Commit 1fccd3eaa30bab9d20160fa84786f55ce13a4c14

Authored by wangqian
1 parent ab9a74b7

数据隔离

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/rentalmechanicalcost/RentalMechanicalCostMapper.java
@@ -32,7 +32,7 @@ public interface RentalMechanicalCostMapper extends BaseMapperX<RentalMechanical @@ -32,7 +32,7 @@ public interface RentalMechanicalCostMapper extends BaseMapperX<RentalMechanical
32 .eqIfPresent(RentalMechanicalCostDO::getUseDuration, reqVO.getUseDuration()) 32 .eqIfPresent(RentalMechanicalCostDO::getUseDuration, reqVO.getUseDuration())
33 //.betweenIfPresent(RentalMechanicalCostDO::getEndUseTime, reqVO.getEndUseTime()) 33 //.betweenIfPresent(RentalMechanicalCostDO::getEndUseTime, reqVO.getEndUseTime())
34 //.likeIfPresent(RentalMechanicalCostDO::getCompanyName, reqVO.getCompanyName()) 34 //.likeIfPresent(RentalMechanicalCostDO::getCompanyName, reqVO.getCompanyName())
35 - //.eqIfPresent(RentalMechanicalCostDO::getCompanyId, reqVO.getCompanyId()) 35 + .eqIfPresent(RentalMechanicalCostDO::getCompanyId, reqVO.getCompanyId())
36 //.eqIfPresent(RentalMechanicalCostDO::getDeptId, reqVO.getDeptId()) 36 //.eqIfPresent(RentalMechanicalCostDO::getDeptId, reqVO.getDeptId())
37 //.eqIfPresent(RentalMechanicalCostDO::getRoadIds, reqVO.getRoadIds()) 37 //.eqIfPresent(RentalMechanicalCostDO::getRoadIds, reqVO.getRoadIds())
38 ///.//eqIfPresent(RentalMechanicalCostDO::getRemark, reqVO.getRemark()) 38 ///.//eqIfPresent(RentalMechanicalCostDO::getRemark, reqVO.getRemark())
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/personalcost/PersonalCostServiceImpl.java
@@ -22,6 +22,7 @@ import java.util.stream.Collectors; @@ -22,6 +22,7 @@ import java.util.stream.Collectors;
22 import static com.zteits.urbanops.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST; 22 import static com.zteits.urbanops.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST;
23 import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; 23 import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception;
24 import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception0; 24 import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception0;
  25 +import static com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getCompanyId;
25 import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.PERSONAL_COST_NOT_EXISTS; 26 import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.PERSONAL_COST_NOT_EXISTS;
26 27
27 /** 28 /**
@@ -118,6 +119,9 @@ public class PersonalCostServiceImpl implements PersonalCostService { @@ -118,6 +119,9 @@ public class PersonalCostServiceImpl implements PersonalCostService {
118 119
119 @Override 120 @Override
120 public PageResult<PersonalCostDO> getPersonalCostPage(PersonalCostPageReqVO pageReqVO) { 121 public PageResult<PersonalCostDO> getPersonalCostPage(PersonalCostPageReqVO pageReqVO) {
  122 + if (getCompanyId() != 100) {
  123 + pageReqVO.setCompanyId(String.valueOf(getCompanyId()));
  124 + }
121 return personalCostMapper.selectPage(pageReqVO); 125 return personalCostMapper.selectPage(pageReqVO);
122 } 126 }
123 127