Files
jx-print/routers/v4_app_router.go
邹宗楠 03069ce0fe 1
2022-10-18 10:30:37 +08:00

43 lines
2.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package routers
import (
"git.rosy.net.cn/jx-print/controllers/app"
"github.com/gin-gonic/gin"
)
// InitV4App 小程序端需要token
func InitV4App(v2 *gin.RouterGroup) {
appYes := v2.Group("/app_need")
// 打印机管理
appYes.POST("/addPrinters", app.PrintController.AddPrinters) // 添加打印机
appYes.GET("/getPrinters", app.PrintController.GetPrinters) // 查询打印机
appYes.POST("/delPrinters", app.PrintController.DelPrinters) // 删除打印机
appYes.POST("/updatePrinter", app.PrintController.UpdatePrinter) // 修改打印机
appYes.POST("/testPrinter", app.PrintController.TestPrint) // 测试打印机
appYes.GET("/getPrintMessages", app.PrintController.GetPrintMessages) // 打印机消息列表
appYes.GET("/statPrinter", app.PrintController.StatPrinterReport) // 打印消息统计
appYes.GET("/queryPrintBill", app.PrintController.QueryPrintBill) // 打印消息统计
// 模板管理
temp := appYes.Group("/temp")
temp.POST("/addOrUpdateTemp", app.PrinterTempController.AddOrUpdateTemp) // 模板添加/修改
temp.DELETE("/deleteTemp", app.PrinterTempController.DeleteTemp) // 删除用户自定义模板
temp.GET("/getUserTempList", app.PrinterTempController.GetUserTempList) // 获取用户模板,模板不足时填充系统模板
temp.GET("/switchTemp", app.PrinterTempController.SwitchTemp) // 切换模板打印模板
// 打印机设置
setting := appYes.Group("/setting")
setting.POST("updatePrintSetting", app.PrintSettingController.UpdatePrintSetting) // 打印机设置修改
setting.GET("getPrintSetting", app.PrintSettingController.GetPrintSetting) // 打印机设置修改
/***************/
appYes.POST("/getToken4Jxc4", app.Auth2ControllerController.GetToken4Jxc4) // 微信登录京西菜市,获取菜市token
appYes.POST("/pay", app.Auth2ControllerController.Pay4Order) // 吊起微信支付
// 用户授权成功之后获取绑定门店信息
appYes.POST("/bindingStore", app.PrinterBindStoreController.AddPrinterBindStore) // 添加门店绑定授权
appYes.POST("/checkRelieve", app.PrinterBindStoreController.CheckStoreBindStatus) // 检查是否可以解除绑定
appYes.POST("/unBindingStore", app.PrinterBindStoreController.UpdatePrinterUnBindStore) // 解除打印机账号绑定关系
}