修改注册普通用户权限为消费者1,之前是三门店老板和消费者

This commit is contained in:
邹宗楠
2022-05-18 15:07:28 +08:00
parent 5fb999840e
commit 4a619ade8c
3 changed files with 7 additions and 2 deletions

View File

@@ -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 == "" {

View File

@@ -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)
}

View File

@@ -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