print controlller 添加打印机

This commit is contained in:
suyl
2021-06-24 16:13:01 +08:00
parent 1b213dc31f
commit 5bbcda5b5f
3 changed files with 10 additions and 11 deletions

View File

@@ -12,6 +12,7 @@ routinePoolSize = 1000
[api]
httpport = 8889
EnableDocs = true
addEvent = true
aliKey = "LTAI4FwZN7pp4dACQHoapkZQ"
aliSecret = "NTegceUFX0FdfMovqCDzqcIKmhcoOu"

View File

@@ -1,8 +1,6 @@
package controllers
import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
beego "github.com/astaxie/beego/server/web"
)
@@ -15,13 +13,12 @@ type CallBackPrint struct {
Code string `json:"code"`
}
func (c *PrintController) Msg() {
//if c.Ctx.Input.Method() == http.MethodPost {
callBackPrint := &CallBackPrint{}
globals.SugarLogger.Debugf("print callback callbackResponse:%s", utils.Format4Output(c.Ctx.Request, true))
c.Data["json"] = callBackPrint
c.ServeJSON()
//} else {
// c.Abort("404")
//}
// @Title 添加打印机
// @Description 添加打印机
// @Param token header string true "认证token"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /AddPrint [post]
func (c *PrintController) AddPrint() {
}

View File

@@ -33,4 +33,5 @@ func Init() {
SugarLogger.Infof("globals RunMode=%s", beego.BConfig.RunMode)
AliKey = web.AppConfig.DefaultString("aliKey", "")
AliSecret = web.AppConfig.DefaultString("aliSecret", "")
IsAddEvent = web.AppConfig.DefaultBool("addEvent", false)
}