springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/UserConstants.java
@@ -16,6 +16,6 @@ public static final String NEWS_ID = "news_media_id:"; public static final String NEWS_LIST = "news_list:"; public static final String SANSHUO_INDUSTRY_CENTER_ROLE="1559112102373756911"; public static final String SANSHUO_EXPERT_ROLE="1559112102373756955"; public static final String SANSHUO_INDUSTRY_CENTER_ROLE="103"; public static final String SANSHUO_EXPERT_ROLE="102"; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComEvent.java
@@ -179,4 +179,7 @@ @ApiModelProperty("专家头像") @TableField(exist = false) private String expertAvatar; @ApiModelProperty("社区id") @TableField(exist = false) private Long communityId; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -80,12 +80,25 @@ public R pageByComEvent(ComEvent comEvent, Page pagination,LoginUserInfoVO loginUserInfoVO) { if (nonNull(comEvent.getUserType())){ if (comEvent.getUserType().equals(1)){ //个人账号权限 comEvent.setRequestUserId(loginUserInfoVO.getUserId()); }else if (comEvent.getUserType().equals(2)){ }else if (comEvent.getUserType().equals(2) || loginUserInfoVO.getType().equals(13)){ //专家账号权限 ComSanshuoExpert expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getPhone, loginUserInfoVO.getPhone())); if (nonNull(expert)){ comEvent.setSpecialistId(expert.getId()); } }else if (loginUserInfoVO.getType().equals(11)){ //行业分中心权限 comEvent.setUserType(3); //获取行业分中心id ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getOne(new QueryWrapper<ComSanshuoIndustryCenter>().lambda().eq(ComSanshuoIndustryCenter::getAccount, loginUserInfoVO.getAccount())); if (nonNull(center)){ comEvent.setCenterId(center.getId().toString()); } }else if (loginUserInfoVO.getType().equals(3)){ //社区后台权限 comEvent.setCommunityId(loginUserInfoVO.getCommunityId()); } } IPage<ComEvent> list = baseMapper.pageByComEvent(comEvent, pagination); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -84,6 +84,12 @@ <if test="comEvent.userType == 2"> AND specialist_id=#{comEvent.specialistId} </if> <if test="userType == 3"> AND center_id=#{comEvent.centerId} </if> <if test="userType == 4"> AND request_user_community=#{comEvent.communityId} </if> </where> order by create_at desc </select>