修复了查询Project时没有CreatedTime的问题
parent
e548a2fce0
commit
5da87af6e3
|
@ -6,6 +6,7 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author 阳勇权
|
||||
|
@ -25,6 +26,7 @@ public class ProjectDTO {
|
|||
String projectSubclassName;
|
||||
Boolean deleted;
|
||||
Boolean completed;
|
||||
LocalDateTime projectCreatedTime;
|
||||
LocalDate projectClosedDate;
|
||||
Integer completeNum;
|
||||
Integer totalNum;
|
||||
|
|
|
@ -39,6 +39,7 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
|
|||
@Autowired
|
||||
private RedisTemplate<Object, Object> redisTemplate;
|
||||
|
||||
//TODO: ban掉多次登录失败的IP
|
||||
@Override
|
||||
public Map<String, Object> login(String staffUsername, String password) throws BadRequestException {
|
||||
if (staffUsername == null || staffUsername.strip().length() == 0)
|
||||
|
|
|
@ -118,7 +118,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<StaffProcessDTO> getProjectProcessOfStaff(String token, Integer projectId) throws BadRequestException, ForbiddenException {
|
||||
public List<StaffProcessDTO> getProjectProcessOfStaff(String token, Integer projectId) throws ForbiddenException {
|
||||
Integer staffId = TokenUtils.getStaffId(token);
|
||||
if (projectGroupService.getProjectAccessLevel(token, projectId) == 0) {
|
||||
throw new ForbiddenException(IProjectGroupService.UNABLE_TO_ACCESS_PROJECT);
|
||||
|
@ -195,7 +195,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
|
|||
task.setTaskId(null);
|
||||
Integer userLevel = projectGroupService.getProjectAccessLevel(token, task.getTaskProjectId());
|
||||
if (userLevel == 0) {
|
||||
System.out.println(userLevel);
|
||||
throw new ForbiddenException(IProjectGroupService.UNABLE_TO_ACCESS_PROJECT);
|
||||
}
|
||||
if (!task.checkInsert()) {
|
||||
|
@ -206,10 +205,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
|
|||
if (!task.checkLegalFather(father) || (getHolderLevel(token, task.getTaskFatherId()) == 0 && userLevel == 3)) {
|
||||
throw new BadRequestException("无法指定该父级");
|
||||
}
|
||||
task.setTaskCreatedTime(LocalDateTime.now());
|
||||
task.setTaskCreatedTime(null);
|
||||
task.setTaskStatus(Task.STATUS_WAITING);
|
||||
task.setTaskClosedTime(null);
|
||||
System.out.println("-------------------------\n");
|
||||
if (baseMapper.insert(task) == 0) {
|
||||
throw new BadRequestException(BadRequestException.OPERATE_FAILED);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://wuyize.ml:3306/db_project_management?useUnicode=true&characterEncoding=utf-8
|
||||
url: jdbc:mysql://wuyize.ml:3306/db_project_management?useUnicode=true&characterEncoding=utf-8&useAffectedRows=true
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
username: rmdjzz_root
|
||||
password: rmdjzz2020
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
pt2.project_class_name AS project_subclass_name,
|
||||
is_completed,
|
||||
is_deleted,
|
||||
project_created_time,
|
||||
project_closed_date,
|
||||
IF(complete_num IS NULL, 0, complete_num) AS complete_num,
|
||||
IF(total_num IS NULL, 0, total_num) AS total_num
|
||||
|
|
Loading…
Reference in New Issue