商品审核修改
This commit is contained in:
@@ -4510,7 +4510,7 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
|
||||
return isAudit, err
|
||||
}
|
||||
|
||||
func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status int, remark string, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
db := dao.GetDB()
|
||||
if status == model.StoreAuditStatusOnline {
|
||||
return "", fmt.Errorf("审核标志不正确!")
|
||||
@@ -4523,6 +4523,9 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status
|
||||
if len(storeAudits) == 0 || err != nil {
|
||||
return retVal, fmt.Errorf("未查询到该门店该商品的待审核信息!storeID: %v, nameID: %v", storeID, v)
|
||||
}
|
||||
if len(storeAudits) > 1 {
|
||||
return retVal, fmt.Errorf("查询到该门店该商品的待审核信息大于1条!storeID: %v, nameID: %v", storeID, v)
|
||||
}
|
||||
//审核通过
|
||||
if status == model.StoreAuditStatusCreated {
|
||||
storeAudits[0].UserID = ctx.GetUserID()
|
||||
@@ -4538,6 +4541,7 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status
|
||||
} else if status == model.StoreAuditStatusRejected {
|
||||
storeAudits[0].UserID = ctx.GetUserID()
|
||||
storeAudits[0].Status = model.StoreAuditStatusRejected
|
||||
storeAudits[0].Remark = remark
|
||||
_, err = dao.UpdateEntity(db, storeAudits[0], "UserID", "Status")
|
||||
} else {
|
||||
return retVal, fmt.Errorf("审核标志不正确!")
|
||||
|
||||
Reference in New Issue
Block a user