diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index f27625e..dd35b7e 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -14,7 +14,8 @@ export default defineConfig({ nav: [ { text: 'Home', link: '/' }, { text: '后端', link: '/server/准备.md' }, - { text: '前端', link: '/admin/准备.md' } + { text: '前端', link: '/admin/准备.md' }, + { text: '在线体验', link: 'https://x.adtk.cn/' }, ], sidebar: [ diff --git a/docs/server/部署Go.md b/docs/server/部署Go.md index cd1b442..7498f5c 100644 --- a/docs/server/部署Go.md +++ b/docs/server/部署Go.md @@ -40,15 +40,14 @@ pm2 start 打包后的二进制文件名 --name x_admin pm2 startup # 保存 pm2 save + + + # 所有任务列表 pm2 list - - # 停止 -```bash pm2 stop x_admin # 重启 -```bash pm2 restart x_admin # 查看日志 pm2 log x_admin diff --git a/server/admin/flow/flow_apply/flow_apply_ctl.go b/server/admin/flow/flow_apply/flow_apply_ctl.go index f7a62b3..7747cfa 100644 --- a/server/admin/flow/flow_apply/flow_apply_ctl.go +++ b/server/admin/flow/flow_apply/flow_apply_ctl.go @@ -11,24 +11,23 @@ import ( type FlowApplyHandler struct{} -// @Summary 申请流程列表 -// @Tags flow_apply-申请流程 -// @Produce json -// @Param Token header string true "token" -// @Param PageNo query int true "页码" -// @Param PageSize query int true "每页数量" -// @Param templateId query int false "模板" -// @Param applyUserId query int false "申请人id" -// @Param applyUserNickname query string false "申请人昵称" -// @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 "流程配置" -// @Param status query int false "状态:1待提交,2审批中,3审批完成,4审批失败" -// @Success 200 {object} []FlowApplyResp "成功" -// @Failure 400 {object} string "请求错误" -// @Router /api/flow_apply/list [get] +// @Summary 申请流程列表 +// @Tags flow_apply-申请流程 +// @Produce json +// @Param Token header string true "token" +// @Param PageNo query int true "页码" +// @Param PageSize query int true "每页数量" +// @Param templateId query int false "模板" +// @Param applyUserId query int false "申请人id" +// @Param applyUserNickname query string false "申请人昵称" +// @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 "流程配置" +// @Param status query int false "状态:1待提交,2审批中,3审批完成,4审批失败" +// @Success 200 {object} response.Response{data=response.PageResp{lists=[]FlowApplyResp}} "成功" +// @Router /api/admin/flow/flow_apply/list [get] func (hd FlowApplyHandler) List(c *gin.Context) { var page request.PageReq var listReq FlowApplyListReq @@ -42,13 +41,13 @@ func (hd FlowApplyHandler) List(c *gin.Context) { response.CheckAndRespWithData(c, res, err) } -// @Summary 申请流程详情 -// @Tags flow_apply-申请流程 -// @Produce json -// @Param Token header string true "token" -// @Param id query int false "申请id" -// @Success 200 {object} FlowApplyResp "成功" -// @Router /api/flow_apply/detail [get] +// @Summary 申请流程详情 +// @Tags flow_apply-申请流程 +// @Produce json +// @Param Token header string true "token" +// @Param id query int false "申请id" +// @Success 200 {object} response.Response{data=FlowApplyResp} "成功" +// @Router /api/admin/flow/flow_apply/detail [get] func (hd FlowApplyHandler) Detail(c *gin.Context) { var detailReq FlowApplyDetailReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) { @@ -58,21 +57,21 @@ func (hd FlowApplyHandler) Detail(c *gin.Context) { response.CheckAndRespWithData(c, res, err) } -// @Summary 申请流程新增 -// @Tags flow_apply-申请流程 -// @Produce json -// @Param Token header string true "token" -// @Param templateId body int false "模板" -// @Param applyUserId body int false "申请人id" -// @Param applyUserNickname body string 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 "流程配置" -// @Param status body int false "状态:1待提交,2审批中,3审批完成,4审批失败" -// @Success 200 {object} response.RespType "成功" -// @Router /api/flow_apply/add [post] +// @Summary 申请流程新增 +// @Tags flow_apply-申请流程 +// @Produce json +// @Param Token header string true "token" +// @Param templateId body int false "模板" +// @Param applyUserId body int false "申请人id" +// @Param applyUserNickname body string 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 "流程配置" +// @Param status body int false "状态:1待提交,2审批中,3审批完成,4审批失败" +// @Success 200 {object} response.Response "成功" +// @Router /api/admin/flow/flow_apply/add [post] func (hd FlowApplyHandler) Add(c *gin.Context) { var addReq FlowApplyAddReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &addReq)) { @@ -88,22 +87,22 @@ func (hd FlowApplyHandler) Add(c *gin.Context) { response.CheckAndResp(c, Service.Add(addReq)) } -// @Summary 申请流程编辑 -// @Tags flow_apply-申请流程 -// @Produce json -// @Param Token header string true "token" -// @Param id body int false "申请id" -// @Param templateId body int false "模板" -// @Param applyUserId body int false "申请人id" -// @Param applyUserNickname body string 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 "流程配置" -// @Param status body int false "状态:1待提交,2审批中,3审批完成,4审批失败" -// @Success 200 {object} response.RespType "成功" -// @Router /api/flow_apply/edit [post] +// @Summary 申请流程编辑 +// @Tags flow_apply-申请流程 +// @Produce json +// @Param Token header string true "token" +// @Param id body int false "申请id" +// @Param templateId body int false "模板" +// @Param applyUserId body int false "申请人id" +// @Param applyUserNickname body string 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 "流程配置" +// @Param status body int false "状态:1待提交,2审批中,3审批完成,4审批失败" +// @Success 200 {object} response.Response "成功" +// @Router /api/admin/flow/flow_apply/edit [post] func (hd FlowApplyHandler) Edit(c *gin.Context) { var editReq FlowApplyEditReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &editReq)) { @@ -112,13 +111,13 @@ func (hd FlowApplyHandler) Edit(c *gin.Context) { response.CheckAndResp(c, Service.Edit(editReq)) } -// @Summary 申请流程删除 -// @Tags flow_apply-申请流程 -// @Produce json -// @Param Token header string true "token" -// @Param id body int false "申请id" -// @Success 200 {object} response.RespType "成功" -// @Router /api/flow_apply/del [post] +// @Summary 申请流程删除 +// @Tags flow_apply-申请流程 +// @Produce json +// @Param Token header string true "token" +// @Param id body int false "申请id" +// @Success 200 {object} response.Response "成功" +// @Router /api/admin/flow/flow_apply/del [post] func (hd FlowApplyHandler) Del(c *gin.Context) { var delReq FlowApplyDelReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &delReq)) { diff --git a/server/admin/flow/flow_history/flow_history_ctl.go b/server/admin/flow/flow_history/flow_history_ctl.go index c518ce7..573e962 100644 --- a/server/admin/flow/flow_history/flow_history_ctl.go +++ b/server/admin/flow/flow_history/flow_history_ctl.go @@ -12,25 +12,24 @@ import ( type FlowHistoryHandler struct { } -// @Summary 流程历史列表 -// @Tags flow_history-流程历史 -// @Produce json -// @Param Token header string true "token" -// @Param PageNo query int true "页码" -// @Param PageSize query int true "每页数量" -// @Param applyId query int false "申请id" -// @Param templateId query int false "模板id" -// @Param applyUserId query int false "申请人id" -// @Param applyUserNickname query string false "申请人昵称" -// @Param approverId query int false "审批人id" -// @Param approverNickname query string false "审批用户昵称" -// @Param nodeId query string false "节点" -// @Param formValue query string false "表单值" -// @Param passStatus query int false "通过状态:0待处理,1通过,2拒绝" -// @Param passRemark query string false "通过备注" -// @Success 200 {object} []FlowHistoryResp "成功" -// @Failure 400 {object} string "请求错误" -// @Router /api/flow_history/list [get] +// @Summary 流程历史列表 +// @Tags flow_history-流程历史 +// @Produce json +// @Param Token header string true "token" +// @Param PageNo query int true "页码" +// @Param PageSize query int true "每页数量" +// @Param applyId query int false "申请id" +// @Param templateId query int false "模板id" +// @Param applyUserId query int false "申请人id" +// @Param applyUserNickname query string false "申请人昵称" +// @Param approverId query int false "审批人id" +// @Param approverNickname query string false "审批用户昵称" +// @Param nodeId query string false "节点" +// @Param formValue query string false "表单值" +// @Param passStatus query int false "通过状态:0待处理,1通过,2拒绝" +// @Param passRemark query string false "通过备注" +// @Success 200 {object} response.Response{data=response.PageResp{lists=[]FlowHistoryResp}} "成功" +// @Router /api/admin/flow/flow_history/list [get] func (hd FlowHistoryHandler) List(c *gin.Context) { var page request.PageReq var listReq = FlowHistoryListReq{ @@ -46,11 +45,11 @@ func (hd FlowHistoryHandler) List(c *gin.Context) { response.CheckAndRespWithData(c, res, err) } -// @Summary 流程历史列表-所有 -// @Tags flow_history-流程历史 -// @Produce json -// @Success 200 {object} []FlowHistoryResp "成功" -// @Router /api/flow_history/listAll [get] +// @Summary 流程历史列表-所有 +// @Tags flow_history-流程历史 +// @Produce json +// @Success 200 {object} response.Response{data=FlowHistoryResp} "成功" +// @Router /api/admin/flow/flow_history/listAll [get] func (hd FlowHistoryHandler) ListAll(c *gin.Context) { var listReq FlowHistoryListReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) { @@ -60,13 +59,13 @@ func (hd FlowHistoryHandler) ListAll(c *gin.Context) { response.CheckAndRespWithData(c, res, err) } -// @Summary 流程历史详情 -// @Tags flow_history-流程历史 -// @Produce json -// @Param Token header string true "token" -// @Param id query int false "历史id" -// @Success 200 {object} FlowHistoryResp "成功" -// @Router /api/flow_history/detail [get] +// @Summary 流程历史详情 +// @Tags flow_history-流程历史 +// @Produce json +// @Param Token header string true "token" +// @Param id query int false "历史id" +// @Success 200 {object} response.Response{data=FlowHistoryResp} "成功" +// @Router /api/admin/flow/flow_history/detail [get] func (hd FlowHistoryHandler) Detail(c *gin.Context) { var detailReq FlowHistoryDetailReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) { @@ -76,22 +75,22 @@ func (hd FlowHistoryHandler) Detail(c *gin.Context) { response.CheckAndRespWithData(c, res, err) } -// @Summary 流程历史新增 -// @Tags flow_history-流程历史 -// @Produce json -// @Param Token header string true "token" -// @Param applyId body int false "申请id" -// @Param templateId body int false "模板id" -// @Param applyUserId body int false "申请人id" -// @Param applyUserNickname body string false "申请人昵称" -// @Param approverId body int false "审批人id" -// @Param approverNickname body string false "审批用户昵称" -// @Param nodeId body string false "节点" -// @Param formValue body string false "表单值" -// @Param passStatus body int false "通过状态:0待处理,1通过,2拒绝" -// @Param passRemark body string false "通过备注" -// @Success 200 {object} response.RespType "成功" -// @Router /api/flow_history/add [post] +// @Summary 流程历史新增 +// @Tags flow_history-流程历史 +// @Produce json +// @Param Token header string true "token" +// @Param applyId body int false "申请id" +// @Param templateId body int false "模板id" +// @Param applyUserId body int false "申请人id" +// @Param applyUserNickname body string false "申请人昵称" +// @Param approverId body int false "审批人id" +// @Param approverNickname body string false "审批用户昵称" +// @Param nodeId body string false "节点" +// @Param formValue body string false "表单值" +// @Param passStatus body int false "通过状态:0待处理,1通过,2拒绝" +// @Param passRemark body string false "通过备注" +// @Success 200 {object} response.Response "成功" +// @Router /api/admin/flow/flow_history/add [post] func (hd FlowHistoryHandler) Add(c *gin.Context) { var addReq FlowHistoryAddReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &addReq)) { @@ -100,23 +99,23 @@ func (hd FlowHistoryHandler) Add(c *gin.Context) { response.CheckAndResp(c, Service.Add(addReq)) } -// @Summary 流程历史编辑 -// @Tags flow_history-流程历史 -// @Produce json -// @Param Token header string true "token" -// @Param id body int false "历史id" -// @Param applyId body int false "申请id" -// @Param templateId body int false "模板id" -// @Param applyUserId body int false "申请人id" -// @Param applyUserNickname body string false "申请人昵称" -// @Param approverId body int false "审批人id" -// @Param approverNickname body string false "审批用户昵称" -// @Param nodeId body string false "节点" -// @Param formValue body string false "表单值" -// @Param passStatus body int false "通过状态:0待处理,1通过,2拒绝" -// @Param passRemark body string false "通过备注" -// @Success 200 {object} response.RespType "成功" -// @Router /api/flow_history/edit [post] +// @Summary 流程历史编辑 +// @Tags flow_history-流程历史 +// @Produce json +// @Param Token header string true "token" +// @Param id body int false "历史id" +// @Param applyId body int false "申请id" +// @Param templateId body int false "模板id" +// @Param applyUserId body int false "申请人id" +// @Param applyUserNickname body string false "申请人昵称" +// @Param approverId body int false "审批人id" +// @Param approverNickname body string false "审批用户昵称" +// @Param nodeId body string false "节点" +// @Param formValue body string false "表单值" +// @Param passStatus body int false "通过状态:0待处理,1通过,2拒绝" +// @Param passRemark body string false "通过备注" +// @Success 200 {object} response.Response "成功" +// @Router /api/admin/flow/flow_history/edit [post] func (hd FlowHistoryHandler) Edit(c *gin.Context) { var editReq FlowHistoryEditReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &editReq)) { @@ -125,13 +124,13 @@ func (hd FlowHistoryHandler) Edit(c *gin.Context) { response.CheckAndResp(c, Service.Edit(editReq)) } -// @Summary 流程历史删除 -// @Tags flow_history-流程历史 -// @Produce json -// @Param Token header string true "token" -// @Param id body int false "历史id" -// @Success 200 {object} response.RespType "成功" -// @Router /api/flow_history/del [post] +// @Summary 流程历史删除 +// @Tags flow_history-流程历史 +// @Produce json +// @Param Token header string true "token" +// @Param id body int false "历史id" +// @Success 200 {object} response.Response "成功" +// @Router /api/admin/flow/flow_history/del [post] func (hd FlowHistoryHandler) Del(c *gin.Context) { var delReq FlowHistoryDelReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &delReq)) { @@ -142,7 +141,7 @@ func (hd FlowHistoryHandler) Del(c *gin.Context) { // 提交申请,通过审批 // -// @Router /api/flow_apply/pass [post] +// @Router /api/admin/flow_apply/pass [post] func (hd FlowHistoryHandler) Pass(c *gin.Context) { var pass PassReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &pass)) { @@ -154,7 +153,7 @@ func (hd FlowHistoryHandler) Pass(c *gin.Context) { } // 拒绝审批 -// @Router /api/flow_apply/back [post] +// @Router /api/admin/flow_apply/back [post] func (hd FlowHistoryHandler) Back(c *gin.Context) { var back BackReq if response.IsFailWithResp(c, util.VerifyUtil.VerifyBody(c, &back)) { diff --git a/server/admin/flow/flow_template/flow_template_ctl.go b/server/admin/flow/flow_template/flow_template_ctl.go index 3229d94..19284be 100644 --- a/server/admin/flow/flow_template/flow_template_ctl.go +++ b/server/admin/flow/flow_template/flow_template_ctl.go @@ -10,20 +10,19 @@ import ( 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} []FlowTemplateResp "成功" -// @Failure 400 {object} string "请求错误" -// @Router /api/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 @@ -37,21 +36,21 @@ func (hd FlowTemplateHandler) List(c *gin.Context) { response.CheckAndRespWithData(c, res, err) } -// @Summary 流程模板列表-所有 -// @Tags flow_template-流程模板 -// @Router /api/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/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)) { @@ -61,17 +60,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.RespType "成功" -// @Router /api/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)) { @@ -80,18 +79,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.RespType "成功" -// @Router /api/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)) { @@ -100,13 +99,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.RespType "成功" -// @Router /api/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)) { diff --git a/server/admin/generator/tpl_utils/templates/gocode/controller.go.tpl b/server/admin/generator/tpl_utils/templates/gocode/controller.go.tpl index 78500a5..a0a72fe 100644 --- a/server/admin/generator/tpl_utils/templates/gocode/controller.go.tpl +++ b/server/admin/generator/tpl_utils/templates/gocode/controller.go.tpl @@ -22,16 +22,15 @@ type {{{ title (toCamelCase .ModuleName) }}}Handler struct {} {{{- range .Columns }}} {{{- if .IsQuery }}} {{{- if eq .HtmlType "datetime" }}} -// @Param {{{ toCamelCase .GoField }}}Start query {{{ .GoType }}} false "{{{ .ColumnComment }}}." -// @Param {{{ toCamelCase .GoField }}}End query {{{ .GoType }}} false "{{{ .ColumnComment }}}." +// @Param {{{ toCamelCase .GoField }}}Start query {{{ .GoType }}} false "{{{ .ColumnComment }}}" +// @Param {{{ toCamelCase .GoField }}}End query {{{ .GoType }}} false "{{{ .ColumnComment }}}" {{{- else }}} -// @Param {{{ toCamelCase .GoField }}} query {{{ .GoType }}} false "{{{ .ColumnComment }}}." +// @Param {{{ toCamelCase .GoField }}} query {{{ .GoType }}} false "{{{ .ColumnComment }}}" {{{- end }}} {{{- end }}} {{{- end }}} -// @Success 200 {object} []{{{ title (toCamelCase .EntityName) }}}Resp "成功" -// @Failure 400 {object} string "请求错误" -// @Router /api/admin/{{{ .ModuleName }}}/list [get] +//@Success 200 {object} {{{getPageResp (title (toCamelCase .EntityName)) }}} "成功" +//@Router /api/admin/{{{ .ModuleName }}}/list [get] func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) List(c *gin.Context) { var page request.PageReq var listReq {{{ title (toCamelCase .EntityName) }}}ListReq @@ -51,14 +50,14 @@ func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) List(c *gin.Context) { {{{- range .Columns }}} {{{- if .IsQuery }}} {{{- if eq .HtmlType "datetime" }}} -// @Param {{{ toCamelCase .GoField }}}Start query {{{ .GoType }}} false "{{{ .ColumnComment }}}." -// @Param {{{ toCamelCase .GoField }}}End query {{{ .GoType }}} false "{{{ .ColumnComment }}}." +// @Param {{{ toCamelCase .GoField }}}Start query {{{ .GoType }}} false "{{{ .ColumnComment }}}" +// @Param {{{ toCamelCase .GoField }}}End query {{{ .GoType }}} false "{{{ .ColumnComment }}}" {{{- else }}} -// @Param {{{ toCamelCase .GoField }}} query {{{ .GoType }}} false "{{{ .ColumnComment }}}." +// @Param {{{ toCamelCase .GoField }}} query {{{ .GoType }}} false "{{{ .ColumnComment }}}" {{{- end }}} {{{- end }}} {{{- end }}} -// @Success 200 {object} []{{{ title (toCamelCase .EntityName) }}}Resp "成功" +// @Success 200 {object} response.Response{ data=[]{{{ title (toCamelCase .EntityName) }}}Resp} "成功" // @Router /api/admin/{{{ .ModuleName }}}/listAll [get] func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) ListAll(c *gin.Context) { var listReq {{{ title (toCamelCase .EntityName) }}}ListReq @@ -75,10 +74,10 @@ func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) ListAll(c *gin.Context // @Param Token header string true "token" {{{- range .Columns }}} {{{- if .IsPk }}} -// @Param {{{ toCamelCase .GoField }}} query {{{ .GoType }}} false "{{{ .ColumnComment }}}." +// @Param {{{ toCamelCase .GoField }}} query {{{ .GoType }}} false "{{{ .ColumnComment }}}" {{{- end }}} {{{- end }}} -// @Success 200 {object} {{{ title (toCamelCase .EntityName) }}}Resp "成功" +// @Success 200 {object} response.Response{ data={{{ title (toCamelCase .EntityName) }}}Resp} "成功" // @Router /api/admin/{{{ .ModuleName }}}/detail [get] func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) Detail(c *gin.Context) { var detailReq {{{ title (toCamelCase .EntityName) }}}DetailReq @@ -96,10 +95,10 @@ func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) Detail(c *gin.Context) // @Param Token header string true "token" {{{- range .Columns }}} {{{- if .IsInsert }}} -// @Param {{{ toCamelCase .GoField }}} body {{{ .GoType }}} false "{{{ .ColumnComment }}}." +// @Param {{{ toCamelCase .GoField }}} body {{{ .GoType }}} false "{{{ .ColumnComment }}}" {{{- end }}} {{{- end }}} -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/{{{ .ModuleName }}}/add [post] func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) Add(c *gin.Context) { var addReq {{{ title (toCamelCase .EntityName) }}}AddReq @@ -114,10 +113,10 @@ func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) Add(c *gin.Context) { // @Param Token header string true "token" {{{- range .Columns }}} {{{- if .IsEdit }}} -// @Param {{{ toCamelCase .GoField }}} body {{{ .GoType }}} false "{{{ .ColumnComment }}}." +// @Param {{{ toCamelCase .GoField }}} body {{{ .GoType }}} false "{{{ .ColumnComment }}}" {{{- end }}} {{{- end }}} -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/{{{ .ModuleName }}}/edit [post] func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) Edit(c *gin.Context) { var editReq {{{ title (toCamelCase .EntityName) }}}EditReq @@ -132,10 +131,10 @@ func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) Edit(c *gin.Context) { // @Param Token header string true "token" {{{- range .Columns }}} {{{- if .IsPk }}} -// @Param {{{ toCamelCase .GoField }}} body {{{ .GoType }}} false "{{{ .ColumnComment }}}." +// @Param {{{ toCamelCase .GoField }}} body {{{ .GoType }}} false "{{{ .ColumnComment }}}" {{{- end }}} {{{- end }}} -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/{{{ .ModuleName }}}/del [post] func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) Del(c *gin.Context) { var delReq {{{ title (toCamelCase .EntityName) }}}DelReq @@ -153,7 +152,12 @@ func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) Del(c *gin.Context) { // @Param Token header string true "token" {{{- range .Columns }}} {{{- if .IsQuery }}} -// @Param {{{ toCamelCase .GoField }}} query {{{ .GoType }}} false "{{{ .ColumnComment }}}." +{{{- if eq .HtmlType "datetime" }}} +// @Param {{{ toCamelCase .GoField }}}Start query {{{ .GoType }}} false "{{{ .ColumnComment }}}" +// @Param {{{ toCamelCase .GoField }}}End query {{{ .GoType }}} false "{{{ .ColumnComment }}}" +{{{- else }}} +// @Param {{{ toCamelCase .GoField }}} query {{{ .GoType }}} false "{{{ .ColumnComment }}}" +{{{- end }}} {{{- end }}} {{{- end }}} // @Router /api/admin/{{{ .ModuleName }}}/ExportFile [get] @@ -178,6 +182,7 @@ func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) ExportFile(c *gin.Cont // @Summary {{{ .FunctionName }}}导入 // @Tags {{{ .ModuleName }}}-{{{ .FunctionName }}} // @Produce json +// @Router /api/admin/{{{ .ModuleName }}}/ImportFile [post] func (hd {{{ title (toCamelCase .ModuleName) }}}Handler) ImportFile(c *gin.Context) { file, _, err := c.Request.FormFile("file") if err != nil { diff --git a/server/admin/generator/tpl_utils/tpl.go b/server/admin/generator/tpl_utils/tpl.go index 0a2c519..add4421 100644 --- a/server/admin/generator/tpl_utils/tpl.go +++ b/server/admin/generator/tpl_utils/tpl.go @@ -24,6 +24,7 @@ var TemplateUtil = templateUtil{ "toCamelCase": util.StringUtil.ToCamelCase, "contains": util.ToolsUtil.Contains, "goToTsType": util.ToolsUtil.GoToTsType, + "getPageResp": util.ToolsUtil.GetPageResp, }), } diff --git a/server/admin/monitor_client/monitor_client_ctl.go b/server/admin/monitor_client/monitor_client_ctl.go index 97f083d..fb58ca1 100644 --- a/server/admin/monitor_client/monitor_client_ctl.go +++ b/server/admin/monitor_client/monitor_client_ctl.go @@ -3,37 +3,39 @@ package monitor_client import ( "net/http" "time" - "github.com/gin-gonic/gin" "x_admin/core/request" "x_admin/core/response" "x_admin/util" "x_admin/util/excel" + + "github.com/gin-gonic/gin" ) - -type MonitorClientHandler struct {} +type MonitorClientHandler struct{} -// @Summary 监控-客户端信息列表 -// @Tags monitor_client-监控-客户端信息 -// @Produce json -// @Param Token header string true "token" -// @Param PageNo query int true "页码" -// @Param PageSize query int true "每页数量" -// @Param projectKey query string false "项目key." -// @Param clientId query string false "sdk生成的客户端id." -// @Param userId query string false "用户id." -// @Param os query string false "系统." -// @Param browser query string false "浏览器." -// @Param city query string false "城市." -// @Param width query int false "屏幕." -// @Param height query int false "屏幕高度." -// @Param ua query string false "ua记录." -// @Param createTimeStart query core.TsTime false "创建时间." -// @Param createTimeEnd query core.TsTime false "创建时间." -// @Param clientTimeStart query core.TsTime false "更新时间." -// @Param clientTimeEnd query core.TsTime false "更新时间." -// @Success 200 {object} []MonitorClientResp "成功" -// @Failure 400 {object} string "请求错误" +// @Summary 监控-客户端信息列表 +// @Tags monitor_client-监控-客户端信息 +// @Produce json +// @Param Token header string true "token" +// @Param PageNo query int true "页码" +// @Param PageSize query int true "每页数量" +// @Param projectKey query string false "项目key." +// @Param clientId query string false "sdk生成的客户端id." +// @Param userId query string false "用户id." +// @Param os query string false "系统." +// @Param browser query string false "浏览器." +// @Param city query string false "城市." +// @Param width query int false "屏幕." +// @Param height query int false "屏幕高度." +// @Param ua query string false "ua记录." +// @Param createTimeStart query core.TsTime false "创建时间." +// @Param createTimeEnd query core.TsTime false "创建时间." +// @Param clientTimeStart query core.TsTime false "更新时间." +// @Param clientTimeEnd query core.TsTime false "更新时间." +// +// @Success 200 {object} response.Response{data=response.PageResp{lists=[]MonitorClientResp}} "成功" +// +// @Failure 400 {object} string "请求错误" // @Router /api/admin/monitor_client/list [get] func (hd MonitorClientHandler) List(c *gin.Context) { var page request.PageReq @@ -50,21 +52,21 @@ func (hd MonitorClientHandler) List(c *gin.Context) { // @Summary 监控-客户端信息列表-所有 // @Tags monitor_client-监控-客户端信息 -// @Produce json -// @Param projectKey query string false "项目key." -// @Param clientId query string false "sdk生成的客户端id." -// @Param userId query string false "用户id." -// @Param os query string false "系统." -// @Param browser query string false "浏览器." -// @Param city query string false "城市." -// @Param width query int false "屏幕." -// @Param height query int false "屏幕高度." -// @Param ua query string false "ua记录." -// @Param createTimeStart query core.TsTime false "创建时间." -// @Param createTimeEnd query core.TsTime false "创建时间." -// @Param clientTimeStart query core.TsTime false "更新时间." -// @Param clientTimeEnd query core.TsTime false "更新时间." -// @Success 200 {object} []MonitorClientResp "成功" +// @Produce json +// @Param projectKey query string false "项目key." +// @Param clientId query string false "sdk生成的客户端id." +// @Param userId query string false "用户id." +// @Param os query string false "系统." +// @Param browser query string false "浏览器." +// @Param city query string false "城市." +// @Param width query int false "屏幕." +// @Param height query int false "屏幕高度." +// @Param ua query string false "ua记录." +// @Param createTimeStart query core.TsTime false "创建时间." +// @Param createTimeEnd query core.TsTime false "创建时间." +// @Param clientTimeStart query core.TsTime false "更新时间." +// @Param clientTimeEnd query core.TsTime false "更新时间." +// @Success 200 {object} response.Response{data=[]MonitorClientResp} "成功" // @Router /api/admin/monitor_client/listAll [get] func (hd MonitorClientHandler) ListAll(c *gin.Context) { var listReq MonitorClientListReq @@ -78,9 +80,9 @@ func (hd MonitorClientHandler) ListAll(c *gin.Context) { // @Summary 监控-客户端信息详情 // @Tags monitor_client-监控-客户端信息 // @Produce json -// @Param Token header string true "token" -// @Param id query int false "uuid." -// @Success 200 {object} MonitorClientResp "成功" +// @Param Token header string true "token" +// @Param id query int false "uuid." +// @Success 200 {object} response.Response{data=MonitorClientResp} "成功" // @Router /api/admin/monitor_client/detail [get] func (hd MonitorClientHandler) Detail(c *gin.Context) { var detailReq MonitorClientDetailReq @@ -91,21 +93,20 @@ func (hd MonitorClientHandler) Detail(c *gin.Context) { response.CheckAndRespWithData(c, res, err) } - // @Summary 监控-客户端信息新增 // @Tags monitor_client-监控-客户端信息 // @Produce json // @Param Token header string true "token" -// @Param clientId body string false "sdk生成的客户端id." +// @Param clientId body string false "sdk生成的客户端id." // @Param userId body string false "用户id." -// @Param os body string false "系统." +// @Param os body string false "系统." // @Param browser body string false "浏览器." // @Param city body string false "城市." -// @Param width body int false "屏幕." -// @Param height body int false "屏幕高度." -// @Param ua body string false "ua记录." -// @Param clientTime body core.TsTime false "更新时间." -// @Success 200 {object} response.RespType "成功" +// @Param width body int false "屏幕." +// @Param height body int false "屏幕高度." +// @Param ua body string false "ua记录." +// @Param clientTime body core.TsTime false "更新时间." +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_client/add [post] func (hd MonitorClientHandler) Add(c *gin.Context) { var addReq MonitorClientAddReq @@ -114,20 +115,21 @@ func (hd MonitorClientHandler) Add(c *gin.Context) { } response.CheckAndResp(c, Service.Add(addReq)) } + // @Summary 监控-客户端信息编辑 // @Tags monitor_client-监控-客户端信息 // @Produce json // @Param Token header string true "token" -// @Param clientId body string false "sdk生成的客户端id." +// @Param clientId body string false "sdk生成的客户端id." // @Param userId body string false "用户id." -// @Param os body string false "系统." +// @Param os body string false "系统." // @Param browser body string false "浏览器." // @Param city body string false "城市." -// @Param width body int false "屏幕." -// @Param height body int false "屏幕高度." -// @Param ua body string false "ua记录." -// @Param clientTime body core.TsTime false "更新时间." -// @Success 200 {object} response.RespType "成功" +// @Param width body int false "屏幕." +// @Param height body int false "屏幕高度." +// @Param ua body string false "ua记录." +// @Param clientTime body core.TsTime false "更新时间." +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_client/edit [post] func (hd MonitorClientHandler) Edit(c *gin.Context) { var editReq MonitorClientEditReq @@ -136,12 +138,13 @@ func (hd MonitorClientHandler) Edit(c *gin.Context) { } response.CheckAndResp(c, Service.Edit(editReq)) } + // @Summary 监控-客户端信息删除 // @Tags monitor_client-监控-客户端信息 // @Produce json -// @Param Token header string true "token" -// @Param id body int false "uuid." -// @Success 200 {object} response.RespType "成功" +// @Param Token header string true "token" +// @Param id body int false "uuid." +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_client/del [post] func (hd MonitorClientHandler) Del(c *gin.Context) { var delReq MonitorClientDelReq @@ -151,23 +154,21 @@ func (hd MonitorClientHandler) Del(c *gin.Context) { response.CheckAndResp(c, Service.Del(delReq.Id)) } - - // @Summary 监控-客户端信息导出 // @Tags monitor_client-监控-客户端信息 // @Produce json -// @Param Token header string true "token" -// @Param projectKey query string false "项目key." -// @Param clientId query string false "sdk生成的客户端id." -// @Param userId query string false "用户id." -// @Param os query string false "系统." -// @Param browser query string false "浏览器." -// @Param city query string false "城市." -// @Param width query int false "屏幕." -// @Param height query int false "屏幕高度." -// @Param ua query string false "ua记录." -// @Param createTime query core.TsTime false "创建时间." -// @Param clientTime query core.TsTime false "更新时间." +// @Param Token header string true "token" +// @Param projectKey query string false "项目key." +// @Param clientId query string false "sdk生成的客户端id." +// @Param userId query string false "用户id." +// @Param os query string false "系统." +// @Param browser query string false "浏览器." +// @Param city query string false "城市." +// @Param width query int false "屏幕." +// @Param height query int false "屏幕高度." +// @Param ua query string false "ua记录." +// @Param createTime query core.TsTime false "创建时间." +// @Param clientTime query core.TsTime false "更新时间." // @Router /api/admin/monitor_client/ExportFile [get] func (hd MonitorClientHandler) ExportFile(c *gin.Context) { var listReq MonitorClientListReq @@ -184,12 +185,12 @@ func (hd MonitorClientHandler) ExportFile(c *gin.Context) { response.FailWithMsg(c, response.SystemError, "导出失败") return } - excel.DownLoadExcel("监控-客户端信息" + time.Now().Format("20060102-150405"), c.Writer, f) + excel.DownLoadExcel("监控-客户端信息"+time.Now().Format("20060102-150405"), c.Writer, f) } -// @Summary 监控-客户端信息导入 -// @Tags monitor_client-监控-客户端信息 -// @Produce json +// @Summary 监控-客户端信息导入 +// @Tags monitor_client-监控-客户端信息 +// @Produce json func (hd MonitorClientHandler) ImportFile(c *gin.Context) { file, _, err := c.Request.FormFile("file") if err != nil { @@ -203,9 +204,9 @@ func (hd MonitorClientHandler) ImportFile(c *gin.Context) { c.String(http.StatusInternalServerError, err.Error()) return } -// for _, t := range importList { -// fmt.Printf("%#v", t) -// } + // for _, t := range importList { + // fmt.Printf("%#v", t) + // } err = Service.ImportFile(importList) response.CheckAndResp(c, err) -} \ No newline at end of file +} diff --git a/server/admin/monitor_project/monitor_project_ctl.go b/server/admin/monitor_project/monitor_project_ctl.go index 3cdc170..f51de6a 100644 --- a/server/admin/monitor_project/monitor_project_ctl.go +++ b/server/admin/monitor_project/monitor_project_ctl.go @@ -17,14 +17,14 @@ type MonitorProjectHandler struct{} // @Summary 错误项目列表 // @Tags monitor_project-错误项目 // @Produce json -// @Param Token header string true "token" -// @Param PageNo query int true "页码" -// @Param PageSize query int true "每页数量" -// @Param projectKey query string false "项目uuid." -// @Param projectName query string false "项目名称." -// @Param projectType query string false "项目类型go java web node php 等." -// @Success 200 {object} []MonitorProjectResp "成功" -// @Failure 400 {object} string "请求错误" +// @Param Token header string true "token" +// @Param PageNo query int true "页码" +// @Param PageSize query int true "每页数量" +// @Param projectKey query string false "项目uuid." +// @Param projectName query string false "项目名称." +// @Param projectType query string false "项目类型go java web node php 等." +// @Success 200 {object} response.Response{data=response.PageResp{lists=[]MonitorProjectResp}} "成功" +// @Failure 400 {object} string "请求错误" // @Router /api/admin/monitor_project/list [get] func (hd MonitorProjectHandler) List(c *gin.Context) { var page request.PageReq @@ -42,7 +42,7 @@ func (hd MonitorProjectHandler) List(c *gin.Context) { // @Summary 错误项目列表-所有 // @Tags monitor_project-错误项目 // @Produce json -// @Success 200 {object} []MonitorProjectResp "成功" +// @Success 200 {object} response.Response{data=[]MonitorProjectResp} "成功" // @Router /api/admin/monitor_project/listAll [get] func (hd MonitorProjectHandler) ListAll(c *gin.Context) { res, err := Service.ListAll() @@ -56,9 +56,9 @@ func (hd MonitorProjectHandler) ListAll(c *gin.Context) { // @Summary 错误项目详情 // @Tags monitor_project-错误项目 // @Produce json -// @Param Token header string true "token" -// @Param id query int false "项目id." -// @Success 200 {object} MonitorProjectResp "成功" +// @Param Token header string true "token" +// @Param id query int false "项目id." +// @Success 200 {object} response.Response{data=MonitorProjectResp} "成功" // @Router /api/admin/monitor_project/detail [get] func (hd MonitorProjectHandler) Detail(c *gin.Context) { var detailReq MonitorProjectDetailReq @@ -76,7 +76,7 @@ func (hd MonitorProjectHandler) Detail(c *gin.Context) { // @Param projectKey body string false "项目uuid." // @Param projectName body string false "项目名称." // @Param projectType body string false "项目类型go java web node php 等." -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_project/add [post] func (hd MonitorProjectHandler) Add(c *gin.Context) { var addReq MonitorProjectAddReq @@ -94,7 +94,7 @@ func (hd MonitorProjectHandler) Add(c *gin.Context) { // @Param projectKey body string false "项目uuid." // @Param projectName body string false "项目名称." // @Param projectType body string false "项目类型go java web node php 等." -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_project/edit [post] func (hd MonitorProjectHandler) Edit(c *gin.Context) { var editReq MonitorProjectEditReq @@ -109,7 +109,7 @@ func (hd MonitorProjectHandler) Edit(c *gin.Context) { // @Produce json // @Param Token header string true "token" // @Param id body int false "项目id." -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_project/del [post] func (hd MonitorProjectHandler) Del(c *gin.Context) { var delReq MonitorProjectDelReq diff --git a/server/admin/monitor_web/monitor_web_ctl.go b/server/admin/monitor_web/monitor_web_ctl.go index 7b23352..99a09b3 100644 --- a/server/admin/monitor_web/monitor_web_ctl.go +++ b/server/admin/monitor_web/monitor_web_ctl.go @@ -85,7 +85,7 @@ func (hd MonitorWebHandler) Detail(c *gin.Context) { // @Param message body string false "错误消息." // @Param stack body string false "错误堆栈." // @Param clientTime body int false "客户端时间." -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_web/add [post] func (hd MonitorWebHandler) Add(c *gin.Context) { var addReq MonitorWebAddReq @@ -107,7 +107,7 @@ func (hd MonitorWebHandler) Add(c *gin.Context) { // @Param message body string false "错误消息." // @Param stack body string false "错误堆栈." // @Param clientTime body int false "客户端时间." -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_web/edit [post] func (hd MonitorWebHandler) Edit(c *gin.Context) { var editReq MonitorWebEditReq @@ -122,7 +122,7 @@ func (hd MonitorWebHandler) Edit(c *gin.Context) { // @Produce json // @Param Token header string true "token" // @Param id body int false "uuid." -// @Success 200 {object} response.RespType "成功" +// @Success 200 {object} response.Response "成功" // @Router /api/admin/monitor_web/del [post] func (hd MonitorWebHandler) Del(c *gin.Context) { var delReq MonitorWebDelReq diff --git a/server/docs/docs.go b/server/docs/docs.go index ae17abd..765d396 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -24,15 +24,1226 @@ const docTemplate = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/api/admin/flow/flow_apply/add": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程新增", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "模板", + "name": "templateId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人id", + "name": "applyUserId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程名称", + "name": "flowName", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程分类", + "name": "flowGroup", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程描述", + "name": "flowRemark", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单配置", + "name": "flowFormData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程配置", + "name": "flowProcessData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "状态:1待提交,2审批中,3审批完成,4审批失败", + "name": "status", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_apply/del": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程删除", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "申请id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_apply/detail": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程详情", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "申请id", + "name": "id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/flow_apply.FlowApplyResp" + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_apply/edit": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程编辑", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "申请id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "模板", + "name": "templateId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人id", + "name": "applyUserId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程名称", + "name": "flowName", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程分类", + "name": "flowGroup", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程描述", + "name": "flowRemark", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单配置", + "name": "flowFormData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程配置", + "name": "flowProcessData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "状态:1待提交,2审批中,3审批完成,4审批失败", + "name": "status", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_apply/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程列表", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "页码", + "name": "PageNo", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "每页数量", + "name": "PageSize", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "模板", + "name": "templateId", + "in": "query" + }, + { + "type": "integer", + "description": "申请人id", + "name": "applyUserId", + "in": "query" + }, + { + "type": "string", + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "query" + }, + { + "type": "string", + "description": "流程名称", + "name": "flowName", + "in": "query" + }, + { + "type": "integer", + "description": "流程分类", + "name": "flowGroup", + "in": "query" + }, + { + "type": "string", + "description": "流程描述", + "name": "flowRemark", + "in": "query" + }, + { + "type": "string", + "description": "表单配置", + "name": "flowFormData", + "in": "query" + }, + { + "type": "string", + "description": "流程配置", + "name": "flowProcessData", + "in": "query" + }, + { + "type": "integer", + "description": "状态:1待提交,2审批中,3审批完成,4审批失败", + "name": "status", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/flow_apply.FlowApplyResp" + } + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_history/add": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史新增", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "申请id", + "name": "applyId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "模板id", + "name": "templateId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人id", + "name": "applyUserId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "审批人id", + "name": "approverId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "审批用户昵称", + "name": "approverNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "节点", + "name": "nodeId", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单值", + "name": "formValue", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "通过状态:0待处理,1通过,2拒绝", + "name": "passStatus", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "通过备注", + "name": "passRemark", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_history/del": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史删除", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "历史id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_history/detail": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史详情", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "历史id", + "name": "id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/flow_history.FlowHistoryResp" + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_history/edit": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史编辑", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "历史id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请id", + "name": "applyId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "模板id", + "name": "templateId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人id", + "name": "applyUserId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "审批人id", + "name": "approverId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "审批用户昵称", + "name": "approverNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "节点", + "name": "nodeId", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单值", + "name": "formValue", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "通过状态:0待处理,1通过,2拒绝", + "name": "passStatus", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "通过备注", + "name": "passRemark", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_history/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史列表", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "页码", + "name": "PageNo", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "每页数量", + "name": "PageSize", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "申请id", + "name": "applyId", + "in": "query" + }, + { + "type": "integer", + "description": "模板id", + "name": "templateId", + "in": "query" + }, + { + "type": "integer", + "description": "申请人id", + "name": "applyUserId", + "in": "query" + }, + { + "type": "string", + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "query" + }, + { + "type": "integer", + "description": "审批人id", + "name": "approverId", + "in": "query" + }, + { + "type": "string", + "description": "审批用户昵称", + "name": "approverNickname", + "in": "query" + }, + { + "type": "string", + "description": "节点", + "name": "nodeId", + "in": "query" + }, + { + "type": "string", + "description": "表单值", + "name": "formValue", + "in": "query" + }, + { + "type": "integer", + "description": "通过状态:0待处理,1通过,2拒绝", + "name": "passStatus", + "in": "query" + }, + { + "type": "string", + "description": "通过备注", + "name": "passRemark", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/flow_history.FlowHistoryResp" + } + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_history/listAll": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史列表-所有", + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/flow_history.FlowHistoryResp" + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_template/add": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板新增", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "流程名称", + "name": "flowName", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程分类", + "name": "flowGroup", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程描述", + "name": "flowRemark", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单配置", + "name": "flowFormData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程配置", + "name": "flowProcessData", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_template/del": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板删除", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "历史id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_template/detail": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板详情", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "历史id", + "name": "id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/flow_template.FlowTemplateResp" + } + } + } + } + }, + "/api/admin/flow/flow_template/edit": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板编辑", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": ".", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程名称", + "name": "flowName", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程分类", + "name": "flowGroup", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程描述", + "name": "flowRemark", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单配置", + "name": "flowFormData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程配置", + "name": "flowProcessData", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_template/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板列表", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "页码", + "name": "PageNo", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "每页数量", + "name": "PageSize", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "流程名称", + "name": "flowName", + "in": "query" + }, + { + "type": "integer", + "description": "流程分类", + "name": "flowGroup", + "in": "query" + }, + { + "type": "string", + "description": "流程描述", + "name": "flowRemark", + "in": "query" + }, + { + "type": "string", + "description": "表单配置", + "name": "flowFormData", + "in": "query" + }, + { + "type": "string", + "description": "流程配置", + "name": "flowProcessData", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/flow_template.FlowTemplateResp" + } + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_template/listAll": { + "get": { + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板列表-所有", + "responses": {} + } + }, + "/api/admin/flow_apply/back": { + "post": { + "responses": {} + } + }, + "/api/admin/flow_apply/pass": { + "post": { + "responses": {} + } + }, "/api/admin/monitor_client/ExportFile": { "get": { "produces": [ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息导出", + "summary": "监控-客户端信息导出", "parameters": [ { "type": "string", @@ -94,12 +1305,6 @@ const docTemplate = `{ "description": "ua记录.", "name": "ua", "in": "query" - }, - { - "type": "integer", - "description": "客户端时间.", - "name": "clientTime", - "in": "query" } ], "responses": {} @@ -111,9 +1316,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息新增", + "summary": "监控-客户端信息新增", "parameters": [ { "type": "string", @@ -122,14 +1327,6 @@ const docTemplate = `{ "in": "header", "required": true }, - { - "description": "项目key.", - "name": "projectKey", - "in": "body", - "schema": { - "type": "string" - } - }, { "description": "sdk生成的客户端id.", "name": "clientId", @@ -195,11 +1392,11 @@ const docTemplate = `{ } }, { - "description": "客户端时间.", + "description": "更新时间.", "name": "clientTime", "in": "body", "schema": { - "type": "integer" + "type": "string" } } ], @@ -207,7 +1404,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -219,9 +1416,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息删除", + "summary": "监控-客户端信息删除", "parameters": [ { "type": "string", @@ -243,7 +1440,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -255,9 +1452,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息详情", + "summary": "监控-客户端信息详情", "parameters": [ { "type": "string", @@ -277,7 +1474,19 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/monitor_client.MonitorClientResp" + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/monitor_client.MonitorClientResp" + } + } + } + ] } } } @@ -289,9 +1498,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息编辑", + "summary": "监控-客户端信息编辑", "parameters": [ { "type": "string", @@ -300,22 +1509,6 @@ const docTemplate = `{ "in": "header", "required": true }, - { - "description": "uuid.", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "项目key.", - "name": "projectKey", - "in": "body", - "schema": { - "type": "string" - } - }, { "description": "sdk生成的客户端id.", "name": "clientId", @@ -381,11 +1574,11 @@ const docTemplate = `{ } }, { - "description": "客户端时间.", + "description": "更新时间.", "name": "clientTime", "in": "body", "schema": { - "type": "integer" + "type": "string" } } ], @@ -393,7 +1586,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -405,9 +1598,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息列表", + "summary": "监控-客户端信息列表", "parameters": [ { "type": "string", @@ -483,22 +1676,40 @@ const docTemplate = `{ "description": "ua记录.", "name": "ua", "in": "query" - }, - { - "type": "integer", - "description": "客户端时间.", - "name": "clientTime", - "in": "query" } ], "responses": { "200": { "description": "成功", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/monitor_client.MonitorClientResp" - } + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/monitor_client.MonitorClientResp" + } + } + } + } + ] + } + } + } + ] } }, "400": { @@ -516,17 +1727,85 @@ const docTemplate = `{ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" + ], + "summary": "监控-客户端信息列表-所有", + "parameters": [ + { + "type": "string", + "description": "项目key.", + "name": "projectKey", + "in": "query" + }, + { + "type": "string", + "description": "sdk生成的客户端id.", + "name": "clientId", + "in": "query" + }, + { + "type": "string", + "description": "用户id.", + "name": "userId", + "in": "query" + }, + { + "type": "string", + "description": "系统.", + "name": "os", + "in": "query" + }, + { + "type": "string", + "description": "浏览器.", + "name": "browser", + "in": "query" + }, + { + "type": "string", + "description": "城市.", + "name": "city", + "in": "query" + }, + { + "type": "integer", + "description": "屏幕.", + "name": "width", + "in": "query" + }, + { + "type": "integer", + "description": "屏幕高度.", + "name": "height", + "in": "query" + }, + { + "type": "string", + "description": "ua记录.", + "name": "ua", + "in": "query" + } ], - "summary": "客户端信息列表-所有", "responses": { "200": { "description": "成功", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/monitor_client.MonitorClientResp" - } + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/monitor_client.MonitorClientResp" + } + } + } + } + ] } } } @@ -617,7 +1896,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -653,7 +1932,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -687,7 +1966,19 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/monitor_project.MonitorProjectResp" + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/monitor_project.MonitorProjectResp" + } + } + } + ] } } } @@ -747,7 +2038,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -807,10 +2098,34 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/monitor_project.MonitorProjectResp" - } + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/monitor_project.MonitorProjectResp" + } + } + } + } + ] + } + } + } + ] } }, "400": { @@ -835,10 +2150,22 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/monitor_project.MonitorProjectResp" - } + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/monitor_project.MonitorProjectResp" + } + } + } + } + ] } } } @@ -985,7 +2312,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -1021,7 +2348,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -1147,7 +2474,7 @@ const docTemplate = `{ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -1334,1130 +2661,6 @@ const docTemplate = `{ } } }, - "/api/flow_apply/add": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程新增", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "模板", - "name": "templateId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人id", - "name": "applyUserId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程名称", - "name": "flowName", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程分类", - "name": "flowGroup", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程描述", - "name": "flowRemark", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单配置", - "name": "flowFormData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程配置", - "name": "flowProcessData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "状态:1待提交,2审批中,3审批完成,4审批失败", - "name": "status", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_apply/back": { - "post": { - "responses": {} - } - }, - "/api/flow_apply/del": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程删除", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "申请id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_apply/detail": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程详情", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "申请id", - "name": "id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/flow_apply.FlowApplyResp" - } - } - } - } - }, - "/api/flow_apply/edit": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程编辑", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "申请id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "模板", - "name": "templateId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人id", - "name": "applyUserId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程名称", - "name": "flowName", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程分类", - "name": "flowGroup", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程描述", - "name": "flowRemark", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单配置", - "name": "flowFormData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程配置", - "name": "flowProcessData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "状态:1待提交,2审批中,3审批完成,4审批失败", - "name": "status", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_apply/list": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程列表", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "页码", - "name": "PageNo", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "每页数量", - "name": "PageSize", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "模板", - "name": "templateId", - "in": "query" - }, - { - "type": "integer", - "description": "申请人id", - "name": "applyUserId", - "in": "query" - }, - { - "type": "string", - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "query" - }, - { - "type": "string", - "description": "流程名称", - "name": "flowName", - "in": "query" - }, - { - "type": "integer", - "description": "流程分类", - "name": "flowGroup", - "in": "query" - }, - { - "type": "string", - "description": "流程描述", - "name": "flowRemark", - "in": "query" - }, - { - "type": "string", - "description": "表单配置", - "name": "flowFormData", - "in": "query" - }, - { - "type": "string", - "description": "流程配置", - "name": "flowProcessData", - "in": "query" - }, - { - "type": "integer", - "description": "状态:1待提交,2审批中,3审批完成,4审批失败", - "name": "status", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/flow_apply.FlowApplyResp" - } - } - }, - "400": { - "description": "请求错误", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/flow_apply/pass": { - "post": { - "responses": {} - } - }, - "/api/flow_history/add": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史新增", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "申请id", - "name": "applyId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "模板id", - "name": "templateId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人id", - "name": "applyUserId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "审批人id", - "name": "approverId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "审批用户昵称", - "name": "approverNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "节点", - "name": "nodeId", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单值", - "name": "formValue", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "通过状态:0待处理,1通过,2拒绝", - "name": "passStatus", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "通过备注", - "name": "passRemark", - "in": "body", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_history/del": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史删除", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "历史id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_history/detail": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史详情", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "历史id", - "name": "id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/flow_history.FlowHistoryResp" - } - } - } - } - }, - "/api/flow_history/edit": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史编辑", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "历史id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请id", - "name": "applyId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "模板id", - "name": "templateId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人id", - "name": "applyUserId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "审批人id", - "name": "approverId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "审批用户昵称", - "name": "approverNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "节点", - "name": "nodeId", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单值", - "name": "formValue", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "通过状态:0待处理,1通过,2拒绝", - "name": "passStatus", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "通过备注", - "name": "passRemark", - "in": "body", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_history/list": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史列表", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "页码", - "name": "PageNo", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "每页数量", - "name": "PageSize", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "申请id", - "name": "applyId", - "in": "query" - }, - { - "type": "integer", - "description": "模板id", - "name": "templateId", - "in": "query" - }, - { - "type": "integer", - "description": "申请人id", - "name": "applyUserId", - "in": "query" - }, - { - "type": "string", - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "query" - }, - { - "type": "integer", - "description": "审批人id", - "name": "approverId", - "in": "query" - }, - { - "type": "string", - "description": "审批用户昵称", - "name": "approverNickname", - "in": "query" - }, - { - "type": "string", - "description": "节点", - "name": "nodeId", - "in": "query" - }, - { - "type": "string", - "description": "表单值", - "name": "formValue", - "in": "query" - }, - { - "type": "integer", - "description": "通过状态:0待处理,1通过,2拒绝", - "name": "passStatus", - "in": "query" - }, - { - "type": "string", - "description": "通过备注", - "name": "passRemark", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/flow_history.FlowHistoryResp" - } - } - }, - "400": { - "description": "请求错误", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/flow_history/listAll": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史列表-所有", - "responses": { - "200": { - "description": "成功", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/flow_history.FlowHistoryResp" - } - } - } - } - } - }, - "/api/flow_template/add": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板新增", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "流程名称", - "name": "flowName", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程分类", - "name": "flowGroup", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程描述", - "name": "flowRemark", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单配置", - "name": "flowFormData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程配置", - "name": "flowProcessData", - "in": "body", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_template/del": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板删除", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "历史id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_template/detail": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板详情", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "历史id", - "name": "id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/flow_template.FlowTemplateResp" - } - } - } - } - }, - "/api/flow_template/edit": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板编辑", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": ".", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程名称", - "name": "flowName", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程分类", - "name": "flowGroup", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程描述", - "name": "flowRemark", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单配置", - "name": "flowFormData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程配置", - "name": "flowProcessData", - "in": "body", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_template/list": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板列表", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "页码", - "name": "PageNo", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "每页数量", - "name": "PageSize", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "流程名称", - "name": "flowName", - "in": "query" - }, - { - "type": "integer", - "description": "流程分类", - "name": "flowGroup", - "in": "query" - }, - { - "type": "string", - "description": "流程描述", - "name": "flowRemark", - "in": "query" - }, - { - "type": "string", - "description": "表单配置", - "name": "flowFormData", - "in": "query" - }, - { - "type": "string", - "description": "流程配置", - "name": "flowProcessData", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/flow_template.FlowTemplateResp" - } - } - }, - "400": { - "description": "请求错误", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/flow_template/listAll": { - "get": { - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板列表-所有", - "responses": {} - } - }, "/system/admin/ListByDeptId/{deptId}": { "get": { "description": "获取部门的用户", @@ -2659,7 +2862,7 @@ const docTemplate = `{ "type": "string" }, "clientTime": { - "description": "客户端时间", + "description": "更新时间", "type": "string" }, "createTime": { @@ -2786,9 +2989,6 @@ const docTemplate = `{ } } }, - "response.RespType": { - "type": "object" - }, "response.Response": { "type": "object", "properties": { diff --git a/server/docs/swagger.json b/server/docs/swagger.json index 4b59a0c..a685ddb 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -18,15 +18,1226 @@ "host": "localhost:8001", "basePath": "/", "paths": { + "/api/admin/flow/flow_apply/add": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程新增", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "模板", + "name": "templateId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人id", + "name": "applyUserId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程名称", + "name": "flowName", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程分类", + "name": "flowGroup", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程描述", + "name": "flowRemark", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单配置", + "name": "flowFormData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程配置", + "name": "flowProcessData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "状态:1待提交,2审批中,3审批完成,4审批失败", + "name": "status", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_apply/del": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程删除", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "申请id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_apply/detail": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程详情", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "申请id", + "name": "id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/flow_apply.FlowApplyResp" + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_apply/edit": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程编辑", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "申请id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "模板", + "name": "templateId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人id", + "name": "applyUserId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程名称", + "name": "flowName", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程分类", + "name": "flowGroup", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程描述", + "name": "flowRemark", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单配置", + "name": "flowFormData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程配置", + "name": "flowProcessData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "状态:1待提交,2审批中,3审批完成,4审批失败", + "name": "status", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_apply/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_apply-申请流程" + ], + "summary": "申请流程列表", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "页码", + "name": "PageNo", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "每页数量", + "name": "PageSize", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "模板", + "name": "templateId", + "in": "query" + }, + { + "type": "integer", + "description": "申请人id", + "name": "applyUserId", + "in": "query" + }, + { + "type": "string", + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "query" + }, + { + "type": "string", + "description": "流程名称", + "name": "flowName", + "in": "query" + }, + { + "type": "integer", + "description": "流程分类", + "name": "flowGroup", + "in": "query" + }, + { + "type": "string", + "description": "流程描述", + "name": "flowRemark", + "in": "query" + }, + { + "type": "string", + "description": "表单配置", + "name": "flowFormData", + "in": "query" + }, + { + "type": "string", + "description": "流程配置", + "name": "flowProcessData", + "in": "query" + }, + { + "type": "integer", + "description": "状态:1待提交,2审批中,3审批完成,4审批失败", + "name": "status", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/flow_apply.FlowApplyResp" + } + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_history/add": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史新增", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "申请id", + "name": "applyId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "模板id", + "name": "templateId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人id", + "name": "applyUserId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "审批人id", + "name": "approverId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "审批用户昵称", + "name": "approverNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "节点", + "name": "nodeId", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单值", + "name": "formValue", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "通过状态:0待处理,1通过,2拒绝", + "name": "passStatus", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "通过备注", + "name": "passRemark", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_history/del": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史删除", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "历史id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_history/detail": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史详情", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "历史id", + "name": "id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/flow_history.FlowHistoryResp" + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_history/edit": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史编辑", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "历史id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请id", + "name": "applyId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "模板id", + "name": "templateId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人id", + "name": "applyUserId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "审批人id", + "name": "approverId", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "审批用户昵称", + "name": "approverNickname", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "节点", + "name": "nodeId", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单值", + "name": "formValue", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "通过状态:0待处理,1通过,2拒绝", + "name": "passStatus", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "通过备注", + "name": "passRemark", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_history/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史列表", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "页码", + "name": "PageNo", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "每页数量", + "name": "PageSize", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "申请id", + "name": "applyId", + "in": "query" + }, + { + "type": "integer", + "description": "模板id", + "name": "templateId", + "in": "query" + }, + { + "type": "integer", + "description": "申请人id", + "name": "applyUserId", + "in": "query" + }, + { + "type": "string", + "description": "申请人昵称", + "name": "applyUserNickname", + "in": "query" + }, + { + "type": "integer", + "description": "审批人id", + "name": "approverId", + "in": "query" + }, + { + "type": "string", + "description": "审批用户昵称", + "name": "approverNickname", + "in": "query" + }, + { + "type": "string", + "description": "节点", + "name": "nodeId", + "in": "query" + }, + { + "type": "string", + "description": "表单值", + "name": "formValue", + "in": "query" + }, + { + "type": "integer", + "description": "通过状态:0待处理,1通过,2拒绝", + "name": "passStatus", + "in": "query" + }, + { + "type": "string", + "description": "通过备注", + "name": "passRemark", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/flow_history.FlowHistoryResp" + } + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_history/listAll": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_history-流程历史" + ], + "summary": "流程历史列表-所有", + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/flow_history.FlowHistoryResp" + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_template/add": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板新增", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "流程名称", + "name": "flowName", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程分类", + "name": "flowGroup", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程描述", + "name": "flowRemark", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单配置", + "name": "flowFormData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程配置", + "name": "flowProcessData", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_template/del": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板删除", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": "历史id", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_template/detail": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板详情", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "历史id", + "name": "id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/flow_template.FlowTemplateResp" + } + } + } + } + }, + "/api/admin/flow/flow_template/edit": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板编辑", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "description": ".", + "name": "id", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程名称", + "name": "flowName", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程分类", + "name": "flowGroup", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "流程描述", + "name": "flowRemark", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "表单配置", + "name": "flowFormData", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "流程配置", + "name": "flowProcessData", + "in": "body", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/admin/flow/flow_template/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板列表", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Token", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "页码", + "name": "PageNo", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "每页数量", + "name": "PageSize", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "流程名称", + "name": "flowName", + "in": "query" + }, + { + "type": "integer", + "description": "流程分类", + "name": "flowGroup", + "in": "query" + }, + { + "type": "string", + "description": "流程描述", + "name": "flowRemark", + "in": "query" + }, + { + "type": "string", + "description": "表单配置", + "name": "flowFormData", + "in": "query" + }, + { + "type": "string", + "description": "流程配置", + "name": "flowProcessData", + "in": "query" + } + ], + "responses": { + "200": { + "description": "成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/flow_template.FlowTemplateResp" + } + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "/api/admin/flow/flow_template/listAll": { + "get": { + "tags": [ + "flow_template-流程模板" + ], + "summary": "流程模板列表-所有", + "responses": {} + } + }, + "/api/admin/flow_apply/back": { + "post": { + "responses": {} + } + }, + "/api/admin/flow_apply/pass": { + "post": { + "responses": {} + } + }, "/api/admin/monitor_client/ExportFile": { "get": { "produces": [ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息导出", + "summary": "监控-客户端信息导出", "parameters": [ { "type": "string", @@ -88,12 +1299,6 @@ "description": "ua记录.", "name": "ua", "in": "query" - }, - { - "type": "integer", - "description": "客户端时间.", - "name": "clientTime", - "in": "query" } ], "responses": {} @@ -105,9 +1310,9 @@ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息新增", + "summary": "监控-客户端信息新增", "parameters": [ { "type": "string", @@ -116,14 +1321,6 @@ "in": "header", "required": true }, - { - "description": "项目key.", - "name": "projectKey", - "in": "body", - "schema": { - "type": "string" - } - }, { "description": "sdk生成的客户端id.", "name": "clientId", @@ -189,11 +1386,11 @@ } }, { - "description": "客户端时间.", + "description": "更新时间.", "name": "clientTime", "in": "body", "schema": { - "type": "integer" + "type": "string" } } ], @@ -201,7 +1398,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -213,9 +1410,9 @@ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息删除", + "summary": "监控-客户端信息删除", "parameters": [ { "type": "string", @@ -237,7 +1434,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -249,9 +1446,9 @@ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息详情", + "summary": "监控-客户端信息详情", "parameters": [ { "type": "string", @@ -271,7 +1468,19 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/monitor_client.MonitorClientResp" + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/monitor_client.MonitorClientResp" + } + } + } + ] } } } @@ -283,9 +1492,9 @@ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息编辑", + "summary": "监控-客户端信息编辑", "parameters": [ { "type": "string", @@ -294,22 +1503,6 @@ "in": "header", "required": true }, - { - "description": "uuid.", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "项目key.", - "name": "projectKey", - "in": "body", - "schema": { - "type": "string" - } - }, { "description": "sdk生成的客户端id.", "name": "clientId", @@ -375,11 +1568,11 @@ } }, { - "description": "客户端时间.", + "description": "更新时间.", "name": "clientTime", "in": "body", "schema": { - "type": "integer" + "type": "string" } } ], @@ -387,7 +1580,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -399,9 +1592,9 @@ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" ], - "summary": "客户端信息列表", + "summary": "监控-客户端信息列表", "parameters": [ { "type": "string", @@ -477,22 +1670,40 @@ "description": "ua记录.", "name": "ua", "in": "query" - }, - { - "type": "integer", - "description": "客户端时间.", - "name": "clientTime", - "in": "query" } ], "responses": { "200": { "description": "成功", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/monitor_client.MonitorClientResp" - } + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/monitor_client.MonitorClientResp" + } + } + } + } + ] + } + } + } + ] } }, "400": { @@ -510,17 +1721,85 @@ "application/json" ], "tags": [ - "monitor_client-客户端信息" + "monitor_client-监控-客户端信息" + ], + "summary": "监控-客户端信息列表-所有", + "parameters": [ + { + "type": "string", + "description": "项目key.", + "name": "projectKey", + "in": "query" + }, + { + "type": "string", + "description": "sdk生成的客户端id.", + "name": "clientId", + "in": "query" + }, + { + "type": "string", + "description": "用户id.", + "name": "userId", + "in": "query" + }, + { + "type": "string", + "description": "系统.", + "name": "os", + "in": "query" + }, + { + "type": "string", + "description": "浏览器.", + "name": "browser", + "in": "query" + }, + { + "type": "string", + "description": "城市.", + "name": "city", + "in": "query" + }, + { + "type": "integer", + "description": "屏幕.", + "name": "width", + "in": "query" + }, + { + "type": "integer", + "description": "屏幕高度.", + "name": "height", + "in": "query" + }, + { + "type": "string", + "description": "ua记录.", + "name": "ua", + "in": "query" + } ], - "summary": "客户端信息列表-所有", "responses": { "200": { "description": "成功", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/monitor_client.MonitorClientResp" - } + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/monitor_client.MonitorClientResp" + } + } + } + } + ] } } } @@ -611,7 +1890,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -647,7 +1926,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -681,7 +1960,19 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/monitor_project.MonitorProjectResp" + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/monitor_project.MonitorProjectResp" + } + } + } + ] } } } @@ -741,7 +2032,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -801,10 +2092,34 @@ "200": { "description": "成功", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/monitor_project.MonitorProjectResp" - } + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.PageResp" + }, + { + "type": "object", + "properties": { + "lists": { + "type": "array", + "items": { + "$ref": "#/definitions/monitor_project.MonitorProjectResp" + } + } + } + } + ] + } + } + } + ] } }, "400": { @@ -829,10 +2144,22 @@ "200": { "description": "成功", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/monitor_project.MonitorProjectResp" - } + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/monitor_project.MonitorProjectResp" + } + } + } + } + ] } } } @@ -979,7 +2306,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -1015,7 +2342,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -1141,7 +2468,7 @@ "200": { "description": "成功", "schema": { - "$ref": "#/definitions/response.RespType" + "$ref": "#/definitions/response.Response" } } } @@ -1328,1130 +2655,6 @@ } } }, - "/api/flow_apply/add": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程新增", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "模板", - "name": "templateId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人id", - "name": "applyUserId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程名称", - "name": "flowName", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程分类", - "name": "flowGroup", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程描述", - "name": "flowRemark", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单配置", - "name": "flowFormData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程配置", - "name": "flowProcessData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "状态:1待提交,2审批中,3审批完成,4审批失败", - "name": "status", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_apply/back": { - "post": { - "responses": {} - } - }, - "/api/flow_apply/del": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程删除", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "申请id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_apply/detail": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程详情", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "申请id", - "name": "id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/flow_apply.FlowApplyResp" - } - } - } - } - }, - "/api/flow_apply/edit": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程编辑", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "申请id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "模板", - "name": "templateId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人id", - "name": "applyUserId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程名称", - "name": "flowName", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程分类", - "name": "flowGroup", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程描述", - "name": "flowRemark", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单配置", - "name": "flowFormData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程配置", - "name": "flowProcessData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "状态:1待提交,2审批中,3审批完成,4审批失败", - "name": "status", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_apply/list": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_apply-申请流程" - ], - "summary": "申请流程列表", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "页码", - "name": "PageNo", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "每页数量", - "name": "PageSize", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "模板", - "name": "templateId", - "in": "query" - }, - { - "type": "integer", - "description": "申请人id", - "name": "applyUserId", - "in": "query" - }, - { - "type": "string", - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "query" - }, - { - "type": "string", - "description": "流程名称", - "name": "flowName", - "in": "query" - }, - { - "type": "integer", - "description": "流程分类", - "name": "flowGroup", - "in": "query" - }, - { - "type": "string", - "description": "流程描述", - "name": "flowRemark", - "in": "query" - }, - { - "type": "string", - "description": "表单配置", - "name": "flowFormData", - "in": "query" - }, - { - "type": "string", - "description": "流程配置", - "name": "flowProcessData", - "in": "query" - }, - { - "type": "integer", - "description": "状态:1待提交,2审批中,3审批完成,4审批失败", - "name": "status", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/flow_apply.FlowApplyResp" - } - } - }, - "400": { - "description": "请求错误", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/flow_apply/pass": { - "post": { - "responses": {} - } - }, - "/api/flow_history/add": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史新增", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "申请id", - "name": "applyId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "模板id", - "name": "templateId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人id", - "name": "applyUserId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "审批人id", - "name": "approverId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "审批用户昵称", - "name": "approverNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "节点", - "name": "nodeId", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单值", - "name": "formValue", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "通过状态:0待处理,1通过,2拒绝", - "name": "passStatus", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "通过备注", - "name": "passRemark", - "in": "body", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_history/del": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史删除", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "历史id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_history/detail": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史详情", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "历史id", - "name": "id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/flow_history.FlowHistoryResp" - } - } - } - } - }, - "/api/flow_history/edit": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史编辑", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "历史id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请id", - "name": "applyId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "模板id", - "name": "templateId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人id", - "name": "applyUserId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "审批人id", - "name": "approverId", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "审批用户昵称", - "name": "approverNickname", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "节点", - "name": "nodeId", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单值", - "name": "formValue", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "通过状态:0待处理,1通过,2拒绝", - "name": "passStatus", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "通过备注", - "name": "passRemark", - "in": "body", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_history/list": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史列表", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "页码", - "name": "PageNo", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "每页数量", - "name": "PageSize", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "申请id", - "name": "applyId", - "in": "query" - }, - { - "type": "integer", - "description": "模板id", - "name": "templateId", - "in": "query" - }, - { - "type": "integer", - "description": "申请人id", - "name": "applyUserId", - "in": "query" - }, - { - "type": "string", - "description": "申请人昵称", - "name": "applyUserNickname", - "in": "query" - }, - { - "type": "integer", - "description": "审批人id", - "name": "approverId", - "in": "query" - }, - { - "type": "string", - "description": "审批用户昵称", - "name": "approverNickname", - "in": "query" - }, - { - "type": "string", - "description": "节点", - "name": "nodeId", - "in": "query" - }, - { - "type": "string", - "description": "表单值", - "name": "formValue", - "in": "query" - }, - { - "type": "integer", - "description": "通过状态:0待处理,1通过,2拒绝", - "name": "passStatus", - "in": "query" - }, - { - "type": "string", - "description": "通过备注", - "name": "passRemark", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/flow_history.FlowHistoryResp" - } - } - }, - "400": { - "description": "请求错误", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/flow_history/listAll": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_history-流程历史" - ], - "summary": "流程历史列表-所有", - "responses": { - "200": { - "description": "成功", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/flow_history.FlowHistoryResp" - } - } - } - } - } - }, - "/api/flow_template/add": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板新增", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "流程名称", - "name": "flowName", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程分类", - "name": "flowGroup", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程描述", - "name": "flowRemark", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单配置", - "name": "flowFormData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程配置", - "name": "flowProcessData", - "in": "body", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_template/del": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板删除", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": "历史id", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_template/detail": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板详情", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "历史id", - "name": "id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/flow_template.FlowTemplateResp" - } - } - } - } - }, - "/api/flow_template/edit": { - "post": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板编辑", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "description": ".", - "name": "id", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程名称", - "name": "flowName", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程分类", - "name": "flowGroup", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "流程描述", - "name": "flowRemark", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "表单配置", - "name": "flowFormData", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "流程配置", - "name": "flowProcessData", - "in": "body", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "$ref": "#/definitions/response.RespType" - } - } - } - } - }, - "/api/flow_template/list": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板列表", - "parameters": [ - { - "type": "string", - "description": "token", - "name": "Token", - "in": "header", - "required": true - }, - { - "type": "integer", - "description": "页码", - "name": "PageNo", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "每页数量", - "name": "PageSize", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "流程名称", - "name": "flowName", - "in": "query" - }, - { - "type": "integer", - "description": "流程分类", - "name": "flowGroup", - "in": "query" - }, - { - "type": "string", - "description": "流程描述", - "name": "flowRemark", - "in": "query" - }, - { - "type": "string", - "description": "表单配置", - "name": "flowFormData", - "in": "query" - }, - { - "type": "string", - "description": "流程配置", - "name": "flowProcessData", - "in": "query" - } - ], - "responses": { - "200": { - "description": "成功", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/flow_template.FlowTemplateResp" - } - } - }, - "400": { - "description": "请求错误", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/flow_template/listAll": { - "get": { - "tags": [ - "flow_template-流程模板" - ], - "summary": "流程模板列表-所有", - "responses": {} - } - }, "/system/admin/ListByDeptId/{deptId}": { "get": { "description": "获取部门的用户", @@ -2653,7 +2856,7 @@ "type": "string" }, "clientTime": { - "description": "客户端时间", + "description": "更新时间", "type": "string" }, "createTime": { @@ -2780,9 +2983,6 @@ } } }, - "response.RespType": { - "type": "object" - }, "response.Response": { "type": "object", "properties": { diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index e684517..310044b 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -127,7 +127,7 @@ definitions: description: sdk生成的客户端id type: string clientTime: - description: 客户端时间 + description: 更新时间 type: string createTime: description: 创建时间 @@ -219,8 +219,6 @@ definitions: description: 每页Size type: integer type: object - response.RespType: - type: object response.Response: properties: code: @@ -246,6 +244,759 @@ info: title: x_admin文档 version: 0.0.1 paths: + /api/admin/flow/flow_apply/add: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 模板 + in: body + name: templateId + schema: + type: integer + - description: 申请人id + in: body + name: applyUserId + schema: + type: integer + - description: 申请人昵称 + in: body + name: applyUserNickname + schema: + type: string + - description: 流程名称 + in: body + name: flowName + schema: + type: string + - description: 流程分类 + in: body + name: flowGroup + schema: + type: integer + - description: 流程描述 + in: body + name: flowRemark + schema: + type: string + - description: 表单配置 + in: body + name: flowFormData + schema: + type: string + - description: 流程配置 + in: body + name: flowProcessData + schema: + type: string + - description: 状态:1待提交,2审批中,3审批完成,4审批失败 + in: body + name: status + schema: + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 申请流程新增 + tags: + - flow_apply-申请流程 + /api/admin/flow/flow_apply/del: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 申请id + in: body + name: id + schema: + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 申请流程删除 + tags: + - flow_apply-申请流程 + /api/admin/flow/flow_apply/detail: + get: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 申请id + in: query + name: id + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + $ref: '#/definitions/flow_apply.FlowApplyResp' + type: object + summary: 申请流程详情 + tags: + - flow_apply-申请流程 + /api/admin/flow/flow_apply/edit: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 申请id + in: body + name: id + schema: + type: integer + - description: 模板 + in: body + name: templateId + schema: + type: integer + - description: 申请人id + in: body + name: applyUserId + schema: + type: integer + - description: 申请人昵称 + in: body + name: applyUserNickname + schema: + type: string + - description: 流程名称 + in: body + name: flowName + schema: + type: string + - description: 流程分类 + in: body + name: flowGroup + schema: + type: integer + - description: 流程描述 + in: body + name: flowRemark + schema: + type: string + - description: 表单配置 + in: body + name: flowFormData + schema: + type: string + - description: 流程配置 + in: body + name: flowProcessData + schema: + type: string + - description: 状态:1待提交,2审批中,3审批完成,4审批失败 + in: body + name: status + schema: + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 申请流程编辑 + tags: + - flow_apply-申请流程 + /api/admin/flow/flow_apply/list: + get: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 页码 + in: query + name: PageNo + required: true + type: integer + - description: 每页数量 + in: query + name: PageSize + required: true + type: integer + - description: 模板 + in: query + name: templateId + type: integer + - description: 申请人id + in: query + name: applyUserId + type: integer + - description: 申请人昵称 + in: query + name: applyUserNickname + type: string + - description: 流程名称 + in: query + name: flowName + type: string + - description: 流程分类 + in: query + name: flowGroup + type: integer + - description: 流程描述 + in: query + name: flowRemark + type: string + - description: 表单配置 + in: query + name: flowFormData + type: string + - description: 流程配置 + in: query + name: flowProcessData + type: string + - description: 状态:1待提交,2审批中,3审批完成,4审批失败 + in: query + name: status + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + allOf: + - $ref: '#/definitions/response.PageResp' + - properties: + lists: + items: + $ref: '#/definitions/flow_apply.FlowApplyResp' + type: array + type: object + type: object + summary: 申请流程列表 + tags: + - flow_apply-申请流程 + /api/admin/flow/flow_history/add: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 申请id + in: body + name: applyId + schema: + type: integer + - description: 模板id + in: body + name: templateId + schema: + type: integer + - description: 申请人id + in: body + name: applyUserId + schema: + type: integer + - description: 申请人昵称 + in: body + name: applyUserNickname + schema: + type: string + - description: 审批人id + in: body + name: approverId + schema: + type: integer + - description: 审批用户昵称 + in: body + name: approverNickname + schema: + type: string + - description: 节点 + in: body + name: nodeId + schema: + type: string + - description: 表单值 + in: body + name: formValue + schema: + type: string + - description: 通过状态:0待处理,1通过,2拒绝 + in: body + name: passStatus + schema: + type: integer + - description: 通过备注 + in: body + name: passRemark + schema: + type: string + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 流程历史新增 + tags: + - flow_history-流程历史 + /api/admin/flow/flow_history/del: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 历史id + in: body + name: id + schema: + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 流程历史删除 + tags: + - flow_history-流程历史 + /api/admin/flow/flow_history/detail: + get: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 历史id + in: query + name: id + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + $ref: '#/definitions/flow_history.FlowHistoryResp' + type: object + summary: 流程历史详情 + tags: + - flow_history-流程历史 + /api/admin/flow/flow_history/edit: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 历史id + in: body + name: id + schema: + type: integer + - description: 申请id + in: body + name: applyId + schema: + type: integer + - description: 模板id + in: body + name: templateId + schema: + type: integer + - description: 申请人id + in: body + name: applyUserId + schema: + type: integer + - description: 申请人昵称 + in: body + name: applyUserNickname + schema: + type: string + - description: 审批人id + in: body + name: approverId + schema: + type: integer + - description: 审批用户昵称 + in: body + name: approverNickname + schema: + type: string + - description: 节点 + in: body + name: nodeId + schema: + type: string + - description: 表单值 + in: body + name: formValue + schema: + type: string + - description: 通过状态:0待处理,1通过,2拒绝 + in: body + name: passStatus + schema: + type: integer + - description: 通过备注 + in: body + name: passRemark + schema: + type: string + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 流程历史编辑 + tags: + - flow_history-流程历史 + /api/admin/flow/flow_history/list: + get: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 页码 + in: query + name: PageNo + required: true + type: integer + - description: 每页数量 + in: query + name: PageSize + required: true + type: integer + - description: 申请id + in: query + name: applyId + type: integer + - description: 模板id + in: query + name: templateId + type: integer + - description: 申请人id + in: query + name: applyUserId + type: integer + - description: 申请人昵称 + in: query + name: applyUserNickname + type: string + - description: 审批人id + in: query + name: approverId + type: integer + - description: 审批用户昵称 + in: query + name: approverNickname + type: string + - description: 节点 + in: query + name: nodeId + type: string + - description: 表单值 + in: query + name: formValue + type: string + - description: 通过状态:0待处理,1通过,2拒绝 + in: query + name: passStatus + type: integer + - description: 通过备注 + in: query + name: passRemark + type: string + produces: + - application/json + responses: + "200": + description: 成功 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + allOf: + - $ref: '#/definitions/response.PageResp' + - properties: + lists: + items: + $ref: '#/definitions/flow_history.FlowHistoryResp' + type: array + type: object + type: object + summary: 流程历史列表 + tags: + - flow_history-流程历史 + /api/admin/flow/flow_history/listAll: + get: + produces: + - application/json + responses: + "200": + description: 成功 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + $ref: '#/definitions/flow_history.FlowHistoryResp' + type: object + summary: 流程历史列表-所有 + tags: + - flow_history-流程历史 + /api/admin/flow/flow_template/add: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 流程名称 + in: body + name: flowName + schema: + type: string + - description: 流程分类 + in: body + name: flowGroup + schema: + type: integer + - description: 流程描述 + in: body + name: flowRemark + schema: + type: string + - description: 表单配置 + in: body + name: flowFormData + schema: + type: string + - description: 流程配置 + in: body + name: flowProcessData + schema: + type: string + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 流程模板新增 + tags: + - flow_template-流程模板 + /api/admin/flow/flow_template/del: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 历史id + in: body + name: id + schema: + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 流程模板删除 + tags: + - flow_template-流程模板 + /api/admin/flow/flow_template/detail: + get: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 历史id + in: query + name: id + type: integer + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/flow_template.FlowTemplateResp' + summary: 流程模板详情 + tags: + - flow_template-流程模板 + /api/admin/flow/flow_template/edit: + post: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: . + in: body + name: id + schema: + type: integer + - description: 流程名称 + in: body + name: flowName + schema: + type: string + - description: 流程分类 + in: body + name: flowGroup + schema: + type: integer + - description: 流程描述 + in: body + name: flowRemark + schema: + type: string + - description: 表单配置 + in: body + name: flowFormData + schema: + type: string + - description: 流程配置 + in: body + name: flowProcessData + schema: + type: string + produces: + - application/json + responses: + "200": + description: 成功 + schema: + $ref: '#/definitions/response.Response' + summary: 流程模板编辑 + tags: + - flow_template-流程模板 + /api/admin/flow/flow_template/list: + get: + parameters: + - description: token + in: header + name: Token + required: true + type: string + - description: 页码 + in: query + name: PageNo + required: true + type: integer + - description: 每页数量 + in: query + name: PageSize + required: true + type: integer + - description: 流程名称 + in: query + name: flowName + type: string + - description: 流程分类 + in: query + name: flowGroup + type: integer + - description: 流程描述 + in: query + name: flowRemark + type: string + - description: 表单配置 + in: query + name: flowFormData + type: string + - description: 流程配置 + in: query + name: flowProcessData + type: string + produces: + - application/json + responses: + "200": + description: 成功 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + allOf: + - $ref: '#/definitions/response.PageResp' + - properties: + lists: + items: + $ref: '#/definitions/flow_template.FlowTemplateResp' + type: array + type: object + type: object + summary: 流程模板列表 + tags: + - flow_template-流程模板 + /api/admin/flow/flow_template/listAll: + get: + responses: {} + summary: 流程模板列表-所有 + tags: + - flow_template-流程模板 + /api/admin/flow_apply/back: + post: + responses: {} + /api/admin/flow_apply/pass: + post: + responses: {} /api/admin/monitor_client/ExportFile: get: parameters: @@ -290,16 +1041,12 @@ paths: in: query name: ua type: string - - description: 客户端时间. - in: query - name: clientTime - type: integer produces: - application/json responses: {} - summary: 客户端信息导出 + summary: 监控-客户端信息导出 tags: - - monitor_client-客户端信息 + - monitor_client-监控-客户端信息 /api/admin/monitor_client/add: post: parameters: @@ -308,11 +1055,6 @@ paths: name: Token required: true type: string - - description: 项目key. - in: body - name: projectKey - schema: - type: string - description: sdk生成的客户端id. in: body name: clientId @@ -353,21 +1095,21 @@ paths: name: ua schema: type: string - - description: 客户端时间. + - description: 更新时间. in: body name: clientTime schema: - type: integer + type: string produces: - application/json responses: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' - summary: 客户端信息新增 + $ref: '#/definitions/response.Response' + summary: 监控-客户端信息新增 tags: - - monitor_client-客户端信息 + - monitor_client-监控-客户端信息 /api/admin/monitor_client/del: post: parameters: @@ -387,10 +1129,10 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' - summary: 客户端信息删除 + $ref: '#/definitions/response.Response' + summary: 监控-客户端信息删除 tags: - - monitor_client-客户端信息 + - monitor_client-监控-客户端信息 /api/admin/monitor_client/detail: get: parameters: @@ -409,10 +1151,15 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/monitor_client.MonitorClientResp' - summary: 客户端信息详情 + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + $ref: '#/definitions/monitor_client.MonitorClientResp' + type: object + summary: 监控-客户端信息详情 tags: - - monitor_client-客户端信息 + - monitor_client-监控-客户端信息 /api/admin/monitor_client/edit: post: parameters: @@ -421,16 +1168,6 @@ paths: name: Token required: true type: string - - description: uuid. - in: body - name: id - schema: - type: integer - - description: 项目key. - in: body - name: projectKey - schema: - type: string - description: sdk生成的客户端id. in: body name: clientId @@ -471,21 +1208,21 @@ paths: name: ua schema: type: string - - description: 客户端时间. + - description: 更新时间. in: body name: clientTime schema: - type: integer + type: string produces: - application/json responses: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' - summary: 客户端信息编辑 + $ref: '#/definitions/response.Response' + summary: 监控-客户端信息编辑 tags: - - monitor_client-客户端信息 + - monitor_client-监控-客户端信息 /api/admin/monitor_client/list: get: parameters: @@ -540,40 +1277,88 @@ paths: in: query name: ua type: string - - description: 客户端时间. - in: query - name: clientTime - type: integer produces: - application/json responses: "200": description: 成功 schema: - items: - $ref: '#/definitions/monitor_client.MonitorClientResp' - type: array + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + allOf: + - $ref: '#/definitions/response.PageResp' + - properties: + lists: + items: + $ref: '#/definitions/monitor_client.MonitorClientResp' + type: array + type: object + type: object "400": description: 请求错误 schema: type: string - summary: 客户端信息列表 + summary: 监控-客户端信息列表 tags: - - monitor_client-客户端信息 + - monitor_client-监控-客户端信息 /api/admin/monitor_client/listAll: get: + parameters: + - description: 项目key. + in: query + name: projectKey + type: string + - description: sdk生成的客户端id. + in: query + name: clientId + type: string + - description: 用户id. + in: query + name: userId + type: string + - description: 系统. + in: query + name: os + type: string + - description: 浏览器. + in: query + name: browser + type: string + - description: 城市. + in: query + name: city + type: string + - description: 屏幕. + in: query + name: width + type: integer + - description: 屏幕高度. + in: query + name: height + type: integer + - description: ua记录. + in: query + name: ua + type: string produces: - application/json responses: "200": description: 成功 schema: - items: - $ref: '#/definitions/monitor_client.MonitorClientResp' - type: array - summary: 客户端信息列表-所有 + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + items: + $ref: '#/definitions/monitor_client.MonitorClientResp' + type: array + type: object + summary: 监控-客户端信息列表-所有 tags: - - monitor_client-客户端信息 + - monitor_client-监控-客户端信息 /api/admin/monitor_project/ExportFile: get: parameters: @@ -629,7 +1414,7 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' + $ref: '#/definitions/response.Response' summary: 错误项目新增 tags: - monitor_project-错误项目 @@ -652,7 +1437,7 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' + $ref: '#/definitions/response.Response' summary: 错误项目删除 tags: - monitor_project-错误项目 @@ -674,7 +1459,12 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/monitor_project.MonitorProjectResp' + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + $ref: '#/definitions/monitor_project.MonitorProjectResp' + type: object summary: 错误项目详情 tags: - monitor_project-错误项目 @@ -712,7 +1502,7 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' + $ref: '#/definitions/response.Response' summary: 错误项目编辑 tags: - monitor_project-错误项目 @@ -752,9 +1542,19 @@ paths: "200": description: 成功 schema: - items: - $ref: '#/definitions/monitor_project.MonitorProjectResp' - type: array + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + allOf: + - $ref: '#/definitions/response.PageResp' + - properties: + lists: + items: + $ref: '#/definitions/monitor_project.MonitorProjectResp' + type: array + type: object + type: object "400": description: 请求错误 schema: @@ -770,9 +1570,14 @@ paths: "200": description: 成功 schema: - items: - $ref: '#/definitions/monitor_project.MonitorProjectResp' - type: array + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + items: + $ref: '#/definitions/monitor_project.MonitorProjectResp' + type: array + type: object summary: 错误项目列表-所有 tags: - monitor_project-错误项目 @@ -867,7 +1672,7 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' + $ref: '#/definitions/response.Response' summary: 错误收集error新增 tags: - monitor_web-错误收集error @@ -890,7 +1695,7 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' + $ref: '#/definitions/response.Response' summary: 错误收集error删除 tags: - monitor_web-错误收集error @@ -970,7 +1775,7 @@ paths: "200": description: 成功 schema: - $ref: '#/definitions/response.RespType' + $ref: '#/definitions/response.Response' summary: 错误收集error编辑 tags: - monitor_web-错误收集error @@ -1094,728 +1899,6 @@ paths: summary: article_collect列表 tags: - article_collect文章 - /api/flow_apply/add: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 模板 - in: body - name: templateId - schema: - type: integer - - description: 申请人id - in: body - name: applyUserId - schema: - type: integer - - description: 申请人昵称 - in: body - name: applyUserNickname - schema: - type: string - - description: 流程名称 - in: body - name: flowName - schema: - type: string - - description: 流程分类 - in: body - name: flowGroup - schema: - type: integer - - description: 流程描述 - in: body - name: flowRemark - schema: - type: string - - description: 表单配置 - in: body - name: flowFormData - schema: - type: string - - description: 流程配置 - in: body - name: flowProcessData - schema: - type: string - - description: 状态:1待提交,2审批中,3审批完成,4审批失败 - in: body - name: status - schema: - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 申请流程新增 - tags: - - flow_apply-申请流程 - /api/flow_apply/back: - post: - responses: {} - /api/flow_apply/del: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 申请id - in: body - name: id - schema: - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 申请流程删除 - tags: - - flow_apply-申请流程 - /api/flow_apply/detail: - get: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 申请id - in: query - name: id - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/flow_apply.FlowApplyResp' - summary: 申请流程详情 - tags: - - flow_apply-申请流程 - /api/flow_apply/edit: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 申请id - in: body - name: id - schema: - type: integer - - description: 模板 - in: body - name: templateId - schema: - type: integer - - description: 申请人id - in: body - name: applyUserId - schema: - type: integer - - description: 申请人昵称 - in: body - name: applyUserNickname - schema: - type: string - - description: 流程名称 - in: body - name: flowName - schema: - type: string - - description: 流程分类 - in: body - name: flowGroup - schema: - type: integer - - description: 流程描述 - in: body - name: flowRemark - schema: - type: string - - description: 表单配置 - in: body - name: flowFormData - schema: - type: string - - description: 流程配置 - in: body - name: flowProcessData - schema: - type: string - - description: 状态:1待提交,2审批中,3审批完成,4审批失败 - in: body - name: status - schema: - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 申请流程编辑 - tags: - - flow_apply-申请流程 - /api/flow_apply/list: - get: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 页码 - in: query - name: PageNo - required: true - type: integer - - description: 每页数量 - in: query - name: PageSize - required: true - type: integer - - description: 模板 - in: query - name: templateId - type: integer - - description: 申请人id - in: query - name: applyUserId - type: integer - - description: 申请人昵称 - in: query - name: applyUserNickname - type: string - - description: 流程名称 - in: query - name: flowName - type: string - - description: 流程分类 - in: query - name: flowGroup - type: integer - - description: 流程描述 - in: query - name: flowRemark - type: string - - description: 表单配置 - in: query - name: flowFormData - type: string - - description: 流程配置 - in: query - name: flowProcessData - type: string - - description: 状态:1待提交,2审批中,3审批完成,4审批失败 - in: query - name: status - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - items: - $ref: '#/definitions/flow_apply.FlowApplyResp' - type: array - "400": - description: 请求错误 - schema: - type: string - summary: 申请流程列表 - tags: - - flow_apply-申请流程 - /api/flow_apply/pass: - post: - responses: {} - /api/flow_history/add: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 申请id - in: body - name: applyId - schema: - type: integer - - description: 模板id - in: body - name: templateId - schema: - type: integer - - description: 申请人id - in: body - name: applyUserId - schema: - type: integer - - description: 申请人昵称 - in: body - name: applyUserNickname - schema: - type: string - - description: 审批人id - in: body - name: approverId - schema: - type: integer - - description: 审批用户昵称 - in: body - name: approverNickname - schema: - type: string - - description: 节点 - in: body - name: nodeId - schema: - type: string - - description: 表单值 - in: body - name: formValue - schema: - type: string - - description: 通过状态:0待处理,1通过,2拒绝 - in: body - name: passStatus - schema: - type: integer - - description: 通过备注 - in: body - name: passRemark - schema: - type: string - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 流程历史新增 - tags: - - flow_history-流程历史 - /api/flow_history/del: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 历史id - in: body - name: id - schema: - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 流程历史删除 - tags: - - flow_history-流程历史 - /api/flow_history/detail: - get: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 历史id - in: query - name: id - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/flow_history.FlowHistoryResp' - summary: 流程历史详情 - tags: - - flow_history-流程历史 - /api/flow_history/edit: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 历史id - in: body - name: id - schema: - type: integer - - description: 申请id - in: body - name: applyId - schema: - type: integer - - description: 模板id - in: body - name: templateId - schema: - type: integer - - description: 申请人id - in: body - name: applyUserId - schema: - type: integer - - description: 申请人昵称 - in: body - name: applyUserNickname - schema: - type: string - - description: 审批人id - in: body - name: approverId - schema: - type: integer - - description: 审批用户昵称 - in: body - name: approverNickname - schema: - type: string - - description: 节点 - in: body - name: nodeId - schema: - type: string - - description: 表单值 - in: body - name: formValue - schema: - type: string - - description: 通过状态:0待处理,1通过,2拒绝 - in: body - name: passStatus - schema: - type: integer - - description: 通过备注 - in: body - name: passRemark - schema: - type: string - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 流程历史编辑 - tags: - - flow_history-流程历史 - /api/flow_history/list: - get: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 页码 - in: query - name: PageNo - required: true - type: integer - - description: 每页数量 - in: query - name: PageSize - required: true - type: integer - - description: 申请id - in: query - name: applyId - type: integer - - description: 模板id - in: query - name: templateId - type: integer - - description: 申请人id - in: query - name: applyUserId - type: integer - - description: 申请人昵称 - in: query - name: applyUserNickname - type: string - - description: 审批人id - in: query - name: approverId - type: integer - - description: 审批用户昵称 - in: query - name: approverNickname - type: string - - description: 节点 - in: query - name: nodeId - type: string - - description: 表单值 - in: query - name: formValue - type: string - - description: 通过状态:0待处理,1通过,2拒绝 - in: query - name: passStatus - type: integer - - description: 通过备注 - in: query - name: passRemark - type: string - produces: - - application/json - responses: - "200": - description: 成功 - schema: - items: - $ref: '#/definitions/flow_history.FlowHistoryResp' - type: array - "400": - description: 请求错误 - schema: - type: string - summary: 流程历史列表 - tags: - - flow_history-流程历史 - /api/flow_history/listAll: - get: - produces: - - application/json - responses: - "200": - description: 成功 - schema: - items: - $ref: '#/definitions/flow_history.FlowHistoryResp' - type: array - summary: 流程历史列表-所有 - tags: - - flow_history-流程历史 - /api/flow_template/add: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 流程名称 - in: body - name: flowName - schema: - type: string - - description: 流程分类 - in: body - name: flowGroup - schema: - type: integer - - description: 流程描述 - in: body - name: flowRemark - schema: - type: string - - description: 表单配置 - in: body - name: flowFormData - schema: - type: string - - description: 流程配置 - in: body - name: flowProcessData - schema: - type: string - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 流程模板新增 - tags: - - flow_template-流程模板 - /api/flow_template/del: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 历史id - in: body - name: id - schema: - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 流程模板删除 - tags: - - flow_template-流程模板 - /api/flow_template/detail: - get: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 历史id - in: query - name: id - type: integer - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/flow_template.FlowTemplateResp' - summary: 流程模板详情 - tags: - - flow_template-流程模板 - /api/flow_template/edit: - post: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: . - in: body - name: id - schema: - type: integer - - description: 流程名称 - in: body - name: flowName - schema: - type: string - - description: 流程分类 - in: body - name: flowGroup - schema: - type: integer - - description: 流程描述 - in: body - name: flowRemark - schema: - type: string - - description: 表单配置 - in: body - name: flowFormData - schema: - type: string - - description: 流程配置 - in: body - name: flowProcessData - schema: - type: string - produces: - - application/json - responses: - "200": - description: 成功 - schema: - $ref: '#/definitions/response.RespType' - summary: 流程模板编辑 - tags: - - flow_template-流程模板 - /api/flow_template/list: - get: - parameters: - - description: token - in: header - name: Token - required: true - type: string - - description: 页码 - in: query - name: PageNo - required: true - type: integer - - description: 每页数量 - in: query - name: PageSize - required: true - type: integer - - description: 流程名称 - in: query - name: flowName - type: string - - description: 流程分类 - in: query - name: flowGroup - type: integer - - description: 流程描述 - in: query - name: flowRemark - type: string - - description: 表单配置 - in: query - name: flowFormData - type: string - - description: 流程配置 - in: query - name: flowProcessData - type: string - produces: - - application/json - responses: - "200": - description: 成功 - schema: - items: - $ref: '#/definitions/flow_template.FlowTemplateResp' - type: array - "400": - description: 请求错误 - schema: - type: string - summary: 流程模板列表 - tags: - - flow_template-流程模板 - /api/flow_template/listAll: - get: - responses: {} - summary: 流程模板列表-所有 - tags: - - flow_template-流程模板 /system/admin/ListByDeptId/{deptId}: get: description: 获取部门的用户 diff --git a/server/util/tools.go b/server/util/tools.go index 02f778e..3ac2dda 100644 --- a/server/util/tools.go +++ b/server/util/tools.go @@ -97,6 +97,11 @@ func (tu toolsUtil) GoToTsType(s string) string { return "string" } +// 拼接字符串 +func (tu toolsUtil) GetPageResp(s string) string { + return `response.Response{ data=response.PageResp{ lists= []` + s + `Resp}}` +} + // Round float四舍五入 func (tu toolsUtil) Round(val float64, n int) float64 { base := math.Pow(10, float64(n))