饿鲜达商品库合并测试,订单分账修改
This commit is contained in:
@@ -201,6 +201,17 @@ func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVeri
|
||||
user.Avatar = inAuthInfo.GetAvatar()
|
||||
}
|
||||
}
|
||||
//注册时默认商城用户就加入分账接收方
|
||||
if strings.Contains(ctx.GetRequest().Referer(), "wx4b5930c13f8b1170") {
|
||||
param := &wxpayapi.ProfitSharingReceiverParam{
|
||||
Receiver: wxpayapi.CData(`{
|
||||
"type":"` + wxpayapi.AccountTypeOpen + `",
|
||||
"account":"` + inAuthInfo.GetAuthID() + `",
|
||||
"relation_type":" ` + wxpayapi.Relation + `"
|
||||
}`),
|
||||
}
|
||||
_, err = api.WxpayAPI.AddProfitSharingReceiver(param)
|
||||
}
|
||||
if err = CreateUser(user, utils.LimitUTF8StringLen(createName, 32)); err == nil {
|
||||
userProvider.UpdateLastLogin(user.GetID(), authType, ctx.GetRealRemoteIP())
|
||||
TryAddStoreBossRole4User(ctx, user)
|
||||
@@ -380,6 +391,7 @@ func CreateUser(user *model.User, creatorName string) (err error) {
|
||||
dao.WrapAddIDCULDEntity(user, creatorName)
|
||||
user.UserID = utils.GetUUID()
|
||||
user.Status = model.UserStatusNormal
|
||||
user.DividePercentage = 5
|
||||
return dao.CreateEntity(nil, user)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user