huangjiajun 1 anno fa
parent
commit
543651b589
5 ha cambiato i file con 46 aggiunte e 31 eliminazioni
  1. +33
    -0
      app/hdl/zhimeng_platform/hdl_new_order_list.go
  2. +5
    -27
      app/hdl/zhimeng_platform/hdl_order_list.go
  3. +6
    -4
      app/router/router.go
  4. +1
    -0
      app/svc/platform/svc_hw_order_list.go
  5. +1
    -0
      app/svc/platform/svc_order_list.go

+ 33
- 0
app/hdl/zhimeng_platform/hdl_new_order_list.go Vedi File

@@ -0,0 +1,33 @@
package zhimeng_platform

import (
"github.com/gin-gonic/gin"
)

func NewOrderList(c *gin.Context) {
pvd := c.Params.ByName("pvd")
switch pvd {
case "playlet":
OrderList(c)
break
case "hw":
HwOrderList(c)
break
case "guide":
GuideOrderList(c)
}

}
func NewOrderOutput(c *gin.Context) {
pvd := c.Params.ByName("pvd")
switch pvd {
case "playlet":
OrderOutput(c)
break
case "hw":
HwOrderOutput(c)
break
case "guide":
GuideOrderOutput(c)
}
}

+ 5
- 27
app/hdl/zhimeng_platform/hdl_order_list.go Vedi File

@@ -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{


+ 6
- 4
app/router/router.go Vedi File

@@ -74,10 +74,12 @@ func routeZhimeng(r *gin.RouterGroup) {
{
r.POST("/order_list", platformHdl.OrderList)
r.POST("/order_output", platformHdl.OrderOutput)
r.POST("/hw_order_list", platformHdl.HwOrderList)
r.POST("/hw_order_output", platformHdl.HwOrderOutput)
r.POST("/guide_order_list", platformHdl.GuideOrderList)
r.POST("/guide_order_output", platformHdl.GuideOrderOutput)
r.POST("/:pvd/order_list", platformHdl.NewOrderList)
r.POST("/:pvd/order_output", platformHdl.NewOrderOutput)
//r.POST("/hw_order_list", platformHdl.HwOrderList)
//r.POST("/hw_order_output", platformHdl.HwOrderOutput)
//r.POST("/guide_order_list", platformHdl.GuideOrderList)
//r.POST("/guide_order_output", platformHdl.GuideOrderOutput)

r.POST("/withdrawal_income", platformHdl.WithdrawalIncome)
r.POST("/withdrawal_bind_alipay", platformHdl.WithdrawalBindAlipay)


+ 1
- 0
app/svc/platform/svc_hw_order_list.go Vedi File

@@ -33,6 +33,7 @@ func HwOrderList(c *gin.Context, args map[string]string) ([]map[string]string, i
"source": platformMap[v.Type],
"amount": utils.Float64ToStr(v.Payment),
"commission": utils.Float64ToStr(v.Commission),
"real_commission": utils.Float64ToStr(v.Commission),
"status": v.Status,
"settle_status": settleStatus,
"create_time": time.Unix(int64(v.CreateTime), 0).Format("2006-01-02 15:04:05"),


+ 1
- 0
app/svc/platform/svc_order_list.go Vedi File

@@ -35,6 +35,7 @@ func OrderList(c *gin.Context, args map[string]string) ([]map[string]string, int
"amount": v.Amount,
"platform_fee": v.PlatformFee,
"commission": v.Commission,
"real_commission": v.Commission,
"status": v.Status,
"settle_status": settleStatus,
"create_time": v.CreateTime.Format("2006-01-02 15:04:05"),


Caricamento…
Annulla
Salva