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