dongfeng-pay/boss/controllers/deleteController.go

149 lines
3.2 KiB
Go
Raw Normal View History

2021-04-27 15:33:49 +08:00
/***************************************************
** @Desc : c file for ...
** @Time : 2019/8/21 16:51
** @Author : yuebin
** @File : delete
** @Last Modified by : yuebin
** @Last Modified time: 2019/8/21 16:51
** @Software: GoLand
****************************************************/
package controllers
import (
2021-11-11 10:30:43 +08:00
"boss/service"
2021-04-27 15:33:49 +08:00
"strings"
)
2021-11-11 10:30:43 +08:00
type DeleteController struct {
2021-04-27 15:33:49 +08:00
BaseController
}
2021-11-11 10:30:43 +08:00
func (c *DeleteController) Finish() {
se := new(service.DeleteService)
se.Finish()
2021-04-27 15:33:49 +08:00
}
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteMenu() {
2021-04-27 15:33:49 +08:00
menuUid := c.GetString("menuUid")
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
dataJSON := se.DeleteMenu(menuUid, c.GetSession("userID").(string))
2021-04-27 15:33:49 +08:00
2021-11-11 10:30:43 +08:00
c.Data["json"] = dataJSON
_ = c.ServeJSONP()
2021-04-27 15:33:49 +08:00
}
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteSecondMenu() {
2021-04-27 15:33:49 +08:00
secondMenuUid := strings.TrimSpace(c.GetString("secondMenuUid"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
dataJSON := se.DeleteSecondMenu(secondMenuUid)
2021-04-27 15:33:49 +08:00
c.Data["json"] = dataJSON
2021-11-11 10:30:43 +08:00
_ = c.ServeJSON()
2021-04-27 15:33:49 +08:00
}
/*
* 删除权限项
*/
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeletePowerItem() {
2021-04-27 15:33:49 +08:00
powerID := strings.TrimSpace(c.GetString("powerID"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
dataJSON := se.DeletePowerItem(powerID)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(dataJSON)
}
/*
* 删除角色
*/
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteRole() {
2021-04-27 15:33:49 +08:00
roleUid := strings.TrimSpace(c.GetString("roleUid"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
dataJSON := se.DeleteRole(roleUid)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(dataJSON)
}
/*
* 删除操作员
*/
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteOperator() {
2021-04-27 15:33:49 +08:00
userId := strings.TrimSpace(c.GetString("userId"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
dataJSON := se.DeleteOperator(userId)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(dataJSON)
}
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteBankCardRecord() {
2021-04-27 15:33:49 +08:00
uid := strings.TrimSpace(c.GetString("uid"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
2021-04-27 15:33:49 +08:00
2021-11-11 10:30:43 +08:00
dataJSON := se.DeleteBankCardRecord(uid)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(dataJSON)
}
/*
* 删除通道操作
*/
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteRoad() {
2021-04-27 15:33:49 +08:00
roadUid := strings.TrimSpace(c.GetString("roadUid"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
dataJSON := se.DeleteRoad(roadUid)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(dataJSON)
}
/*
* 删除通道池
*/
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteRoadPool() {
2021-04-27 15:33:49 +08:00
roadPoolCode := strings.TrimSpace(c.GetString("roadPoolCode"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
dataJSON := se.DeleteRoadPool(roadPoolCode)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(dataJSON)
}
/*
* 删除商户
*/
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteMerchant() {
2021-04-27 15:33:49 +08:00
merchantUid := strings.TrimSpace(c.GetString("merchantUid"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
keyDataJSON := se.DeleteMerchant(merchantUid)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(keyDataJSON)
}
/*
* 删除账户
*/
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteAccount() {
2021-04-27 15:33:49 +08:00
accountUid := strings.TrimSpace(c.GetString("accountUid"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
dataJSON := se.DeleteAccount(accountUid)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(dataJSON)
}
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteAgent() {
2021-04-27 15:33:49 +08:00
agentUid := strings.TrimSpace(c.GetString("agentUid"))
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
keyDataJSON := se.DeleteAgent(agentUid)
2021-04-27 15:33:49 +08:00
c.GenerateJSON(keyDataJSON)
}
2021-11-11 10:30:43 +08:00
func (c *DeleteController) DeleteAgentRelation() {
2021-04-27 15:33:49 +08:00
2021-11-11 10:30:43 +08:00
merchantUid := strings.TrimSpace(c.GetString("merchantUid"))
2021-04-27 15:33:49 +08:00
2021-11-11 10:30:43 +08:00
se := new(service.DeleteService)
2021-04-27 15:33:49 +08:00
2021-11-11 10:30:43 +08:00
keyDataJSON := se.DeleteAgentRelation(merchantUid)
2021-04-27 15:33:49 +08:00
2021-11-11 10:30:43 +08:00
c.GenerateJSON(keyDataJSON)
2021-04-27 15:33:49 +08:00
}