张天森
2022-09-14 a555226aac49074be84a7e1adbd90cc1132e1dbc
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java
@@ -23,6 +23,8 @@
import java.util.Date;
import java.util.List;
import static java.util.Objects.nonNull;
@Service
public class ComSanShuoExpertServiceImpl  extends ServiceImpl<ComSanshuoExpertDao, ComSanshuoExpert> implements ComSanShuoExpertService {
@@ -77,24 +79,51 @@
        //账号级别
        Long id=null;
        Integer range=null;
        if (nonNull(loginUserInfo)){
            if (nonNull(loginUserInfo.getUserType()) || nonNull(loginUserInfo.getType())){
                if (loginUserInfo.getUserType().equals(1)){
                    range=3;
                    id=loginUserInfo.getStreetId();
                }else if (loginUserInfo.getUserType().equals(2)){
                    range=4;
                    id=loginUserInfo.getCommunityId();
                }else if (loginUserInfo.getType().equals(11)){
                    range=2;
                    id=loginUserInfo.getCommunityId();
                }
            }
        }
        return R.ok(comSanshuoExpertDao.expertPage(new Page(page,size),keyWord,range,id));
    }
    /**
     * 专家风采
     * */
    @Override
    public R expertShow() {
        List<ExpertShowVO> expertShowVOS = comSanshuoExpertDao.expertShow();
        for (ExpertShowVO expertShowVO : expertShowVOS) {
            comSanshuoExpertDao.selectExpertIndustry();
            if (nonNull(expertShowVO.getLevel())){
                if (1==expertShowVO.getLevel()) {
                    expertShowVO.setName("区三说会堂调解专家");
                }else if (2==expertShowVO.getLevel()){
                    expertShowVO.setName("行业分中心调解专家");
                    List<ExpertShowVO> expertShowVOS1 = comSanshuoExpertDao.selectExpertIndustry();
                    expertShowVO.setChildList(expertShowVOS1);
                }else if (3==expertShowVO.getLevel()){
                    expertShowVO.setName("镇/街道调解站调解专家");
                    List<ExpertShowVO> expertShowVOS1 = comSanshuoExpertDao.selectExpertStreet();
                    expertShowVO.setChildList(expertShowVOS1);
                }else {
                    expertShowVO.setName("村/社区调解站调解专家");
                    List<ExpertShowVO> expertShowVOS1 = comSanshuoExpertDao.selectExpertCommunity();
                    expertShowVO.setChildList(expertShowVOS1);
                }
            }
        }
        return R.ok();
    }
    /**
     * 数据范围
     * */
    public void getRange(LoginUserInfoVO loginUserInfo){
    }
}