Commit ec779af587f4dfa81341cd188cce6a9dce61cfed
1 parent
7a11a28e
获取用户昵称
Showing
2 changed files
with
6 additions
and
0 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/deviceuser/DeviceUserMapper.java
| @@ -27,6 +27,8 @@ public interface DeviceUserMapper extends BaseMapperX<DeviceUserDO> { | @@ -27,6 +27,8 @@ public interface DeviceUserMapper extends BaseMapperX<DeviceUserDO> { | ||
| 27 | .eqIfPresent(DeviceUserDO::getDeviceNo, reqVO.getDeviceNo()) | 27 | .eqIfPresent(DeviceUserDO::getDeviceNo, reqVO.getDeviceNo()) |
| 28 | .likeIfPresent(DeviceUserDO::getDeviceName, reqVO.getDeviceName()) | 28 | .likeIfPresent(DeviceUserDO::getDeviceName, reqVO.getDeviceName()) |
| 29 | .eqIfPresent(DeviceUserDO::getDeviceState, reqVO.getDeviceState()) | 29 | .eqIfPresent(DeviceUserDO::getDeviceState, reqVO.getDeviceState()) |
| 30 | + .eqIfPresent(DeviceUserDO::getCompanyId, reqVO.getCompanyId()) | ||
| 31 | + | ||
| 30 | .orderByDesc(DeviceUserDO::getId)); | 32 | .orderByDesc(DeviceUserDO::getId)); |
| 31 | } | 33 | } |
| 32 | 34 |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/deviceuser/DeviceUserServiceImpl.java
| @@ -115,6 +115,10 @@ public class DeviceUserServiceImpl implements DeviceUserService { | @@ -115,6 +115,10 @@ public class DeviceUserServiceImpl implements DeviceUserService { | ||
| 115 | @DataPermission(enable = false) | 115 | @DataPermission(enable = false) |
| 116 | @Override | 116 | @Override |
| 117 | public PageResult<DeviceUserRespVO> getDeviceUserPage(DeviceUserPageReqVO pageReqVO) { | 117 | public PageResult<DeviceUserRespVO> getDeviceUserPage(DeviceUserPageReqVO pageReqVO) { |
| 118 | + Long companyId = SecurityFrameworkUtils.getCompanyId(); | ||
| 119 | + if(companyId !=null){ | ||
| 120 | + pageReqVO.setCompanyId(companyId); | ||
| 121 | + } | ||
| 118 | PageResult<DeviceUserDO> pageResult = deviceUserMapper.selectPage(pageReqVO); | 122 | PageResult<DeviceUserDO> pageResult = deviceUserMapper.selectPage(pageReqVO); |
| 119 | PageResult<DeviceUserRespVO> pageResultVO = BeanUtils.toBean(pageResult, DeviceUserRespVO.class); | 123 | PageResult<DeviceUserRespVO> pageResultVO = BeanUtils.toBean(pageResult, DeviceUserRespVO.class); |
| 120 | if(CollectionUtil.isEmpty(pageResultVO.getList())){ | 124 | if(CollectionUtil.isEmpty(pageResultVO.getList())){ |