提交 c16d3b6c 作者: zhenjie

需求列表、业务案例、新闻列表地址编码筛选

上级 04a9ed7a
......@@ -10,6 +10,7 @@ import com.mmc.csf.release.dao.IndustryCaseDao;
import com.mmc.csf.release.entity.information.IndustryCaseDO;
import com.mmc.csf.release.feign.UserAppApi;
import com.mmc.csf.release.service.IndustryCaseService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -34,6 +35,9 @@ public class IndustryCaseServiceImpl implements IndustryCaseService {
//查询对应地区的用户
if (industryCaseQO.getProvinceCode() != null) {
List<Integer> userIds = userAppApi.feignListUserAccountIds(industryCaseQO.getProvinceCode(), industryCaseQO.getCityCode(), industryCaseQO.getDistrictCode(), request.getHeader(TokenConstant.TOKEN));
if (CollectionUtils.isEmpty(userIds)) {
return ResultBody.success(PageResult.buildPage(industryCaseQO.getPageNo(), industryCaseQO.getPageSize(), 0));
}
industryCaseQO.setUserIds(userIds);
}
int count = industryCaseDao.countListCasePage(industryCaseQO);
......
......@@ -12,6 +12,7 @@ import com.mmc.csf.release.dao.IndustryNewsDao;
import com.mmc.csf.release.entity.information.IndustryNewsDO;
import com.mmc.csf.release.feign.UserAppApi;
import com.mmc.csf.release.service.IndustryNewsService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -37,6 +38,9 @@ public class IndustryNewsServiceImpl implements IndustryNewsService {
//查询对应地区的用户, 默认查广东
if (industryCaseQO.getProvinceCode() != null) {
List<Integer> userIds = userAppApi.feignListUserAccountIds(industryCaseQO.getProvinceCode(), industryCaseQO.getCityCode(), industryCaseQO.getDistrictCode(), request.getHeader(TokenConstant.TOKEN));
if (CollectionUtils.isEmpty(userIds)) {
return ResultBody.success(PageResult.buildPage(industryCaseQO.getPageNo(), industryCaseQO.getPageSize(), 0));
}
industryCaseQO.setUserIds(userIds);
}
int count = industryNewsDao.countListNewsPage(industryCaseQO);
......
......@@ -69,11 +69,6 @@ public class RequirementsServiceImpl implements RequirementsService {
@Override
public ResultBody listPublishPage(IndustryCaseQO industryCaseQO, HttpServletRequest request) {
//查询对应地区的用户
//查询对应地区的用户, 默认查广东
if (industryCaseQO.getProvinceCode() != null){
List<Integer> userIds = userAppApi.feignListUserAccountIds(industryCaseQO.getProvinceCode(), industryCaseQO.getCityCode(), industryCaseQO.getDistrictCode(), request.getHeader(TokenConstant.TOKEN));
industryCaseQO.setUserIds(userIds);
}
int count = requirementsDao.countListPublishPage(industryCaseQO);
if (count == 0) {
return ResultBody.success(PageResult.buildPage(industryCaseQO.getPageNo(), industryCaseQO.getPageSize(), count));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论