feax:()修改代码规范(注释)
parent
13bf016452
commit
cd46940e70
|
@ -76,19 +76,18 @@ public class SysLoginService {
|
||||||
if (Result.FAIL == userResult.getCode()) {
|
if (Result.FAIL == userResult.getCode()) {
|
||||||
throw new ServiceException(userResult.getMsg());
|
throw new ServiceException(userResult.getMsg());
|
||||||
}
|
}
|
||||||
|
|
||||||
LoginUser userInfo = userResult.getData();
|
LoginUser userInfo = userResult.getData();
|
||||||
SysUser user = userResult.getData().getSysUser();
|
SysUser user = userResult.getData().getSysUser();
|
||||||
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
|
if(UserStatus.DELETED.getCode().equals(user.getDelFlag())){
|
||||||
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除");
|
recordLogService.recordLogininfor(username,Constants.LOGIN_FAIL,"对不起,您的账号已被删除");
|
||||||
throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
|
throw new ServiceException("对不起,您的账号:" + username + " 已被删除 ");
|
||||||
}
|
}
|
||||||
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
|
if(UserStatus.DISABLE.getCode().equals(user.getStatus())){
|
||||||
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
recordLogService.recordLogininfor(username,Constants.LOGIN_FAIL,"用户已停用,请联系管理官");
|
||||||
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
||||||
}
|
}
|
||||||
passwordService.validate(user, password);
|
passwordService.validate(user,password);
|
||||||
recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
|
recordLogService.recordLogininfor(username,Constants.LOGIN_SUCCESS,"登录成功");
|
||||||
return userInfo;
|
return userInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,16 +127,15 @@ public class SysLoginService {
|
||||||
throw new ServiceException("密码长度必须在5到20个字符之间");
|
throw new ServiceException("密码长度必须在5到20个字符之间");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注册用户信息
|
//注册用户信息
|
||||||
SysUser sysUser = new SysUser();
|
SysUser sysUser = new SysUser();
|
||||||
sysUser.setUserName(username);
|
sysUser.setUserName(username);
|
||||||
sysUser.setNickName(username);
|
sysUser.setNickName(username);
|
||||||
sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
||||||
Result<?> registerResult = remoteUserService.registerUserInfo(registerBody, SecurityConstants.INNER);
|
Result<Boolean> registerResult = remoteUserService.registerUserInfo(registerBody, SecurityConstants.INNER);
|
||||||
|
|
||||||
if (Result.FAIL == registerResult.getCode()) {
|
if (Result.FAIL == registerResult.getCode()) {
|
||||||
throw new ServiceException(registerResult.getMsg());
|
throw new ServiceException(registerResult.getMsg());
|
||||||
}
|
}
|
||||||
recordLogService.recordLogininfor(username, Constants.REGISTER, "注册成功");
|
recordLogService.recordLogininfor(username,Constants.REGISTER,"注册成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,12 @@
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>cloud-modules-enterprise-common</artifactId>
|
<artifactId>cloud-modules-enterprise-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.yulichang</groupId>
|
||||||
|
<artifactId>mybatis-plus-join</artifactId>
|
||||||
|
<version>1.4.13</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -7,14 +7,13 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障日志业务层
|
* 故障日志业务层
|
||||||
* @Author: chenruijia
|
* @author chenruijia
|
||||||
* @Date 2024/9/28 12.19
|
* @Date 2024/9/28 12.19
|
||||||
* @Description FaultLogService:故障日志业务层
|
* @Description FaultLogService:故障日志业务层
|
||||||
*/
|
*/
|
||||||
public interface FaultLogService extends IService<FaultLog> {
|
public interface FaultLogService extends IService<FaultLog> {
|
||||||
List<FaultLog> faultLogList(FaultLog faultLog);
|
List<FaultLog> faultLogList(FaultLog faultLog);
|
||||||
|
|
||||||
|
|
||||||
FaultLog byidId(Long faultLogId);
|
FaultLog byidId(Long faultLogId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import com.muyu.enterprise.domain.FaultMessage;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 站内信业务层
|
* 站内信业务层
|
||||||
* @Author: chenruijia
|
* @author chenruijia
|
||||||
* @Date 2024/9/28 12.19
|
* @Date 2024/9/28 12.19
|
||||||
* @Description FaultMessageService:站内信业务层
|
* @Description FaultMessageService:站内信业务层
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,7 +6,7 @@ import com.muyu.enterprise.domain.FaultType;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 故障类型业务层
|
* 故障类型业务层
|
||||||
* @Author: chenruijia
|
* @author chenruijia
|
||||||
* @Date 2024/9/28 12.19
|
* @Date 2024/9/28 12.19
|
||||||
* @Description FaultTypeService:故障类型业务层
|
* @Description FaultTypeService:故障类型业务层
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,7 +6,7 @@ import com.muyu.enterprise.domain.FaultrRule;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 故障规则业务层
|
* 故障规则业务层
|
||||||
* @Author: chenruijia
|
* @author chenruijia
|
||||||
* @Date 2024/9/28 12.19
|
* @Date 2024/9/28 12.19
|
||||||
* @Description FaultrRuleService:故障规则业务层
|
* @Description FaultrRuleService:故障规则业务层
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,7 +6,7 @@ import com.muyu.enterprise.domain.SysCarFault;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 故障管理业务层
|
* 故障管理业务层
|
||||||
* @Author: chenruijia
|
* @author chenruijia
|
||||||
* @Date 2024/9/28 12.19
|
* @Date 2024/9/28 12.19
|
||||||
* @Description SysCarFaultService:故障管理业务层
|
* @Description SysCarFaultService:故障管理业务层
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,7 +21,7 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理控制层
|
* 企业管理控制层
|
||||||
* @Author: chenruijia
|
* @author chenruijia
|
||||||
* @Date 2024/9/26 0:21
|
* @Date 2024/9/26 0:21
|
||||||
* @Description 企业管理控制层
|
* @Description 企业管理控制层
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue