6 years ago
parent
commit
33f1b7c349
  1. 166
      tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExclude.java
  2. 1120
      tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExcludeExample.java
  3. 6
      tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java
  4. 1
      tall/src/main/java/com/ccsens/tall/config/SpringConfig.java
  5. 8
      tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExcludeDao.java
  6. 8
      tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExecludeDao.java
  7. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExcludeMapper.java
  8. 31
      tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExecludeMapper.java
  9. 2
      tall/src/main/java/com/ccsens/tall/service/ExcelService.java
  10. 8
      tall/src/main/java/com/ccsens/tall/service/ExcludeRoleService.java
  11. 4
      tall/src/main/java/com/ccsens/tall/service/IExcludeRoleService.java
  12. 6
      tall/src/main/java/com/ccsens/tall/service/IProRoleService.java
  13. 2
      tall/src/main/java/com/ccsens/tall/service/IProShowService.java
  14. 2
      tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java
  15. 73
      tall/src/main/java/com/ccsens/tall/service/ProRoleService.java
  16. 17
      tall/src/main/java/com/ccsens/tall/service/ProShowService.java
  17. 59
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  18. 37
      tall/src/main/java/com/ccsens/tall/service/ProjectService.java
  19. 2
      tall/src/main/java/com/ccsens/tall/web/DebugController.java
  20. 2
      tall/src/main/java/com/ccsens/tall/web/DomainController.java
  21. 4
      tall/src/main/resources/application.yml
  22. 454
      tall/src/main/resources/mapper_raw/ProRoleExcludeMapper.xml

166
tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExeclude.java → tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExclude.java

@ -1,84 +1,84 @@
package com.ccsens.tall.bean.po; package com.ccsens.tall.bean.po;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
public class ProRoleExeclude implements Serializable { public class ProRoleExclude implements Serializable {
private Long id; private Long id;
private Long roleId; private Long roleId;
private Long otherRoleId; private Long otherRoleId;
private Date createdAt; private Date createdAt;
private Date updatedAt; private Date updatedAt;
private Byte recStatus; private Byte recStatus;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Long getRoleId() { public Long getRoleId() {
return roleId; return roleId;
} }
public void setRoleId(Long roleId) { public void setRoleId(Long roleId) {
this.roleId = roleId; this.roleId = roleId;
} }
public Long getOtherRoleId() { public Long getOtherRoleId() {
return otherRoleId; return otherRoleId;
} }
public void setOtherRoleId(Long otherRoleId) { public void setOtherRoleId(Long otherRoleId) {
this.otherRoleId = otherRoleId; this.otherRoleId = otherRoleId;
} }
public Date getCreatedAt() { public Date getCreatedAt() {
return createdAt; return createdAt;
} }
public void setCreatedAt(Date createdAt) { public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt; this.createdAt = createdAt;
} }
public Date getUpdatedAt() { public Date getUpdatedAt() {
return updatedAt; return updatedAt;
} }
public void setUpdatedAt(Date updatedAt) { public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt; this.updatedAt = updatedAt;
} }
public Byte getRecStatus() { public Byte getRecStatus() {
return recStatus; return recStatus;
} }
public void setRecStatus(Byte recStatus) { public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus; this.recStatus = recStatus;
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName()); sb.append(getClass().getSimpleName());
sb.append(" ["); sb.append(" [");
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", roleId=").append(roleId); sb.append(", roleId=").append(roleId);
sb.append(", otherRoleId=").append(otherRoleId); sb.append(", otherRoleId=").append(otherRoleId);
sb.append(", createdAt=").append(createdAt); sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt); sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus); sb.append(", recStatus=").append(recStatus);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
} }

1120
tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExecludeExample.java → tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExcludeExample.java

File diff suppressed because it is too large

6
tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java

