From 522997137c3771b9d256fd4a495ce7f68e4e543b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 20 Mar 2023 16:54:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0app=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxutils/unipush/push.go | 47 +++----------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/business/jxutils/unipush/push.go b/business/jxutils/unipush/push.go index f84fa30c1..19fb25dbd 100644 --- a/business/jxutils/unipush/push.go +++ b/business/jxutils/unipush/push.go @@ -74,25 +74,12 @@ func NotifyNewOrder(order *model.GoodsOrder) { storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeId, 0, "") if err != nil || storeDetail == nil { - msg.MsgType = "新订单错误" - msg.VendorName = "错误消息通知" - msg.OrderSqs = "1" - msg.StoreTitle = "根据门店id获取门店详情错误" - msg.Context = err.Error() - context, _ := json.Marshal(msg) - pushMsgByUniApp(99999, "门店用户cid获取错误", []string{"212db7816d26e0c603518091b96d3554"}, string(context)) return } cid, err := GetStoreBoosCID(storeId) if err != nil { - msg.MsgType = "新订单错误" - msg.VendorName = "错误消息通知" - msg.OrderSqs = "1" - msg.StoreTitle = "错误日志通知" - msg.Context = err.Error() - context, _ := json.Marshal(msg) - pushMsgByUniApp(99999, "门店用户cid获取错误", []string{"212db7816d26e0c603518091b96d3554"}, string(context)) + globals.SugarLogger.Errorf("新订单推送,获取门店老板CID错误:%v", err) return } @@ -138,25 +125,12 @@ func NotifyAfsOrder(afsOrder *model.AfsOrder) (err error) { storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeId, 0, "") if err != nil || storeDetail == nil { - msg.MsgType = "售后单错误" - msg.VendorName = "错误消息通知" - msg.OrderSqs = "1" - msg.StoreTitle = "根据门店id获取门店详情错误" - msg.Context = err.Error() - context, _ := json.Marshal(msg) - pushMsgByUniApp(99999, "门店用户cid获取错误", []string{"212db7816d26e0c603518091b96d3554"}, string(context)) return } cid, err := GetStoreBoosCID(storeId) if err != nil { - msg.MsgType = "售后单错误" - msg.VendorName = "错误消息通知" - msg.OrderSqs = "1" - msg.StoreTitle = "错误日志通知" - msg.Context = err.Error() - context, _ := json.Marshal(msg) - pushMsgByUniApp(99999, "门店用户cid获取错误", []string{"212db7816d26e0c603518091b96d3554"}, string(context)) + globals.SugarLogger.Errorf("售后单,获取门店老板CID错误:%v", err) return } @@ -180,29 +154,16 @@ func NotifyOrderCanceled(order *model.GoodsOrder) (err error) { storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeId, 0, "") if err != nil || storeDetail == nil { - msg.MsgType = "取消单错误" - msg.VendorName = "错误消息通知" - msg.OrderSqs = "1" - msg.StoreTitle = "根据门店id获取门店详情错误" - msg.Context = err.Error() - context, _ := json.Marshal(msg) - pushMsgByUniApp(99999, "门店用户cid获取错误", []string{"212db7816d26e0c603518091b96d3554"}, string(context)) return } cid, err := GetStoreBoosCID(storeId) if err != nil { - msg.MsgType = "取消单错误" - msg.VendorName = "错误消息通知" - msg.OrderSqs = "1" - msg.StoreTitle = "错误日志通知" - msg.Context = err.Error() - context, _ := json.Marshal(msg) - pushMsgByUniApp(99999, "门店用户cid获取错误", []string{"212db7816d26e0c603518091b96d3554"}, string(context)) + globals.SugarLogger.Errorf("取消单,获取门店老板CID错误:%v", err) return } - msg.MsgType = "售后订单" + msg.MsgType = "取消订单" msg.VendorName = model.VendorChineseNames[order.VendorID] msg.OrderSqs = "0" msg.StoreTitle = storeDetail.Name