导出饿百健康用户修改
This commit is contained in:
@@ -1711,6 +1711,25 @@ func formalizeStore4Courier(storeDetail *dao.StoreDetail2) *dao.StoreDetail2 {
|
|||||||
return storeDetail
|
return storeDetail
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type EbaiStoreHealthy struct {
|
||||||
|
RealShopID int `json:"门店ID"`
|
||||||
|
MerchantID int `json:"平台门店ID"`
|
||||||
|
MerchantName string `json:"平台门店名"`
|
||||||
|
SkuNum int `json:"日均在架且有库存的商品数"`
|
||||||
|
IsSku int `json:"商品数是否达标"`
|
||||||
|
HasPhotoRate string `json:"有图率"`
|
||||||
|
IsYoutu int `json:"有图率是否达标"`
|
||||||
|
Hours float64 `json:"日均营业时长"`
|
||||||
|
IsYinye int `json:"营业时长是否达标"`
|
||||||
|
UnvalidOrderNum int `json:"商家原因取消订单数"`
|
||||||
|
IsJiedan int `json:"取消数是否达标"`
|
||||||
|
BadOrderRate string `json:"差评订单率"`
|
||||||
|
IsCp int `json:"差评率是否达标"`
|
||||||
|
RestaurantSubsidy float64 `json:"商家补贴金额(元)"`
|
||||||
|
IsButie int `json:"补贴是否达标"`
|
||||||
|
IsHealthy int `json:"商户是否健康"`
|
||||||
|
}
|
||||||
|
|
||||||
func ExportShopsHealthInfo(ctx *jxcontext.Context, vendorIDs, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
func ExportShopsHealthInfo(ctx *jxcontext.Context, vendorIDs, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
vendorID := model.VendorIDEBAI
|
vendorID := model.VendorIDEBAI
|
||||||
@@ -1751,18 +1770,32 @@ func ExportShopsHealthInfo(ctx *jxcontext.Context, vendorIDs, storeIDs []int, is
|
|||||||
mapInfo["real_shop_id"] = storeMap2[utils.Interface2String(mapInfo["merchant_id"])].StoreID
|
mapInfo["real_shop_id"] = storeMap2[utils.Interface2String(mapInfo["merchant_id"])].StoreID
|
||||||
healthInfoList2 = append(healthInfoList2, mapInfo)
|
healthInfoList2 = append(healthInfoList2, mapInfo)
|
||||||
}
|
}
|
||||||
|
var healthyList []*EbaiStoreHealthy
|
||||||
|
for _, v := range healthInfoList2 {
|
||||||
|
healthy := &EbaiStoreHealthy{}
|
||||||
|
utils.Map2StructByJson(v, healthy, false)
|
||||||
|
healthyList = append(healthyList, healthy)
|
||||||
|
}
|
||||||
excelConf := &excel.Obj2ExcelSheetConfig{
|
excelConf := &excel.Obj2ExcelSheetConfig{
|
||||||
Title: "饿百门店情况导出",
|
Title: "饿百门店情况导出",
|
||||||
Data: healthInfoList2,
|
Data: healthInfoList2,
|
||||||
CaptionList: []string{
|
CaptionList: []string{
|
||||||
"real_shop_id",
|
"门店ID",
|
||||||
"merchant_id",
|
"平台门店ID",
|
||||||
"merchant_name",
|
"平台门店名",
|
||||||
"hours",
|
"日均在架且有库存的商品数",
|
||||||
"sku_num",
|
"商品数是否达标",
|
||||||
"target_jiedan",
|
"有图率",
|
||||||
"is_healthy",
|
"有图率是否达标",
|
||||||
"bad_order_rate",
|
"日均营业时长",
|
||||||
|
"营业时长是否达标",
|
||||||
|
"商家原因取消订单数",
|
||||||
|
"取消数是否达标",
|
||||||
|
"差评订单率",
|
||||||
|
"差评率是否达标",
|
||||||
|
"商家补贴金额(元)",
|
||||||
|
"补贴是否达标",
|
||||||
|
"商户是否健康",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
excelBin = excel.Obj2Excel([]*excel.Obj2ExcelSheetConfig{excelConf})
|
excelBin = excel.Obj2Excel([]*excel.Obj2ExcelSheetConfig{excelConf})
|
||||||
|
|||||||
Reference in New Issue
Block a user