aa
This commit is contained in:
@@ -2003,25 +2003,28 @@ func RrefreshMtwmVendorAct(ctx *jxcontext.Context) (err error) {
|
||||
if actList, _ := mtapi.RetailDiscountList(storeMap.VendorStoreID, k); len(actList) > 0 {
|
||||
for _, act := range actList {
|
||||
if act.Status > 0 {
|
||||
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 actSkus, _ := dao.GetEffectiveActStoreSkuInfo(db, 0, []int{model.VendorIDMTWM}, model.ActTypeAll, []int{storeMap.StoreID},
|
||||
[]int{utils.Str2Int(act.AppFoodCode)}, utils.Timestamp2Time(act.StartTime), utils.Timestamp2Time(act.EndTime)); len(actSkus) == 0 {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user