feax:()修改代码规范(注释)

dev.entOperation
crj 2024-09-28 20:12:04 +08:00
parent 13bf016452
commit cd46940e70
8 changed files with 24 additions and 21 deletions

View File

@ -76,19 +76,18 @@ public class SysLoginService {
if (Result.FAIL == userResult.getCode()) {
throw new ServiceException(userResult.getMsg());
}
LoginUser userInfo = userResult.getData();
SysUser user = userResult.getData().getSysUser();
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除");
throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
if(UserStatus.DELETED.getCode().equals(user.getDelFlag())){
recordLogService.recordLogininfor(username,Constants.LOGIN_FAIL,"对不起,您的账号已被删除");
throw new ServiceException("对不起,您的账号:" + username + " 已被删除 ");
}
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
throw new ServiceException("对不起,您的账号" + username + " 已停用");
if(UserStatus.DISABLE.getCode().equals(user.getStatus())){
recordLogService.recordLogininfor(username,Constants.LOGIN_FAIL,"用户已停用,请联系管理官");
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
}
passwordService.validate(user, password);
recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
passwordService.validate(user,password);
recordLogService.recordLogininfor(username,Constants.LOGIN_SUCCESS,"登录成功");
return userInfo;
}
@ -128,16 +127,15 @@ public class SysLoginService {
throw new ServiceException("密码长度必须在5到20个字符之间");
}
// 注册用户信息
//注册用户信息
SysUser sysUser = new SysUser();
sysUser.setUserName(username);
sysUser.setNickName(username);
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()) {
throw new ServiceException(registerResult.getMsg());
}
recordLogService.recordLogininfor(username, Constants.REGISTER, "注册成功");
recordLogService.recordLogininfor(username,Constants.REGISTER,"注册成功");
}
}

View File

@ -82,6 +82,12 @@
<groupId>com.muyu</groupId>
<artifactId>cloud-modules-enterprise-common</artifactId>
</dependency>
<dependency>
<groupId>com.github.yulichang</groupId>
<artifactId>mybatis-plus-join</artifactId>
<version>1.4.13</version>
</dependency>
</dependencies>
<build>

View File

@ -7,14 +7,13 @@ import java.util.List;
/**
*
* @Author: chenruijia
* @author chenruijia
* @Date 2024/9/28 12.19
* @Description FaultLogService:
*/
public interface FaultLogService extends IService<FaultLog> {
List<FaultLog> faultLogList(FaultLog faultLog);
FaultLog byidId(Long faultLogId);
}

View File

@ -6,7 +6,7 @@ import com.muyu.enterprise.domain.FaultMessage;
import java.util.List;
/**
*
* @Author: chenruijia
* @author chenruijia
* @Date 2024/9/28 12.19
* @Description FaultMessageService:
*/

View File

@ -6,7 +6,7 @@ import com.muyu.enterprise.domain.FaultType;
import java.util.List;
/**
*
* @Author: chenruijia
* @author chenruijia
* @Date 2024/9/28 12.19
* @Description FaultTypeService:
*/

View File

@ -6,7 +6,7 @@ import com.muyu.enterprise.domain.FaultrRule;
import java.util.List;
/**
*
* @Author: chenruijia
* @author chenruijia
* @Date 2024/9/28 12.19
* @Description FaultrRuleService:
*/

View File

@ -6,7 +6,7 @@ import com.muyu.enterprise.domain.SysCarFault;
import java.util.List;
/**
*
* @Author: chenruijia
* @author chenruijia
* @Date 2024/9/28 12.19
* @Description SysCarFaultService:
*/

View File

@ -21,7 +21,7 @@ import java.util.List;
/**
*
* @Author: chenruijia
* @author chenruijia
* @Date 2024/9/26 0:21
* @Description
*/