// 保存邮箱模版 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) }
// 保存邮件模板 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) }