1
This commit is contained in:
@@ -1744,6 +1744,7 @@ func UpdateStoresSkus(ctx *jxcontext.Context, causeFlag int, storeIDs []int, sku
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag, _ := doStoreSkuAudit(ctx, storeIDs, skuBindInfos)
|
flag, _ := doStoreSkuAudit(ctx, storeIDs, skuBindInfos)
|
||||||
|
globals.SugarLogger.Debugf("========falg := %s", utils.Format4Output(flag, false))
|
||||||
if !flag {
|
if !flag {
|
||||||
var num int64
|
var num int64
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
@@ -5908,7 +5909,7 @@ func GetStoreSkuAudit(ctx *jxcontext.Context, storeIDs, nameIDs, skuIDs, statuss
|
|||||||
}
|
}
|
||||||
|
|
||||||
func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*StoreSkuBindInfo) (isAudit bool, err error) {
|
func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*StoreSkuBindInfo) (isAudit bool, err error) {
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second / 5)
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
for _, storeID := range storeIDs {
|
for _, storeID := range storeIDs {
|
||||||
stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, nil, "")
|
stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, nil, "")
|
||||||
@@ -5925,9 +5926,12 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
globals.SugarLogger.Debugf("-------------- %s", utils.Format4Output(ctx.GetLoginType(), false))
|
||||||
if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini && ctx.GetLoginType() != weixin.AuthTypeWxApp && ctx.GetLoginType() != weixin.AuthTypeWxAppCaishi && ctx.GetLoginType() != auth2.AuthTypeMobile {
|
if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini && ctx.GetLoginType() != weixin.AuthTypeWxApp && ctx.GetLoginType() != weixin.AuthTypeWxAppCaishi && ctx.GetLoginType() != auth2.AuthTypeMobile {
|
||||||
authInfo, err := ctx.GetV2AuthInfo()
|
authInfo, err := ctx.GetV2AuthInfo()
|
||||||
|
globals.SugarLogger.Debugf("------------authInfo-- %s", utils.Format4Output(authInfo, false))
|
||||||
if err == nil && authInfo != nil && (ctx.GetFullUser().Type&model.UserTypeOperator) != 0 {
|
if err == nil && authInfo != nil && (ctx.GetFullUser().Type&model.UserTypeOperator) != 0 {
|
||||||
|
globals.SugarLogger.Debugf("------------storeAudits-- %s", utils.Format4Output(storeAudits, false))
|
||||||
if len(storeAudits) > 0 {
|
if len(storeAudits) > 0 {
|
||||||
storeAudits[0].DeletedAt = time.Now()
|
storeAudits[0].DeletedAt = time.Now()
|
||||||
dao.UpdateEntity(db, storeAudits[0], "DeletedAt")
|
dao.UpdateEntity(db, storeAudits[0], "DeletedAt")
|
||||||
@@ -5941,6 +5945,8 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("-22222------------- %s", utils.Format4Output(ctx.GetLoginType(), false))
|
||||||
|
|
||||||
storeSkuAudit := &model.StoreSkuAudit{
|
storeSkuAudit := &model.StoreSkuAudit{
|
||||||
StoreID: storeID,
|
StoreID: storeID,
|
||||||
NameID: skuBindInfo.NameID,
|
NameID: skuBindInfo.NameID,
|
||||||
|
|||||||
Reference in New Issue
Block a user