aa
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtpsapi"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -1924,36 +1923,6 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
// dao.UpdateEntity(db, v, "ConsigneeMobile2")
|
||||
// }
|
||||
//}
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
courierStoreList, _ := dao.GetStoreCourierList(db, nil, []int{model.VendorIDMTPS}, model.StoreStatusAll, model.StoreAuditStatusAll)
|
||||
task := tasksch.NewParallelTask("uuuuuu", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
courierStore := batchItemList[0].(*model.StoreCourierMap)
|
||||
storeDetail, _ := dao.GetStoreDetail(db, courierStore.StoreID, model.VendorIDJX, "")
|
||||
result, _ := api.MtpsAPI.GetStoreInfoByID(utils.Str2Int(courierStore.VendorStoreID))
|
||||
name := fmt.Sprintf("%s-%s-%s", globals.StoreName, storeDetail.CityName, storeDetail.Name)
|
||||
if result != nil {
|
||||
if result.PoiName != name {
|
||||
shopInfo := &mtpsapi.ShopInfo{
|
||||
ShopID: utils.Int2Str(storeDetail.ID),
|
||||
ShopName: name,
|
||||
}
|
||||
api.MtpsAPI.ShopUpdate(shopInfo)
|
||||
}
|
||||
if result.OpenType != courierStore.VendorStatus {
|
||||
courierStore.VendorStatus = result.OpenType
|
||||
dao.UpdateEntity(db, courierStore, "VendorStatus")
|
||||
}
|
||||
} else {
|
||||
courierStore.VendorStatus = 0
|
||||
dao.UpdateEntity(db, courierStore, "VendorStatus")
|
||||
}
|
||||
return retVal, err
|
||||
}, courierStoreList)
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
task.GetID()
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user