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()) { 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,"注册成功");
} }
} }

View File

@ -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>
@ -101,4 +107,4 @@
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -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);
} }

View File

@ -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:
*/ */

View File

@ -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:
*/ */

View File

@ -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:
*/ */

View File

@ -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:
*/ */

View File

@ -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
*/ */