aa
This commit is contained in:
@@ -1223,6 +1223,15 @@ func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (i
|
||||
PricePercentagePack: "京西100-100",
|
||||
VendorID: model.VendorIDJX,
|
||||
})
|
||||
//尝试把平台负责人加到他自己的权限里
|
||||
if store.MarketManPhone != "" {
|
||||
user, _ := dao.GetUserByID(db, "mobile", store.MarketManPhone)
|
||||
if roles, _ := dao.GetRole(db, user.Name, ""); len(roles) > 0 {
|
||||
role := roles[0]
|
||||
role.StoreIDs = role.StoreIDs + "," + utils.Int2Str(store.ID)
|
||||
dao.UpdateEntity(db, role, "StoreIDs")
|
||||
}
|
||||
}
|
||||
return store.ID, err
|
||||
}
|
||||
return 0, err
|
||||
|
||||
Reference in New Issue
Block a user