| @@ -6,6 +6,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxFlowRecord; | import com.iformall.domain.po.WxFlowRecord; | ||||
| import com.iformall.domain.vo.FlowModelVo; | |||||
| import com.iformall.enums.EnumFlowRecordStatus; | import com.iformall.enums.EnumFlowRecordStatus; | ||||
| import com.iformall.service.WxFlowService; | import com.iformall.service.WxFlowService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| @@ -194,7 +195,17 @@ public class WxFlowAbleController extends BaseController { | |||||
| } | } | ||||
| /** | |||||
| * 创建模板 | |||||
| */ | |||||
| @ApiOperation(value = "创建模板",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}") | |||||
| @PostMapping(value = "createModel") | |||||
| @SystemControllerLog(description = "工作流-创建模板") | |||||
| public ResultData createModel(@ModelAttribute FlowModelVo modelVo) { | |||||
| MallUserInfo user = getUser(); | |||||
| modelVo.setTenantId(getTenantId()); | |||||
| return wxFlowService.createModel(modelVo); | |||||
| } | |||||
| } | } | ||||
| @@ -0,0 +1,11 @@ | |||||
| drop table if exists `wx_flow_model`; | |||||
| CREATE TABLE `wx_flow_model` ( | |||||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` varchar(10) NOT NULL COMMENT '租户id', | |||||
| `name` varchar(255) DEFAULT NULL COMMENT '名称', | |||||
| `flow` varchar(255) DEFAULT NULL COMMENT '流程', | |||||
| `create_user` bigint(20) NOT NULL COMMENT '创建用户', | |||||
| `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||||
| `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; | |||||
| @@ -0,0 +1,22 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import lombok.Data; | |||||
| import java.io.Serializable; | |||||
| import java.util.List; | |||||
| @Data | |||||
| public class FlowModelVo implements Serializable{ | |||||
| private static final long serialVersionUID = 1L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="模板名称",name="name") | |||||
| private String name; | |||||
| @io.swagger.annotations.ApiModelProperty(value="节点列表",name="taskList") | |||||
| private List<UserTaskVo> taskList; | |||||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||||
| private String tenantId; | |||||
| } | |||||
| @@ -9,34 +9,14 @@ public class UserTaskVo implements Serializable{ | |||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @io.swagger.annotations.ApiModelProperty(value="节点名称",name="name") | |||||
| private String name; | private String name; | ||||
| @io.swagger.annotations.ApiModelProperty(value="用户列表",name="userList") | |||||
| private List<Long> userList; | private List<Long> userList; | ||||
| //1普通 2会签 3或签 | //1普通 2会签 3或签 | ||||
| @io.swagger.annotations.ApiModelProperty(value="节点类型,1普通 2会签 3或签",name="type") | |||||
| private Integer type; | private Integer type; | ||||
| public String getName() { | |||||
| return name; | |||||
| } | |||||
| public void setName(String name) { | |||||
| this.name = name; | |||||
| } | |||||
| public List<Long> getUserList() { | |||||
| return userList; | |||||
| } | |||||
| public void setUserList(List<Long> userList) { | |||||
| this.userList = userList; | |||||
| } | |||||
| public Integer getType() { | |||||
| return type; | |||||
| } | |||||
| public void setType(Integer type) { | |||||
| this.type = type; | |||||
| } | |||||
| } | } | ||||
| @@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxCarCmdLog; | import com.iformall.domain.po.WxCarCmdLog; | ||||
| import com.iformall.domain.po.WxFlowRecord; | import com.iformall.domain.po.WxFlowRecord; | ||||
| import com.iformall.domain.vo.FlowModelVo; | |||||
| import org.springframework.web.bind.annotation.RequestBody; | import org.springframework.web.bind.annotation.RequestBody; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -88,4 +89,10 @@ public interface WxFlowService { | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxFlowRecord> myHandelList(WxFlowRecord record, Integer pageIndex, Integer pageSize); | PageInfo<WxFlowRecord> myHandelList(WxFlowRecord record, Integer pageIndex, Integer pageSize); | ||||
| /** | |||||
| * 创建模板 | |||||
| * @return | |||||
| */ | |||||
| ResultData createModel(FlowModelVo modelVo); | |||||
| } | } | ||||
| @@ -9,6 +9,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.msg.MailMsg; | import com.iformall.domain.po.msg.MailMsg; | ||||
| import com.iformall.domain.po.msg.WxMsgRecord; | import com.iformall.domain.po.msg.WxMsgRecord; | ||||
| import com.iformall.domain.vo.FlowModelVo; | |||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.*; | import com.iformall.mapper.*; | ||||
| @@ -1132,5 +1133,8 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @Override | |||||
| public ResultData createModel(FlowModelVo modelVo) { | |||||
| return null; | |||||
| } | |||||
| } | } | ||||