Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
adee1121
Commit
adee1121
authored
Dec 30, 2016
by
lee_mingzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change something
parent
e4637ce4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
10 deletions
+10
-10
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+1
-1
Jr58Controller.java
...ntgroup/xyqb/controller/external/user/Jr58Controller.java
+1
-1
SyncUserController.java
...oup/xyqb/controller/external/user/SyncUserController.java
+1
-1
UserApiController.java
...roup/xyqb/controller/external/user/UserApiController.java
+1
-1
UserController.java
...ntgroup/xyqb/controller/internal/user/UserController.java
+2
-2
IUserService.java
...in/java/cn/quantgroup/xyqb/service/user/IUserService.java
+2
-2
UserServiceImpl.java
...cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
+2
-2
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
adee1121
...
@@ -37,7 +37,7 @@ public class InnerController {
...
@@ -37,7 +37,7 @@ public class InnerController {
@RequestMapping
(
"/user/search/phoneNo"
)
@RequestMapping
(
"/user/search/phoneNo"
)
public
JsonResult
findByPhoneNo
(
String
phoneNo
)
{
public
JsonResult
findByPhoneNo
(
String
phoneNo
)
{
User
user
=
userService
.
findByPhoneIn
RedisIfExist
(
phoneNo
);
User
user
=
userService
.
findByPhoneIn
Db
(
phoneNo
);
if
(
user
==
null
)
{
if
(
user
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
""
,
null
);
return
JsonResult
.
buildErrorStateResult
(
""
,
null
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/Jr58Controller.java
View file @
adee1121
...
@@ -196,7 +196,7 @@ public class Jr58Controller implements ApplicationEventPublisherAware {
...
@@ -196,7 +196,7 @@ public class Jr58Controller implements ApplicationEventPublisherAware {
LOGGER
.
error
(
"58金融运营商授权数据导入接口 - uuid对应的UuidPhoneMapping为空"
);
LOGGER
.
error
(
"58金融运营商授权数据导入接口 - uuid对应的UuidPhoneMapping为空"
);
}
}
// 手机号在新系统中存在,说明之前已经注册过
// 手机号在新系统中存在,说明之前已经注册过
userInXyqb
=
xyqbUserService
.
findByPhone
InRedisIfExist
(
phoneNo
);
userInXyqb
=
xyqbUserService
.
findByPhone
(
phoneNo
);
if
(
userInXyqb
!=
null
)
{
if
(
userInXyqb
!=
null
)
{
String
token
=
authApiService
.
login
(
phoneNo
,
Constants
.
Channel
.
JR58
);
String
token
=
authApiService
.
login
(
phoneNo
,
Constants
.
Channel
.
JR58
);
return
new
Tuple
<>(
String
.
format
(
ENTRY_POINT_URL_TEMPLATE
,
xyqbUrl
,
token
),
userInXyqb
);
return
new
Tuple
<>(
String
.
format
(
ENTRY_POINT_URL_TEMPLATE
,
xyqbUrl
,
token
),
userInXyqb
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/SyncUserController.java
View file @
adee1121
...
@@ -58,7 +58,7 @@ public class SyncUserController {
...
@@ -58,7 +58,7 @@ public class SyncUserController {
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
}
}
String
phoneNo
=
userDetail
.
getPhoneNo
();
String
phoneNo
=
userDetail
.
getPhoneNo
();
User
user
=
userService
.
findByPhone
InRedisIfExist
(
phoneNo
);
User
user
=
userService
.
findByPhone
(
phoneNo
);
if
(
null
==
user
)
{
if
(
null
==
user
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/UserApiController.java
View file @
adee1121
...
@@ -50,7 +50,7 @@ public class UserApiController {
...
@@ -50,7 +50,7 @@ public class UserApiController {
if
(!
"abc1234"
.
equals
(
key
)
||
StringUtils
.
isEmpty
(
phoneNo
))
{
if
(!
"abc1234"
.
equals
(
key
)
||
StringUtils
.
isEmpty
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
}
}
User
user
=
userService
.
findByPhone
InRedisIfExist
(
phoneNo
);
User
user
=
userService
.
findByPhone
(
phoneNo
);
if
(
null
==
user
)
{
if
(
null
==
user
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/UserController.java
View file @
adee1121
...
@@ -97,7 +97,7 @@ public class UserController implements IBaseController {
...
@@ -97,7 +97,7 @@ public class UserController implements IBaseController {
}
}
String
userName
=
credentialArr
[
0
];
String
userName
=
credentialArr
[
0
];
String
pass
=
credentialArr
[
1
];
String
pass
=
credentialArr
[
1
];
User
user
=
userService
.
findByPhone
InRedisIfExist
(
userName
);
User
user
=
userService
.
findByPhone
(
userName
);
if
(
user
==
null
){
if
(
user
==
null
){
return
JsonResult
.
buildErrorStateResult
(
"用户名或密码不正确"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"用户名或密码不正确"
,
null
);
}
}
...
@@ -190,7 +190,7 @@ public class UserController implements IBaseController {
...
@@ -190,7 +190,7 @@ public class UserController implements IBaseController {
LOGGER
.
info
(
"用户快速登录,验证码校验失败,phoneNo:{} , verificationCode:{}"
,
phoneNo
,
verificationCode
);
LOGGER
.
info
(
"用户快速登录,验证码校验失败,phoneNo:{} , verificationCode:{}"
,
phoneNo
,
verificationCode
);
return
JsonResult
.
buildErrorStateResult
(
"验证码错误"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"验证码错误"
,
null
);
}
}
User
user
=
userService
.
findByPhone
InRedisIfExist
(
phoneNo
);
User
user
=
userService
.
findByPhone
(
phoneNo
);
if
(
user
==
null
){
if
(
user
==
null
){
user
=
registerFastWhenLogin
(
phoneNo
,
channelId
,
createdFrom
,
appChannel
);
user
=
registerFastWhenLogin
(
phoneNo
,
channelId
,
createdFrom
,
appChannel
);
if
(
user
==
null
)
{
if
(
user
==
null
)
{
...
...
src/main/java/cn/quantgroup/xyqb/service/user/IUserService.java
View file @
adee1121
...
@@ -7,7 +7,7 @@ import cn.quantgroup.xyqb.entity.User;
...
@@ -7,7 +7,7 @@ import cn.quantgroup.xyqb.entity.User;
*/
*/
public
interface
IUserService
{
public
interface
IUserService
{
//
User findByPhone(String phone);
User
findByPhone
(
String
phone
);
User
findByUuid
(
String
uuid
);
User
findByUuid
(
String
uuid
);
...
@@ -19,7 +19,7 @@ public interface IUserService {
...
@@ -19,7 +19,7 @@ public interface IUserService {
boolean
resetPassword
(
String
phoneNo
,
String
password
);
boolean
resetPassword
(
String
phoneNo
,
String
password
);
User
findByPhoneIn
RedisIfExist
(
String
phone
);
User
findByPhoneIn
Db
(
String
phone
);
User
findByUuidInDb
(
String
uuid
);
User
findByUuidInDb
(
String
uuid
);
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
View file @
adee1121
...
@@ -77,11 +77,11 @@ public class UserServiceImpl implements IUserService {
...
@@ -77,11 +77,11 @@ public class UserServiceImpl implements IUserService {
}
}
/*
@Override
@Override
@Cacheable
(
value
=
"usercache"
,
key
=
"'xyqbuser' + #phone"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
@Cacheable
(
value
=
"usercache"
,
key
=
"'xyqbuser' + #phone"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
public
User
findByPhone
(
String
phone
)
{
public
User
findByPhone
(
String
phone
)
{
return
userRepository
.
findByPhoneNo
(
phone
);
return
userRepository
.
findByPhoneNo
(
phone
);
}
*/
}
@Override
@Override
@Cacheable
(
value
=
"usercache"
,
key
=
"'xyqbuser' + #uuid"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
@Cacheable
(
value
=
"usercache"
,
key
=
"'xyqbuser' + #uuid"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment