App稳态、暂态报告功能支持
This commit is contained in:
@@ -26,11 +26,11 @@ public class AppInfoSetParam {
|
||||
@ApiModelProperty(value = "设备告警")
|
||||
private Integer alarmInfo;
|
||||
|
||||
@ApiModelProperty("是否开启出厂调试0:false ;1:true")
|
||||
private Integer exFactoryBug;
|
||||
@ApiModelProperty("0:false ;1:true itic功能是否开启")
|
||||
private Integer iticFunction;
|
||||
|
||||
@ApiModelProperty("是否开启功能调试0:false ;1:true")
|
||||
private Integer functionBug;
|
||||
@ApiModelProperty("0:false ;1:true f47功能是否开启")
|
||||
private Integer f47Function;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
||||
@@ -50,11 +50,11 @@ public class AppInfoSet {
|
||||
@ApiModelProperty("设备告警")
|
||||
private Integer alarmInfo;
|
||||
|
||||
@ApiModelProperty("是否开启出厂调试0:false ;1:true")
|
||||
private Integer exFactoryBug;
|
||||
@ApiModelProperty("0:false ;1:true itic功能是否开启")
|
||||
private Integer iticFunction;
|
||||
|
||||
@ApiModelProperty("是否开启功能调试0:false ;1:true")
|
||||
private Integer functionBug;
|
||||
@ApiModelProperty("0:false ;1:true f47功能是否开启")
|
||||
private Integer f47Function;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.redis.pojo.enums.RedisKeyEnum;
|
||||
import com.njcn.redis.utils.RedisUtil;
|
||||
import com.njcn.user.enums.AppRoleEnum;
|
||||
import com.njcn.user.enums.UserResponseEnum;
|
||||
import com.njcn.user.pojo.po.Role;
|
||||
import com.njcn.user.pojo.po.UserRole;
|
||||
import com.njcn.user.pojo.po.app.AppInfoSet;
|
||||
import com.njcn.user.service.IAppInfoSetService;
|
||||
import com.njcn.user.service.IAppRoleService;
|
||||
import com.njcn.user.service.IRoleService;
|
||||
@@ -58,13 +56,13 @@ public class AppRoleServiceImpl implements IAppRoleService {
|
||||
LambdaUpdateWrapper<UserRole> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
||||
lambdaUpdateWrapper.eq(UserRole::getUserId, userId).set(UserRole::getRoleId, roleByCode.getId());
|
||||
userRoleService.update(lambdaUpdateWrapper);
|
||||
if (Objects.equals(roleByCode.getCode(), AppRoleEnum.ENGINEERING_USER.getCode())) {
|
||||
iAppInfoSetService.lambdaUpdate().
|
||||
eq(AppInfoSet::getUserId, userId).
|
||||
set(AppInfoSet::getExFactoryBug, 1).
|
||||
set(AppInfoSet::getFunctionBug, 1).
|
||||
update();
|
||||
}
|
||||
// if (Objects.equals(roleByCode.getCode(), AppRoleEnum.ENGINEERING_USER.getCode())) {
|
||||
// iAppInfoSetService.lambdaUpdate().
|
||||
// eq(AppInfoSet::getUserId, userId).
|
||||
// set(AppInfoSet::getExFactoryBug, 1).
|
||||
// set(AppInfoSet::getFunctionBug, 1).
|
||||
// update();
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,10 +32,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Random;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
@@ -195,8 +192,8 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, User> impleme
|
||||
appInfoSet.setEventInfo(1);
|
||||
appInfoSet.setRunInfo(1);
|
||||
appInfoSet.setAlarmInfo(1);
|
||||
appInfoSet.setFunctionBug(0);
|
||||
appInfoSet.setExFactoryBug(0);
|
||||
appInfoSet.setIticFunction(0);
|
||||
appInfoSet.setF47Function(0);
|
||||
appInfoSetService.save(appInfoSet);
|
||||
//发送用户初始密码
|
||||
password = redisUtil.getStringByKey(newUser.getId());
|
||||
@@ -365,7 +362,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, User> impleme
|
||||
|
||||
@Override
|
||||
public List<User> getAdminInfo() {
|
||||
return this.lambdaQuery().eq(User::getType,1).eq(User::getState,1).list();
|
||||
return this.lambdaQuery().in(User::getType, Arrays.asList(0,1)).ne(User::getState,Arrays.asList(0,3)).list();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user