50 lines
1.2 KiB
Go
50 lines
1.2 KiB
Go
package bidding
|
|
|
|
import (
|
|
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
|
"git.rosy.net.cn/jx-callback/business/model"
|
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
|
"git.rosy.net.cn/jx-callback/globals"
|
|
"git.rosy.net.cn/jx-callback/globals/api"
|
|
)
|
|
|
|
func GetMTInfo() {
|
|
// 获取当前一月有效订单的门店信息
|
|
effectiveStores, err := dao.StoreInformationStatistics()
|
|
if err != nil {
|
|
return
|
|
}
|
|
|
|
var mtApi *mtwmapi.API
|
|
for _, v := range effectiveStores {
|
|
if v.VendorOrgCode == globals.Mtwm2Code {
|
|
mtApi = api.Mtwm2API
|
|
mtApi.SetToken(v.MtwmToken)
|
|
} else {
|
|
mtApi = api.MtwmAPI
|
|
}
|
|
|
|
statistics := &model.ActivityStation{
|
|
StoreID: v.JxStoreID,
|
|
VendorID: model.VendorIDMTWM,
|
|
VendorStoreID: v.VendorStoreID,
|
|
BrandID: v.VendorOrgCode,
|
|
Activity1: 0,
|
|
Activity2: 0,
|
|
Activity: 0,
|
|
StoreSkuNum: 0,
|
|
StoreRating: "",
|
|
DeliveryFee: "",
|
|
DeliveryFee2: "",
|
|
PromotionFee: "",
|
|
BusinessHours: "",
|
|
}
|
|
dao.WrapAddIDCULEntity(statistics, "system")
|
|
// 获取美团活动
|
|
mtApi.RetailDiscountList(v.VendorStoreID, mtwmapi.RetailActTypeDirectDown) // 折扣活动
|
|
mtApi.RetailDiscountList(v.VendorStoreID, mtwmapi.RetailActTypeSecKill) // 爆品活动
|
|
|
|
}
|
|
|
|
}
|