From 44694bee7e5f61481d7b710b2b87e6ced10e216a Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 18 Jun 2024 09:19:33 +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/admin/svc/order/svc_order_list.go | 5 +---- app/bigData/svc/svc_data.go | 11 ++++------- app/ipad/svc/svc_order.go | 4 ---- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/app/admin/svc/order/svc_order_list.go b/app/admin/svc/order/svc_order_list.go index 5d4dafa..b970876 100644 --- a/app/admin/svc/order/svc_order_list.go +++ b/app/admin/svc/order/svc_order_list.go @@ -37,7 +37,7 @@ func OrderList(c *gin.Context) { } enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) for _, v := range *list { - v1 := JudgePackageOrdOrdState(&v) + v1 := v isCanCancel := "1" if v1.State > 0 { isCanCancel = "0" @@ -102,7 +102,6 @@ func OrderGoodsList(c *gin.Context) { } enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) for _, v := range list { - JudgePackageOrdOrdStateSecond(v["oid"], v["state"]) enterpriseName := "" insideEnterpriseName := "" _, ok := enterpriseMap[utils.StrToInt(v["enterprise_id"])] @@ -172,7 +171,6 @@ func NewOrderGoodsList(c *gin.Context) { } enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) for _, v := range list { - JudgePackageOrdOrdStateSecond(v["oid"], v["state"]) enterpriseName := "" insideEnterpriseName := "" _, ok := enterpriseMap[utils.StrToInt(v["enterprise_id"])] @@ -710,7 +708,6 @@ func OrderDetail(c *gin.Context) { e.OutErr(c, 400, e.NewErr(400, "订单不存在")) return } - order = JudgePackageOrdOrdState(order) var enterpriseData model.Enterprise eg.Where("id=?", order.EnterpriseId).Get(&enterpriseData) stateArr := []string{"待制作", "制作中", "烘焙中", "分拣中", "已完成", "已取消"} diff --git a/app/bigData/svc/svc_data.go b/app/bigData/svc/svc_data.go index c32a3bf..024931f 100644 --- a/app/bigData/svc/svc_data.go +++ b/app/bigData/svc/svc_data.go @@ -2,7 +2,6 @@ package svc import ( md2 "applet/app/admin/md" - "applet/app/admin/svc/order" "applet/app/bigData/md" "applet/app/db" "applet/app/db/model" @@ -228,7 +227,7 @@ func LeftDataForSorting() (resp []md.LeftDataForMakeResp, err error) { } var oIds []int64 for _, v := range orders { - v1 := order.JudgePackageOrdOrdState(&v) + v1 := v if v1.State == 4 || v1.State == 5 { continue } @@ -435,8 +434,6 @@ func NewSortingCate() []map[string]string { if utils.InArr(utils.IntToStr(v.EnterpriseId), ids) { continue } - v1 := order.JudgePackageOrdOrdState(&v) - v = *v1 tmp := map[string]string{ "id": utils.IntToStr(v.EnterpriseId), "name": enterpriseMap[v.EnterpriseId].Name, @@ -474,7 +471,7 @@ func NewSortingData(c *gin.Context) []map[string]string { } var oIds []string for _, v := range orders { - v1 := order.JudgePackageOrdOrdState(&v) + v1 := v if v1.State == 4 || v1.State == 5 { continue } @@ -522,7 +519,7 @@ func NewSortingGoodsCate() []map[string]string { } var oIds []string for _, v := range orders { - v1 := order.JudgePackageOrdOrdState(&v) + v1 := v if v1.State == 4 || v1.State == 5 { continue } @@ -582,7 +579,7 @@ func NewSortingGoodsData(arg map[string]string) []map[string]string { } var oIds []string for _, v := range orders { - v1 := order.JudgePackageOrdOrdState(&v) + v1 := v if v1.State == 4 || v1.State == 5 { continue } diff --git a/app/ipad/svc/svc_order.go b/app/ipad/svc/svc_order.go index 41df6d8..022bc75 100644 --- a/app/ipad/svc/svc_order.go +++ b/app/ipad/svc/svc_order.go @@ -2,7 +2,6 @@ package svc import ( "applet/app/admin/md" - "applet/app/admin/svc/order" svc2 "applet/app/bigData/svc" "applet/app/db" "applet/app/e" @@ -31,9 +30,6 @@ func Order(c *gin.Context) { stateArr := []string{"待制作", "制作中", "烘焙中", "分拣中", "已完成", "已取消"} btnArr := []string{"进入制作", "进入制作", "进入制作", "分拣完成", "查看详情", "已取消"} for _, v := range *data { - v2 := &v - v2 = order.JudgePackageOrdOrdState(v2) - v = *v2 enterpriseName := "" _, ok := enterpriseMap[v.EnterpriseId] if ok {