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
2bd7436d
Commit
2bd7436d
authored
May 19, 2017
by
Java-郭京峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
motan 主库查询实现,枚举包结构改动
parent
9650903b
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
94 additions
and
34 deletions
+94
-34
MotanUserServiceImpl.java
.../xyqb/controller/external/motan/MotanUserServiceImpl.java
+48
-16
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+2
-1
Contact.java
src/main/java/cn/quantgroup/xyqb/entity/Contact.java
+1
-1
UserDetail.java
src/main/java/cn/quantgroup/xyqb/entity/UserDetail.java
+2
-2
UserExtInfo.java
src/main/java/cn/quantgroup/xyqb/entity/UserExtInfo.java
+7
-6
UserSpouse.java
src/main/java/cn/quantgroup/xyqb/entity/UserSpouse.java
+1
-1
ContactRet.java
src/main/java/cn/quantgroup/xyqb/model/ContactRet.java
+1
-1
UserDetailRet.java
src/main/java/cn/quantgroup/xyqb/model/UserDetailRet.java
+1
-1
UserExtInfoRet.java
src/main/java/cn/quantgroup/xyqb/model/UserExtInfoRet.java
+1
-1
UserSpouseRet.java
src/main/java/cn/quantgroup/xyqb/model/UserSpouseRet.java
+1
-1
LoginInfo.java
...main/java/cn/quantgroup/xyqb/model/session/LoginInfo.java
+1
-1
UserDetailVO.java
...java/cn/quantgroup/xyqb/service/user/vo/UserDetailVO.java
+4
-2
XyqbSessionContextHolder.java
.../cn/quantgroup/xyqb/session/XyqbSessionContextHolder.java
+24
-0
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/motan/MotanUserServiceImpl.java
View file @
2bd7436d
...
@@ -4,13 +4,15 @@ import cn.quantgroup.motan.bean.*;
...
@@ -4,13 +4,15 @@ import cn.quantgroup.motan.bean.*;
import
cn.quantgroup.motan.retbean.*
;
import
cn.quantgroup.motan.retbean.*
;
import
cn.quantgroup.motan.service.UserMotanService
;
import
cn.quantgroup.motan.service.UserMotanService
;
import
cn.quantgroup.motan.vo.UserSysResult
;
import
cn.quantgroup.motan.vo.UserSysResult
;
import
cn.quantgroup.user.enums.*
;
import
cn.quantgroup.xyqb.Constants
;
import
cn.quantgroup.xyqb.Constants
;
import
cn.quantgroup.xyqb.entity.*
;
import
cn.quantgroup.xyqb.entity.*
;
import
cn.quantgroup.xyqb.entity.enumerate.*
;
import
cn.quantgroup.xyqb.model.*
;
import
cn.quantgroup.xyqb.model.*
;
import
cn.quantgroup.xyqb.model.IdType
;
import
cn.quantgroup.xyqb.model.session.LoginInfo
;
import
cn.quantgroup.xyqb.model.session.LoginInfo
;
import
cn.quantgroup.xyqb.model.session.SessionStruct
;
import
cn.quantgroup.xyqb.model.session.SessionStruct
;
import
cn.quantgroup.xyqb.repository.IUserRepository
;
import
cn.quantgroup.xyqb.repository.IUserRepository
;
import
cn.quantgroup.xyqb.service.api.IUserApiService
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.http.IHttpService
;
import
cn.quantgroup.xyqb.service.http.IHttpService
;
import
cn.quantgroup.xyqb.service.merchant.IMerchantService
;
import
cn.quantgroup.xyqb.service.merchant.IMerchantService
;
...
@@ -35,7 +37,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -35,7 +37,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
javax.servlet.http.HttpServletRequest
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.List
;
...
@@ -45,6 +46,8 @@ import java.util.stream.Collectors;
...
@@ -45,6 +46,8 @@ import java.util.stream.Collectors;
import
static
cn
.
quantgroup
.
xyqb
.
constant
.
UserConstant
.
USER_ERROR_OR_PASSWORD_ERROR
;
import
static
cn
.
quantgroup
.
xyqb
.
constant
.
UserConstant
.
USER_ERROR_OR_PASSWORD_ERROR
;
//import cn.quantgroup.xyqb.entity.enumerate.*;
/**
/**
* Created by 11 on 2017/2/27.
* Created by 11 on 2017/2/27.
*/
*/
...
@@ -53,7 +56,6 @@ import static cn.quantgroup.xyqb.constant.UserConstant.USER_ERROR_OR_PASSWORD_ER
...
@@ -53,7 +56,6 @@ import static cn.quantgroup.xyqb.constant.UserConstant.USER_ERROR_OR_PASSWORD_ER
public
class
MotanUserServiceImpl
implements
UserMotanService
{
public
class
MotanUserServiceImpl
implements
UserMotanService
{
private
static
final
ObjectMapper
MAPPER
=
new
ObjectMapper
();
private
static
final
ObjectMapper
MAPPER
=
new
ObjectMapper
();
private
final
static
Random
random
=
new
Random
();
private
final
static
Random
random
=
new
Random
();
static
{
static
{
MAPPER
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
false
);
MAPPER
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
false
);
}
}
...
@@ -90,6 +92,9 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -90,6 +92,9 @@ public class MotanUserServiceImpl implements UserMotanService {
@Autowired
@Autowired
private
IHttpService
httpService
;
private
IHttpService
httpService
;
@Autowired
private
IUserApiService
userApiService
;
@Override
@Override
public
UserSysResult
<
XUser
>
findUserByPhoneNo
(
String
phoneNo
)
{
public
UserSysResult
<
XUser
>
findUserByPhoneNo
(
String
phoneNo
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
...
@@ -402,9 +407,9 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -402,9 +407,9 @@ public class MotanUserServiceImpl implements UserMotanService {
@Override
@Override
public
UserSysResult
<
XUserExtInfo
>
updateUserExtInfo
(
public
UserSysResult
<
XUserExtInfo
>
updateUserExtInfo
(
Long
userId
,
cn
.
quantgroup
.
motan
.
enums
.
IncomeEnum
incomeEnum
,
cn
.
quantgroup
.
motan
.
enums
.
IncomeRangeEnum
incomeRangeEnum
,
Long
userId
,
IncomeEnum
incomeEnum
,
IncomeRangeEnum
incomeRangeEnum
,
cn
.
quantgroup
.
motan
.
enums
.
OccupationEnum
occupationEnum
,
cn
.
quantgroup
.
motan
.
enums
.
EducationEnum
educationEnum
,
Boolean
hasCar
,
OccupationEnum
occupationEnum
,
EducationEnum
educationEnum
,
Boolean
hasCar
,
Boolean
hasSocialSecurity
,
Boolean
hasHouse
,
Boolean
hasCreditCard
,
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
maritalStatus
)
{
Boolean
hasSocialSecurity
,
Boolean
hasHouse
,
Boolean
hasCreditCard
,
MaritalStatus
maritalStatus
)
{
UserSysResult
<
XUserExtInfo
>
userSysResult
=
returnValue
(
null
,
null
);
UserSysResult
<
XUserExtInfo
>
userSysResult
=
returnValue
(
null
,
null
);
if
(
null
==
userId
||
0L
==
userId
)
{
if
(
null
==
userId
||
0L
==
userId
)
{
return
returnErrorValue
(
"用户id为空"
);
return
returnErrorValue
(
"用户id为空"
);
...
@@ -504,7 +509,7 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -504,7 +509,7 @@ public class MotanUserServiceImpl implements UserMotanService {
UserSpouse
userSpouse
=
userSpouseService
.
findByUserId
(
userId
);
UserSpouse
userSpouse
=
userSpouseService
.
findByUserId
(
userId
);
if
(
userSpouse
==
null
)
{
if
(
userSpouse
==
null
)
{
userSpouse
=
new
UserSpouse
(
userId
);
userSpouse
=
new
UserSpouse
(
userId
);
userSpouse
.
setStatus
(
MaritalStatus
.
UNKNOWN
);
userSpouse
.
setStatus
(
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
UNKNOWN
);
}
}
return
returnSuccessValue
(
fromUserSpouse
(
userSpouse
));
return
returnSuccessValue
(
fromUserSpouse
(
userSpouse
));
}
}
...
@@ -519,7 +524,7 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -519,7 +524,7 @@ public class MotanUserServiceImpl implements UserMotanService {
xUserSpouse
.
setSpouseName
(
userSpouse
.
getSpouseName
());
xUserSpouse
.
setSpouseName
(
userSpouse
.
getSpouseName
());
xUserSpouse
.
setCreatedAt
(
userSpouse
.
getCreatedAt
());
xUserSpouse
.
setCreatedAt
(
userSpouse
.
getCreatedAt
());
xUserSpouse
.
setUpdateAt
(
userSpouse
.
getUpdateAt
());
xUserSpouse
.
setUpdateAt
(
userSpouse
.
getUpdateAt
());
xUserSpouse
.
setStatus
(
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
valueOf
(
userSpouse
.
getStatus
().
name
()));
xUserSpouse
.
setStatus
(
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
valueOf
(
userSpouse
.
getStatus
().
name
()));
return
xUserSpouse
;
return
xUserSpouse
;
}
}
...
@@ -557,8 +562,17 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -557,8 +562,17 @@ public class MotanUserServiceImpl implements UserMotanService {
@Override
@Override
public
UserSysResult
<
Boolean
>
userImportCheck
(
String
phoneNo
,
String
registerFrom
)
{
public
UserSysResult
<
Boolean
>
userImportCheck
(
String
phoneNo
,
String
registerFrom
)
{
//todo
if
(
"244"
.
equals
(
registerFrom
))
{
return
null
;
return
returnErrorValue
(
"用户导入检查拒绝"
);
}
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isEmpty
(
phoneNo
)
||
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isEmpty
(
registerFrom
))
{
return
returnErrorValue
(
"检查传入的参数,参数不全。"
);
}
boolean
checkPassed
=
userApiService
.
userImportCheck
(
phoneNo
);
if
(
checkPassed
)
{
return
returnValue
(
Boolean
.
TRUE
,
"success"
);
}
return
returnErrorValue
(
"用户导入检查拒绝"
);
}
}
@Override
@Override
...
@@ -566,10 +580,10 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -566,10 +580,10 @@ public class MotanUserServiceImpl implements UserMotanService {
if
(
xUserSpouse
.
getUserId
()
==
null
||
xUserSpouse
.
getUserId
()
==
0
)
{
if
(
xUserSpouse
.
getUserId
()
==
null
||
xUserSpouse
.
getUserId
()
==
0
)
{
return
returnErrorValue
(
"用户不能为空"
);
return
returnErrorValue
(
"用户不能为空"
);
}
}
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
status
=
xUserSpouse
.
getStatus
();
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
status
=
xUserSpouse
.
getStatus
();
String
spousePhone
=
xUserSpouse
.
getSpousePhone
();
String
spousePhone
=
xUserSpouse
.
getSpousePhone
();
String
spouseName
=
xUserSpouse
.
getSpouseName
();
String
spouseName
=
xUserSpouse
.
getSpouseName
();
if
(
xUserSpouse
.
getStatus
()
==
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
MARRIED
)
{
if
(
xUserSpouse
.
getStatus
()
==
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
MARRIED
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
spousePhone
))
{
if
(!
ValidationUtil
.
validatePhoneNo
(
spousePhone
))
{
return
returnErrorValue
(
"手机号格式错误"
);
return
returnErrorValue
(
"手机号格式错误"
);
}
}
...
@@ -583,9 +597,9 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -583,9 +597,9 @@ public class MotanUserServiceImpl implements UserMotanService {
userSpouse
=
new
UserSpouse
(
xUserSpouse
.
getUserId
());
userSpouse
=
new
UserSpouse
(
xUserSpouse
.
getUserId
());
userSpouse
.
setCreatedAt
(
timestamp
);
userSpouse
.
setCreatedAt
(
timestamp
);
}
}
userSpouse
.
setSpouseName
(
status
==
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
MARRIED
?
spouseName
:
""
);
userSpouse
.
setSpouseName
(
status
==
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
MARRIED
?
spouseName
:
""
);
userSpouse
.
setSpousePhone
(
status
==
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
MARRIED
?
spousePhone
:
""
);
userSpouse
.
setSpousePhone
(
status
==
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
MARRIED
?
spousePhone
:
""
);
userSpouse
.
setStatus
(
MaritalStatus
.
valueOf
(
status
.
name
()));
userSpouse
.
setStatus
(
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
valueOf
(
status
.
name
()));
userSpouse
.
setUpdateAt
(
timestamp
);
userSpouse
.
setUpdateAt
(
timestamp
);
userSpouse
=
userSpouseService
.
save
(
userSpouse
);
userSpouse
=
userSpouseService
.
save
(
userSpouse
);
return
returnSuccessValue
(
fromUserSpouse
(
userSpouse
));
return
returnSuccessValue
(
fromUserSpouse
(
userSpouse
));
...
@@ -630,7 +644,7 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -630,7 +644,7 @@ public class MotanUserServiceImpl implements UserMotanService {
@Override
@Override
public
UserSysResult
<
XLoginInfo
>
getLoginInfo
(
String
token
)
{
public
UserSysResult
<
XLoginInfo
>
getLoginInfo
(
String
token
)
{
SessionStruct
sessionStruct
=
XyqbSessionContextHolder
.
getXSessionFromRedis
();
SessionStruct
sessionStruct
=
XyqbSessionContextHolder
.
getXSessionFromRedis
(
token
);
if
(
null
!=
sessionStruct
)
{
if
(
null
!=
sessionStruct
)
{
log
.
info
(
"从用户中心获取到了用户登录信息:phone:[{}]"
,
sessionStruct
.
getValues
().
getUser
().
getPhoneNo
());
log
.
info
(
"从用户中心获取到了用户登录信息:phone:[{}]"
,
sessionStruct
.
getValues
().
getUser
().
getPhoneNo
());
XLoginInfo
loginInfo
=
new
XLoginInfo
();
XLoginInfo
loginInfo
=
new
XLoginInfo
();
...
@@ -670,6 +684,7 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -670,6 +684,7 @@ public class MotanUserServiceImpl implements UserMotanService {
}
}
}
}
/**
/**
* 封装返回结果.
* 封装返回结果.
*
*
...
@@ -764,4 +779,21 @@ public class MotanUserServiceImpl implements UserMotanService {
...
@@ -764,4 +779,21 @@ public class MotanUserServiceImpl implements UserMotanService {
return
user
;
return
user
;
}
}
// fixme 什么逻辑
@Override
public
UserSysResult
<
XUserDetail
>
modifyUserDetail
(
UserDetailUpdateBean
userDetailUpdateBean
)
{
return
null
;
}
@Override
public
UserSysResult
<
Map
<
Long
,
String
>>
findPhoneByUserIds
(
List
<
Long
>
userIds
)
{
if
(!
CollectionUtils
.
isEmpty
(
userIds
)
&&
userIds
.
size
()<=
500
)
{
Map
<
Long
,
String
>
userIdAndPhoneMap
=
userService
.
findPhoneByIdsInDb
(
userIds
);
return
returnSuccessValue
(
userIdAndPhoneMap
);
}
else
{
return
returnErrorValue
(
"批量查询每次最多进行500条用户信息的查询"
);
}
}
}
}
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
2bd7436d
...
@@ -2,8 +2,9 @@ package cn.quantgroup.xyqb.controller.external.user;
...
@@ -2,8 +2,9 @@ package cn.quantgroup.xyqb.controller.external.user;
import
cn.quantgroup.xyqb.controller.IBaseController
;
import
cn.quantgroup.xyqb.controller.IBaseController
;
import
cn.quantgroup.xyqb.entity.*
;
import
cn.quantgroup.xyqb.entity.*
;
import
cn.quantgroup.
xyqb.entity.enumerate
.*
;
import
cn.quantgroup.
user.enums
.*
;
import
cn.quantgroup.xyqb.model.*
;
import
cn.quantgroup.xyqb.model.*
;
import
cn.quantgroup.xyqb.model.IdType
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.session.ISessionService
;
import
cn.quantgroup.xyqb.service.session.ISessionService
;
import
cn.quantgroup.xyqb.service.user.*
;
import
cn.quantgroup.xyqb.service.user.*
;
...
...
src/main/java/cn/quantgroup/xyqb/entity/Contact.java
View file @
2bd7436d
package
cn
.
quantgroup
.
xyqb
.
entity
;
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
cn.quantgroup.
xyqb.entity.enumerate
.Relation
;
import
cn.quantgroup.
user.enums
.Relation
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.*
;
import
javax.persistence.*
;
...
...
src/main/java/cn/quantgroup/xyqb/entity/UserDetail.java
View file @
2bd7436d
...
@@ -75,10 +75,10 @@ public class UserDetail implements Serializable {
...
@@ -75,10 +75,10 @@ public class UserDetail implements Serializable {
xUserDetail
.
setName
(
this
.
getName
());
xUserDetail
.
setName
(
this
.
getName
());
xUserDetail
.
setIdNo
(
this
.
getIdNo
());
xUserDetail
.
setIdNo
(
this
.
getIdNo
());
if
(
this
.
getIdType
()
!=
null
)
{
if
(
this
.
getIdType
()
!=
null
)
{
xUserDetail
.
setIdType
(
cn
.
quantgroup
.
motan
.
enums
.
IdType
.
valueOf
(
this
.
getIdType
().
name
()));
xUserDetail
.
setIdType
(
cn
.
quantgroup
.
user
.
enums
.
IdType
.
valueOf
(
this
.
getIdType
().
name
()));
}
}
if
(
this
.
getGender
()
!=
null
)
{
if
(
this
.
getGender
()
!=
null
)
{
xUserDetail
.
setGender
(
cn
.
quantgroup
.
motan
.
enums
.
Gender
.
valueOf
(
this
.
getGender
().
name
()));
xUserDetail
.
setGender
(
cn
.
quantgroup
.
user
.
enums
.
Gender
.
valueOf
(
this
.
getGender
().
name
()));
}
}
xUserDetail
.
setEmail
(
this
.
getEmail
());
xUserDetail
.
setEmail
(
this
.
getEmail
());
xUserDetail
.
setQq
(
this
.
getQq
());
xUserDetail
.
setQq
(
this
.
getQq
());
...
...
src/main/java/cn/quantgroup/xyqb/entity/UserExtInfo.java
View file @
2bd7436d
package
cn
.
quantgroup
.
xyqb
.
entity
;
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
cn.quantgroup.motan.retbean.XUserExtInfo
;
import
cn.quantgroup.motan.retbean.XUserExtInfo
;
import
cn.quantgroup.xyqb.entity.enumerate.*
;
//import cn.quantgroup.xyqb.entity.enumerate.*;
import
cn.quantgroup.user.enums.*
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.*
;
import
javax.persistence.*
;
...
@@ -50,14 +51,14 @@ public class UserExtInfo implements Serializable {
...
@@ -50,14 +51,14 @@ public class UserExtInfo implements Serializable {
XUserExtInfo
xUserExtInfo
=
new
XUserExtInfo
();
XUserExtInfo
xUserExtInfo
=
new
XUserExtInfo
();
xUserExtInfo
.
setId
(
this
.
id
);
xUserExtInfo
.
setId
(
this
.
id
);
xUserExtInfo
.
setUserId
(
this
.
userId
);
xUserExtInfo
.
setUserId
(
this
.
userId
);
xUserExtInfo
.
setEducationEnum
(
cn
.
quantgroup
.
motan
.
enums
.
EducationEnum
.
valueOf
(
this
.
educationEnum
.
name
()));
xUserExtInfo
.
setEducationEnum
(
cn
.
quantgroup
.
user
.
enums
.
EducationEnum
.
valueOf
(
this
.
educationEnum
.
name
()));
xUserExtInfo
.
setIncomeEnum
(
cn
.
quantgroup
.
motan
.
enums
.
IncomeEnum
.
valueOf
(
this
.
incomeEnum
.
name
()));
xUserExtInfo
.
setIncomeEnum
(
cn
.
quantgroup
.
user
.
enums
.
IncomeEnum
.
valueOf
(
this
.
incomeEnum
.
name
()));
xUserExtInfo
.
setIncomeRangeEnum
(
cn
.
quantgroup
.
motan
.
enums
.
IncomeRangeEnum
.
valueOf
(
this
.
incomeRangeEnum
.
name
()));
xUserExtInfo
.
setIncomeRangeEnum
(
cn
.
quantgroup
.
user
.
enums
.
IncomeRangeEnum
.
valueOf
(
this
.
incomeRangeEnum
.
name
()));
xUserExtInfo
.
setOccupationEnum
(
cn
.
quantgroup
.
motan
.
enums
.
OccupationEnum
.
valueOf
(
this
.
occupationEnum
.
name
()));
xUserExtInfo
.
setOccupationEnum
(
cn
.
quantgroup
.
user
.
enums
.
OccupationEnum
.
valueOf
(
this
.
occupationEnum
.
name
()));
xUserExtInfo
.
setHasCar
(
this
.
hasCar
);
xUserExtInfo
.
setHasCar
(
this
.
hasCar
);
xUserExtInfo
.
setHasSocialSecurity
(
this
.
hasSocialSecurity
);
xUserExtInfo
.
setHasSocialSecurity
(
this
.
hasSocialSecurity
);
xUserExtInfo
.
setHasCreditCard
(
this
.
hasCreditCard
);
xUserExtInfo
.
setHasCreditCard
(
this
.
hasCreditCard
);
xUserExtInfo
.
setMarryStatus
(
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
valueOf
(
this
.
marryStatus
.
name
()));
xUserExtInfo
.
setMarryStatus
(
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
valueOf
(
this
.
marryStatus
.
name
()));
xUserExtInfo
.
setCreatedAt
(
this
.
createdAt
);
xUserExtInfo
.
setCreatedAt
(
this
.
createdAt
);
xUserExtInfo
.
setUpdateAt
(
this
.
updateAt
);
xUserExtInfo
.
setUpdateAt
(
this
.
updateAt
);
return
xUserExtInfo
;
return
xUserExtInfo
;
...
...
src/main/java/cn/quantgroup/xyqb/entity/UserSpouse.java
View file @
2bd7436d
package
cn
.
quantgroup
.
xyqb
.
entity
;
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
cn.quantgroup.
xyqb.entity.enumerate
.MaritalStatus
;
import
cn.quantgroup.
user.enums
.MaritalStatus
;
import
lombok.*
;
import
lombok.*
;
import
javax.persistence.*
;
import
javax.persistence.*
;
...
...
src/main/java/cn/quantgroup/xyqb/model/ContactRet.java
View file @
2bd7436d
package
cn
.
quantgroup
.
xyqb
.
model
;
package
cn
.
quantgroup
.
xyqb
.
model
;
import
cn.quantgroup.xyqb.entity.Contact
;
import
cn.quantgroup.xyqb.entity.Contact
;
import
cn.quantgroup.
xyqb.entity.enumerate
.Relation
;
import
cn.quantgroup.
user.enums
.Relation
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
src/main/java/cn/quantgroup/xyqb/model/UserDetailRet.java
View file @
2bd7436d
...
@@ -3,7 +3,7 @@ package cn.quantgroup.xyqb.model;
...
@@ -3,7 +3,7 @@ package cn.quantgroup.xyqb.model;
import
cn.quantgroup.xyqb.entity.UserDetail
;
import
cn.quantgroup.xyqb.entity.UserDetail
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
cn.quantgroup.xyqb.model.IdType
;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
...
...
src/main/java/cn/quantgroup/xyqb/model/UserExtInfoRet.java
View file @
2bd7436d
package
cn
.
quantgroup
.
xyqb
.
model
;
package
cn
.
quantgroup
.
xyqb
.
model
;
import
cn.quantgroup.xyqb.entity.UserExtInfo
;
import
cn.quantgroup.xyqb.entity.UserExtInfo
;
import
cn.quantgroup.
xyqb.entity.enumerate
.*
;
import
cn.quantgroup.
user.enums
.*
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
...
src/main/java/cn/quantgroup/xyqb/model/UserSpouseRet.java
View file @
2bd7436d
package
cn
.
quantgroup
.
xyqb
.
model
;
package
cn
.
quantgroup
.
xyqb
.
model
;
import
cn.quantgroup.xyqb.entity.UserSpouse
;
import
cn.quantgroup.xyqb.entity.UserSpouse
;
import
cn.quantgroup.
xyqb.entity.enumerate
.MaritalStatus
;
import
cn.quantgroup.
user.enums
.MaritalStatus
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
...
src/main/java/cn/quantgroup/xyqb/model/session/LoginInfo.java
View file @
2bd7436d
...
@@ -26,7 +26,7 @@ public class LoginInfo {
...
@@ -26,7 +26,7 @@ public class LoginInfo {
public
XLoginInfo
toXLoginInfo
()
{
public
XLoginInfo
toXLoginInfo
()
{
XLoginInfo
xLoginInfo
=
new
XLoginInfo
();
XLoginInfo
xLoginInfo
=
new
XLoginInfo
();
xLoginInfo
.
setUser
();
//
xLoginInfo.setUser();
return
xLoginInfo
;
return
xLoginInfo
;
}
}
...
...
src/main/java/cn/quantgroup/xyqb/service/user/vo/UserDetailVO.java
View file @
2bd7436d
...
@@ -68,10 +68,10 @@ public class UserDetailVO {
...
@@ -68,10 +68,10 @@ public class UserDetailVO {
xUserDetail
.
setName
(
this
.
getName
());
xUserDetail
.
setName
(
this
.
getName
());
xUserDetail
.
setIdNo
(
this
.
getIdNo
());
xUserDetail
.
setIdNo
(
this
.
getIdNo
());
if
(
this
.
getIdType
()
!=
null
)
{
if
(
this
.
getIdType
()
!=
null
)
{
xUserDetail
.
setIdType
(
cn
.
quantgroup
.
motan
.
enums
.
IdType
.
valueOf
(
this
.
getIdType
().
name
()));
xUserDetail
.
setIdType
(
cn
.
quantgroup
.
user
.
enums
.
IdType
.
valueOf
(
this
.
getIdType
().
name
()));
}
}
if
(
this
.
getGender
()
!=
null
)
{
if
(
this
.
getGender
()
!=
null
)
{
xUserDetail
.
setGender
(
cn
.
quantgroup
.
motan
.
enums
.
Gender
.
valueOf
(
this
.
getGender
().
name
()));
xUserDetail
.
setGender
(
cn
.
quantgroup
.
user
.
enums
.
Gender
.
valueOf
(
this
.
getGender
().
name
()));
}
}
xUserDetail
.
setEmail
(
this
.
getEmail
());
xUserDetail
.
setEmail
(
this
.
getEmail
());
xUserDetail
.
setQq
(
this
.
getQq
());
xUserDetail
.
setQq
(
this
.
getQq
());
...
@@ -82,6 +82,8 @@ public class UserDetailVO {
...
@@ -82,6 +82,8 @@ public class UserDetailVO {
if
(
this
.
getUpdatedAt
()
!=
null
)
{
if
(
this
.
getUpdatedAt
()
!=
null
)
{
xUserDetail
.
setUpdatedAt
(
new
Timestamp
(
this
.
getUpdatedAt
()));
xUserDetail
.
setUpdatedAt
(
new
Timestamp
(
this
.
getUpdatedAt
()));
}
}
xUserDetail
.
setIsAuthenticated
(
this
.
getIsAuthenticated
());
xUserDetail
.
setIsAuthenticated
(
this
.
getIsAuthenticated
());
xUserDetail
.
setEnable
(
this
.
getEnable
());
xUserDetail
.
setEnable
(
this
.
getEnable
());
return
xUserDetail
;
return
xUserDetail
;
...
...
src/main/java/cn/quantgroup/xyqb/session/XyqbSessionContextHolder.java
View file @
2bd7436d
...
@@ -81,4 +81,28 @@ public class XyqbSessionContextHolder {
...
@@ -81,4 +81,28 @@ public class XyqbSessionContextHolder {
public
static
void
releaseSession
()
{
public
static
void
releaseSession
()
{
threadSession
.
remove
();
threadSession
.
remove
();
}
}
public
static
SessionStruct
getXSessionFromRedis
(
String
token
)
{
if
(
token
==
null
||
token
.
length
()
!=
36
)
{
return
null
;
}
String
result
=
redisTemplate
.
opsForValue
().
get
(
Constants
.
Session
.
USER_SESSION_CACHE
+
token
);
if
(
StringUtils
.
isEmpty
(
result
))
{
return
null
;
}
try
{
SessionValue
values
=
JSON
.
parseObject
(
result
,
SessionValue
.
class
);
if
(
values
==
null
)
{
return
null
;
}
SessionStruct
sessionStruct
=
new
SessionStruct
();
sessionStruct
.
setSid
(
token
);
sessionStruct
.
setValues
(
values
);
return
sessionStruct
;
}
catch
(
Exception
ex
){
LOGGER
.
error
(
"序列化session出错"
,
ex
);
return
null
;
}
}
}
}
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