mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-12-24 08:12:55 +08:00
Service名称包含模块名,方便将两个模块放一起,解决部分循环依赖,还是前端幸福没有依赖痛苦
This commit is contained in:
@@ -8,21 +8,22 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type FlowTemplateHandler struct{}
|
||||
type FlowTemplateHandler struct {
|
||||
}
|
||||
|
||||
// @Summary 流程模板列表
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param PageNo query int true "页码"
|
||||
// @Param PageSize query int true "每页数量"
|
||||
// @Param flowName query string false "流程名称"
|
||||
// @Param flowGroup query int false "流程分类"
|
||||
// @Param flowRemark query string false "流程描述"
|
||||
// @Param flowFormData query string false "表单配置"
|
||||
// @Param flowProcessData query string false "流程配置"
|
||||
// @Success 200 {object} response.Response{data=response.PageResp{lists=[]FlowTemplateResp}} "成功"
|
||||
// @Router /api/admin/flow/flow_template/list [get]
|
||||
// @Summary 流程模板列表
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param PageNo query int true "页码"
|
||||
// @Param PageSize query int true "每页数量"
|
||||
// @Param flowName query string false "流程名称"
|
||||
// @Param flowGroup query int false "流程分类"
|
||||
// @Param flowRemark query string false "流程描述"
|
||||
// @Param flowFormData query string false "表单配置"
|
||||
// @Param flowProcessData query string false "流程配置"
|
||||
// @Success 200 {object} response.Response{data=response.PageResp{lists=[]FlowTemplateResp}} "成功"
|
||||
// @Router /api/admin/flow/flow_template/list [get]
|
||||
func (hd FlowTemplateHandler) List(c *gin.Context) {
|
||||
var page request.PageReq
|
||||
var listReq FlowTemplateListReq
|
||||
@@ -36,21 +37,21 @@ func (hd FlowTemplateHandler) List(c *gin.Context) {
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
// @Summary 流程模板列表-所有
|
||||
// @Tags flow_template-流程模板
|
||||
// @Router /api/admin/flow/flow_template/listAll [get]
|
||||
// @Summary 流程模板列表-所有
|
||||
// @Tags flow_template-流程模板
|
||||
// @Router /api/admin/flow/flow_template/listAll [get]
|
||||
func (hd FlowTemplateHandler) ListAll(c *gin.Context) {
|
||||
res, err := Service.ListAll()
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
// @Summary 流程模板详情
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id query int false "历史id"
|
||||
// @Success 200 {object} FlowTemplateResp "成功"
|
||||
// @Router /api/admin/flow/flow_template/detail [get]
|
||||
// @Summary 流程模板详情
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id query int false "历史id"
|
||||
// @Success 200 {object} FlowTemplateResp "成功"
|
||||
// @Router /api/admin/flow/flow_template/detail [get]
|
||||
func (hd FlowTemplateHandler) Detail(c *gin.Context) {
|
||||
var detailReq FlowTemplateDetailReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) {
|
||||
@@ -60,17 +61,17 @@ func (hd FlowTemplateHandler) Detail(c *gin.Context) {
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
// @Summary 流程模板新增
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param flowName body string false "流程名称"
|
||||
// @Param flowGroup body int false "流程分类"
|
||||
// @Param flowRemark body string false "流程描述"
|
||||
// @Param flowFormData body string false "表单配置"
|
||||
// @Param flowProcessData body string false "流程配置"
|
||||
// @Success 200 {object} response.Response "成功"
|
||||
// @Router /api/admin/flow/flow_template/add [post]
|
||||
// @Summary 流程模板新增
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param flowName body string false "流程名称"
|
||||
// @Param flowGroup body int false "流程分类"
|
||||
// @Param flowRemark body string false "流程描述"
|
||||
// @Param flowFormData body string false "表单配置"
|
||||
// @Param flowProcessData body string false "流程配置"
|
||||
// @Success 200 {object} response.Response "成功"
|
||||
// @Router /api/admin/flow/flow_template/add [post]
|
||||
func (hd FlowTemplateHandler) Add(c *gin.Context) {
|
||||
var addReq FlowTemplateAddReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &addReq)) {
|
||||
@@ -79,18 +80,18 @@ func (hd FlowTemplateHandler) Add(c *gin.Context) {
|
||||
response.CheckAndResp(c, Service.Add(addReq))
|
||||
}
|
||||
|
||||
// @Summary 流程模板编辑
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id body int false "."
|
||||
// @Param flowName body string false "流程名称"
|
||||
// @Param flowGroup body int false "流程分类"
|
||||
// @Param flowRemark body string false "流程描述"
|
||||
// @Param flowFormData body string false "表单配置"
|
||||
// @Param flowProcessData body string false "流程配置"
|
||||
// @Success 200 {object} response.Response "成功"
|
||||
// @Router /api/admin/flow/flow_template/edit [post]
|
||||
// @Summary 流程模板编辑
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id body int false "."
|
||||
// @Param flowName body string false "流程名称"
|
||||
// @Param flowGroup body int false "流程分类"
|
||||
// @Param flowRemark body string false "流程描述"
|
||||
// @Param flowFormData body string false "表单配置"
|
||||
// @Param flowProcessData body string false "流程配置"
|
||||
// @Success 200 {object} response.Response "成功"
|
||||
// @Router /api/admin/flow/flow_template/edit [post]
|
||||
func (hd FlowTemplateHandler) Edit(c *gin.Context) {
|
||||
var editReq FlowTemplateEditReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &editReq)) {
|
||||
@@ -99,13 +100,13 @@ func (hd FlowTemplateHandler) Edit(c *gin.Context) {
|
||||
response.CheckAndResp(c, Service.Edit(editReq))
|
||||
}
|
||||
|
||||
// @Summary 流程模板删除
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id body int false "历史id"
|
||||
// @Success 200 {object} response.Response "成功"
|
||||
// @Router /api/admin/flow/flow_template/del [post]
|
||||
// @Summary 流程模板删除
|
||||
// @Tags flow_template-流程模板
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id body int false "历史id"
|
||||
// @Success 200 {object} response.Response "成功"
|
||||
// @Router /api/admin/flow/flow_template/del [post]
|
||||
func (hd FlowTemplateHandler) Del(c *gin.Context) {
|
||||
var delReq FlowTemplateDelReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &delReq)) {
|
||||
|
||||
Reference in New Issue
Block a user