修改试卷数据处理逻辑;修改组织-项目关系数据处理逻辑;重新生成OrgProjectDAO
This commit is contained in:
parent
3569212e57
commit
57f6dae0b3
@ -62,6 +62,9 @@ public class WebConfig implements WebMvcConfigurer {
|
||||
whiteList.add("/api/test/**");
|
||||
whiteList.add("/api/project/viewSetting/simple/all");
|
||||
whiteList.add("/api/project/viewSetting/project/{project}");
|
||||
//旧数据处理
|
||||
whiteList.add("/api/org/oldData/handle");
|
||||
whiteList.add("/api/mapFunction/oldDataHandle");
|
||||
registry.addInterceptor(authenticateInterceptor).excludePathPatterns(whiteList);
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,16 @@
|
||||
package club.joylink.rtss.controller.org;
|
||||
|
||||
import club.joylink.rtss.dao.org.OrgProjectDao;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.dao.OrgDAO;
|
||||
import club.joylink.rtss.dao.OrgProjectDAO;
|
||||
import club.joylink.rtss.entity.Org;
|
||||
import club.joylink.rtss.entity.OrgExample;
|
||||
import club.joylink.rtss.entity.OrgProject;
|
||||
import club.joylink.rtss.services.org.IOrgProjectService;
|
||||
import club.joylink.rtss.services.org.OrgService;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.org.OrgProjectVO;
|
||||
import club.joylink.rtss.vo.client.org.OrgVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@ -42,9 +43,9 @@ public class OrgProjectController {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private OrgProjectDao orgProjectDao;
|
||||
private OrgProjectDAO orgProjectDAO;
|
||||
@Autowired
|
||||
private OrgService orgService;
|
||||
private OrgDAO orgDAO;
|
||||
|
||||
/**
|
||||
* 旧数据处理(用完删除)
|
||||
@ -52,20 +53,22 @@ public class OrgProjectController {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@PostMapping("/oldData/handle")
|
||||
public void oldDataHandle() {
|
||||
orgProjectDao.deleteByExample(null);
|
||||
orgProjectDAO.deleteByExample(null);
|
||||
|
||||
OrgProject orgProject = new OrgProject();
|
||||
orgProject.setCreateTime(LocalDateTime.now());
|
||||
orgProject.setCreatorId(1L);
|
||||
List<OrgVO> orgs = orgService.queryAllTopOrg();
|
||||
for (OrgVO org : orgs) {
|
||||
List<String> projectCodes = org.getProjectCodes();
|
||||
if (!CollectionUtils.isEmpty(projectCodes)) {
|
||||
for (String projectCode : projectCodes) {
|
||||
OrgExample orgExample = new OrgExample();
|
||||
orgExample.createCriteria().andStatusEqualTo("1").andParentIdIsNull();
|
||||
List<Org> orgs = orgDAO.selectByExample(orgExample);
|
||||
for (Org org : orgs) {
|
||||
String projectCodeStr = org.getProjectCode();
|
||||
if (StringUtils.hasText(projectCodeStr)) {
|
||||
for (String projectCode : projectCodeStr.split(",")) {
|
||||
orgProject.setId(null);
|
||||
orgProject.setOrgId(org.getId());
|
||||
orgProject.setProjectCode(projectCode);
|
||||
orgProjectDao.insert(orgProject);
|
||||
orgProjectDAO.insert(orgProject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,16 +2,10 @@ package club.joylink.rtss.controller.paper;
|
||||
|
||||
import club.joylink.rtss.constants.RoleEnum;
|
||||
import club.joylink.rtss.controller.advice.Role;
|
||||
import club.joylink.rtss.dao.ExamDefinitionDAO;
|
||||
import club.joylink.rtss.dao.OrgDAO;
|
||||
import club.joylink.rtss.dao.UserExamMapper;
|
||||
import club.joylink.rtss.dao.org.OrgProjectDao;
|
||||
import club.joylink.rtss.dao.*;
|
||||
import club.joylink.rtss.dao.paper.PaperCompositionDAO;
|
||||
import club.joylink.rtss.dao.paper.PaperUserDAO;
|
||||
import club.joylink.rtss.entity.ExamDefinitionExample;
|
||||
import club.joylink.rtss.entity.UserExam;
|
||||
import club.joylink.rtss.entity.UserExamExample;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.entity.paper.PaperUser;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.IMapService;
|
||||
@ -160,13 +154,15 @@ public class PaperCompositionController {
|
||||
@Autowired
|
||||
OrgDAO orgDAO;
|
||||
@Autowired
|
||||
OrgProjectDao orgProjectDao;
|
||||
OrgProjectDAO orgProjectDAO;
|
||||
@Autowired
|
||||
UserExamMapper userExamMapper;
|
||||
@Autowired
|
||||
private PaperUserDAO paperUserDAO;
|
||||
@Autowired
|
||||
PaperCompositionDAO paperCompositionDAO;
|
||||
@Autowired
|
||||
LsLessonDAO lsLessonDAO;
|
||||
|
||||
/**
|
||||
* 旧数据处理接口(用完删除)
|
||||
@ -180,11 +176,16 @@ public class PaperCompositionController {
|
||||
List<String> msg = new ArrayList<>();
|
||||
//所有在线地图
|
||||
Map<Long, MapVO> onlineMaps = iMapService.listOnline().stream().collect(Collectors.toMap(MapVO::getId, Function.identity()));
|
||||
//在线地图的有效试卷
|
||||
LsLessonExample lsLessonExample = new LsLessonExample();
|
||||
lsLessonExample.createCriteria().andMapIdIn(new ArrayList<>(onlineMaps.keySet())).andStatusEqualTo("1");
|
||||
List<Long> validLessonIds = lsLessonDAO.selectByExample(lsLessonExample)
|
||||
.stream().map(LsLesson::getId).collect(Collectors.toList());
|
||||
//所有项目-组织对应关系
|
||||
Map<String, Long> projectCode_orgId_map = orgProjectDao.selectByExample(null).stream().collect(Collectors.toMap(OrgProject::getProjectCode, OrgProject::getOrgId));
|
||||
Map<String, Long> projectCode_orgId_map = orgProjectDAO.selectByExample(null).stream().collect(Collectors.toMap(OrgProject::getProjectCode, OrgProject::getOrgId));
|
||||
//转化试卷并记录试卷id变化
|
||||
ExamDefinitionExample examDefinitionExample = new ExamDefinitionExample();
|
||||
examDefinitionExample.createCriteria().andStatusEqualTo("1").andMapIdIn(new ArrayList<>(onlineMaps.keySet()));
|
||||
examDefinitionExample.createCriteria().andStatusEqualTo("1").andLessonIdIn(validLessonIds);
|
||||
Map<Long, Long> old_newExamIdMap = new HashMap<>();
|
||||
examDefinitionDAO.selectByExample(examDefinitionExample).stream()
|
||||
.peek(exam -> {
|
||||
|
12
src/main/java/club/joylink/rtss/dao/OrgProjectDAO.java
Normal file
12
src/main/java/club/joylink/rtss/dao/OrgProjectDAO.java
Normal file
@ -0,0 +1,12 @@
|
||||
package club.joylink.rtss.dao;
|
||||
|
||||
import club.joylink.rtss.entity.OrgProject;
|
||||
import club.joylink.rtss.entity.OrgProjectExample;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* OrgProjectDAO继承基类
|
||||
*/
|
||||
@Repository
|
||||
public interface OrgProjectDAO extends MyBatisBaseDao<OrgProject, Long, OrgProjectExample> {
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package club.joylink.rtss.dao.org;
|
||||
|
||||
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.entity.org.OrgProjectExample;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 组织与项目关系
|
||||
*/
|
||||
@Repository
|
||||
public interface OrgProjectDao extends MyBatisBaseDao<OrgProject, Long, OrgProjectExample> {
|
||||
|
||||
int deleteByExampleSelective(@Param("example") OrgProjectExample example);
|
||||
}
|
124
src/main/java/club/joylink/rtss/entity/OrgProject.java
Normal file
124
src/main/java/club/joylink/rtss/entity/OrgProject.java
Normal file
@ -0,0 +1,124 @@
|
||||
package club.joylink.rtss.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class OrgProject implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 组织ID
|
||||
*/
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
private String projectCode;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getOrgId() {
|
||||
return orgId;
|
||||
}
|
||||
|
||||
public void setOrgId(Long orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
public String getProjectCode() {
|
||||
return projectCode;
|
||||
}
|
||||
|
||||
public void setProjectCode(String projectCode) {
|
||||
this.projectCode = projectCode;
|
||||
}
|
||||
|
||||
public Long getCreatorId() {
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId) {
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(LocalDateTime createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
OrgProject other = (OrgProject) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId()))
|
||||
&& (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode()))
|
||||
&& (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode());
|
||||
result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode());
|
||||
result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", orgId=").append(orgId);
|
||||
sb.append(", projectCode=").append(projectCode);
|
||||
sb.append(", creatorId=").append(creatorId);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package club.joylink.rtss.entity.org;
|
||||
package club.joylink.rtss.entity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class OrgProjectExample {
|
||||
@ -11,6 +11,10 @@ public class OrgProjectExample {
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Long offset;
|
||||
|
||||
public OrgProjectExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
@ -64,6 +68,22 @@ public class OrgProjectExample {
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Long offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
@ -115,52 +135,52 @@ public class OrgProjectExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
@ -305,52 +325,52 @@ public class OrgProjectExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdEqualTo(Integer value) {
|
||||
public Criteria andCreatorIdEqualTo(Long value) {
|
||||
addCriterion("creator_id =", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotEqualTo(Integer value) {
|
||||
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||
addCriterion("creator_id <>", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdGreaterThan(Integer value) {
|
||||
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||
addCriterion("creator_id >", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdGreaterThanOrEqualTo(Integer value) {
|
||||
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("creator_id >=", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdLessThan(Integer value) {
|
||||
public Criteria andCreatorIdLessThan(Long value) {
|
||||
addCriterion("creator_id <", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdLessThanOrEqualTo(Integer value) {
|
||||
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("creator_id <=", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIn(List<Integer> values) {
|
||||
public Criteria andCreatorIdIn(List<Long> values) {
|
||||
addCriterion("creator_id in", values, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotIn(List<Integer> values) {
|
||||
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||
addCriterion("creator_id not in", values, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdBetween(Integer value1, Integer value2) {
|
||||
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotBetween(Integer value1, Integer value2) {
|
||||
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
@ -365,57 +385,59 @@ public class OrgProjectExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
public Criteria andCreateTimeLessThan(LocalDateTime value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
@ -508,4 +530,4 @@ public class OrgProjectExample {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package club.joylink.rtss.entity.org;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class OrgProject {
|
||||
private Long id;
|
||||
|
||||
private Long orgId;
|
||||
|
||||
private String projectCode;
|
||||
|
||||
private Long creatorId;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package club.joylink.rtss.services.org;
|
||||
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.entity.OrgProject;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.org.OrgProjectVO;
|
||||
|
@ -2,14 +2,9 @@ package club.joylink.rtss.services.org;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.dao.OrgDAO;
|
||||
import club.joylink.rtss.dao.OrgProjectDAO;
|
||||
import club.joylink.rtss.dao.OrgUserDAO;
|
||||
import club.joylink.rtss.dao.org.OrgProjectDao;
|
||||
import club.joylink.rtss.entity.Org;
|
||||
import club.joylink.rtss.entity.OrgExample;
|
||||
import club.joylink.rtss.entity.OrgUser;
|
||||
import club.joylink.rtss.entity.OrgUserExample;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.entity.org.OrgProjectExample;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
@ -33,7 +28,7 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class OrgProjectService implements IOrgProjectService {
|
||||
@Autowired
|
||||
private OrgProjectDao orgProjectDao;
|
||||
private OrgProjectDAO orgProjectDAO;
|
||||
|
||||
@Autowired
|
||||
private OrgUserDAO orgUserDAO;
|
||||
@ -49,7 +44,7 @@ public class OrgProjectService implements IOrgProjectService {
|
||||
public List<OrgProject> queryOrgProjectListByOrgId(Long orgId) {
|
||||
OrgProjectExample orgProjectExample = new OrgProjectExample();
|
||||
orgProjectExample.createCriteria().andOrgIdEqualTo(orgId);
|
||||
return orgProjectDao.selectByExample(orgProjectExample);
|
||||
return orgProjectDAO.selectByExample(orgProjectExample);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -100,7 +95,7 @@ public class OrgProjectService implements IOrgProjectService {
|
||||
orgProject.setProjectCode(code);
|
||||
orgProject.setCreateTime(LocalDateTime.now());
|
||||
orgProject.setCreatorId(user.getId());
|
||||
orgProjectDao.insert(orgProject);
|
||||
orgProjectDAO.insert(orgProject);
|
||||
});
|
||||
}
|
||||
|
||||
@ -110,16 +105,16 @@ public class OrgProjectService implements IOrgProjectService {
|
||||
OrgProjectExample orgProjectExample = new OrgProjectExample();
|
||||
orgProjectExample.createCriteria().andOrgIdEqualTo(orgId);
|
||||
if (CollectionUtils.isEmpty(projectList)) { // 为空,直接删除项目列表
|
||||
orgProjectDao.deleteByExampleSelective(orgProjectExample);
|
||||
orgProjectDAO.deleteByExample(orgProjectExample);
|
||||
} else {
|
||||
List<OrgProject> orgProjects = orgProjectDao.selectByExample(orgProjectExample);
|
||||
List<OrgProject> orgProjects = orgProjectDAO.selectByExample(orgProjectExample);
|
||||
if (checkChange(orgProjects, projectList)) {
|
||||
List<String> oldProjectList = orgProjects.stream().map(OrgProject::getProjectCode).collect(Collectors.toList());
|
||||
// 删除不存在的
|
||||
List<String> delCodeList = oldProjectList.stream().filter(code -> !projectList.contains(code)).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(delCodeList)) {
|
||||
orgProjectExample.createCriteria().andOrgIdEqualTo(orgId).andProjectCodeIn(delCodeList);
|
||||
orgProjectDao.deleteByExampleSelective(orgProjectExample);
|
||||
orgProjectDAO.deleteByExample(orgProjectExample);
|
||||
}
|
||||
// 插入信息的
|
||||
List<String> newCodeList = projectList.stream().filter(code -> !oldProjectList.contains(code)).collect(Collectors.toList());
|
||||
@ -137,7 +132,7 @@ public class OrgProjectService implements IOrgProjectService {
|
||||
} else {
|
||||
OrgProjectExample example = new OrgProjectExample();
|
||||
example.createCriteria().andOrgIdIn(orgIds);
|
||||
return orgProjectDao.selectByExample(example);
|
||||
return orgProjectDAO.selectByExample(example);
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,7 +158,7 @@ public class OrgProjectService implements IOrgProjectService {
|
||||
private List<OrgProject> queryOrgProjectList(String projectCode) {
|
||||
OrgProjectExample orgProjectExample = new OrgProjectExample();
|
||||
orgProjectExample.createCriteria().andProjectCodeEqualTo(projectCode);
|
||||
return orgProjectDao.selectByExample(orgProjectExample);
|
||||
return orgProjectDAO.selectByExample(orgProjectExample);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,6 @@ import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.dao.OrgScoringRuleDAO;
|
||||
import club.joylink.rtss.dao.OrgScoringRuleRelDAO;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.IExamService;
|
||||
import club.joylink.rtss.services.ISysUserService;
|
||||
|
@ -2,11 +2,7 @@ package club.joylink.rtss.services.org;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.dao.OrgDAO;
|
||||
import club.joylink.rtss.entity.Org;
|
||||
import club.joylink.rtss.entity.OrgExample;
|
||||
import club.joylink.rtss.entity.OrgUser;
|
||||
import club.joylink.rtss.entity.SysAccount;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.ISysUserService;
|
||||
import club.joylink.rtss.services.QRCodeManager;
|
||||
|
@ -101,7 +101,7 @@ public class OldPermissionDataSyncService {
|
||||
for (MapInfo mapInfo : mapInfoList) {
|
||||
this.generate(mapInfo);
|
||||
}*/
|
||||
this.abilityService.autoSynchMapSystemData(0L);
|
||||
this.abilityService.autoSynchMapSystemData(1L);
|
||||
}catch (Exception e){
|
||||
log.error("用户权限初始化失败 msg:" + e.getMessage(),e);
|
||||
ISRUN.compareAndSet(true,false);
|
||||
@ -425,7 +425,7 @@ public class OldPermissionDataSyncService {
|
||||
ps.setDistributeId(userPermissionVO.getDistributeId());
|
||||
return ps;
|
||||
}
|
||||
|
||||
|
||||
public static DistributeDataVO createDistributeDataVO(SyncVO vo){
|
||||
DistributeDataVO dataVO = new DistributeDataVO();
|
||||
dataVO.setCreatorId(vo.permission.getCreatorId());
|
||||
|
@ -2,13 +2,11 @@ package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.dao.MapInfoDAO;
|
||||
import club.joylink.rtss.dao.OrgDAO;
|
||||
import club.joylink.rtss.dao.OrgProjectDAO;
|
||||
import club.joylink.rtss.dao.RtsMapFunctionDAO;
|
||||
import club.joylink.rtss.dao.org.OrgProjectDao;
|
||||
import club.joylink.rtss.dao.project.ProjectDAO;
|
||||
import club.joylink.rtss.dao.project.ProjectViewDAO;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.entity.org.OrgProjectExample;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.entity.project.ProjectExample;
|
||||
import club.joylink.rtss.entity.project.ProjectView;
|
||||
@ -48,7 +46,7 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
private ProjectViewDAO projectViewDAO;
|
||||
|
||||
@Autowired
|
||||
private OrgProjectDao orgProjectDao;
|
||||
private OrgProjectDAO orgProjectDAO;
|
||||
|
||||
@Autowired
|
||||
private OrgDAO orgDAO;
|
||||
@ -322,7 +320,7 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
private List<OrgProject> getOrgProjectList(List<String> projectCodeList) {
|
||||
OrgProjectExample orgProjectExample = new OrgProjectExample();
|
||||
orgProjectExample.createCriteria().andProjectCodeIn(projectCodeList);
|
||||
return orgProjectDao.selectByExample(orgProjectExample);
|
||||
return orgProjectDAO.selectByExample(orgProjectExample);
|
||||
}
|
||||
|
||||
private List<Org> getOrgList(List<Long> orgIdList) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package club.joylink.rtss.vo.client.org;
|
||||
|
||||
import club.joylink.rtss.entity.Org;
|
||||
import club.joylink.rtss.entity.OrgProject;
|
||||
import club.joylink.rtss.entity.SysAccount;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
@ -1,208 +1,213 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="club.joylink.rtss.dao.org.OrgProjectDao">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.org.OrgProject">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="org_id" property="orgId" jdbcType="BIGINT"/>
|
||||
<result column="project_code" property="projectCode" jdbcType="VARCHAR"/>
|
||||
<result column="creator_id" property="creatorId" jdbcType="BIGINT"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")"
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="club.joylink.rtss.dao.OrgProjectDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.OrgProject">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="org_id" jdbcType="BIGINT" property="orgId" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")"
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, org_id, project_code, creator_id, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap"
|
||||
parameterType="club.joylink.rtss.entity.org.OrgProjectExample">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</trim>
|
||||
</if>
|
||||
'true' as QUERYID,
|
||||
<include refid="Base_Column_List"/>
|
||||
from rts_org_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from rts_org_project
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from rts_org_project where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<update id="deleteByExampleSelective" parameterType="map">
|
||||
delete from rts_org_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.org.OrgProject" keyProperty="id"
|
||||
useGeneratedKeys="true" keyColumn="id">
|
||||
insert into rts_org_project (org_id, project_code, creator_id, create_time)
|
||||
values (#{orgId,jdbcType=BIGINT}, #{projectCode,jdbcType=VARCHAR},
|
||||
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.org.OrgProject">
|
||||
insert into rts_org_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="orgId != null">
|
||||
org_id,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orgId != null">
|
||||
#{orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update rts_org_project
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orgId != null">
|
||||
org_id = #{record.orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update rts_org_project
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, org_id, project_code, creator_id, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.OrgProjectExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_org_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_org_project
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from rts_org_project
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.OrgProjectExample">
|
||||
delete from rts_org_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.OrgProject" useGeneratedKeys="true">
|
||||
insert into rts_org_project (org_id, project_code, creator_id,
|
||||
create_time)
|
||||
values (#{orgId,jdbcType=BIGINT}, #{projectCode,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.OrgProject" useGeneratedKeys="true">
|
||||
insert into rts_org_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orgId != null">
|
||||
org_id,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orgId != null">
|
||||
#{orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.OrgProjectExample" resultType="java.lang.Long">
|
||||
select count(*) from rts_org_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update rts_org_project
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orgId != null">
|
||||
org_id = #{record.orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.org.OrgProject">
|
||||
update rts_org_project
|
||||
<set>
|
||||
<if test="orgId != null">
|
||||
org_id = #{orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.org.OrgProject">
|
||||
update rts_org_project
|
||||
set org_id = #{orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update rts_org_project
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
org_id = #{record.orgId,jdbcType=BIGINT},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.OrgProject">
|
||||
update rts_org_project
|
||||
<set>
|
||||
<if test="orgId != null">
|
||||
org_id = #{orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.OrgProject">
|
||||
update rts_org_project
|
||||
set org_id = #{orgId,jdbcType=BIGINT},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user