商品审核查询修改
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)
|
||||
|
||||
@@ -847,7 +847,7 @@ func (c *StoreSkuController) GetStoreSkuAudit() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeIDs formData string false "门店ID列表"
|
||||
// @Param nameIDs formData string false "id列表对象,当前指skuname id"
|
||||
// @Param auditPrice formData string false "录入的审核价格"
|
||||
// @Param auditPrice formData int false "录入的审核价格"
|
||||
// @Param status formData int false "审核标志,1通过,-1 不通过"
|
||||
// @Param remark formData string false "审核不通过原因"
|
||||
// @Param isAsync formData bool false "是否异步,缺省是同步"
|
||||
@@ -861,7 +861,7 @@ func (c *StoreSkuController) StoreSkuPriceAudit() {
|
||||
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.NameIDs, &nameIDs); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = cms.StoreSkuPriceAudit(params.Ctx, storeIDs, nameIDs, params.Status, params.Remark, params.IsAsync, params.IsContinueWhenError)
|
||||
retVal, err = cms.StoreSkuPriceAudit(params.Ctx, storeIDs, nameIDs, params.Status, params.AuditPrice, params.Remark, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user