完善审核门店
This commit is contained in:
@@ -14,6 +14,8 @@ import (
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/authz"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/yinbaoapi"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/refutil"
|
||||
@@ -3616,8 +3618,16 @@ func StoreAudit(ctx *jxcontext.Context, storeAudits []*model.StoreAudit, status
|
||||
if status == model.StoreAuditStatusCreated {
|
||||
storeAudits[0].AuditStatus = model.StoreAuditStatusCreated
|
||||
//添加门店
|
||||
|
||||
// CreateStore(ctx, storeExt, ctx.GetUserName())
|
||||
storeExt := &StoreExt{}
|
||||
utils.Map2StructByJson(utils.Struct2MapByJson(&storeAudit), &storeExt, false)
|
||||
storeID, err := CreateStore(ctx, storeExt, ctx.GetUserName())
|
||||
if err != nil {
|
||||
return retVal, fmt.Errorf(err.Error())
|
||||
}
|
||||
err = AddUsers4Role(ctx, autils.NewRole(authz.StoreRoleBoss, storeID), []string{storeAudit.UserID})
|
||||
if err != nil {
|
||||
return retVal, fmt.Errorf(err.Error())
|
||||
}
|
||||
} else if status == model.StoreAuditStatusRejected {
|
||||
storeAudits[0].Status = model.StoreAuditStatusRejected
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user