diff --git a/business/jxstore/cms/user.go b/business/jxstore/cms/user.go index cbb3dc846..86372239c 100644 --- a/business/jxstore/cms/user.go +++ b/business/jxstore/cms/user.go @@ -40,7 +40,7 @@ func GetStoreUsers(ctx *jxcontext.Context, storeID int) (storeUserInfos []*Store func GetUserInfo(ctx *jxcontext.Context, mobile string) (storeUserInfo *StoreUserInfo, err error) { sql := ` - SELECT t1.id, t1.jxstoreid, t1.openid, t1.tel, t1.nickname, t1.parentid, t3.tel parent_mobile, + SELECT t1.id, IF(t3.id IS NULL, t1.jxstoreid, t3.jxstoreid) jxstoreid, t1.openid, t1.tel, t1.nickname, t1.parentid, t3.tel parent_mobile, CONCAT("[", GROUP_CONCAT(CONCAT('{"id":', t2.id, ',"openID":"', IF(t2.openid IS NULL, "", t2.openid), '","tel":"', t2.tel, '","nickname":"', IF(t2.nickname IS NULL, "", t2.nickname), '"}')), "]") members_str FROM weixins t1 LEFT JOIN weixins t2 ON t2.parentid = t1.id @@ -59,7 +59,7 @@ func GetUserInfo(ctx *jxcontext.Context, mobile string) (storeUserInfo *StoreUse func GetSelfInfo(ctx *jxcontext.Context, openID string) (storeUserInfo *StoreUserInfo, err error) { sql := ` - SELECT t1.id, t1.jxstoreid, t1.openid, t1.tel, t1.nickname, t1.parentid, t3.tel parent_mobile, + SELECT t1.id, IF(t3.id IS NULL, t1.jxstoreid, t3.jxstoreid) jxstoreid, t1.openid, t1.tel, t1.nickname, t1.parentid, t3.tel parent_mobile, CONCAT("[", GROUP_CONCAT(CONCAT('{"id":', t2.id, ',"openID":"', IF(t2.openid IS NULL, "", t2.openid), '","tel":"', t2.tel, '","nickname":"', IF(t2.nickname IS NULL, "", t2.nickname), '"}')), "]") members_str FROM weixins t1 LEFT JOIN weixins t2 ON t2.parentid = t1.id diff --git a/controllers/auth_controller.go b/controllers/auth_controller.go index 6189260f3..9e7580ebc 100644 --- a/controllers/auth_controller.go +++ b/controllers/auth_controller.go @@ -106,6 +106,7 @@ func (c *AuthController) GetUserInfo() { // @Title 发送验证码 // @Description 发送验证码 +// @Param token header string true "认证token" // @Param mobile formData string true "手机号" // @Success 200 {object} controllers.CallResult // @Failure 200 {object} controllers.CallResult