1
This commit is contained in:
@@ -45,6 +45,37 @@ func (p *PrinterBindStore) AddPrinterBindStore(c *gin.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
// UpdatePrinterUnBindStore 解除打印机账号绑定关系
|
||||
// @Title 解除打印机账号绑定关系
|
||||
// @Description 解除打印机账号绑定关系
|
||||
// @Param token cookie string true "用户登录token"
|
||||
// @Param data body app_model.RelieveBind true "请求参数"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /bindingStore [post]
|
||||
func (p *PrinterBindStore) UpdatePrinterUnBindStore(c *gin.Context) {
|
||||
var (
|
||||
err error
|
||||
tokenInfo *model.TokenInfo
|
||||
param = &tempModel.RelieveBind{}
|
||||
bindServer = printServer.PrintBindStore{}
|
||||
)
|
||||
if err = c.ShouldBind(¶m); err != nil {
|
||||
controllers.BuildErrJson(c, err)
|
||||
return
|
||||
}
|
||||
if tokenInfo = controllers.CheckToken(c); tokenInfo == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// 解除用户和打印机绑定关系,
|
||||
|
||||
controllers.CallFunc(c, func() (retVal interface{}, errCode string, err error) {
|
||||
err = bindServer.RelievePrintBindStore(tokenInfo.User.UserID, param.PrintNo)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// CheckStoreBindStatus 检查用户是否可以取消门店打印机绑定
|
||||
// @Title 检查用户是否可以取消门店打印机绑定
|
||||
// @Description 检查用户是否可以取消门店打印机绑定
|
||||
|
||||
Reference in New Issue
Block a user