func (this *contentC) SavePage_post(ctx *web.Context) { partnerId := this.GetPartnerId(ctx) r := ctx.Request r.ParseForm() var result gof.Message e := content.ValuePage{} web.ParseFormToEntity(r.Form, &e) //更新 e.UpdateTime = time.Now().Unix() e.PartnerId = partnerId id, err := dps.ContentService.SavePage(partnerId, &e) if err != nil { result.Message = err.Error() } else { result.Result = true result.Data = id } ctx.Response.JsonOutput(result) }
// 设置值 func (this *Page) SetValue(v *content.ValuePage) error { v.Id = this.GetDomainId() this._value = v return nil }