|
|
@ -2,6 +2,8 @@ package com.dreamworks.boditech.service; |
|
|
|
import com.dreamworks.boditech.entity.ParamUserLogin; |
|
|
|
import com.dreamworks.boditech.entity.Account; |
|
|
|
import com.dreamworks.boditech.mapper.AccountMapper; |
|
|
|
import com.dreamworks.boditech.utils.AppError; |
|
|
|
import com.dreamworks.boditech.utils.AppRuntimeException; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
@ -45,7 +47,7 @@ public class AccountService { |
|
|
|
Account account = userMapper.findByAccount(param.account); |
|
|
|
String hashPin = DigestUtils.md5DigestAsHex(param.pin.getBytes()); |
|
|
|
if ( null == account || !account.pin.equals(hashPin) ) { |
|
|
|
throw new RuntimeException("ACCOUNT_LOGIN_INVALID_ACCOUNT_OR_PIN_CODE"); |
|
|
|
throw new AppRuntimeException(AppError.ACCOUNT_LOGIN_INVALID_ACCOUNT_OR_PIN_CODE); |
|
|
|
} |
|
|
|
|
|
|
|
account.lastLoginTime = (int)(System.currentTimeMillis() / 1000); |
|
|
|