From 63557fa357cc0d10d314bb4e5bf1b4bf6a952275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 17 Jun 2022 09:34:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81=E7=A7=8D?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partner/printer/yilianyun/yilianyun.go | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/business/partner/printer/yilianyun/yilianyun.go b/business/partner/printer/yilianyun/yilianyun.go index 6ea346461..99cbf896d 100644 --- a/business/partner/printer/yilianyun/yilianyun.go +++ b/business/partner/printer/yilianyun/yilianyun.go @@ -78,7 +78,6 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin 商品明细: \n 品名 数量 小计\n --------------------------------\n` - // 实际支付:%s\n orderParams = append(orderParams, utils.Time2Str(order.OrderCreatedAt), utils.Time2Str(expectedDeliveryTime), @@ -90,7 +89,6 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin order.ConsigneeMobile, order.ConsigneeAddress, order.BuyerComment, - // jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), ) for _, sku := range order.Skus { @@ -106,8 +104,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin } } orderFmt += `\n -共%d种%d件商品 -\n +共%d种%d件商品\n +实际支付:%s\n --------------------------------\n
商品质量问题请联系:
%s:%s
\n @@ -116,7 +114,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin --------------------------------\n ` // http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk - orderParams = append(orderParams, order.SkuCount, order.GoodsCount, order.StoreName, storeTel, globals.StoreName) + orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), order.StoreName, storeTel, globals.StoreName) return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1) } @@ -162,7 +160,6 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st 商品明细: \n 品名 数量 小计\n --------------------------------\n` - // 实际支付:%s\n orderParams = append(orderParams, utils.Time2Str(order.OrderCreatedAt), utils.Time2Str(expectedDeliveryTime), @@ -174,7 +171,6 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st order.ConsigneeMobile, order.ConsigneeAddress, order.BuyerComment, - // jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), ) for _, sku := range order.Skus { @@ -190,8 +186,8 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st } } orderFmt += `\n -共%d种%d件商品 -\n +共%d种%d件商品\n +实际支付:%s\n --------------------------------\n
商品质量问题请联系:
\n
%s:%s
\n @@ -200,7 +196,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st --------------------------------\n ` // http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk - orderParams = append(orderParams, order.SkuCount, order.GoodsCount, order.StoreName, storeTel, globals.StoreName) + orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), order.StoreName, storeTel, globals.StoreName) return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1) } @@ -275,14 +271,13 @@ func (c *PrinterHandler) getCancelOrRefundOrderContent(order *model.GoodsOrder, } } orderFmt += `\n -共%d种%d件商品 -\n +共%d种%d件商品\n +实际支付:%s\n --------------------------------\n --------------------------------\n ` // http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk - orderParams = append(orderParams, order.SkuCount, order.GoodsCount) - globals.SugarLogger.Debug("string=========================", strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)) + orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice)) return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1) } @@ -352,14 +347,13 @@ func (c *PrinterHandler) getCancelOrRefundOrderContentBig(order *model.GoodsOrde } } orderFmt += `\n -共%d种%d件商品 -\n +共%d种%d件商品\n +实际支付:%s\n\n --------------------------------\n --------------------------------\n ` // http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk - orderParams = append(orderParams, order.SkuCount, order.GoodsCount) - globals.SugarLogger.Debug("string=========================", strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)) + orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice)) return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1) }