You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
678 B

  1. package v1
  2. import (
  3. "fmt"
  4. "gin-vue-admin/global/response"
  5. "gin-vue-admin/model"
  6. "github.com/gin-gonic/gin"
  7. )
  8. // @Tags workflow
  9. // @Summary 注册工作流
  10. // @Produce application/json
  11. // @Param data body sysModel.SysWorkflow true "注册工作流接口"
  12. // @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
  13. // @Router /workflow/createWorkFlow [post]
  14. func CreateWorkFlow(c *gin.Context) {
  15. var wk model.SysWorkflow
  16. _ = c.ShouldBindJSON(&wk)
  17. err := wk.Create()
  18. if err != nil {
  19. response.Result(response.ERROR, gin.H{}, fmt.Sprintf("获取失败:%v", err), c)
  20. } else {
  21. response.Result(response.SUCCESS, gin.H{}, "获取成功", c)
  22. }
  23. }