Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -86,7 +86,6 @@ func isCreateOrUpdate(syncStatus int8) bool {
|
||||
|
||||
func createOneShopAct(act *model.Act2, vendorStoreID string, actStoreSku []*model.ActStoreSku2) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||
actData := storeSku2ActData(act, actStoreSku, isCreateOrUpdate)
|
||||
globals.SugarLogger.Debugf("test0129 actData=%s", utils.Format4Output(actData, false))
|
||||
if len(actData) > 0 {
|
||||
if globals.EnableMtwmStoreWrite {
|
||||
actResult, faileInfoList, err2 := api.MtwmAPI.RetailDiscountBatchSave2(vendorStoreID, jxActType2Mtwm(act.Type), actData)
|
||||
@@ -95,7 +94,6 @@ func createOneShopAct(act *model.Act2, vendorStoreID string, actStoreSku []*mode
|
||||
if err2 != nil && strings.Contains(err2.Error(), "未获取有效门店id") {
|
||||
|
||||
temp, err := dao.GetStoreDetailForDD(dao.GetDB(), 0, model.VendorIDMTWM, vendorStoreID, "")
|
||||
globals.SugarLogger.Debugf("createOneShopAct test0130 temp=%s", utils.Format4Output(temp, false))
|
||||
if err == nil {
|
||||
actResult, faileInfoList, err2 = getAPI(temp.VendorOrgCode, 0, vendorStoreID).RetailDiscountBatchSave2(vendorStoreID, jxActType2Mtwm(act.Type), actData)
|
||||
}
|
||||
@@ -176,11 +174,9 @@ func getActStoreSkuFromTaskResult(taskReslt []interface{}) (list []*model.ActSto
|
||||
|
||||
func createSkuAct(ctx *jxcontext.Context, parentTask tasksch.ITask, act *model.Act2, actStoreSku []*model.ActStoreSku2) (createdList []*model.ActStoreSku2, err error) {
|
||||
actStoreSkuListList := partner.SplitActStoreSku2List(actStoreSku)
|
||||
globals.SugarLogger.Debugf("createSkuAct test0129 actStoreSkuListList=%s", utils.Format4Output(actStoreSkuListList, false))
|
||||
task := tasksch.NewParallelTask("mtwm createSkuAct", nil, ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
list := batchItemList[0].([]*model.ActStoreSku2)
|
||||
globals.SugarLogger.Debugf("createSkuAct test0129 list=%s", utils.Format4Output(list, false))
|
||||
|
||||
failedList, err2 := createOneShopAct(act, list[0].VendorStoreID, list)
|
||||
if err = err2; err2 == nil {
|
||||
|
||||
Reference in New Issue
Block a user