From c612b569e0653be9f71b7d87f95c5f2b7af7a264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 25 Aug 2022 17:18:29 +0800 Subject: [PATCH] 1 --- business/dao/print_temp_utils.go | 2 +- business/model/print_temp_config.go | 217 ++++++++++++++-------------- 2 files changed, 110 insertions(+), 109 deletions(-) diff --git a/business/dao/print_temp_utils.go b/business/dao/print_temp_utils.go index f59d34f13..f1742100b 100644 --- a/business/dao/print_temp_utils.go +++ b/business/dao/print_temp_utils.go @@ -151,7 +151,7 @@ func MakePrintMsgOnTemp(param map[string]string, userId string) (string, error) case "skuName", "skuNumber", "skuPrice", "skuAllPrice", "allSkuTypeCount", "allSkuCount", "skuUpc": continue case "goodsListDetail": - printMsg += model.TempTag[v] + printMsg += userTempMap[v] skuList := make([]*model.SkuListPrintOrder, 0, 0) if err := json.Unmarshal([]byte(param["skuList"]), &skuList); err != nil { return "", err diff --git a/business/model/print_temp_config.go b/business/model/print_temp_config.go index 8a42f2164..4622ead0f 100644 --- a/business/model/print_temp_config.go +++ b/business/model/print_temp_config.go @@ -1,113 +1,114 @@ package model -var TempTag map[string]string - -func init() { - TempTag = make(map[string]string, 26) - TempTag["title"] = Title - TempTag["sound"] = Sound - TempTag["eBailOrderNo"] = EBailOrderNo - TempTag["payOrderTime"] = PayOrderTime - TempTag["trySendTime"] = TrySendTime - TempTag["orderNo"] = OrderNo - TempTag["businessType"] = BusinessType - TempTag["vendorName"] = VendorName - TempTag["eBaiCode"] = EBaiCode - TempTag["qRCOrder"] = QRCOrder - TempTag["eBaiVendorName"] = EBaiVendorName - TempTag["eBaiOrderNo"] = EBaiOrderNo - TempTag["consigneeName"] = ConsigneeName - TempTag["consigneeMobile"] = ConsigneeMobile - TempTag["consigneeAddress"] = ConsigneeAddress - TempTag["buyerComment"] = BuyerComment - TempTag["goodsListDetail"] = GoodsListDetail - TempTag["skuName"] = SkuName - TempTag["skuNumber"] = SkuNumber - TempTag["skuPrice"] = SkuPrice - TempTag["skuAllPrice"] = SkuAllPrice - TempTag["allSkuTypeCount"] = AllSkuTypeCount - TempTag["allSkuCount"] = AllSkuCount - TempTag["storeName"] = StoreName - TempTag["storeTel"] = StoreTel - TempTag["officialName"] = OfficialName -} - -const ( - //SystemTempKey 公共参数 EBaiOrderNo= vendorName EBaiVendorName = vendorOrderNo - SystemTempKey = "title,sound,eBailOrderNo,payOrderTime,trySendTime,orderNo,businessType,vendorName,eBaiCode,qRCOrder,eBaiVendorName,eBaiOrderNo,consigneeName," + - "consigneeMobile,consigneeAddress,buyerComment,goodsListDetail,skuName,skuNumber,skuPrice,skuAllPrice,skuUpc,allSkuTypeCount,allSkuCount,storeName,storeTel,officialName" - SystemTempValue = "{" + - "title:" + Title + "," + - "sound:" + Sound + "," + - "eBailOrderNo:" + EBailOrderNo + "," + - "payOrderTime:" + PayOrderTime + "," + - "trySendTime:" + TrySendTime + "," + - "orderNo:" + OrderNo + "," + - "businessType:" + BusinessType + "," + - "vendorName:" + VendorName + "," + - "eBaiCode:" + EBaiCode + "," + - "qRCOrder:" + QRCOrder + "," + - "eBaiVendorName:" + EBaiVendorName + "," + - "eBaiOrderNo:" + EBaiOrderNo + "," + - "consigneeName:" + ConsigneeName + "," + - "consigneeMobile:" + ConsigneeMobile + "," + - "consigneeAddress:" + ConsigneeAddress + "," + - "buyerComment:" + BuyerComment + "," + - "goodsListDetail:" + GoodsListDetail + "," + - "skuName:" + SkuName + "," + - "skuNumber:" + SkuNumber + "," + - "skuPrice:" + SkuPrice + "," + - "skuAllPrice:" + SkuAllPrice + "," + - "skuUpc:" + SkuUpc + "," + - "allSkuTypeCount:" + AllSkuTypeCount + "," + - "allSkuCount:" + AllSkuCount + "," + - "storeName:" + StoreName + "," + - "storeTel:" + StoreTel + "," + - "officialName:" + OfficialName + - "}" - - Title = `
手机买菜上京西

-
极速到家送惊喜

- --------------------------------
` - - Sound = `
%d
` - EBailOrderNo = `
%s


` - PayOrderTime = ` 下单时间: %s
` - TrySendTime = ` 预计送达: %s
` - OrderNo = ` 订单编号: %s
` - BusinessType = `
预订单

` - - VendorName = `
%s` - EBaiCode = `#%s
` - - QRCOrder = `%s
` - EBaiVendorName = `%s:` - EBaiOrderNo = `%s

` - ConsigneeName = ` 客户: %s
` - ConsigneeMobile = ` 电话: %s
` - ConsigneeAddress = ` 地址: %s

` - - BuyerComment = ` 客户备注:
%s

` - GoodsListDetail = `商品明细:
- 品名 数量 单价 小计
- --------------------------------
` - - SkuName = `%s
` - SkuNumber = `x%s` - SkuPrice = ` ¥%s` - SkuAllPrice = ` ¥%s
` - SkuUpc = `upc码: %s\n` - - AllSkuTypeCount = `

共%s种,` - AllSkuCount = `%s件商品
--------------------------------
` - - StoreName = `
商品质量问题请联系:

%s:` - StoreTel = `%s


更多信息请关注官方微信: ` - - OfficialName = `%s


- --------------------------------
- --------------------------------

` -) +// +//var TempTag map[string]string +// +//func init() { +// TempTag = make(map[string]string, 26) +// TempTag["title"] = Title +// TempTag["sound"] = Sound +// TempTag["eBailOrderNo"] = EBailOrderNo +// TempTag["payOrderTime"] = PayOrderTime +// TempTag["trySendTime"] = TrySendTime +// TempTag["orderNo"] = OrderNo +// TempTag["businessType"] = BusinessType +// TempTag["vendorName"] = VendorName +// TempTag["eBaiCode"] = EBaiCode +// TempTag["qRCOrder"] = QRCOrder +// TempTag["eBaiVendorName"] = EBaiVendorName +// TempTag["eBaiOrderNo"] = EBaiOrderNo +// TempTag["consigneeName"] = ConsigneeName +// TempTag["consigneeMobile"] = ConsigneeMobile +// TempTag["consigneeAddress"] = ConsigneeAddress +// TempTag["buyerComment"] = BuyerComment +// TempTag["goodsListDetail"] = GoodsListDetail +// TempTag["skuName"] = SkuName +// TempTag["skuNumber"] = SkuNumber +// TempTag["skuPrice"] = SkuPrice +// TempTag["skuAllPrice"] = SkuAllPrice +// TempTag["allSkuTypeCount"] = AllSkuTypeCount +// TempTag["allSkuCount"] = AllSkuCount +// TempTag["storeName"] = StoreName +// TempTag["storeTel"] = StoreTel +// TempTag["officialName"] = OfficialName +//} +// +//const ( +// //SystemTempKey 公共参数 EBaiOrderNo= vendorName EBaiVendorName = vendorOrderNo +// SystemTempKey = "title,sound,eBailOrderNo,payOrderTime,trySendTime,orderNo,businessType,vendorName,eBaiCode,qRCOrder,eBaiVendorName,eBaiOrderNo,consigneeName," + +// "consigneeMobile,consigneeAddress,buyerComment,goodsListDetail,skuName,skuNumber,skuPrice,skuAllPrice,skuUpc,allSkuTypeCount,allSkuCount,storeName,storeTel,officialName" +// SystemTempValue = "{" + +// "title:" + Title + "," + +// "sound:" + Sound + "," + +// "eBailOrderNo:" + EBailOrderNo + "," + +// "payOrderTime:" + PayOrderTime + "," + +// "trySendTime:" + TrySendTime + "," + +// "orderNo:" + OrderNo + "," + +// "businessType:" + BusinessType + "," + +// "vendorName:" + VendorName + "," + +// "eBaiCode:" + EBaiCode + "," + +// "qRCOrder:" + QRCOrder + "," + +// "eBaiVendorName:" + EBaiVendorName + "," + +// "eBaiOrderNo:" + EBaiOrderNo + "," + +// "consigneeName:" + ConsigneeName + "," + +// "consigneeMobile:" + ConsigneeMobile + "," + +// "consigneeAddress:" + ConsigneeAddress + "," + +// "buyerComment:" + BuyerComment + "," + +// "goodsListDetail:" + GoodsListDetail + "," + +// "skuName:" + SkuName + "," + +// "skuNumber:" + SkuNumber + "," + +// "skuPrice:" + SkuPrice + "," + +// "skuAllPrice:" + SkuAllPrice + "," + +// "skuUpc:" + SkuUpc + "," + +// "allSkuTypeCount:" + AllSkuTypeCount + "," + +// "allSkuCount:" + AllSkuCount + "," + +// "storeName:" + StoreName + "," + +// "storeTel:" + StoreTel + "," + +// "officialName:" + OfficialName + +// "}" +// +// Title = `
手机买菜上京西

+//
极速到家送惊喜

+// --------------------------------
` +// +// Sound = `
%d
` +// EBailOrderNo = `
%s


` +// PayOrderTime = ` 下单时间: %s
` +// TrySendTime = ` 预计送达: %s
` +// OrderNo = ` 订单编号: %s
` +// BusinessType = `
预订单

` +// +// VendorName = `
%s` +// EBaiCode = `#%s
` +// +// QRCOrder = `%s
` +// EBaiVendorName = `%s:` +// EBaiOrderNo = `%s

` +// ConsigneeName = ` 客户: %s
` +// ConsigneeMobile = ` 电话: %s
` +// ConsigneeAddress = ` 地址: %s

` +// +// BuyerComment = ` 客户备注:
%s

` +// GoodsListDetail = `商品明细:
+// 品名 数量 单价 小计
+// --------------------------------
` +// +// SkuName = `%s
` +// SkuNumber = `x%s` +// SkuPrice = ` ¥%s` +// SkuAllPrice = ` ¥%s
` +// SkuUpc = `upc码: %s\n` +// +// AllSkuTypeCount = `

共%s种,` +// AllSkuCount = `%s件商品
--------------------------------
` +// +// StoreName = `
商品质量问题请联系:

%s:` +// StoreTel = `%s


更多信息请关注官方微信: ` +// +// OfficialName = `%s


+// --------------------------------
+// --------------------------------

` +//) type SkuListPrintOrder struct { SkuName string `json:"skuName"` // 商品名称