|
|
@@ -13,31 +13,16 @@ func OrderList(c *gin.Context) { |
|
|
|
e.OutErr(c, e.ERR_INVALID_ARGS, err) |
|
|
|
return |
|
|
|
} |
|
|
|
platformMaps := []string{ |
|
|
|
"starbucks", "movie", "mcdonald", "nayuki", "luckin", "pizza", "pagoda", "burger_king", "heytea", "to_kfc", "wallace", "flowerCake", "delivery", "tourism", |
|
|
|
} |
|
|
|
platformMap := map[string]string{ |
|
|
|
"starbucks": "星巴克", "movie": "电影", "mcdonald": "麦当劳", "nayuki": "奈雪", "luckin": "瑞幸咖啡", "pizza": "必胜客", |
|
|
|
"pagoda": "百果园", "burger_king": "汉堡王", "heytea": "喜茶", "to_kfc": "肯德基", "wallace": "华莱士", "flowerCake": "鲜花", "delivery": "比价寄", "tourism": "出游", |
|
|
|
} |
|
|
|
|
|
|
|
var data = make([]map[string]string, 0) |
|
|
|
var total int64 |
|
|
|
if utils.InArr(args["source"], platformMaps) { |
|
|
|
data, total = platform.HwOrderList(c, args) |
|
|
|
} else { |
|
|
|
data, total = platform.OrderList(c, args) |
|
|
|
} |
|
|
|
|
|
|
|
data, total = platform.OrderList(c, args) |
|
|
|
sourceList := []map[string]string{ |
|
|
|
{"name": "短剧", "value": "video"}, |
|
|
|
{"name": "广告", "value": "adv"}, |
|
|
|
} |
|
|
|
|
|
|
|
for k, v := range platformMap { |
|
|
|
tmp := map[string]string{ |
|
|
|
"name": v, "value": k, |
|
|
|
} |
|
|
|
sourceList = append(sourceList, tmp) |
|
|
|
} |
|
|
|
videoList := []map[string]string{ |
|
|
|
{"name": "抖音", "value": "douyin"}, |
|
|
|
{"name": "快手", "value": "kuaishou"}, |
|
|
@@ -69,17 +54,10 @@ func OrderOutput(c *gin.Context) { |
|
|
|
e.OutErr(c, e.ERR_INVALID_ARGS, err) |
|
|
|
return |
|
|
|
} |
|
|
|
platformMap := []string{ |
|
|
|
"starbucks", "movie", "mcdonald", "nayuki", "luckin", "pizza", "pagoda", "burger_king", "heytea", "to_kfc", "wallace", "flowerCake", "delivery", "tourism", |
|
|
|
} |
|
|
|
|
|
|
|
var data map[string]string |
|
|
|
var name string |
|
|
|
if utils.InArr(args["source"], platformMap) { |
|
|
|
name, data = platform.HwOrderOutput(c, args) |
|
|
|
|
|
|
|
} else { |
|
|
|
name, data = platform.OrderOutput(c, args) |
|
|
|
} |
|
|
|
name, data = platform.OrderOutput(c, args) |
|
|
|
file := utils.Output(c, name, data) |
|
|
|
filename := name + ".xlsx" |
|
|
|
r := map[string]string{ |
|
|
|