商品审核查询修改
This commit is contained in:
@@ -4530,7 +4530,7 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
|
||||
return isAudit, err
|
||||
}
|
||||
|
||||
func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status int, remark string, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status, auditPrice int, remark string, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
db := dao.GetDB()
|
||||
if status == model.StoreAuditStatusOnline {
|
||||
return "", fmt.Errorf("审核标志不正确!")
|
||||
@@ -4551,13 +4551,22 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status
|
||||
storeAudits[0].UserID = ctx.GetUserID()
|
||||
storeAudits[0].Status = model.StoreAuditStatusCreated
|
||||
storeAudits[0].Remark = remark
|
||||
_, err = dao.UpdateEntity(db, storeAudits[0], "UserID", "Status", "Remark")
|
||||
storeAudits[0].AuditPrice = auditPrice
|
||||
_, err = dao.UpdateEntity(db, storeAudits[0], "UserID", "Status", "Remark", "AuditPrice")
|
||||
var skuBindInfos = []*StoreSkuBindInfo{
|
||||
&StoreSkuBindInfo{
|
||||
NameID: v,
|
||||
UnitPrice: storeAudits[0].UnitPrice,
|
||||
},
|
||||
}
|
||||
//证明填了额外的审核价格
|
||||
if auditPrice != 0 {
|
||||
skuBindInfos[0].UnitPrice = auditPrice
|
||||
}
|
||||
//如果是关注改价
|
||||
if storeAudits[0].Type == model.StoreSkuAuditTypeFocus {
|
||||
skuBindInfos[0].IsFocus = 1
|
||||
}
|
||||
var num int64
|
||||
db := dao.GetDB()
|
||||
skuIDs, err := updateStoresSkusWithoutSync(ctx, db, storeIDs, skuBindInfos, false)
|
||||
|
||||
Reference in New Issue
Block a user