From aa8dd1f25aeb37b3f74d5fc9c4eb485f6c5345ab Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 1 Aug 2024 13:54:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/db/db_life_order.go | 4 +++- app/svc/platform/svc_life_order_list.go | 11 ++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/app/db/db_life_order.go b/app/db/db_life_order.go index 9a17e5f..03d0792 100644 --- a/app/db/db_life_order.go +++ b/app/db/db_life_order.go @@ -105,7 +105,9 @@ func GetLifeOrderListTotal(args map[string]string) ([]model.LifeOrder, int64) { if args["status"] != "" { sess = sess.And("status=?", args["status"]) } - + if args["source"] != "" { + sess = sess.And("pvd=?", args["source"]) + } sort := "create_time desc,id desc" if args["sort"] != "" { sort = args["sort"] diff --git a/app/svc/platform/svc_life_order_list.go b/app/svc/platform/svc_life_order_list.go index fe4de4e..b9f7c20 100644 --- a/app/svc/platform/svc_life_order_list.go +++ b/app/svc/platform/svc_life_order_list.go @@ -2,6 +2,7 @@ package platform import ( "applet/app/db" + "applet/app/md" "applet/app/utils" "github.com/gin-gonic/gin" "time" @@ -12,15 +13,7 @@ func LifeOrderList(c *gin.Context, args map[string]string) ([]map[string]string, args["uid"] = utils.AnyToString(masterId) list, total := db.GetLifeOrderListTotal(args) var data = make([]map[string]string, 0) - platformMap := map[string]string{ - "tikTok_life": "抖音本地生活", - "csjp": "穿山甲抖音", - "csjp_live": "穿山甲抖音直播商品", - "kuaishou": "快手", - "kuaishou_live": "快手直播商品", - "meituan": "美团", - "own_ele": "饿了么", - } + platformMap := md.SettlePvd if len(list) > 0 { for _, v := range list { settleStatus := "未结算"