diff --git a/src/main/java/com/lz/modules/flow/dao/FlowStartMapper.java b/src/main/java/com/lz/modules/flow/dao/FlowStartMapper.java index 04b4a70b..b6f178f4 100644 --- a/src/main/java/com/lz/modules/flow/dao/FlowStartMapper.java +++ b/src/main/java/com/lz/modules/flow/dao/FlowStartMapper.java @@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.lz.modules.flow.entity.FlowStart; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; + +import java.util.List; + @Mapper public interface FlowStartMapper extends BaseMapper { @@ -29,5 +32,6 @@ public interface FlowStartMapper extends BaseMapper { int deleteFlowStartById(@Param("id")Long id); + List selectListByTime(); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/entity/FlowStart.java b/src/main/java/com/lz/modules/flow/entity/FlowStart.java index b20b4312..6947bf0d 100644 --- a/src/main/java/com/lz/modules/flow/entity/FlowStart.java +++ b/src/main/java/com/lz/modules/flow/entity/FlowStart.java @@ -8,10 +8,9 @@ import lombok.Data; import java.util.Date; /** *

-* 菜单权限表 *

*发起考核表 * @author quyixiao -* @since 2020-10-13 +* @since 2020-10-21 */ @Data @@ -40,8 +39,11 @@ public class FlowStart implements java.io.Serializable { @ApiModelProperty(value = "结束时间", name = "endTime") private Date endTime; //组id - @ApiModelProperty(value = "组id,逗号隔开", name = "groupIds") - private String groupIds; + @ApiModelProperty(value = "组id", name = "groupIds") + private Long groupIds; + //考核名称 + @ApiModelProperty(value = "考核名称", name = "name") + private String name; /** * * @return @@ -151,17 +153,32 @@ public class FlowStart implements java.io.Serializable { * 组id * @return */ - public String getGroupIds() { + public Long getGroupIds() { return groupIds; } /** * 组id * @param groupIds */ - public void setGroupIds(String groupIds) { + public void setGroupIds(Long groupIds) { this.groupIds = groupIds; } + /** + * 考核名称 + * @return + */ + public String getName() { + return name; + } + /** + * 考核名称 + * @param name + */ + public void setName(String name) { + this.name = name; + } + @Override public String toString() { return "FlowStart{" + @@ -173,6 +190,7 @@ public class FlowStart implements java.io.Serializable { ",startTime=" + startTime + ",endTime=" + endTime + ",groupIds=" + groupIds + + ",name=" + name + "}"; } } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/FlowStartService.java b/src/main/java/com/lz/modules/flow/service/FlowStartService.java index 01622ca1..dbe95a97 100644 --- a/src/main/java/com/lz/modules/flow/service/FlowStartService.java +++ b/src/main/java/com/lz/modules/flow/service/FlowStartService.java @@ -3,6 +3,8 @@ package com.lz.modules.flow.service; import com.baomidou.mybatisplus.extension.service.IService; import com.lz.modules.flow.entity.FlowStart; +import java.util.List; + /** *

* 发起考核表 服务类 @@ -30,4 +32,5 @@ public interface FlowStartService extends IService { int deleteFlowStartById(Long id); + } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/performance/controller/AssessManagerController.java b/src/main/java/com/lz/modules/performance/controller/AssessManagerController.java index 39c10e49..673a1d17 100644 --- a/src/main/java/com/lz/modules/performance/controller/AssessManagerController.java +++ b/src/main/java/com/lz/modules/performance/controller/AssessManagerController.java @@ -1,6 +1,7 @@ package com.lz.modules.performance.controller; import com.lz.common.utils.R; +import com.lz.modules.flow.dao.FlowStartMapper; import com.lz.modules.flow.service.FlowStartService; import com.lz.modules.performance.req.AssessDetailReq; import com.lz.modules.performance.req.AssessListReq; @@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController; public class AssessManagerController { @Autowired - private FlowStartService flowStartService; + private FlowStartMapper flowStartMapper; @RequestMapping("assess/manager/list") diff --git a/src/main/resources/mapper/flow/FlowStartMapper.xml b/src/main/resources/mapper/flow/FlowStartMapper.xml index 89b33c42..a9795628 100644 --- a/src/main/resources/mapper/flow/FlowStartMapper.xml +++ b/src/main/resources/mapper/flow/FlowStartMapper.xml @@ -12,12 +12,13 @@ + - id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, cycle_type AS cycleType, start_time AS startTime, end_time AS endTime, group_ids AS groupIds + id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, cycle_type AS cycleType, start_time AS startTime, end_time AS endTime, group_ids AS groupIds, name AS name @@ -27,38 +28,40 @@ select * from lz_flow_start where id=#{id} and is_delete = 0 limit 1 - insert into lz_flow_start( - cycle_type, - start_time, - end_time, - group_ids, - is_delete, - gmt_create, - gmt_modified + cycle_type, + start_time, + end_time, + group_ids, + name, + is_delete, + gmt_create, + gmt_modified )values( - #{ cycleType}, - #{ startTime}, - #{ endTime}, - #{ groupIds}, - 0, - now(), - now() + #{ cycleType}, + #{ startTime}, + #{ endTime}, + #{ groupIds}, + #{ name}, + 0, + now(), + now() ) update - lz_flow_start + lz_flow_start is_delete = #{isDelete}, gmt_create = #{gmtCreate}, cycle_type = #{cycleType}, start_time = #{startTime}, end_time = #{endTime}, - group_ids = #{groupIds} + group_ids = #{groupIds}, + name = #{name} ,gmt_modified = now() where id = #{id} @@ -67,14 +70,15 @@ update - lz_flow_start - set + lz_flow_start + set is_delete = #{isDelete}, gmt_create = #{gmtCreate}, cycle_type = #{cycleType}, start_time = #{startTime}, end_time = #{endTime}, - group_ids = #{groupIds} + group_ids = #{groupIds}, + name = #{name} ,gmt_modified = now() where id = #{id} @@ -84,5 +88,8 @@ update lz_flow_start set is_delete = 1 where id=#{id} limit 1 + diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java index d2303851..14750b2e 100644 --- a/src/test/java/com/lz/mysql/MysqlMain.java +++ b/src/test/java/com/lz/mysql/MysqlMain.java @@ -78,7 +78,7 @@ public class MysqlMain { //list.add(new TablesBean("lz_result_model")); //list.add(new TablesBean("lz_result_score")); //list.add(new TablesBean("lz_result_taget_lib")); - list.add(new TablesBean("lz_staff_role")); + list.add(new TablesBean("lz_flow_start")); List list2 = new ArrayList(); Map map = MysqlUtil2ShowCreateTable.getComments();