示例#1
0
// 保存邮箱模版
func (this *MssManager) SaveMailTemplate(v *mss.MailTemplate) (int, error) {
	v.PartnerId = this._partner.GetAggregateRootId()
	v.UpdateTime = time.Now().Unix()
	if v.CreateTime == 0 {
		v.CreateTime = v.UpdateTime
	}
	return this._mssRep.SaveMailTemplate(v)
}
示例#2
0
文件: mss_c.go 项目: henrylee2cn/go2o
// 保存邮件模板
func (this *mssC) Save_mail_tpl_post(ctx *web.Context) {
	partnerId := this.GetPartnerId(ctx)
	r := ctx.Request
	r.ParseForm()

	var result gof.Message

	e := mss.MailTemplate{}
	web.ParseFormToEntity(r.Form, &e)

	//更新
	e.PartnerId = partnerId

	id, err := dps.PartnerService.SaveMailTemplate(partnerId, &e)

	if err != nil {
		result.Message = err.Error()
	} else {
		result.Result = true
		result.Data = id
	}
	ctx.Response.JsonOutput(result)
}