1
This commit is contained in:
@@ -209,7 +209,7 @@ func DelPrinterSeq(appID int, printNo string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func DoPrint(appID int, msgID, printNo, content string, orderNo int) (err error) {
|
||||
func DoPrint(appID int, msgID, printNo, content string, orderNo string) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
|
||||
@@ -41,7 +41,7 @@ type PrintMsg struct {
|
||||
|
||||
MsgID string `orm:"column(msg_id)" json:"msg_id"` //消息ID
|
||||
PrintNo string `json:"print_no"` //打印机编号
|
||||
OrderNo int `json:"order_no"` //订单序号
|
||||
OrderNo string `json:"order_no"` //订单序号
|
||||
Content string `orm:"type(text)" json:"content"` //订单内容
|
||||
Status int `json:"status"` //打印状态
|
||||
Comment string `json:"comment"` //失败原因
|
||||
|
||||
@@ -323,7 +323,8 @@ func (c *ApiController) DelPrinterSeq(dataMap map[string]interface{}) (data, err
|
||||
func (c *ApiController) DoPrint(dataMap map[string]interface{}) (data, errCode string, err error) {
|
||||
var (
|
||||
printNo, content string
|
||||
orderNo, appID int
|
||||
appID int
|
||||
orderNo string
|
||||
)
|
||||
globals.SugarLogger.Debugf("Begin API DoPrint data: [%v]", utils.Format4Output(dataMap, false))
|
||||
if _, ok := dataMap[keyPrintNo].(string); !ok {
|
||||
@@ -344,7 +345,7 @@ func (c *ApiController) DoPrint(dataMap map[string]interface{}) (data, errCode s
|
||||
return buildParamErrCodeAndErr(keyOrderNo)
|
||||
} else {
|
||||
orderNoStr := dataMap[keyOrderNo].(string)
|
||||
if orderNo = utils.Str2Int(orderNoStr); orderNo == 0 {
|
||||
if orderNo = orderNoStr; orderNo == "" {
|
||||
return buildParamErrCodeAndErr(keyOrderNo)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user