- fix bug in GetUserInfo and GetSelfInfo
- need token for SendMobileVerifyCode
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user