| | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Validator; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.alarm.config.domain.ArdAlarmTypeConfig; |
| | | import com.ruoyi.alarm.config.mapper.ArdAlarmTypeConfigMapper; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | |
| | | public int insertUser(SysUser user) { |
| | | |
| | | // 新增用户信息 |
| | | user.setUserId(IdUtils.simpleUUID()); |
| | | int rows = userMapper.insertUser(user); |
| | | if (rows > 0) { //增加用户缓存 |
| | | redisCache.setCacheObject(getCacheKey(user.getUserId()), user); |
| | |
| | | private String getCacheKey(String configKey) { |
| | | return CacheConstants.USER_LIST_KEY + configKey; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<SysUser> userByDeptList(List<Long> deptList) { |
| | | QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.in("dept_id",deptList); |
| | | return userMapper.selectList(queryWrapper); |
| | | } |
| | | } |