Merge remote-tracking branch 'origin/jdshop' into jxact

This commit is contained in:
苏尹岚
2020-08-24 10:21:27 +08:00
5 changed files with 26 additions and 15 deletions

View File

@@ -1159,6 +1159,10 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
} else {
err = ErrCanNotFindVendor
}
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(db, storeMap.VendorStoreID, storeMap.VendorID)
if storeDetail != nil {
return nil, fmt.Errorf("此平台门店ID已在京西有绑定请先解除绑定平台门店ID :[%v]", storeMap.VendorStoreID)
}
} else if vendorID == model.VendorIDJX {
ReCalculateJxPriceLight(db, ctx, storeID)
} else if vendorID == model.VendorIDYB {

View File

@@ -4644,18 +4644,21 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
// return false, err
// }
if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini {
if len(storeAudits) > 0 {
storeAudits[0].DeletedAt = time.Now()
dao.UpdateEntity(db, storeAudits[0], "DeletedAt")
// if globals.IsProductEnv() {
// skuAndNames, err := dao.GetSkus(db, nil, []int{skuBindInfo.NameID}, nil, nil, nil)
// if len(skuAndNames) > 0 && err == nil {
// weixinmsg.NotifyStoreOpRequestStatus(true, storeID, skuBindInfo.NameID, jxutils.ComposeSpuName(skuAndNames[0].Prefix, skuAndNames[0].Name, 0), storeAudits[0].OriginUnitPrice, skuBindInfo.UnitPrice, "")
// }
// }
authInfo, err := ctx.GetV2AuthInfo()
if err == nil && authInfo != nil {
if len(storeAudits) > 0 {
storeAudits[0].DeletedAt = time.Now()
dao.UpdateEntity(db, storeAudits[0], "DeletedAt")
// if globals.IsProductEnv() {
// skuAndNames, err := dao.GetSkus(db, nil, []int{skuBindInfo.NameID}, nil, nil, nil)
// if len(skuAndNames) > 0 && err == nil {
// weixinmsg.NotifyStoreOpRequestStatus(true, storeID, skuBindInfo.NameID, jxutils.ComposeSpuName(skuAndNames[0].Prefix, skuAndNames[0].Name, 0), storeAudits[0].OriginUnitPrice, skuBindInfo.UnitPrice, "")
// }
// }
}
globals.SugarLogger.Debugf("doStoreSkuAudit return3 storeID : %v nameID: %v", storeID, skuBindInfo.NameID)
return false, err
}
globals.SugarLogger.Debugf("doStoreSkuAudit return3 storeID : %v nameID: %v", storeID, skuBindInfo.NameID)
return false, err
}
storeSkuAudit := &model.StoreSkuAudit{
StoreID: storeID,