中扬CRM客户关系管理系统
#
LSH
2023-11-02 108e2fc9543ce11e7069c4b4fc10d2f05006333b
#
5个文件已修改
21 ■■■■■ 已修改文件
src/main/java/com/zy/crm/manager/controller/PlanController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/mapper/PlanMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/service/PlanService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/service/impl/PlanServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/PlanMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/controller/PlanController.java
@@ -89,6 +89,7 @@
                  @RequestParam(required = false) String condition,
                  @RequestParam(required = false, value = "dept_id") Long deptId,
                  @RequestParam(required = false, value = "user_id") Long userId) {
        Long director = null;
        if (deptId==null && userId == null){
            if (getRole().getId()==3){
                userId = getUserId();
@@ -96,12 +97,14 @@
                deptId = getDeptId();
                userId = null;
            }
            director = getUserId();
        }
        return R.ok(planService.getPage(new Page<>(curr, limit)
                , getHostId()
                , deptId == null ? null : String.valueOf(deptId)
                , userId
                , director
                , condition)
        );
    }
src/main/java/com/zy/crm/manager/mapper/PlanMapper.java
@@ -24,6 +24,6 @@
    Plan selectPlanByNewestUuid(@Param("hostId") Long hostId);
    List<Plan> listByPage(Page<Plan> page, @Param("hostId")Long hostId, @Param("deptId") String deptId, @Param("userId") Long userId , @Param("condition") String condition);
    List<Plan> listByPage(Page<Plan> page, @Param("hostId")Long hostId, @Param("deptId") String deptId, @Param("userId") Long userId ,@Param("director")Long director, @Param("condition") String condition);
}
src/main/java/com/zy/crm/manager/service/PlanService.java
@@ -17,6 +17,6 @@
    String getUuid(Long hostId);
    Page<Plan> getPage(Page<Plan> page, Long hostId, String deptId, Long userId, String condition);
    Page<Plan> getPage(Page<Plan> page, Long hostId, String deptId, Long userId,Long direcote, String condition);
}
src/main/java/com/zy/crm/manager/service/impl/PlanServiceImpl.java
@@ -61,8 +61,8 @@
    }
    @Override
    public Page<Plan> getPage(Page<Plan> page, Long hostId, String deptId, Long userId, String condition) {
        return page.setRecords(baseMapper.listByPage(page, hostId, deptId, userId, condition));
    public Page<Plan> getPage(Page<Plan> page, Long hostId, String deptId, Long userId,  Long director,String condition) {
        return page.setRecords(baseMapper.listByPage(page, hostId, deptId, userId,director, condition));
    }
    private String getNextUuid(Long hostId) {
src/main/resources/mapper/PlanMapper.xml
@@ -85,11 +85,10 @@
                (
                    <if test="userId != null and userId != ''">
                        user_id = #{userId}
                        or
                        director = #{userId}
                        or
                    </if>
                    <if test="userId == null or userId == ''">
                        user_id is not null
                    </if>
                    or
                    mp.id in
                    (
                        select
@@ -111,6 +110,9 @@
            or mp.planner like concat('%',#{condition},'%')
            )
        </if>
        <if test="director != null and director != ''">
            or mp.director = #{director}
        </if>
        ORDER BY mp.create_time DESC
    </select>