churf
2023-08-23 d57d04af41a7848ebc44c3ae5a0b070af3ecfff5
revert1
7 files modified
43 ■■■■■ changed files
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/repository/ProjectRepository.java 3 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/repository/ProjectTaskRepository.java 9 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskDaliy.java 9 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskDaliyDto.java 4 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskDaliyQueryCriteria.java 2 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskQueryCriteria.java 2 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java 14 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/repository/ProjectRepository.java
@@ -78,7 +78,4 @@
     */
    @Query(value = "SELECT * FROM project WHERE project_distinguish = ?1 AND plan_start_date LIKE concat(?2,'%')", nativeQuery = true)
    List<Project> findProjectByProjectDistinguishAndTargetYear(String projectDistinguish, String targetYear);
    @Query(value = "select id from project where id = ?1",nativeQuery = true)
    Long findByProjectId(Long id);
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/repository/ProjectTaskRepository.java
@@ -42,13 +42,4 @@
     * @param projectId
     */
    void deleteByProjectId(Long projectId);
    /*
    参数说明:
    参数1:用户ID
    方法作用:根据用户ID查询一下他都是那些任务的项目负责人。
     */
//    List<Long> findProjectIdByUserId(Long userId);
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskDaliy.java
@@ -47,7 +47,7 @@
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "ID")
    private String id;
    private Long id;
    @Column(name = "`project_id`",nullable = false)
    @NotNull
@@ -57,12 +57,7 @@
    @Column(name = "`task_id`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "任务ID")
    private String taskId;
    @Column(name = "`taskUserMongo`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "任务分配ID")
    private TaskUserMongo taskUserMongo;
    private Long taskId;
    @Column(name = "`task_inner_id`",nullable = false)
    @NotNull
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskDaliyDto.java
@@ -34,13 +34,13 @@
public class TaskDaliyDto extends BaseDTO implements Serializable {
    /** ID */
    private String id;
    private Long id;
    /** 项目ID */
    private Long projectId;
    /** 任务ID */
    private String taskId;
    private Long taskId;
    /** 任务连番 */
    private Long taskInnerId;
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskDaliyQueryCriteria.java
@@ -46,7 +46,7 @@
    /** 精确 */
    @Query
    private String taskId;
    private Long taskId;
    /* 两者之间 */
    @Query(propName = "fillDate", type = Query.Type.BETWEEN)
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskQueryCriteria.java
@@ -80,4 +80,6 @@
    /** 包含 */
    @Query(propName = "projectId", type = Query.Type.IN)
    private List<Long> projectIdInList;
    private String performanceType;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java
@@ -308,7 +308,13 @@
            criteriaMongo = criteriaMongo.and("userIdList").in(criteria.getUserIds());
        }
        if (criteria.getTagList() != null && criteria.getTagList().size() > 0) {
            criteriaMongo = criteriaMongo.and("tagList").all(criteria.getTagList());
            criteriaMongo = criteriaMongo.and("tagList").in(criteria.getTagList());
        }
        if(criteria.getUserIds() != null && criteria.getUserIds().size() > 0){
            criteriaMongo = criteriaMongo.and("containUserList").in(criteria.getUserIds());
        }
        if(criteria.getPerformanceType() != null) {
            criteriaMongo = criteriaMongo.and("performanceType").is(criteria.getPerformanceType());
        }
        Query query = new Query(criteriaMongo);
        Long totalCount = mongoTemplate.count(query, TaskMongo.class);
@@ -915,13 +921,13 @@
    @Override
    //删除已有的任务缓存
    @CacheEvict(cacheNames = "ChildrenTask", key = "'userId:' +#p0  + 'projectId:' + #p1.projectId")
    @CacheEvict(cacheNames = "ChildrenTask",allEntries = true)
    public TaskMongo create(Long userId,TaskMongo resources) {
        return mongoTemplate.save(resources);
    }
    @Override
    @CacheEvict(cacheNames = "ChildrenTask", key = "'userId:' +#p0  + 'projectId:' + #p1.projectId")
    @CacheEvict(cacheNames = "ChildrenTask",allEntries = true)
    public TaskMongo update(Long userId,TaskMongo resources) {
        //如果他不是任务的负责人但是他还可能是任务的参与人员
@@ -963,7 +969,7 @@
    }
    @Override
    @CacheEvict(cacheNames = "ChildrenTask",key = "'userId:' + #p0 + 'projectId:' ",allEntries = true)
    @CacheEvict(cacheNames = "ChildrenTask",allEntries = true)
    public Boolean deleteAll(Long userId,String[] ids) {
        List<TaskMongo> taskMongoList = mongoTemplate.find(Query.query(Criteria.where("id").in(Arrays.asList(ids))), TaskMongo.class);
        return deleteWithChildren(taskMongoList);