bug--代码规范优化,升级fastjson1.2.73
This commit is contained in:
@ -46,7 +46,9 @@ public class RedisServiceImpl implements RedisService {
|
||||
continue;
|
||||
}
|
||||
DataType dataType = redisTemplate.type(s.toString());
|
||||
if(!dataType.code().equals("string")) continue;
|
||||
if(!"string".equals(dataType.code())) {
|
||||
continue;
|
||||
}
|
||||
RedisVo redisVo = new RedisVo(s.toString(),redisTemplate.opsForValue().get(s.toString()).toString());
|
||||
redisVos.add(redisVo);
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public class DeptServiceImpl extends BaseServiceImpl<DeptMapper, Dept> implement
|
||||
if(isChild) {
|
||||
depts.add(deptDto);
|
||||
for (Dept dept : deptList) {
|
||||
if(dept.getId() == deptDto.getPid() && !deptNames.contains(dept.getName())){
|
||||
if(dept.getId().equals(deptDto.getPid()) && !deptNames.contains(dept.getName())){
|
||||
depts.add(deptDto);
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class JobServiceImpl extends BaseServiceImpl<JobMapper, Job> implements J
|
||||
//断权限范围
|
||||
for (Long deptId : criteria.getDeptIds()) {
|
||||
for (Job job : jobList) {
|
||||
if(deptId ==job.getDeptId()){
|
||||
if(deptId.equals(job.getDeptId())){
|
||||
job.setDept(deptService.getById(job.getDeptId()));
|
||||
}
|
||||
}
|
||||
|
@ -315,7 +315,9 @@ public class MenuServiceImpl extends BaseServiceImpl<MenuMapper, Menu> implement
|
||||
|
||||
if(StringUtils.isNotBlank(resources.getComponentName())&&resources.getType()!=0){
|
||||
int menuCount = this.lambdaQuery().eq(Menu::getComponentName,resources.getComponentName()).count();
|
||||
if(menuCount > 1) throw new YshopException("请保持菜单组件名称唯一");
|
||||
if(menuCount > 1) {
|
||||
throw new YshopException("请保持菜单组件名称唯一");
|
||||
}
|
||||
menu1 = this.getOne(new QueryWrapper<Menu>().lambda()
|
||||
.eq(Menu::getComponentName,resources.getComponentName()));
|
||||
if(menu1 != null && !menu1.getId().equals(menu.getId())){
|
||||
|
@ -144,7 +144,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, User> imp
|
||||
public UserDto findByName(String userName) {
|
||||
User user = userMapper.findByName(userName);
|
||||
|
||||
if(user == null) throw new YshopException("当前用户不存在");
|
||||
if(user == null) {
|
||||
throw new YshopException("当前用户不存在");
|
||||
}
|
||||
//用户所属岗位
|
||||
user.setJob(jobService.getById(user.getJobId()));
|
||||
//用户所属部门
|
||||
|
Reference in New Issue
Block a user