1
This commit is contained in:
@@ -2194,6 +2194,7 @@ func GetActMtwmVendorSku(ctx *jxcontext.Context, storeID int, keyword string, ac
|
|||||||
}
|
}
|
||||||
|
|
||||||
func DeleteActStoreSkuVendor(ctx *jxcontext.Context, db *dao.DaoDB, actStoreSkuParam []*ActStoreSkuParam) (err error) {
|
func DeleteActStoreSkuVendor(ctx *jxcontext.Context, db *dao.DaoDB, actStoreSkuParam []*ActStoreSkuParam) (err error) {
|
||||||
|
|
||||||
return fmt.Errorf("暂不支持直接取消平台活动,开发中……")
|
return fmt.Errorf("暂不支持直接取消平台活动,开发中……")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -283,36 +283,6 @@ func Init() {
|
|||||||
if beego.BConfig.RunMode != "jxgy" {
|
if beego.BConfig.RunMode != "jxgy" {
|
||||||
ScheduleTimerFunc("RefreshSyncSkuList_tao", func() {
|
ScheduleTimerFunc("RefreshSyncSkuList_tao", func() {
|
||||||
var beijin = []int{
|
var beijin = []int{
|
||||||
669158,
|
|
||||||
668691,
|
|
||||||
668673,
|
|
||||||
668282,
|
|
||||||
667447,
|
|
||||||
667354,
|
|
||||||
667321,
|
|
||||||
667319,
|
|
||||||
667316,
|
|
||||||
667269,
|
|
||||||
667268,
|
|
||||||
667267,
|
|
||||||
667260,
|
|
||||||
667132,
|
|
||||||
667094,
|
|
||||||
667030,
|
|
||||||
666965,
|
|
||||||
666714,
|
|
||||||
666708,
|
|
||||||
666705,
|
|
||||||
103437,
|
|
||||||
103349,
|
|
||||||
103123,
|
|
||||||
103121,
|
|
||||||
103106,
|
|
||||||
103038,
|
|
||||||
103028,
|
|
||||||
103019,
|
|
||||||
102831,
|
|
||||||
102751,
|
|
||||||
102683,
|
102683,
|
||||||
102542,
|
102542,
|
||||||
102514,
|
102514,
|
||||||
@@ -359,6 +329,84 @@ func Init() {
|
|||||||
100082,
|
100082,
|
||||||
100079,
|
100079,
|
||||||
100078,
|
100078,
|
||||||
|
669158,
|
||||||
|
668691,
|
||||||
|
668673,
|
||||||
|
668282,
|
||||||
|
667447,
|
||||||
|
667354,
|
||||||
|
667321,
|
||||||
|
667319,
|
||||||
|
667316,
|
||||||
|
667269,
|
||||||
|
667268,
|
||||||
|
667267,
|
||||||
|
667260,
|
||||||
|
667132,
|
||||||
|
667094,
|
||||||
|
667030,
|
||||||
|
666965,
|
||||||
|
666714,
|
||||||
|
666708,
|
||||||
|
666705,
|
||||||
|
103437,
|
||||||
|
103349,
|
||||||
|
103123,
|
||||||
|
103121,
|
||||||
|
103106,
|
||||||
|
103038,
|
||||||
|
103028,
|
||||||
|
103019,
|
||||||
|
102831,
|
||||||
|
102751,
|
||||||
|
//上海
|
||||||
|
668462,
|
||||||
|
668276,
|
||||||
|
668180,
|
||||||
|
667320,
|
||||||
|
667237,
|
||||||
|
667231,
|
||||||
|
667068,
|
||||||
|
667036,
|
||||||
|
666678,
|
||||||
|
103191,
|
||||||
|
103074,
|
||||||
|
103065,
|
||||||
|
103051,
|
||||||
|
103050,
|
||||||
|
103037,
|
||||||
|
103029,
|
||||||
|
103018,
|
||||||
|
103002,
|
||||||
|
102999,
|
||||||
|
102969,
|
||||||
|
102966,
|
||||||
|
102951,
|
||||||
|
102946,
|
||||||
|
102939,
|
||||||
|
102938,
|
||||||
|
102934,
|
||||||
|
102933,
|
||||||
|
102930,
|
||||||
|
102924,
|
||||||
|
102920,
|
||||||
|
102908,
|
||||||
|
102903,
|
||||||
|
102561,
|
||||||
|
102293,
|
||||||
|
100946,
|
||||||
|
100945,
|
||||||
|
100943,
|
||||||
|
100935,
|
||||||
|
100905,
|
||||||
|
100720,
|
||||||
|
100325,
|
||||||
|
100324,
|
||||||
|
100309,
|
||||||
|
100299,
|
||||||
|
100296,
|
||||||
|
100292,
|
||||||
|
100290,
|
||||||
}
|
}
|
||||||
syncStoreSkuTao(beijin)
|
syncStoreSkuTao(beijin)
|
||||||
}, []string{
|
}, []string{
|
||||||
|
|||||||
@@ -523,14 +523,14 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
isMerchantCancel := false
|
//isMerchantCancel := false
|
||||||
// 获取发起取消的人员
|
//// 获取发起取消的人员
|
||||||
for _, v := range statusList {
|
//for _, v := range statusList {
|
||||||
if v.VendorStatus == utils.Int64ToStr(model.WaybillStatusCancel) {
|
// if v.VendorStatus == utils.Int64ToStr(model.WaybillStatusCancel) {
|
||||||
isMerchantCancel = true // 商户取消
|
// isMerchantCancel = true // 商户取消
|
||||||
break
|
// break
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
bill, err := partner.CurOrderManager.LoadWaybill(deliverId, model.VendorIDMTPS)
|
bill, err := partner.CurOrderManager.LoadWaybill(deliverId, model.VendorIDMTPS)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -549,17 +549,17 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
|
|||||||
}
|
}
|
||||||
// 到店
|
// 到店
|
||||||
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusPickedUp) {
|
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusPickedUp) {
|
||||||
if isMerchantCancel {
|
//if isMerchantCancel {
|
||||||
return bill.DesiredFee, nil
|
return bill.DesiredFee, nil
|
||||||
}
|
//}
|
||||||
return 0, nil
|
//return 0, nil
|
||||||
}
|
}
|
||||||
// 接单
|
// 接单
|
||||||
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusAccepted) {
|
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusAccepted) {
|
||||||
if isMerchantCancel {
|
//if isMerchantCancel {
|
||||||
return 200, nil
|
return 200, nil
|
||||||
}
|
//}
|
||||||
return 0, nil
|
//return 0, nil
|
||||||
}
|
}
|
||||||
// 待调度
|
// 待调度
|
||||||
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusWaitingForSchedule) {
|
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusWaitingForSchedule) {
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ func UpdateTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync
|
|||||||
OuCode: utils.String2Pointer(vendorStoreID),
|
OuCode: utils.String2Pointer(vendorStoreID),
|
||||||
SkuCode: utils.String2Pointer(utils.Int2Str(v.SkuID)),
|
SkuCode: utils.String2Pointer(utils.Int2Str(v.SkuID)),
|
||||||
SkuName: utils.String2Pointer(checkNameLength(v.SkuName)),
|
SkuName: utils.String2Pointer(checkNameLength(v.SkuName)),
|
||||||
MemberPrice: price,
|
MemberPrice: utils.String2Pointer("0"),
|
||||||
SkuPrice: price, // 优先使用skuPrice 靠后SalePrice
|
SkuPrice: price, // 优先使用skuPrice 靠后SalePrice
|
||||||
SuggestedPrice: price, // 优先使用skuPrice 靠后SalePrice
|
SuggestedPrice: price, // 优先使用skuPrice 靠后SalePrice
|
||||||
CategoryCode: utils.String2Pointer(utils.Int2Str(v.CategoryID)),
|
CategoryCode: utils.String2Pointer(utils.Int2Str(v.CategoryID)),
|
||||||
@@ -256,19 +256,6 @@ func UpdateTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync
|
|||||||
}
|
}
|
||||||
updateSku.SkuPicUrls = uploadImg(api, []string{v.Img, v.Img2, v.Img3, v.Img4, v.Img5, v.DescImg})
|
updateSku.SkuPicUrls = uploadImg(api, []string{v.Img, v.Img2, v.Img3, v.Img4, v.Img5, v.DescImg})
|
||||||
updateSkuList = append(updateSkuList, updateSku)
|
updateSkuList = append(updateSkuList, updateSku)
|
||||||
//if (index+model.YES)%tao_vegetable.MAXHandleCount == model.NO || index+model.YES == totalCount {
|
|
||||||
// param.ParamList = &updateSkuList
|
|
||||||
// result, err := api.UpdateStoreSku(param)
|
|
||||||
// if err != nil {
|
|
||||||
// globals.SugarLogger.Debugf("UpdateStoreSku Tao Vegetable err : %s", err.Error())
|
|
||||||
// }
|
|
||||||
// // 记录失败的同步数据
|
|
||||||
// createFailedList, _ := SelectStoreSkuListByFoodList(storeSkuList, *result, storeID, model.VendorChineseNames[model.VendorIDTaoVegetable], syncType)
|
|
||||||
// failedList = append(failedList, createFailedList...)
|
|
||||||
// // 记录同步成功的数据
|
|
||||||
// param.ParamList = nil
|
|
||||||
// updateSkuList = make([]domain585.AlibabaWdkSkuUpdateSkuDo, 0, 0)
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
param.ParamList = &updateSkuList
|
param.ParamList = &updateSkuList
|
||||||
@@ -311,9 +298,9 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku
|
|||||||
SubTitle: utils.String2Pointer("小时达"),
|
SubTitle: utils.String2Pointer("小时达"),
|
||||||
SubTitle1: utils.String2Pointer("一小时速达"),
|
SubTitle1: utils.String2Pointer("一小时速达"),
|
||||||
//DeliveryUnit: utils.String2Pointer(storeSku.Unit),
|
//DeliveryUnit: utils.String2Pointer(storeSku.Unit),
|
||||||
DeliveryUnit: utils.String2Pointer("份"),
|
DeliveryUnit: utils.String2Pointer("份"),
|
||||||
DeliverySpec: utils.String2Pointer(utils.Int2Str(model.YES)),
|
DeliverySpec: utils.String2Pointer(utils.Int2Str(model.YES)),
|
||||||
MemberPrice: price,
|
//MemberPrice: price,
|
||||||
Storage: utils.String2Pointer(tao_vegetable.CreateStorage),
|
Storage: utils.String2Pointer(tao_vegetable.CreateStorage),
|
||||||
PickFloatRate: utils.String2Pointer(utils.Int2Str(model.NO)), // ? 0
|
PickFloatRate: utils.String2Pointer(utils.Int2Str(model.NO)), // ? 0
|
||||||
ForbidReceiveDays: utils.Int64ToPointer(tao_vegetable.CreateShelfLife), // ? 7
|
ForbidReceiveDays: utils.Int64ToPointer(tao_vegetable.CreateShelfLife), // ? 7
|
||||||
@@ -592,23 +579,10 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
|
|||||||
SkuPrice: price,
|
SkuPrice: price,
|
||||||
CleanSkuMemberPrice: utils.Int64ToPointer(model.YES),
|
CleanSkuMemberPrice: utils.Int64ToPointer(model.YES),
|
||||||
SuggestedPrice: price,
|
SuggestedPrice: price,
|
||||||
MemberPrice: price,
|
MemberPrice: utils.String2Pointer("0"),
|
||||||
SubTitle: utils.String2Pointer("小时达"),
|
SubTitle: utils.String2Pointer("小时达"),
|
||||||
}
|
}
|
||||||
updateSkuList = append(updateSkuList, updateSku)
|
updateSkuList = append(updateSkuList, updateSku)
|
||||||
|
|
||||||
//if (index+model.YES)%tao_vegetable.MAXHandleCount == model.NO || (index+1) == len(storeSkuList) {
|
|
||||||
// param.ParamList = &updateSkuList
|
|
||||||
// result, err := api.UpdateStoreSku(param)
|
|
||||||
// if err != nil {
|
|
||||||
// globals.SugarLogger.Debugf("UpdateStoreSku Tao Vegetable err : %s", err.Error())
|
|
||||||
// }
|
|
||||||
// // 记录失败的同步数据
|
|
||||||
// createFailedList, _ := SelectStoreSkuListByFoodList(storeSkuList, *result, storeID, model.VendorChineseNames[model.VendorIDTaoVegetable], "修改商品价格")
|
|
||||||
// failedList = append(failedList, createFailedList...)
|
|
||||||
// param.ParamList = nil
|
|
||||||
// updateSkuList = make([]domain585.AlibabaWdkSkuUpdateSkuDo, 0, 0)
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
param.ParamList = &updateSkuList
|
param.ParamList = &updateSkuList
|
||||||
result, err := api.UpdateStoreSku(param)
|
result, err := api.UpdateStoreSku(param)
|
||||||
|
|||||||
Reference in New Issue
Block a user