@ -89,10 +89,8 @@ public class TaskVo {
private Long endTime; private Long endTime;
@ApiModelProperty("时长") @ApiModelProperty("时长")
private Long duration; private Long duration;
@ApiModelProperty("显示的开始时间") @ApiModelProperty("显示的日期格式")
private String showBeginTime; private String showTimeFormat;
@ApiModelProperty("显示的结束时间")
private String showEndTime;
@ApiModelProperty("循环周期") @ApiModelProperty("循环周期")
private String cycle; private String cycle;
@ApiModelProperty("跳转模式 -1手动,0自动,1延迟") @ApiModelProperty("跳转模式 -1手动,0自动,1延迟")

1
tall/src/main/java/com/ccsens/tall/config/SpringConfig.java

@ -101,6 +101,7 @@ public class SpringConfig implements WebMvcConfigurer {
/** /**
* 配置静态资源 * 配置静态资源
*/ */
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/upload/**") registry.addResourceHandler("/upload/**")
.addResourceLocations("classpath:/upload/"); .addResourceLocations("classpath:/upload/");

8
tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExcludeDao.java

@ -0,0 +1,8 @@
package com.ccsens.tall.persist.dao;
import com.ccsens.tall.persist.mapper.ProRoleExcludeMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface ProRoleExcludeDao extends ProRoleExcludeMapper {
}

8
tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExecludeDao.java

@ -1,8 +0,0 @@
package com.ccsens.tall.persist.dao;
import com.ccsens.tall.persist.mapper.ProRoleExecludeMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface ProRoleExecludeDao extends ProRoleExecludeMapper{
}

30
tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExcludeMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.ProRoleExclude;
import com.ccsens.tall.bean.po.ProRoleExcludeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProRoleExcludeMapper {
long countByExample(ProRoleExcludeExample example);
int deleteByExample(ProRoleExcludeExample example);
int deleteByPrimaryKey(Long id);
int insert(ProRoleExclude record);
int insertSelective(ProRoleExclude record);
List<ProRoleExclude> selectByExample(ProRoleExcludeExample example);
ProRoleExclude selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProRoleExclude record, @Param("example") ProRoleExcludeExample example);
int updateByExample(@Param("record") ProRoleExclude record, @Param("example") ProRoleExcludeExample example);
int updateByPrimaryKeySelective(ProRoleExclude record);
int updateByPrimaryKey(ProRoleExclude record);
}

31
tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExecludeMapper.java

@ -1,31 +0,0 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.ProRoleExeclude;
import com.ccsens.tall.bean.po.ProRoleExecludeExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ProRoleExecludeMapper {
long countByExample(ProRoleExecludeExample example);
int deleteByExample(ProRoleExecludeExample example);
int deleteByPrimaryKey(Long id);
int insert(ProRoleExeclude record);
int insertSelective(ProRoleExeclude record);
List<ProRoleExeclude> selectByExample(ProRoleExecludeExample example);
ProRoleExeclude selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProRoleExeclude record, @Param("example") ProRoleExecludeExample example);
int updateByExample(@Param("record") ProRoleExeclude record, @Param("example") ProRoleExecludeExample example);
int updateByPrimaryKeySelective(ProRoleExeclude record);
int updateByPrimaryKey(ProRoleExeclude record);
}

2
tall/src/main/java/com/ccsens/tall/service/ExcelService.java

@ -359,7 +359,7 @@ public class ExcelService implements IExcelService {
if (ObjectUtil.isNotNull(excludeRoleCells)) { if (ObjectUtil.isNotNull(excludeRoleCells)) {
for (int a = 0; a < excludeRoleCells.length; a++) { for (int a = 0; a < excludeRoleCells.length; a++) {
ProRoleExeclude excludeRole = new ProRoleExeclude(); ProRoleExclude excludeRole = new ProRoleExclude();
excludeRole.setId(snowflake.nextId()); excludeRole.setId(snowflake.nextId());
excludeRole.setRoleId(proRoleId); excludeRole.setRoleId(proRoleId);
if (CollectionUtil.isNotEmpty(proRoles)) { if (CollectionUtil.isNotEmpty(proRoles)) {

8
tall/src/main/java/com/ccsens/tall/service/ExcludeRoleService.java

@ -1,7 +1,7 @@
package com.ccsens.tall.service; package com.ccsens.tall.service;
import com.ccsens.tall.bean.po.ProRoleExeclude; import com.ccsens.tall.bean.po.ProRoleExclude;
import com.ccsens.tall.persist.dao.ProRoleExecludeDao; import com.ccsens.tall.persist.dao.ProRoleExcludeDao;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -13,9 +13,9 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
public class ExcludeRoleService implements IExcludeRoleService{ public class ExcludeRoleService implements IExcludeRoleService{
@Autowired @Autowired
private ProRoleExecludeDao proRoleExecludeDao; private ProRoleExcludeDao proRoleExecludeDao;
@Override @Override
public void saveExcludeRole(ProRoleExeclude excludeRole) { public void saveExcludeRole(ProRoleExclude excludeRole) {
proRoleExecludeDao.insertSelective(excludeRole); proRoleExecludeDao.insertSelective(excludeRole);
} }
} }

4
tall/src/main/java/com/ccsens/tall/service/IExcludeRoleService.java

@ -1,7 +1,7 @@
package com.ccsens.tall.service; package com.ccsens.tall.service;
import com.ccsens.tall.bean.po.ProRoleExeclude; import com.ccsens.tall.bean.po.ProRoleExclude;
public interface IExcludeRoleService { public interface IExcludeRoleService {
void saveExcludeRole(ProRoleExeclude excludeRole); void saveExcludeRole(ProRoleExclude excludeRole);
} }

6
tall/src/main/java/com/ccsens/tall/service/IProRoleService.java

@ -16,11 +16,13 @@ public interface IProRoleService {
List<ProjectVo.RoleInfo> getRealMemberRolesByProjectId(Long projectId); List<ProjectVo.RoleInfo> getRealMemberRolesByProjectId(Long projectId);
int selectPowerByRoleName(List<ProRole> roles); int selectPowerByRoleName(Long userId,Long projectId);
TaskVo.RoleCheckList selectRoleByCheckOrExecutor(Long executorRole); TaskVo.RoleCheckList selectRoleByCheckOrExecutor(Long executorRole);
ProRole getAllMember(Long projectId); ProRole getAllMember(Long projectId);
void deleteRoleByProjectId(Long userId,Long projectId); void deleteRole(Long userId,Long roleId);
void deleteRoleByProjectId(Long projectId);
} }

2
tall/src/main/java/com/ccsens/tall/service/IProShowService.java

@ -4,4 +4,6 @@ import com.ccsens.tall.bean.po.ProShow;
public interface IProShowService{ public interface IProShowService{
void saveProShow(ProShow proShow); void saveProShow(ProShow proShow);
ProShow selectByProjectId(Long projectId)throws Exception;
} }

2
tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java

@ -22,5 +22,5 @@ public interface IProTaskDetailService {
void deleteTask(Long currentUserId,Long taskId); void deleteTask(Long currentUserId,Long taskId);
void deleteTaskByTaskId(Long taskId); void deleteTaskByRoleId(Long taskId);
} }

73
tall/src/main/java/com/ccsens/tall/service/ProRoleService.java

@ -2,15 +2,13 @@ package com.ccsens.tall.service;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.ccsens.tall.bean.po.ProMember; import com.ccsens.tall.bean.po.*;
import com.ccsens.tall.bean.po.ProRole;
import com.ccsens.tall.bean.po.ProRoleExample;
import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.ProMemberDao; import com.ccsens.tall.persist.dao.*;
import com.ccsens.tall.persist.dao.ProMemberRoleDao; import com.ccsens.util.CodeEnum;
import com.ccsens.tall.persist.dao.ProRoleDao;
import com.ccsens.util.WebConstant; import com.ccsens.util.WebConstant;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -28,8 +26,16 @@ public class ProRoleService implements IProRoleService {
@Autowired @Autowired
private ProMemberDao proMemberDao; private ProMemberDao proMemberDao;
@Autowired @Autowired
private ProMemberRoleDao memberRoleDao;
@Autowired
private ProRoleExcludeDao excludeDao;
@Autowired
private SysProjectDao projectDao;
@Autowired
private IProMemberService proMemberService; private IProMemberService proMemberService;
@Autowired @Autowired
private IProTaskDetailService taskDetailService;
@Autowired
private IUserService userService; private IUserService userService;
@Override @Override
@ -151,12 +157,16 @@ public class ProRoleService implements IProRoleService {
/** /**
* 获取用户在项目中的最高权限 * 获取用户在项目中的最高权限
* @param roles 用户在项目中所属的一级角色的名字
* @return * @return
*/ */
@Override @Override
public int selectPowerByRoleName(List<ProRole> roles) { public int selectPowerByRoleName(Long userId,Long projectId) {
int power = 0; int power = 0;
SysProject project = projectDao.selectByPrimaryKey(projectId);
if(project.getCreatorId().longValue() == userId){
power = 2;
}
List<ProRole> roles = getProRoleByProjectIdAndUserId(projectId,userId);
if(CollectionUtil.isNotEmpty(roles)){ if(CollectionUtil.isNotEmpty(roles)){
for(ProRole role:roles){ for(ProRole role:roles){
int i = proRoleDao.selectPowerByRoleName(role.getDescription()); int i = proRoleDao.selectPowerByRoleName(role.getDescription());
@ -201,12 +211,53 @@ public class ProRoleService implements IProRoleService {
* 删除角色 * 删除角色
*/ */
@Override @Override
public void deleteRoleByProjectId(Long userId,Long roleId) { public void deleteRole(Long userId,Long roleId){
ProRole role = proRoleDao.selectByPrimaryKey(roleId);
//本用户在项目中的角色
List<ProRole> proRoles = getProRoleByProjectIdAndUserId(role.getProjectId(), userId);
//用户在项目中的最高权限
int power = selectPowerByRoleName(userId,role.getProjectId());
if (power > 1) {
deleteRoleByRoleId(roleId);
} else {
throw new BaseException(CodeEnum.NOT_POWER);
}
}
/**
* 删除项目下的所有角色
*/
@Override
public void deleteRoleByProjectId(Long projectId) {
ProRoleExample roleExample = new ProRoleExample(); ProRoleExample roleExample = new ProRoleExample();
roleExample.createCriteria().andProjectIdEqualTo(roleId); roleExample.createCriteria().andProjectIdEqualTo(projectId);
List<ProRole> roleList = proRoleDao.selectByExample(roleExample); List<ProRole> roleList = proRoleDao.selectByExample(roleExample);
if(CollectionUtil.isNotEmpty(roleList)){
for(ProRole role:roleList){
deleteRoleByRoleId(role.getId());
}
}
} }
private void deleteRoleByRoleId(Long roleId){
//删除角色下的任务
taskDetailService.deleteTaskByRoleId(roleId);
//删除成员和成员角色关联表
ProMemberRoleExample memberRoleExample = new ProMemberRoleExample();
memberRoleExample.createCriteria().andRoleIdEqualTo(roleId);
List<ProMemberRole> memberRoleList = memberRoleDao.selectByExample(memberRoleExample);
if(CollectionUtil.isNotEmpty(memberRoleList)){
for(ProMemberRole memberRole:memberRoleList){
proMemberDao.deleteByPrimaryKey(memberRole.getMemberId());
memberRoleDao.deleteByPrimaryKey(memberRole.getId());
}
}
//删除对谁不可见
ProRoleExcludeExample excludeExample = new ProRoleExcludeExample();
excludeExample.createCriteria().andRoleIdEqualTo(roleId);
excludeDao.deleteByExample(excludeExample);
//删除角色
proRoleDao.deleteByPrimaryKey(roleId);
}
} }

17
tall/src/main/java/com/ccsens/tall/service/ProShowService.java

@ -1,10 +1,14 @@
package com.ccsens.tall.service; package com.ccsens.tall.service;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.tall.bean.po.ProShow; import com.ccsens.tall.bean.po.ProShow;
import com.ccsens.tall.bean.po.ProShowExample;
import com.ccsens.tall.persist.dao.ProShowDao; import com.ccsens.tall.persist.dao.ProShowDao;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
@Service @Service
public class ProShowService implements IProShowService{ public class ProShowService implements IProShowService{
@Autowired @Autowired
@ -14,4 +18,17 @@ public class ProShowService implements IProShowService{
public void saveProShow(ProShow proShow) { public void saveProShow(ProShow proShow) {
proShowDao.insertSelective(proShow); proShowDao.insertSelective(proShow);
} }
@Override
public ProShow selectByProjectId(Long projectId) throws Exception {
ProShow proShow = null;
ProShowExample proShowExample = new ProShowExample();
proShowExample.createCriteria().andProjectIdEqualTo(projectId);
List<ProShow> proShowList = proShowDao.selectByExample(proShowExample);
if(CollectionUtil.isNotEmpty(proShowList)){
proShow = proShowList.get(0);
}
return proShow;
}
} }

59
tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java

@ -14,6 +14,7 @@ import com.ccsens.util.WebConstant;
import com.ccsens.util.exception.BaseException; import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -36,6 +37,8 @@ public class ProTaskDetailService implements IProTaskDetailService {
@Autowired @Autowired
private IProMemberService proMemberService; private IProMemberService proMemberService;
@Autowired @Autowired
private IProShowService proShowService;
@Autowired
private TaskDetailDao taskDetailDao; private TaskDetailDao taskDetailDao;
@Autowired @Autowired
private TaskSubTimeDao taskSubTimeDao; private TaskSubTimeDao taskSubTimeDao;
@ -93,6 +96,8 @@ public class ProTaskDetailService implements IProTaskDetailService {
* 查看任务 项目经理 * 查看任务 项目经理
*/ */
private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPM(Long currentUserId, Long projectId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception { private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPM(Long currentUserId, Long projectId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception {
ProShow proShow = proShowService.selectByProjectId(projectId);
TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo();
List<TaskVo.GlobalTask> globalTaskList = new ArrayList<>(); List<TaskVo.GlobalTask> globalTaskList = new ArrayList<>();
List<TaskVo.NormalTask> normalTaskList = new ArrayList<>(); List<TaskVo.NormalTask> normalTaskList = new ArrayList<>();
@ -123,6 +128,14 @@ public class ProTaskDetailService implements IProTaskDetailService {
task.setRealEndTime(subTimeMember.getRealFinishTime()); task.setRealEndTime(subTimeMember.getRealFinishTime());
task.setProcess(subTimeMember.getComplatedStatus()); task.setProcess(subTimeMember.getComplatedStatus());
} }
if(ObjectUtil.isNotNull(proShow)){
task.setShowTimeFormat(proShow.getTimeShow());
if(proShow.getDuration() == 1){
task.setDuration(null);
}
}else {
task.setShowTimeFormat("MM-dd HH:mm");
}
} }
TaskUtil.Task task = TaskUtil.splitTask(secondNormalTaskList, startTime, endTime, process); TaskUtil.Task task = TaskUtil.splitTask(secondNormalTaskList, startTime, endTime, process);
if (CollectionUtil.isNotEmpty(task.getGlobalTask())) { if (CollectionUtil.isNotEmpty(task.getGlobalTask())) {
@ -157,6 +170,8 @@ public class ProTaskDetailService implements IProTaskDetailService {
* 查看任务 项目成员 * 查看任务 项目成员
*/ */
private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception { private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception {
ProShow proShow = proShowService.selectByProjectId(projectId);
TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo();
List<TaskVo.GlobalTask> globalTaskList = new ArrayList<>(); List<TaskVo.GlobalTask> globalTaskList = new ArrayList<>();
List<TaskVo.NormalTask> normalTaskList = new ArrayList<>(); List<TaskVo.NormalTask> normalTaskList = new ArrayList<>();
@ -176,6 +191,14 @@ public class ProTaskDetailService implements IProTaskDetailService {
normalTask.setProcess(subTimeMember.getComplatedStatus()); normalTask.setProcess(subTimeMember.getComplatedStatus());
normalTask.setRealEndTime(subTimeMember.getRealFinishTime()); normalTask.setRealEndTime(subTimeMember.getRealFinishTime());
} }
if(ObjectUtil.isNotNull(proShow)){
normalTask.setShowTimeFormat(proShow.getTimeShow());
if(proShow.getDuration() == 1){
normalTask.setDuration(null);
}
}else {
normalTask.setShowTimeFormat("MM-dd HH:mm");
}
} }
TaskUtil.Task task = TaskUtil.splitTask(secondTaskVoList, startTime, endTime, process); TaskUtil.Task task = TaskUtil.splitTask(secondTaskVoList, startTime, endTime, process);
if (CollectionUtil.isNotEmpty(task.getGlobalTask())) { if (CollectionUtil.isNotEmpty(task.getGlobalTask())) {
@ -380,6 +403,8 @@ public class ProTaskDetailService implements IProTaskDetailService {
*/ */
@Override @Override
public TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId) throws Exception { public TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId) throws Exception {
ProShow proShow = proShowService.selectByProjectId(projectId);
ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(taskId); ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(taskId);
TaskVo.NormalTask taskDetail = null; TaskVo.NormalTask taskDetail = null;
if (ObjectUtil.isNotNull(subTime)) { if (ObjectUtil.isNotNull(subTime)) {
@ -390,6 +415,15 @@ public class ProTaskDetailService implements IProTaskDetailService {
taskDetail.setProcess(subTimeMember.getComplatedStatus()); taskDetail.setProcess(subTimeMember.getComplatedStatus());
taskDetail.setRealEndTime(subTimeMember.getRealFinishTime()); taskDetail.setRealEndTime(subTimeMember.getRealFinishTime());
} }
//显示的日期格式和时长格式
if(ObjectUtil.isNotNull(proShow)){
taskDetail.setShowTimeFormat(proShow.getTimeShow());
if(proShow.getDuration() == 1){
taskDetail.setDuration(null);
}
}else {
taskDetail.setShowTimeFormat("MM-dd HH:mm");
}
//添加项目信息和插件信息 //添加项目信息和插件信息
normalTaskAddPlugin(currentUserId, subTime.getTaskDetailId(), taskDetail); normalTaskAddPlugin(currentUserId, subTime.getTaskDetailId(), taskDetail);
if (ObjectUtil.isNotNull(taskDetail)) { if (ObjectUtil.isNotNull(taskDetail)) {
@ -403,6 +437,15 @@ public class ProTaskDetailService implements IProTaskDetailService {
groupTask.setProcess(proSubTimeMember.getComplatedStatus()); groupTask.setProcess(proSubTimeMember.getComplatedStatus());
groupTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); groupTask.setRealEndTime(proSubTimeMember.getRealFinishTime());
} }
//显示的日期格式和时长格式
if(ObjectUtil.isNotNull(proShow)){
groupTask.setShowTimeFormat(proShow.getTimeShow());
if(proShow.getDuration() == 1){
groupTask.setDuration(null);
}
}else {
groupTask.setShowTimeFormat("MM-dd HH:mm");
}
//添加项目信息和插件信息 //添加项目信息和插件信息
normalTaskAddPlugin(currentUserId, groupTask.getDetailId(), groupTask); normalTaskAddPlugin(currentUserId, groupTask.getDetailId(), groupTask);
//修改返回时子任务的名字(“任务名+(xx和XX)”) //修改返回时子任务的名字(“任务名+(xx和XX)”)
@ -461,6 +504,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
return name; return name;
} }
/** /**
* 任务清单 * 任务清单
*/ */
@ -773,7 +817,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
//本用户在项目中的角色 //本用户在项目中的角色
List<ProRole> proRoles = proRoleService.getProRoleByProjectIdAndUserId(taskDetail.getProjectId(), currentUserId); List<ProRole> proRoles = proRoleService.getProRoleByProjectIdAndUserId(taskDetail.getProjectId(), currentUserId);
//用户在项目中的最高权限 //用户在项目中的最高权限
int power = proRoleService.selectPowerByRoleName(proRoles); int power = proRoleService.selectPowerByRoleName(currentUserId,taskDetail.getProjectId());
if (power > 1) { if (power > 1) {
if (ObjectUtil.isNotNull(taskDetail)) { if (ObjectUtil.isNotNull(taskDetail)) {
deleteTaskByTaskId(taskDetail.getId()); deleteTaskByTaskId(taskDetail.getId());
@ -784,7 +828,18 @@ public class ProTaskDetailService implements IProTaskDetailService {
} }
@Override @Override
public void deleteTaskByTaskId(Long taskId) { public void deleteTaskByRoleId(Long roleId) {
ProTaskDetailExample taskDetailExample = new ProTaskDetailExample();
taskDetailExample.createCriteria().andExecutorRoleEqualTo(roleId);
List<ProTaskDetail> detailList = taskDetailDao.selectByExample(taskDetailExample);
if(CollectionUtil.isNotEmpty(detailList)){
for(ProTaskDetail taskDetail:detailList){
deleteTaskByTaskId(taskDetail.getId());
}
}
}
private void deleteTaskByTaskId(Long taskId) {
//1、删除交付物相关信息 //1、删除交付物相关信息
taskDeliverService.deleteDeliverByTaskId(taskId); taskDeliverService.deleteDeliverByTaskId(taskId);
//2、删除插件 //2、删除插件

37
tall/src/main/java/com/ccsens/tall/service/ProjectService.java

@ -31,7 +31,7 @@ public class ProjectService implements IProjectService {
@Autowired @Autowired
private SysProjectDao sysProjectDao; private SysProjectDao sysProjectDao;
@Autowired @Autowired
private ProRoleExecludeDao roleExecludeDao; private ProRoleExcludeDao roleExcludeDao;
@Autowired @Autowired
private ProRoleDao proRoleDao; private ProRoleDao proRoleDao;
@Autowired @Autowired
@ -197,7 +197,7 @@ public class ProjectService implements IProjectService {
projectInfo.getRoles().add(WebConstant.ROLE_NAME.Attention.phase); projectInfo.getRoles().add(WebConstant.ROLE_NAME.Attention.phase);
} }
//用户在项目中的最高权限 //用户在项目中的最高权限
int power = proRoleService.selectPowerByRoleName(proRoles); int power = proRoleService.selectPowerByRoleName(currentUserId,project.getId());
projectInfo.setPower(power); projectInfo.setPower(power);
projectInfoList.add(projectInfo); projectInfoList.add(projectInfo);
@ -235,7 +235,7 @@ public class ProjectService implements IProjectService {
projectInfo.getRoles().add(WebConstant.ROLE_NAME.Attention.phase); projectInfo.getRoles().add(WebConstant.ROLE_NAME.Attention.phase);
} }
//用户在项目中的最高权限 //用户在项目中的最高权限
int power = proRoleService.selectPowerByRoleName(proRoles); int power = proRoleService.selectPowerByRoleName(userId,projectId);
projectInfo.setPower(power); projectInfo.setPower(power);
//获取项目配置 //获取项目配置
ProShowExample proShowExample = new ProShowExample(); ProShowExample proShowExample = new ProShowExample();
@ -377,14 +377,14 @@ public class ProjectService implements IProjectService {
//本用户在项目中的角色 //本用户在项目中的角色
List<ProRole> proRoles = proRoleService.getProRoleByProjectIdAndUserId(projectId, currentUserId); List<ProRole> proRoles = proRoleService.getProRoleByProjectIdAndUserId(projectId, currentUserId);
//用户在项目中的最高权限 //用户在项目中的最高权限
int power = proRoleService.selectPowerByRoleName(proRoles); int power = proRoleService.selectPowerByRoleName(currentUserId,projectId);
if(power>1){ if(power>1){
//修改项目状态 // //修改项目状态
SysProject project = sysProjectDao.selectByPrimaryKey(projectId); // SysProject project = sysProjectDao.selectByPrimaryKey(projectId);
project.setRecStatus((byte) 1); // project.setRecStatus((byte) 1);
sysProjectDao.updateByPrimaryKeySelective(project); // sysProjectDao.updateByPrimaryKeySelective(project);
//彻底删除项目 //彻底删除项目
deleteProjectById(projectId);
}else { }else {
throw new BaseException(CodeEnum.NOT_POWER); throw new BaseException(CodeEnum.NOT_POWER);
} }
@ -393,7 +393,14 @@ public class ProjectService implements IProjectService {
* 删除项目 * 删除项目
*/ */
private void deleteProjectById(Long projectId){ private void deleteProjectById(Long projectId){
//删除任务下的角色
proRoleService.deleteRoleByProjectId(projectId);
//删除这个项目被关注的信息
UserAttentionExample attentionExample = new UserAttentionExample();
attentionExample.createCriteria().andProjectIdEqualTo(projectId);
attentionDao.deleteByExample(attentionExample);
//删除项目
sysProjectDao.deleteByPrimaryKey(projectId);
} }
/** /**
@ -475,15 +482,15 @@ public class ProjectService implements IProjectService {
private void copyRoleExeclude(List<ProRole> oldRoleList, Map<Long,String> oldRoleMap, Map<String,Long> newRoleMap){ private void copyRoleExeclude(List<ProRole> oldRoleList, Map<Long,String> oldRoleMap, Map<String,Long> newRoleMap){
if(CollectionUtil.isNotEmpty(oldRoleList)) { if(CollectionUtil.isNotEmpty(oldRoleList)) {
for (ProRole oldRole : oldRoleList) { for (ProRole oldRole : oldRoleList) {
ProRoleExecludeExample execludeExample = new ProRoleExecludeExample(); ProRoleExcludeExample execludeExample = new ProRoleExcludeExample();
execludeExample.createCriteria().andRoleIdEqualTo(oldRole.getId()); execludeExample.createCriteria().andRoleIdEqualTo(oldRole.getId());
List<ProRoleExeclude> roleExecludeList = roleExecludeDao.selectByExample(execludeExample); List<ProRoleExclude> roleExecludeList = roleExcludeDao.selectByExample(execludeExample);
if(CollectionUtil.isNotEmpty(roleExecludeList)){ if(CollectionUtil.isNotEmpty(roleExecludeList)){
for(ProRoleExeclude roleExeclude:roleExecludeList){ for(ProRoleExclude roleExeclude:roleExecludeList){
ProRoleExeclude newRoleExeclude = new ProRoleExeclude(); ProRoleExclude newRoleExeclude = new ProRoleExclude();
newRoleExeclude.setRoleId(newRoleMap.get(oldRoleMap.get(roleExeclude.getRoleId()))); newRoleExeclude.setRoleId(newRoleMap.get(oldRoleMap.get(roleExeclude.getRoleId())));
newRoleExeclude.setOtherRoleId(newRoleMap.get(oldRoleMap.get(roleExeclude.getRoleId()))); newRoleExeclude.setOtherRoleId(newRoleMap.get(oldRoleMap.get(roleExeclude.getRoleId())));
roleExecludeDao.insertSelective(newRoleExeclude); roleExcludeDao.insertSelective(newRoleExeclude);
} }
} }
} }

2
tall/src/main/java/com/ccsens/tall/web/DebugController.java

@ -1,6 +1,5 @@
package com.ccsens.tall.web; package com.ccsens.tall.web;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.util.JsonResponse; import com.ccsens.util.JsonResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -10,7 +9,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Map;
@Api(tags = "DEBUG" , description = "DebugController | ") @Api(tags = "DEBUG" , description = "DebugController | ")
@RestController @RestController

2
tall/src/main/java/com/ccsens/tall/web/DomainController.java

@ -31,6 +31,6 @@ public class DomainController {
public JsonResponse<DomainVo.DomainInfo> getDomainByName(HttpServletRequest request, public JsonResponse<DomainVo.DomainInfo> getDomainByName(HttpServletRequest request,
@RequestParam(required = true) String domainName) throws Exception { @RequestParam(required = true) String domainName) throws Exception {
DomainVo.DomainInfo domainInfo = domainService.getDomainByName(domainName); DomainVo.DomainInfo domainInfo = domainService.getDomainByName(domainName);
return JsonResponse.newInstance().ok(); return JsonResponse.newInstance().ok(domainInfo);
} }
} }

4
tall/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring: spring:
profiles: profiles:
active: dev active: test
include: util-dev,common include: util-test,common

454
tall/src/main/resources/mapper_raw/ProRoleExecludeMapper.xml → tall/src/main/resources/mapper_raw/ProRoleExcludeMapper.xml

@ -1,228 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.ProRoleExecludeMapper"> <mapper namespace="com.ccsens.tall.persist.mapper.ProRoleExcludeMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.ProRoleExeclude"> <resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.ProRoleExclude">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="role_id" jdbcType="BIGINT" property="roleId" /> <result column="role_id" jdbcType="BIGINT" property="roleId" />
<result column="other_role_id" jdbcType="BIGINT" property="otherRoleId" /> <result column="other_role_id" jdbcType="BIGINT" property="otherRoleId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> <result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
<foreach collection="oredCriteria" item="criteria" separator="or"> <foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
</if> </if>
</foreach> </foreach>
</where> </where>
</sql> </sql>
<sql id="Update_By_Example_Where_Clause"> <sql id="Update_By_Example_Where_Clause">
<where> <where>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
</if> </if>
</foreach> </foreach>
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, role_id, other_role_id, created_at, updated_at, rec_status id, role_id, other_role_id, created_at, updated_at, rec_status
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProRoleExecludeExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProRoleExcludeExample" resultMap="BaseResultMap">
select select
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from t_pro_role_execlude from t_pro_role_execlude
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
<if test="orderByClause != null"> <if test="orderByClause != null">
order by ${orderByClause} order by ${orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from t_pro_role_execlude from t_pro_role_execlude
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_pro_role_execlude delete from t_pro_role_execlude
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.ProRoleExecludeExample"> <delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.ProRoleExcludeExample">
delete from t_pro_role_execlude delete from t_pro_role_execlude
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.ProRoleExeclude"> <insert id="insert" parameterType="com.ccsens.tall.bean.po.ProRoleExclude">
insert into t_pro_role_execlude (id, role_id, other_role_id, insert into t_pro_role_execlude (id, role_id, other_role_id,
created_at, updated_at, rec_status created_at, updated_at, rec_status
) )
values (#{id,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, #{otherRoleId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, #{otherRoleId,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProRoleExeclude"> <insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProRoleExclude">
insert into t_pro_role_execlude insert into t_pro_role_execlude
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="roleId != null"> <if test="roleId != null">
role_id, role_id,
</if> </if>
<if test="otherRoleId != null"> <if test="otherRoleId != null">
other_role_id, other_role_id,
</if> </if>
<if test="createdAt != null"> <if test="createdAt != null">
created_at, created_at,
</if> </if>
<if test="updatedAt != null"> <if test="updatedAt != null">
updated_at, updated_at,
</if> </if>
<if test="recStatus != null"> <if test="recStatus != null">
rec_status, rec_status,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=BIGINT}, #{id,jdbcType=BIGINT},
</if> </if>
<if test="roleId != null"> <if test="roleId != null">
#{roleId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT},
</if> </if>
<if test="otherRoleId != null"> <if test="otherRoleId != null">
#{otherRoleId,jdbcType=BIGINT}, #{otherRoleId,jdbcType=BIGINT},
</if> </if>
<if test="createdAt != null"> <if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP},
</if> </if>
<if test="updatedAt != null"> <if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
</if> </if>
<if test="recStatus != null"> <if test="recStatus != null">
#{recStatus,jdbcType=TINYINT}, #{recStatus,jdbcType=TINYINT},
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProRoleExecludeExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProRoleExcludeExample" resultType="java.lang.Long">
select count(*) from t_pro_role_execlude select count(*) from t_pro_role_execlude
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
update t_pro_role_execlude update t_pro_role_execlude
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.roleId != null"> <if test="record.roleId != null">
role_id = #{record.roleId,jdbcType=BIGINT}, role_id = #{record.roleId,jdbcType=BIGINT},
</if> </if>
<if test="record.otherRoleId != null"> <if test="record.otherRoleId != null">
other_role_id = #{record.otherRoleId,jdbcType=BIGINT}, other_role_id = #{record.otherRoleId,jdbcType=BIGINT},
</if> </if>
<if test="record.createdAt != null"> <if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.updatedAt != null"> <if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.recStatus != null"> <if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT}, rec_status = #{record.recStatus,jdbcType=TINYINT},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update t_pro_role_execlude update t_pro_role_execlude
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
role_id = #{record.roleId,jdbcType=BIGINT}, role_id = #{record.roleId,jdbcType=BIGINT},
other_role_id = #{record.otherRoleId,jdbcType=BIGINT}, other_role_id = #{record.otherRoleId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT} rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.ProRoleExeclude"> <update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.ProRoleExclude">
update t_pro_role_execlude update t_pro_role_execlude
<set> <set>
<if test="roleId != null"> <if test="roleId != null">
role_id = #{roleId,jdbcType=BIGINT}, role_id = #{roleId,jdbcType=BIGINT},
</if> </if>
<if test="otherRoleId != null"> <if test="otherRoleId != null">
other_role_id = #{otherRoleId,jdbcType=BIGINT}, other_role_id = #{otherRoleId,jdbcType=BIGINT},
</if> </if>
<if test="createdAt != null"> <if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP}, created_at = #{createdAt,jdbcType=TIMESTAMP},
</if> </if>
<if test="updatedAt != null"> <if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if> </if>
<if test="recStatus != null"> <if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT}, rec_status = #{recStatus,jdbcType=TINYINT},
</if> </if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.ProRoleExeclude"> <update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.ProRoleExclude">
update t_pro_role_execlude update t_pro_role_execlude
set role_id = #{roleId,jdbcType=BIGINT}, set role_id = #{roleId,jdbcType=BIGINT},
other_role_id = #{otherRoleId,jdbcType=BIGINT}, other_role_id = #{otherRoleId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP}, created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT} rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
Loading…
Cancel
Save