diff --git a/src/gonganxitong/apply.go b/src/gonganxitong/apply.go index 724aa9a..2edb6e0 100644 --- a/src/gonganxitong/apply.go +++ b/src/gonganxitong/apply.go @@ -33,7 +33,7 @@ func (s apply) Create(m *ice.Message, arg ...string) { USER_PLACE_ROLE := s.Keys(s.UserPlace, model.ROLE) arg = kit.TransArgKeys(arg, PLACE_UID, model.PLACE_UID) arg = kit.TransArgKeys(arg, USER_PLACE_ROLE, model.ROLE) - s.Table.Create(m, kit.Simple(model.PLACE_UID, m.Option(PLACE_UID), arg, m.OptionSimple(model.USER_UID), model.TABLES, PLACE_UID, model.STATUS, ApplyCreate)...) + s.Table.Create(m, kit.Simple(model.PLACE_UID, m.Option(PLACE_UID), arg, m.OptionSimple(model.USER_UID), model.STATUS, ApplyCreate)...) m.ProcessRewrite(model.UID, m.Result()) } func (s apply) List(m *ice.Message, arg ...string) { diff --git a/src/gonganxitong/portal.shy b/src/gonganxitong/portal.shy index 2c843dd..42617c0 100644 --- a/src/gonganxitong/portal.shy +++ b/src/gonganxitong/portal.shy @@ -9,6 +9,7 @@ field web.chat.wx.menu field web.code.mysql.client field web.code.mysql.query args `mysql gonganxitong` field web.code.db.models +field web.code.db.mysql order ` sess.go user.go diff --git a/src/gonganxitong/user.go b/src/gonganxitong/user.go index 8f317e0..b24d46a 100644 --- a/src/gonganxitong/user.go +++ b/src/gonganxitong/user.go @@ -16,11 +16,15 @@ type user struct { Table community string `data:"20240724-community"` template string `data:"4b-Z_r8dZmm1pHdd2h4A10VVYX4OIHvemlLjsHKBj2s"` - create string `name:"create open_id* name usernick"` + create string `name:"create open_id* usernick avatar"` email string `name:"email email*"` } func (s user) Create(m *ice.Message, arg ...string) { + if m.IsTech() { + m.OptionDefault(aaa.AVATAR, m.Option(ice.MSG_AVATAR)) + m.OptionDefault(aaa.USERNICK, m.Option(ice.MSG_USERNICK)) + } if s.Table.Select(m, m.OptionSimple(model.OPEN_ID)...).Length() == 0 { s.Table.Create(m, kit.Simple(m.OptionSimple(model.OPEN_ID, model.AVATAR), model.NAME, m.Option(aaa.USERNICK))...) m.Option(model.USER_UID, m.Result())