gin-vue-admin 2.0代码重构

This commit is contained in:
QM303176530
2020-04-04 21:39:07 +08:00
parent 5ed41ddd8c
commit 1b9adea284
202 changed files with 1240 additions and 1299 deletions

View File

@@ -0,0 +1,25 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/model"
"github.com/gin-gonic/gin"
)
// @Tags workflow
// @Summary 注册工作流
// @Produce application/json
// @Param data body sysModel.SysWorkflow true "注册工作流接口"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
// @Router /workflow/createWorkFlow [post]
func CreateWorkFlow(c *gin.Context) {
var wk model.SysWorkflow
_ = c.ShouldBindJSON(&wk)
err := wk.Create()
if err != nil {
response.Result(response.ERROR, gin.H{}, fmt.Sprintf("获取失败:%v", err), c)
} else {
response.Result(response.SUCCESS, gin.H{}, "获取成功", c)
}
}