本文整理汇总了Golang中go2o/src/core/domain/interface/member.ValueMember.Id方法的典型用法代码示例。如果您正苦于以下问题:Golang ValueMember.Id方法的具体用法?Golang ValueMember.Id怎么用?Golang ValueMember.Id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类go2o/src/core/domain/interface/member.ValueMember
的用法示例。
在下文中一共展示了ValueMember.Id方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Profile_post
func (this *basicC) Profile_post(ctx *web.Context) {
mm := this.GetMember(ctx)
r := ctx.Request
var result gof.Message
r.ParseForm()
clientM := new(member.ValueMember)
web.ParseFormToEntity(r.Form, clientM)
clientM.Id = mm.Id
_, err := dps.MemberService.SaveMember(clientM)
if err != nil {
result = gof.Message{Result: false, Message: err.Error()}
} else {
result = gof.Message{Result: true}
}
ctx.Response.JsonOutput(result)
}
示例2: Profile_post
func (this *basicC) Profile_post(ctx *web.Context) {
mm := this.GetMember(ctx)
r, w := ctx.Request, ctx.ResponseWriter
var result gof.Message
r.ParseForm()
clientM := new(member.ValueMember)
web.ParseFormToEntity(r.Form, clientM)
clientM.Id = mm.Id
_, err := goclient.Member.SaveMember(clientM, mm.DynamicToken)
if err != nil {
result = gof.Message{Result: false, Message: err.Error()}
} else {
result = gof.Message{Result: true}
}
w.Write(result.Marshal())
}
示例3: Profile_post
func (this *basicC) Profile_post(ctx *web.Context) {
mm := this.GetMember(ctx)
r := ctx.Request
var result gof.Message
r.ParseForm()
m := new(member.ValueMember)
web.ParseFormToEntity(r.Form, m)
m.Id = mm.Id
_, err := dps.MemberService.SaveMember(m)
if err != nil {
result.Message = err.Error()
} else {
result.Result = true
this.ReCacheMember(ctx, m.Id)
}
ctx.Response.JsonOutput(result)
}
示例4: SaveMember
func (this *Member) SaveMember(m *jsv.Args, r *jsv.Result) error {
memberId, err := Verify(m)
if err != nil {
return err
}
var e member.ValueMember
err = jsv.UnmarshalMap((*m)["json"], &e)
if err != nil {
return err
}
e.Id = memberId
_, err = dps.MemberService.SaveMember(&e)
if err != nil {
jsv.LogErr(err)
r.Message = err.Error()
} else {
r.Result = true
}
return nil
}