张天森
2022-11-10 d99a56e37cf9109b46ee68d34a06594ef5615ed3
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientServiceCategoryServiceImpl.java
@@ -105,10 +105,10 @@
    }
    @Override
    public R getAllServiceCategories() {
    public R getAllServiceCategories(String areaCode) {
        List<ConvenientServiceCategoryVO> categoryVOList = new ArrayList<>();
        List<ConvenientServiceCategoryDO> categoryDOS = this.baseMapper.selectList(new QueryWrapper<ConvenientServiceCategoryDO>()
                .lambda().orderByDesc(ConvenientServiceCategoryDO::getWeight));
                .lambda().eq(ConvenientServiceCategoryDO::getAreaCode,areaCode).orderByDesc(ConvenientServiceCategoryDO::getWeight));
        if (!ObjectUtils.isEmpty(categoryDOS)) {
            categoryDOS.forEach(categoryDO -> {
                ConvenientServiceCategoryVO categoryVO = new ConvenientServiceCategoryVO();
@@ -120,7 +120,7 @@
    }
    @Override
    public R getSuitableServiceCategories(Long communityId) {
        return R.ok(this.baseMapper.selectSuitableServiceCategories(communityId));
    public R getSuitableServiceCategories(Long communityId,String areaCode) {
        return R.ok(this.baseMapper.selectSuitableServiceCategories(communityId,areaCode));
    }
}