修改注册普通用户权限为消费者1,之前是三门店老板和消费者
This commit is contained in:
@@ -159,7 +159,8 @@ func init() {
|
|||||||
func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVerifyCode string, inAuthInfo, manTokenInfo *auth2.AuthInfo) (outAuthInfo *auth2.AuthInfo, err error) {
|
func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVerifyCode string, inAuthInfo, manTokenInfo *auth2.AuthInfo) (outAuthInfo *auth2.AuthInfo, err error) {
|
||||||
var mobileAuth *auth2.AuthInfo
|
var mobileAuth *auth2.AuthInfo
|
||||||
fakeMobile := false
|
fakeMobile := false
|
||||||
user.Type = model.UserTypeConsumer | model.UserTypeStoreBoss // 先不区分商户与消息者
|
//user.Type = model.UserTypeConsumer | model.UserTypeStoreBoss // 先不区分商户与消息者
|
||||||
|
user.Type = model.UserTypeConsumer // 注册用户全是1(消费者)
|
||||||
createName := ctx.GetRealRemoteIP()
|
createName := ctx.GetRealRemoteIP()
|
||||||
authType := auth2.AuthTypeMobile
|
authType := auth2.AuthTypeMobile
|
||||||
if manTokenInfo != nil && mobileVerifyCode == "" {
|
if manTokenInfo != nil && mobileVerifyCode == "" {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package mtps
|
package mtps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
_ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
_ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||||
@@ -35,3 +36,6 @@ func TestCancelWaybill(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test11(t *testing.T) {
|
||||||
|
fmt.Println(1|2)
|
||||||
|
}
|
||||||
@@ -727,7 +727,7 @@ func (c *StoreController) GetStoreCategoryMap() {
|
|||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
_, total, err := dao.GetUsers(dao.GetDB(), 0, "", []string{userAuth.UserID}, nil, nil, 0, 1)
|
_, total, err := dao.GetUsers(dao.GetDB(), 1, "", []string{userAuth.UserID}, nil, nil, 0, 1)
|
||||||
//userRole, err := permission.GetUserRole(params.Ctx, userAuth.UserID)
|
//userRole, err := permission.GetUserRole(params.Ctx, userAuth.UserID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
|
|||||||
Reference in New Issue
Block a user