1
This commit is contained in:
@@ -329,26 +329,16 @@ func (c *ApiController) DoPrint(dataMap map[string]interface{}) (data, errCode s
|
|||||||
globals.SugarLogger.Debugf("Begin API DoPrint data: [%v]", utils.Format4Output(dataMap, false))
|
globals.SugarLogger.Debugf("Begin API DoPrint data: [%v]", utils.Format4Output(dataMap, false))
|
||||||
if _, ok := dataMap[keyPrintNo].(string); !ok {
|
if _, ok := dataMap[keyPrintNo].(string); !ok {
|
||||||
return buildParamErrCodeAndErr(keyPrintNo)
|
return buildParamErrCodeAndErr(keyPrintNo)
|
||||||
} else {
|
|
||||||
if printNo = dataMap[keyPrintNo].(string); printNo == "" {
|
|
||||||
return buildParamErrCodeAndErr(keyPrintNo)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := dataMap[keyContent].(string); !ok {
|
if _, ok := dataMap[keyContent].(string); !ok {
|
||||||
return buildParamErrCodeAndErr(keyContent)
|
return buildParamErrCodeAndErr(keyContent)
|
||||||
} else {
|
|
||||||
if content = dataMap[keyContent].(string); content == "" {
|
|
||||||
return buildParamErrCodeAndErr(keyContent)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := dataMap[keyOrderNo].(string); !ok {
|
if _, ok := dataMap[keyOrderNo].(string); !ok {
|
||||||
return buildParamErrCodeAndErr(keyOrderNo)
|
return buildParamErrCodeAndErr(keyOrderNo)
|
||||||
} else {
|
|
||||||
orderNoStr := dataMap[keyOrderNo].(string)
|
|
||||||
if orderNo = orderNoStr; orderNo == "" {
|
|
||||||
return buildParamErrCodeAndErr(keyOrderNo)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
appID = utils.Str2Int(dataMap[keyAppID].(string))
|
appID = utils.Str2Int(dataMap[keyAppID].(string))
|
||||||
msgID := time.Now().Format("20060102150405") + "_" + jxutils.RandStringBytes(8)
|
msgID := time.Now().Format("20060102150405") + "_" + jxutils.RandStringBytes(8)
|
||||||
if err = cms.DoPrint(appID, msgID, printNo, content, orderNo); err != nil {
|
if err = cms.DoPrint(appID, msgID, printNo, content, orderNo); err != nil {
|
||||||
|
|||||||
@@ -50,3 +50,41 @@ func (c *AuthController) RegisterUser() {
|
|||||||
}
|
}
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
EBailOrderNo = "eBaiOrderNo" // 品牌名称
|
||||||
|
BusinessType = "businessType" // 是否为预定单
|
||||||
|
PayOrderTime = "payOrderTime" // 下单时间
|
||||||
|
TrySendTime = "trySendTime" // 预计送达时间
|
||||||
|
OrderNo = "orderNo" // 订单编号
|
||||||
|
VendorName = "vendorName" // 订单来源平台名称
|
||||||
|
VendOrID = "vendOrID" // 订单来源平台id
|
||||||
|
VendorOrderNo = "vendorOrderNo" // 订单序号1/2/
|
||||||
|
EBaiCode = "eBailCode" // 饿百取货码
|
||||||
|
QRCOrder = "qRCOrder" // 订单二维码单号,还是订单Id
|
||||||
|
ConsigneeName = "consigneeName" // 客户名称
|
||||||
|
ConsigneeMobile = "consigneeMobile" // 客户电话
|
||||||
|
ConsigneeAddress = "consigneeAddress" // 客户地址
|
||||||
|
BuyerComment = "buyerComment" // 客户备注
|
||||||
|
SkuList = "skuList" // 商品列表
|
||||||
|
SkuName = "skuName" // 商品名称
|
||||||
|
SkuCount = "skuCount" // 商品件数
|
||||||
|
SkuOnePrice = "skuOnePrice" // 商品单价
|
||||||
|
SkuAllPrice = "skuAllPrice" // 商品总价 = 商品件数 x 商品件数
|
||||||
|
AllSkuTypeCount = "allSkuTypeCount" // 商品种类
|
||||||
|
AllSkuCount = "allSkuCount" // 商品总数量
|
||||||
|
UserPayMoney = "userPayMoney" // 用户支付
|
||||||
|
StoreName = "storeName" // 门店名称
|
||||||
|
StoreTel = "storeTel" // 门店电话
|
||||||
|
OfficialName = "officialName" // 官方名称
|
||||||
|
BigFont = "bigFont" // 是否为大字体
|
||||||
|
PrintNumber = "printNumber" // 打印次数
|
||||||
|
)
|
||||||
|
|
||||||
|
type SkuListPrintOrder struct {
|
||||||
|
SkuName string `json:"skuName"`
|
||||||
|
SkuCount string `json:"skuCount"`
|
||||||
|
SalePrice string `json:"salePrice"` // 单价
|
||||||
|
TotalCountPrice string `json:"totalCountPrice"` // 总价
|
||||||
|
Upc string `json:"upc"` // 条形码
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user