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.

26 lines
671 B

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