diff --git a/controllers/api_controller.go b/controllers/api_controller.go index 2ebc93b7e..cbd87fbd3 100644 --- a/controllers/api_controller.go +++ b/controllers/api_controller.go @@ -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)) if _, ok := dataMap[keyPrintNo].(string); !ok { return buildParamErrCodeAndErr(keyPrintNo) - } else { - if printNo = dataMap[keyPrintNo].(string); printNo == "" { - return buildParamErrCodeAndErr(keyPrintNo) - } } + if _, ok := dataMap[keyContent].(string); !ok { return buildParamErrCodeAndErr(keyContent) - } else { - if content = dataMap[keyContent].(string); content == "" { - return buildParamErrCodeAndErr(keyContent) - } } + if _, ok := dataMap[keyOrderNo].(string); !ok { return buildParamErrCodeAndErr(keyOrderNo) - } else { - orderNoStr := dataMap[keyOrderNo].(string) - if orderNo = orderNoStr; orderNo == "" { - return buildParamErrCodeAndErr(keyOrderNo) - } } + appID = utils.Str2Int(dataMap[keyAppID].(string)) msgID := time.Now().Format("20060102150405") + "_" + jxutils.RandStringBytes(8) if err = cms.DoPrint(appID, msgID, printNo, content, orderNo); err != nil { diff --git a/controllers/auth_contorller.go b/controllers/auth_contorller.go index 5ab175a57..96b3623e3 100644 --- a/controllers/auth_contorller.go +++ b/controllers/auth_contorller.go @@ -50,3 +50,41 @@ func (c *AuthController) RegisterUser() { } 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"` // 条形码 +}