lidongdong
2024-06-27 786deefd0e3c99a2042a024d3b60a02b0effc356
花城 修改单位管理员逻辑
6个文件已修改
48 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java
@@ -105,5 +105,18 @@
    Integer organSumIntegral(@Param("communityIds") List<Long> communityIds,@Param("yearTime") String yearTime);
    Integer pbOrganSumIntegral(@Param("communityIds") List<Long> communityIds,@Param("yearTime") String yearTime);
    /**
     * 查询单位管理员
     *
     * @param phone
     * @return
     */
    Integer selectOrgAdmin(@Param("phone") String phone);
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
@@ -128,6 +128,15 @@
        Long communityId=this.baseMapper.selectCommunityId(comPbCheckUnit.getHelpCommunityName().split(",")[0],comPbCheckUnit.getHelpCommunityName().split(",")[1],comPbCheckUnit.getHelpCommunityName().split(",")[2]);
        ComPbCheckUnit entity = new ComPbCheckUnit();
        BeanUtils.copyProperties(comPbCheckUnit, entity);
        int a=0;
        if(!StringUtils.isEmpty(comPbCheckUnit.getAdminPhone()))
        {
            a=this.baseMapper.selectOrgAdmin(comPbCheckUnit.getAdminPhone());
        }
        if(a!=0)
        {
            return R.fail("该手机号已绑定管理员!");
        }
        if(communityId!=null){
            entity.setCommunityId(communityId);
        }
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml
@@ -508,5 +508,12 @@
    </select>
    <select id="selectOrgAdmin" resultType="Integer">
        select count(*) from com_pb_check_unit where admin_phone like concat('%',#{phone},'%')
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -328,6 +328,13 @@
    Integer selectOrgAdmin(@Param("phone") String phone);
    /**
     * 查询绑定单位id
     * @param phone
     * @return
     */
    Long selectOrgAdminId(@Param("phone") String phone);
    /**
     * 查询报道单位id
     *
     * @param phone
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -480,12 +480,13 @@
                loginUserInfoVO.setIsCheckUnitAdmin(0);
            }
            Long checkUnitId=userDao.selectCheckUnitId(phone);
            Long AdminUnitId=userDao.selectOrgAdminId(phone);
            if(checkUnitId!=null){
                loginUserInfoVO.setCheckUnitId(checkUnitId);
            }
//            else {
//                loginUserInfoVO.setIsCheckUnitAdmin(0);
//            }
            if (AdminUnitId!=null){
                loginUserInfoVO.setBindingCheckUnitId(AdminUnitId);
            }
            //是否网格员
            int easyPhotoMember = userDao.countEasyPhotoMember(phone, userCommunityId);
            if (easyPhotoMember > 0) {
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -602,6 +602,11 @@
    <select id="selectOrgAdmin" resultType="Integer">
        select count(*) from com_pb_check_unit where admin_phone like concat('%',#{phone},'%')
    </select>
    <select id="selectOrgAdminId" resultType="Long">
        select id from com_pb_check_unit where admin_phone like concat('%',#{phone},'%')
    </select>
    <select id="selectCheckUnitId" resultType="Long">
        select check_unit_id from com_pb_member where phone = #{phone} limit 1
    </select>