Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1ccc1cb7
authored
Jul 11, 2023
by
chamberone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add logs
1 parent
befb7829
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
project-user/src/main/java/com/dituhui/pea/user/service/UserService.java
project-user/src/main/java/com/dituhui/pea/user/service/UserService.java
View file @
1ccc1cb
...
@@ -34,12 +34,14 @@ import cn.hutool.core.lang.Validator;
...
@@ -34,12 +34,14 @@ import cn.hutool.core.lang.Validator;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.crypto.SecureUtil
;
import
cn.hutool.crypto.SecureUtil
;
import
lombok.extern.slf4j.Slf4j
;
/**
/**
* 用户业务层
* 用户业务层
*
*
*/
*/
@Service
@Service
@Slf4j
public
class
UserService
{
public
class
UserService
{
/**
/**
...
@@ -58,6 +60,8 @@ public class UserService {
...
@@ -58,6 +60,8 @@ public class UserService {
public
Result
<?>
userLogin
(
String
account
,
String
password
)
{
public
Result
<?>
userLogin
(
String
account
,
String
password
)
{
UserEntity
user
=
userDao
.
findByAccountAndPassword
(
account
,
SecureUtil
.
md5
(
password
));
UserEntity
user
=
userDao
.
findByAccountAndPassword
(
account
,
SecureUtil
.
md5
(
password
));
System
.
out
.
println
(
account
+
" : "
+
password
+
" : "
+
SecureUtil
.
md5
(
password
));
log
.
info
(
"{}:{}:{}:{}"
,
account
,
password
,
SecureUtil
.
md5
(
password
),
user
);
if
(
null
!=
user
)
{
if
(
null
!=
user
)
{
// 生成token
// 生成token
UserLoginDTO
userDTO
=
BeanUtil
.
copyProperties
(
user
,
UserLoginDTO
.
class
);
UserLoginDTO
userDTO
=
BeanUtil
.
copyProperties
(
user
,
UserLoginDTO
.
class
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment