This commit is contained in:
邹宗楠
2023-07-25 09:31:37 +08:00
parent 16f3f9d22e
commit 5618869ee2
2 changed files with 91 additions and 86 deletions

View File

@@ -2030,27 +2030,27 @@ func RrefreshMtwmVendorAct(ctx *jxcontext.Context) (err error) {
if len(actList) > 0 {
for _, act := range actList {
if act.Status > 0 {
//if checkActStoreSkuExist(db, storeMap.StoreID, utils.Str2Int(act.AppFoodCode), model.VendorIDMTWM, utils.Timestamp2Time(act.StartTime), utils.Timestamp2Time(act.EndTime)) {
actVendor := &model.ActMtwmVendor{
StoreID: storeMap.StoreID,
SkuID: utils.Str2Int(act.AppFoodCode),
VendorStoreID: storeMap.VendorStoreID,
ActType: v,
BeginAt: utils.Timestamp2Time(act.StartTime),
EndAt: utils.Timestamp2Time(act.EndTime),
SkuName: act.Name,
OriginPrice: act.OriginalPrice,
ActPrice: act.ActPrice,
DiscountCoefficient: act.DiscountCoefficient,
Status: act.Status,
ItemID: utils.Int64ToStr(act.ItemID),
OrderLimit: act.OrderLimit,
Period: act.Period,
WeeksTime: act.WeeksTime,
SettingType: act.SettingType,
if checkActStoreSkuExist(db, storeMap.StoreID, utils.Str2Int(act.AppFoodCode), model.VendorIDMTWM, utils.Timestamp2Time(act.StartTime), utils.Timestamp2Time(act.EndTime)) {
actVendor := &model.ActMtwmVendor{
StoreID: storeMap.StoreID,
SkuID: utils.Str2Int(act.AppFoodCode),
VendorStoreID: storeMap.VendorStoreID,
ActType: v,
BeginAt: utils.Timestamp2Time(act.StartTime),
EndAt: utils.Timestamp2Time(act.EndTime),
SkuName: act.Name,
OriginPrice: act.OriginalPrice,
ActPrice: act.ActPrice,
DiscountCoefficient: act.DiscountCoefficient,
Status: act.Status,
ItemID: utils.Int64ToStr(act.ItemID),
OrderLimit: act.OrderLimit,
Period: act.Period,
WeeksTime: act.WeeksTime,
SettingType: act.SettingType,
}
dao.CreateEntity(db, actVendor)
}
dao.CreateEntity(db, actVendor)
//}
}
}
}