This commit is contained in:
邹宗楠
2022-07-29 15:04:53 +08:00
parent 7482d15db9
commit f21b009c4e

View File

@@ -153,7 +153,12 @@ func TestPrint(c *gin.Context, appID int, tokenInfo *model.TokenInfo, printNo st
now = time.Now()
)
msgID = now.Format("20060102150405") + "_" + putils.RandStringBytesWithNumber(8)
if apps, _ := dao.GetApps(db, appID, tokenInfo.User.UserID, ""); len(apps) == 0 {
globals.SugarLogger.Debug("err=============", tokenInfo.User.UserID)
apps, err := dao.GetApps(db, appID, tokenInfo.User.UserID, "")
if err != nil {
return "", err
}
if len(apps) == 0 {
return "", fmt.Errorf("未查询到此应用app_id:%d", appID)
}
printers, _ := dao.GetPrinters(db, appID, printNo, 0, 0, 0)