商品价格审核查询增加types
This commit is contained in:
@@ -4482,10 +4482,10 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
|
||||
// globals.SugarLogger.Debugf("doStoreSkuAudit return2 storeID : %v nameID: %v", storeID, skuBindInfo.NameID)
|
||||
// return false, err
|
||||
// }
|
||||
// if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini {
|
||||
// globals.SugarLogger.Debugf("doStoreSkuAudit return3 storeID : %v nameID: %v", storeID, skuBindInfo.NameID)
|
||||
// return false, err
|
||||
// }
|
||||
if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini {
|
||||
globals.SugarLogger.Debugf("doStoreSkuAudit return3 storeID : %v nameID: %v", storeID, skuBindInfo.NameID)
|
||||
return false, err
|
||||
}
|
||||
storeSkuAudit := &model.StoreSkuAudit{
|
||||
StoreID: storeID,
|
||||
NameID: skuBindInfo.NameID,
|
||||
@@ -4545,8 +4545,10 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status,
|
||||
if len(storeAudits) > 1 {
|
||||
return retVal, fmt.Errorf("查询到该门店该商品的待审核信息大于1条!storeID: %v, nameID: %v", storeID, v)
|
||||
}
|
||||
flag := false
|
||||
//审核通过
|
||||
if status == model.StoreAuditStatusCreated {
|
||||
flag = true
|
||||
storeAudits[0].UserID = ctx.GetUserID()
|
||||
storeAudits[0].Status = model.StoreAuditStatusCreated
|
||||
storeAudits[0].Remark = remark
|
||||
@@ -4589,6 +4591,18 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeIDs, nameIDs []int, status,
|
||||
} else {
|
||||
return retVal, fmt.Errorf("审核标志不正确!")
|
||||
}
|
||||
if err == nil {
|
||||
// skuAndNames, err := dao.GetSkus(db, nil, []int{v}, nil, nil, nil)
|
||||
// if len(skuAndNames) > 0 && err == nil {
|
||||
// price := 0
|
||||
// if auditPrice != 0 {
|
||||
// price = auditPrice
|
||||
// } else {
|
||||
// price = storeAudits[0].UnitPrice
|
||||
// }
|
||||
// weixinmsg.NotifyStoreOpRequestStatus(flag, storeID, v, jxutils.ComposeSpuName(skuAndNames[0].Prefix, skuAndNames[0].Name, 0), storeAudits[0].OriginUnitPrice, price, remark)
|
||||
// }
|
||||
}
|
||||
}
|
||||
return retVal, err
|
||||
}, storeIDs)
|
||||
|
||||
Reference in New Issue
Block a user