This commit is contained in:
邹宗楠
2022-10-17 15:05:29 +08:00
parent 5f755c01df
commit 68e2c17a2e
2 changed files with 6 additions and 8 deletions

View File

@@ -205,9 +205,10 @@ func TestPrint(appID int, tokenInfo *model.TokenInfo, printNo string, orderNo in
now = time.Now()
)
msgID = now.Format("20060102150405") + "_" + putils.RandStringBytesWithNumber(8)
if apps, _ := dao.GetApps(db, appID, tokenInfo.User.UserID, ""); len(apps) == 0 {
return "", fmt.Errorf("未查询到此应用app_id:%d", appID)
}
//if apps, _ := dao.GetApps(db, appID, tokenInfo.User.UserID, ""); len(apps) == 0 {
// return "", fmt.Errorf("未查询到此应用app_id:%d", appID)
//}
printers, _ := dao.GetPrinters(db, appID, printNo, 0, 0, 0)
if len(printers) == 0 {
return "", fmt.Errorf("未在该应用下查到此打印机app_id: %d, print_no: %s", appID, printNo)