张天森
2022-10-20 32de383701c62450763cc16ec66a84e5fbf14927
update
8个文件已修改
65 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSanShuoApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/ComSanShuoApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -10546,5 +10546,6 @@
    R westList();
    @GetMapping("/sanshuo/expert/backstageList2")
    R expertBackStageList(@RequestParam(value = "level",required = false)Integer level);
    R expertBackStageList(@RequestParam(value = "level",required = false)Integer level,@RequestParam(value = "page",required = false)Integer page,
                          @RequestParam(value = "size",required = false)Integer size);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSanShuoApi.java
@@ -173,7 +173,9 @@
        return communityService.westList();
    }
    @GetMapping("/expert/backstageList")
    public R expertBackStageList(@RequestParam(value = "level",required = false)Integer level){
        return communityService.expertBackStageList(level);
    public R expertBackStageList(@RequestParam(value = "level",required = false)Integer level,
                                 @RequestParam(value = "page",required = false)Integer page,
                                 @RequestParam(value = "size",required = false)Integer size){
        return communityService.expertBackStageList(level,page,size);
    }
}
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/ComSanShuoApi.java
@@ -163,8 +163,10 @@
    }
    @GetMapping("/expert/backstageList")
    public R expertBackStageList(@RequestParam(value = "level",required = false)Integer level){
        return communityService.expertBackStageList(level);
    public R expertBackStageList(@RequestParam(value = "level",required = false)Integer level,
                                 @RequestParam(value = "page",required = false)Integer page,
                                 @RequestParam(value = "size",required = false)Integer size){
        return communityService.expertBackStageList(level,page,size);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java
@@ -177,8 +177,10 @@
     * 后台获取专家列表
     * */
    @GetMapping("/backstageList2")
    public R  backstageList(@RequestParam(value = "level",required = false)Integer level){
        return comSanShuoExpertService.backstageList(level,getLoginUserInfo());
    public R  backstageList(@RequestParam(value = "level",required = false)Integer level,
                            @RequestParam(value = "page",required = false)Integer page,
                            @RequestParam(value = "size",required = false)Integer size){
        return comSanShuoExpertService.backstageList(level,getLoginUserInfo(),page,size);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java
@@ -69,6 +69,8 @@
    Integer selectExpertCount(@Param("dto") IndexDateDTO indexDataDTO);
    Integer selectExpertVoList();
    IPage<ComSanshuoExpertVO> expertList(Page page, @Param("level") Integer level, @Param("id") Long  id);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java
@@ -54,5 +54,5 @@
    /**
     * 新增专家后台列表
     * */
    R backstageList(Integer level,LoginUserInfoVO loginUserInfoVO);
    R backstageList(Integer level,LoginUserInfoVO loginUserInfoVO,Integer page,Integer size);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java
@@ -417,20 +417,20 @@
    }
    @Override
    public R backstageList(Integer level,LoginUserInfoVO loginUserInfoVO) {
    public R backstageList(Integer level,LoginUserInfoVO loginUserInfoVO,Integer page,Integer size) {
        if (nonNull(level)){
            if (level.equals(1)){
                //三说会堂权限,查看所有
                return R.ok(comSanshuoExpertDao.selectList(null));
                return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,null));
            }else if (level.equals(2)){
                //行业分中心
                ComSanshuoIndustryCenter center = comSanshuoIndustryCenterDao.selectOne(new QueryWrapper<ComSanshuoIndustryCenter>().lambda().eq(ComSanshuoIndustryCenter::getAccount, loginUserInfoVO.getAccount()));
                return R.ok(comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getIndustryCenterId,center.getId())));
                return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,center.getId()));
            }else if (level.equals(3)){
                //街道
                return R.ok(comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getStreetId,loginUserInfoVO.getStreetId())));
                return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,loginUserInfoVO.getStreetId()));
            }else if(level.equals(4)){
                return R.ok(comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getCommunityId,loginUserInfoVO.getCommunityId())));
                return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,loginUserInfoVO.getCommunityId()));
            }
        }
        return null;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml
@@ -148,4 +148,34 @@
    <select id="selectExpertVoList" resultType="Integer">
        select count(id) from com_sanshuo_expert where level=1
    </select>
    <select id="expertList" resultType="com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO">
        select id,level,community_id,
        work_time,good_at,name,
        avatar,phone,account,
        password,status,del_flag,
        create_time,create_by,update_time,
        introduction,street_id,industry_center_id,
        unit_id,unit from com_sanshuo_expert
        where del_flag=1
        <if test="level != null">
            <if test="level == 2">
                AND level = 2
                <if test="id != null">
                    AND industry_center_id=#{id}
                </if>
            </if>
            <if test="level == 3">
                AND level = 3
                <if test="id != null">
                    AND street_id=#{id}
                </if>
            </if>
            <if test="level == 4">
                AND level = 4
                <if test="id != null">
                    AND community_id=#{id}
                </if>
            </if>
        </if>
    </select>
</mapper>