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
3e05a56b
Commit
3e05a56b
authored
May 19, 2020
by
徐小光
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'baseEntity' into 'master'
Base entity See merge request
!50
parents
e2fd8b2e
f2b7aadb
Changes
46
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
147 additions
and
497 deletions
+147
-497
UserDetailController.java
...tgroup/xyqb/controller/external/UserDetailController.java
+0
-3
InnerController.java
...tgroup/xyqb/controller/internal/user/InnerController.java
+0
-13
SyncUserController.java
...oup/xyqb/controller/internal/user/SyncUserController.java
+0
-3
UserCenterController.java
...controller/internal/user/center/UserCenterController.java
+0
-6
UserDetailController.java
...troller/middleoffice/userdetail/UserDetailController.java
+0
-4
ModifyPhoneNoController.java
...yqb/controller/modifyphoneno/ModifyPhoneNoController.java
+24
-3
Step1Req.java
...uantgroup/xyqb/controller/modifyphoneno/req/Step1Req.java
+0
-3
Address.java
src/main/java/cn/quantgroup/xyqb/entity/Address.java
+2
-14
BaseEntity.java
src/main/java/cn/quantgroup/xyqb/entity/BaseEntity.java
+42
-0
Channel.java
src/main/java/cn/quantgroup/xyqb/entity/Channel.java
+0
-61
Contact.java
src/main/java/cn/quantgroup/xyqb/entity/Contact.java
+1
-9
Merchant.java
src/main/java/cn/quantgroup/xyqb/entity/Merchant.java
+1
-10
MerchantConfig.java
src/main/java/cn/quantgroup/xyqb/entity/MerchantConfig.java
+1
-10
ModifyPhoneNo.java
src/main/java/cn/quantgroup/xyqb/entity/ModifyPhoneNo.java
+5
-23
User.java
src/main/java/cn/quantgroup/xyqb/entity/User.java
+8
-21
UserAttached.java
src/main/java/cn/quantgroup/xyqb/entity/UserAttached.java
+1
-9
UserBtRegister.java
src/main/java/cn/quantgroup/xyqb/entity/UserBtRegister.java
+4
-35
UserDetail.java
src/main/java/cn/quantgroup/xyqb/entity/UserDetail.java
+12
-19
UserExtInfo.java
src/main/java/cn/quantgroup/xyqb/entity/UserExtInfo.java
+4
-12
UserHashMapping.java
src/main/java/cn/quantgroup/xyqb/entity/UserHashMapping.java
+1
-25
UserHashPhoneNoIdNoMapping.java
...cn/quantgroup/xyqb/entity/UserHashPhoneNoIdNoMapping.java
+1
-20
UserJr58.java
src/main/java/cn/quantgroup/xyqb/entity/UserJr58.java
+0
-83
UserQueryLog.java
src/main/java/cn/quantgroup/xyqb/entity/UserQueryLog.java
+21
-7
UserSpouse.java
src/main/java/cn/quantgroup/xyqb/entity/UserSpouse.java
+1
-11
WechatUserInfo.java
src/main/java/cn/quantgroup/xyqb/entity/WechatUserInfo.java
+1
-9
AddressRegisteredEventListener.java
...quantgroup/xyqb/event/AddressRegisteredEventListener.java
+0
-3
BtRegisteredEventListener.java
...a/cn/quantgroup/xyqb/event/BtRegisteredEventListener.java
+0
-3
DetailRegisteredEventListener.java
.../quantgroup/xyqb/event/DetailRegisteredEventListener.java
+0
-3
AddressRet.java
src/main/java/cn/quantgroup/xyqb/model/AddressRet.java
+1
-1
ContactRet.java
src/main/java/cn/quantgroup/xyqb/model/ContactRet.java
+2
-2
UserExtInfoRet.java
src/main/java/cn/quantgroup/xyqb/model/UserExtInfoRet.java
+1
-1
UserSpouseRet.java
src/main/java/cn/quantgroup/xyqb/model/UserSpouseRet.java
+2
-2
IChannelRepository.java
...ava/cn/quantgroup/xyqb/repository/IChannelRepository.java
+0
-11
IUserJr58Repository.java
...va/cn/quantgroup/xyqb/repository/IUserJr58Repository.java
+0
-11
UserAuthorizedServiceImpl.java
...oup/xyqb/service/auth/impl/UserAuthorizedServiceImpl.java
+2
-5
UserRegisterServiceImpl.java
...p/xyqb/service/register/impl/UserRegisterServiceImpl.java
+0
-3
AddressServiceImpl.java
...quantgroup/xyqb/service/user/impl/AddressServiceImpl.java
+1
-4
ContactServiceImpl.java
...quantgroup/xyqb/service/user/impl/ContactServiceImpl.java
+1
-6
ModifyPhoneNoServiceImpl.java
...roup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
+0
-3
UserBtRegisterServiceImpl.java
...oup/xyqb/service/user/impl/UserBtRegisterServiceImpl.java
+1
-1
UserCenterServiceImpl.java
...ntgroup/xyqb/service/user/impl/UserCenterServiceImpl.java
+1
-8
UserExtInfoServiceImpl.java
...tgroup/xyqb/service/user/impl/UserExtInfoServiceImpl.java
+1
-8
UserServiceImpl.java
...cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
+3
-4
UserSpouseServiceImpl.java
...ntgroup/xyqb/service/user/impl/UserSpouseServiceImpl.java
+1
-1
UserDetailVO.java
...java/cn/quantgroup/xyqb/service/user/vo/UserDetailVO.java
+0
-1
UserServiceTest.java
src/test/java/service/UserServiceTest.java
+0
-3
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/UserDetailController.java
View file @
3e05a56b
...
@@ -64,17 +64,14 @@ public class UserDetailController implements IBaseController {
...
@@ -64,17 +64,14 @@ public class UserDetailController implements IBaseController {
log
.
error
(
"身份证号错误,userId:{}, idNo: {}"
,
user
.
getId
(),
idNo
);
log
.
error
(
"身份证号错误,userId:{}, idNo: {}"
,
user
.
getId
(),
idNo
);
return
JsonResult
.
buildErrorStateResult
(
"身份证号码错误"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"身份证号码错误"
,
null
);
}
}
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
/* 保存或更新 */
/* 保存或更新 */
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
user
.
getId
());
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
user
.
getId
());
if
(
Objects
.
isNull
(
userDetail
))
{
if
(
Objects
.
isNull
(
userDetail
))
{
userDetail
=
new
UserDetail
();
userDetail
=
new
UserDetail
();
userDetail
.
setCreatedAt
(
now
);
}
}
userDetail
.
setIdNo
(
idNo
);
userDetail
.
setIdNo
(
idNo
);
userDetail
.
setPhoneNo
(
user
.
getPhoneNo
());
userDetail
.
setPhoneNo
(
user
.
getPhoneNo
());
userDetail
.
setUserId
(
user
.
getId
());
userDetail
.
setUserId
(
user
.
getId
());
userDetail
.
setUpdatedAt
(
now
);
userDetail
.
setName
(
name
);
userDetail
.
setName
(
name
);
userDetail
.
setGender
(
info
.
getGender
());
userDetail
.
setGender
(
info
.
getGender
());
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/InnerController.java
View file @
3e05a56b
...
@@ -280,7 +280,6 @@ public class InnerController implements IBaseController {
...
@@ -280,7 +280,6 @@ public class InnerController implements IBaseController {
}
else
if
(!
Objects
.
equals
(
user
.
getPhoneNo
(),
phoneNo
))
{
}
else
if
(!
Objects
.
equals
(
user
.
getPhoneNo
(),
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
"用户手机号不匹配"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"用户手机号不匹配"
,
null
);
}
}
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
/*
/*
* 如果已存在记录,则更新
* 如果已存在记录,则更新
*/
*/
...
@@ -294,13 +293,11 @@ public class InnerController implements IBaseController {
...
@@ -294,13 +293,11 @@ public class InnerController implements IBaseController {
}
}
if
(
Objects
.
isNull
(
userDetail
))
{
if
(
Objects
.
isNull
(
userDetail
))
{
userDetail
=
new
UserDetail
();
userDetail
=
new
UserDetail
();
userDetail
.
setCreatedAt
(
now
);
}
}
userDetail
.
setUserId
(
userId
);
userDetail
.
setUserId
(
userId
);
userDetail
.
setName
(
name
);
userDetail
.
setName
(
name
);
userDetail
.
setPhoneNo
(
phoneNo
);
userDetail
.
setPhoneNo
(
phoneNo
);
userDetail
.
setIdNo
(
idNo
);
userDetail
.
setIdNo
(
idNo
);
userDetail
.
setUpdatedAt
(
now
);
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setGender
(
info
.
getGender
());
userDetail
.
setGender
(
info
.
getGender
());
userDetail
.
setEmail
(
email
);
userDetail
.
setEmail
(
email
);
...
@@ -520,9 +517,6 @@ public class InnerController implements IBaseController {
...
@@ -520,9 +517,6 @@ public class InnerController implements IBaseController {
Address
addressObj
=
addressService
.
findByUserId
(
userId
);
Address
addressObj
=
addressService
.
findByUserId
(
userId
);
if
(
addressObj
==
null
)
{
if
(
addressObj
==
null
)
{
addressObj
=
new
Address
();
addressObj
=
new
Address
();
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
addressObj
.
setCreatedAt
(
now
);
addressObj
.
setUpdateAt
(
now
);
}
}
addressObj
.
setUserId
(
userId
);
addressObj
.
setUserId
(
userId
);
addressObj
.
setProvince
(
province
);
addressObj
.
setProvince
(
province
);
...
@@ -547,13 +541,10 @@ public class InnerController implements IBaseController {
...
@@ -547,13 +541,10 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
"用户ID不能为空"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"用户ID不能为空"
,
null
);
}
}
UserExtInfo
info
=
userExtInfoService
.
findByUserId
(
userId
);
UserExtInfo
info
=
userExtInfoService
.
findByUserId
(
userId
);
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
info
==
null
)
{
if
(
info
==
null
)
{
info
=
new
UserExtInfo
();
info
=
new
UserExtInfo
();
info
.
setUserId
(
userId
);
info
.
setUserId
(
userId
);
info
.
setCreatedAt
(
now
);
}
}
info
.
setUpdateAt
(
now
);
if
(
incomeEnum
!=
null
)
{
if
(
incomeEnum
!=
null
)
{
info
.
setIncomeEnum
(
cn
.
quantgroup
.
user
.
enums
.
IncomeEnum
.
valueOf
(
incomeEnum
.
name
()));
info
.
setIncomeEnum
(
cn
.
quantgroup
.
user
.
enums
.
IncomeEnum
.
valueOf
(
incomeEnum
.
name
()));
}
}
...
@@ -928,7 +919,6 @@ public class InnerController implements IBaseController {
...
@@ -928,7 +919,6 @@ public class InnerController implements IBaseController {
return
false
;
return
false
;
}
}
user
.
setEnable
(
enable
);
user
.
setEnable
(
enable
);
user
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
log
.
info
(
"刷新用户激活状态失败:userId:{},enable:{},user:{}"
,
userId
,
enable
,
user
);
log
.
info
(
"刷新用户激活状态失败:userId:{},enable:{},user:{}"
,
userId
,
enable
,
user
);
user
=
userService
.
saveUser
(
user
);
user
=
userService
.
saveUser
(
user
);
if
(!
user
.
getEnable
())
{
if
(!
user
.
getEnable
())
{
...
@@ -955,15 +945,12 @@ public class InnerController implements IBaseController {
...
@@ -955,15 +945,12 @@ public class InnerController implements IBaseController {
}
}
}
}
UserSpouse
userSpouse
=
userSpouseService
.
findByUserId
(
userId
);
UserSpouse
userSpouse
=
userSpouseService
.
findByUserId
(
userId
);
Timestamp
timestamp
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
userSpouse
==
null
)
{
if
(
userSpouse
==
null
)
{
userSpouse
=
new
UserSpouse
(
userId
);
userSpouse
=
new
UserSpouse
(
userId
);
userSpouse
.
setCreatedAt
(
timestamp
);
}
}
userSpouse
.
setSpouseName
(
status
==
MaritalStatus
.
MARRIED
?
spouseName
:
""
);
userSpouse
.
setSpouseName
(
status
==
MaritalStatus
.
MARRIED
?
spouseName
:
""
);
userSpouse
.
setSpousePhone
(
status
==
MaritalStatus
.
MARRIED
?
spousePhone
:
""
);
userSpouse
.
setSpousePhone
(
status
==
MaritalStatus
.
MARRIED
?
spousePhone
:
""
);
userSpouse
.
setStatus
(
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
valueOf
(
status
.
name
()));
userSpouse
.
setStatus
(
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
valueOf
(
status
.
name
()));
userSpouse
.
setUpdateAt
(
timestamp
);
userSpouse
=
userSpouseService
.
save
(
userSpouse
);
userSpouse
=
userSpouseService
.
save
(
userSpouse
);
return
JsonResult
.
buildSuccessResult
(
null
,
UserSpouseRet
.
getUserSpouseRet
(
userSpouse
));
return
JsonResult
.
buildSuccessResult
(
null
,
UserSpouseRet
.
getUserSpouseRet
(
userSpouse
));
}
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/SyncUserController.java
View file @
3e05a56b
...
@@ -71,17 +71,14 @@ public class SyncUserController {
...
@@ -71,17 +71,14 @@ public class SyncUserController {
log
.
error
(
"用户不存在,phoneNo:{}"
,
phoneNo
);
log
.
error
(
"用户不存在,phoneNo:{}"
,
phoneNo
);
return
JsonResult
.
buildErrorStateResult
(
"用户不存在"
,
phoneNo
);
return
JsonResult
.
buildErrorStateResult
(
"用户不存在"
,
phoneNo
);
}
}
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
/* 保存或更新 */
/* 保存或更新 */
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
user
.
getId
());
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
user
.
getId
());
if
(
Objects
.
isNull
(
userDetail
))
{
if
(
Objects
.
isNull
(
userDetail
))
{
userDetail
=
new
UserDetail
();
userDetail
=
new
UserDetail
();
userDetail
.
setCreatedAt
(
now
);
}
}
userDetail
.
setUserId
(
user
.
getId
());
userDetail
.
setUserId
(
user
.
getId
());
userDetail
.
setIdNo
(
idNo
);
userDetail
.
setIdNo
(
idNo
);
userDetail
.
setPhoneNo
(
phoneNo
);
userDetail
.
setPhoneNo
(
phoneNo
);
userDetail
.
setUpdatedAt
(
now
);
userDetail
.
setName
(
name
);
userDetail
.
setName
(
name
);
userDetail
.
setGender
(
info
.
getGender
());
userDetail
.
setGender
(
info
.
getGender
());
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/center/UserCenterController.java
View file @
3e05a56b
...
@@ -290,10 +290,8 @@ public class UserCenterController {
...
@@ -290,10 +290,8 @@ public class UserCenterController {
}
}
//查询用户是否有保存地址信息
//查询用户是否有保存地址信息
Address
addressInfo
=
addressService
.
findByUserId
(
userId
);
Address
addressInfo
=
addressService
.
findByUserId
(
userId
);
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
null
==
addressInfo
)
{
if
(
null
==
addressInfo
)
{
addressInfo
=
new
Address
();
addressInfo
=
new
Address
();
addressInfo
.
setCreatedAt
(
now
);
}
}
addressInfo
.
setUserId
(
userId
);
addressInfo
.
setUserId
(
userId
);
addressInfo
.
setProvince
(
province
);
addressInfo
.
setProvince
(
province
);
...
@@ -303,7 +301,6 @@ public class UserCenterController {
...
@@ -303,7 +301,6 @@ public class UserCenterController {
addressInfo
.
setDistrictCode
(
districtCode
);
addressInfo
.
setDistrictCode
(
districtCode
);
addressInfo
.
setDistrict
(
district
);
addressInfo
.
setDistrict
(
district
);
addressInfo
.
setAddress
(
address
);
addressInfo
.
setAddress
(
address
);
addressInfo
.
setUpdateAt
(
now
);
addressService
.
save
(
addressInfo
);
addressService
.
save
(
addressInfo
);
return
JsonResult
.
buildSuccessResult
(
null
,
addressInfo
);
return
JsonResult
.
buildSuccessResult
(
null
,
addressInfo
);
}
}
...
@@ -373,13 +370,10 @@ public class UserCenterController {
...
@@ -373,13 +370,10 @@ public class UserCenterController {
}
}
//查询用户是否保存过.
//查询用户是否保存过.
UserExtInfo
userExtInfo
=
userExtInfoService
.
findByUserId
(
userId
);
UserExtInfo
userExtInfo
=
userExtInfoService
.
findByUserId
(
userId
);
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
null
==
userExtInfo
)
{
if
(
null
==
userExtInfo
)
{
userExtInfo
=
new
UserExtInfo
();
userExtInfo
=
new
UserExtInfo
();
userExtInfo
.
setUserId
(
userId
);
userExtInfo
.
setUserId
(
userId
);
}
}
userExtInfo
.
setCreatedAt
(
now
);
userExtInfo
.
setUpdateAt
(
now
);
userExtInfo
.
setEducationEnum
(
educationEnum
);
userExtInfo
.
setEducationEnum
(
educationEnum
);
userExtInfo
.
setMarryStatus
(
maritalStatus
);
userExtInfo
.
setMarryStatus
(
maritalStatus
);
userExtInfo
.
setOccupationEnum
(
occupationEnum
);
userExtInfo
.
setOccupationEnum
(
occupationEnum
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/userdetail/UserDetailController.java
View file @
3e05a56b
...
@@ -48,7 +48,6 @@ public class UserDetailController {
...
@@ -48,7 +48,6 @@ public class UserDetailController {
//更新
//更新
userDetail
.
setName
(
userDetailReq
.
getName
());
userDetail
.
setName
(
userDetailReq
.
getName
());
userDetail
.
setIdNo
(
userDetailReq
.
getIdNo
());
userDetail
.
setIdNo
(
userDetailReq
.
getIdNo
());
userDetail
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
userDetail
=
userDetailService
.
saveUserDetail
(
userDetail
);
userDetail
=
userDetailService
.
saveUserDetail
(
userDetail
);
return
JsonResult
.
buildSuccessResultGeneric
(
userDetail
);
return
JsonResult
.
buildSuccessResultGeneric
(
userDetail
);
}
}
...
@@ -69,7 +68,6 @@ public class UserDetailController {
...
@@ -69,7 +68,6 @@ public class UserDetailController {
}
}
User
user
=
userService
.
findById
(
userId
);
User
user
=
userService
.
findById
(
userId
);
IdCardInfo
idCardInfo
=
idCardService
.
getIdCardInfo
(
userDetailReq
.
getIdNo
());
IdCardInfo
idCardInfo
=
idCardService
.
getIdCardInfo
(
userDetailReq
.
getIdNo
());
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
userDetail
=
new
UserDetail
();
userDetail
=
new
UserDetail
();
userDetail
.
setUserId
(
userId
);
userDetail
.
setUserId
(
userId
);
...
@@ -78,8 +76,6 @@ public class UserDetailController {
...
@@ -78,8 +76,6 @@ public class UserDetailController {
userDetail
.
setIdNo
(
userDetailReq
.
getIdNo
());
userDetail
.
setIdNo
(
userDetailReq
.
getIdNo
());
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setGender
(
idCardInfo
.
getGender
());
userDetail
.
setGender
(
idCardInfo
.
getGender
());
userDetail
.
setCreatedAt
(
now
);
userDetail
.
setUpdatedAt
(
now
);
userDetail
=
userDetailService
.
saveUserDetail
(
userDetail
);
userDetail
=
userDetailService
.
saveUserDetail
(
userDetail
);
return
JsonResult
.
buildSuccessResultGeneric
(
userDetail
);
return
JsonResult
.
buildSuccessResultGeneric
(
userDetail
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/modifyphoneno/ModifyPhoneNoController.java
View file @
3e05a56b
...
@@ -10,13 +10,24 @@ import cn.quantgroup.xyqb.entity.ModifyPhoneNo;
...
@@ -10,13 +10,24 @@ import cn.quantgroup.xyqb.entity.ModifyPhoneNo;
import
cn.quantgroup.xyqb.entity.User
;
import
cn.quantgroup.xyqb.entity.User
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.user.IModifyPhoneNoService
;
import
cn.quantgroup.xyqb.service.user.IModifyPhoneNoService
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.SerializationConfig
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.io.IOException
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
/**
/**
* 用户手机号修改相关api
* 用户手机号修改相关api
...
@@ -81,8 +92,18 @@ public class ModifyPhoneNoController implements IBaseController {
...
@@ -81,8 +92,18 @@ public class ModifyPhoneNoController implements IBaseController {
*/
*/
@ApiOperation
(
"后台客服处理功能 - 查询列表"
)
@ApiOperation
(
"后台客服处理功能 - 查询列表"
)
@GetMapping
@GetMapping
public
JsonResult
<
Page
<
ModifyPhoneNo
>>
list
(
@Valid
ModifyPhoneNoQueryReq
modifyPhoneNoQueryReq
)
{
public
JsonResult
<?>
list
(
@Valid
ModifyPhoneNoQueryReq
modifyPhoneNoQueryReq
)
{
return
JsonResult
.
buildSuccessResultGeneric
(
modifyPhoneNoService
.
list
(
modifyPhoneNoQueryReq
));
Page
<
ModifyPhoneNo
>
list
=
modifyPhoneNoService
.
list
(
modifyPhoneNoQueryReq
);
ObjectMapper
objectMapper
=
new
ObjectMapper
();
objectMapper
.
setDateFormat
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
));
String
s
;
try
{
s
=
objectMapper
.
writeValueAsString
(
list
);
Object
o
=
objectMapper
.
readValue
(
s
,
Object
.
class
);
return
JsonResult
.
buildSuccessResultGeneric
(
o
);
}
catch
(
Exception
ignored
)
{
}
return
JsonResult
.
buildErrorStateResult
(
"数据错误"
,
null
);
}
}
/**
/**
...
...
src/main/java/cn/quantgroup/xyqb/controller/modifyphoneno/req/Step1Req.java
View file @
3e05a56b
...
@@ -65,9 +65,6 @@ public class Step1Req implements Serializable {
...
@@ -65,9 +65,6 @@ public class Step1Req implements Serializable {
public
static
ModifyPhoneNo
adapt
(
Step1Req
step1Req
)
{
public
static
ModifyPhoneNo
adapt
(
Step1Req
step1Req
)
{
ModifyPhoneNo
modifyPhoneNo
=
new
ModifyPhoneNo
();
ModifyPhoneNo
modifyPhoneNo
=
new
ModifyPhoneNo
();
BeanUtils
.
copyProperties
(
step1Req
,
modifyPhoneNo
);
BeanUtils
.
copyProperties
(
step1Req
,
modifyPhoneNo
);
Date
date
=
new
Date
();
modifyPhoneNo
.
setCreatedAt
(
date
);
modifyPhoneNo
.
setUpdatedAt
(
date
);
return
modifyPhoneNo
;
return
modifyPhoneNo
;
}
}
}
}
src/main/java/cn/quantgroup/xyqb/entity/Address.java
View file @
3e05a56b
...
@@ -13,14 +13,10 @@ import java.sql.Timestamp;
...
@@ -13,14 +13,10 @@ import java.sql.Timestamp;
@Data
@Data
@Entity
@Entity
@Table
(
name
=
"address"
,
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
"user_id"
))
@Table
(
name
=
"address"
,
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
"user_id"
))
public
class
Address
implements
Serializable
{
public
class
Address
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
@Column
(
name
=
"province_code"
)
@Column
(
name
=
"province_code"
)
...
@@ -37,15 +33,7 @@ public class Address implements Serializable {
...
@@ -37,15 +33,7 @@ public class Address implements Serializable {
private
String
district
;
private
String
district
;
@Column
(
name
=
"address"
)
@Column
(
name
=
"address"
)
private
String
address
;
private
String
address
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updateAt
;
@PreUpdate
public
void
preUpdate
()
{
this
.
updateAt
=
new
Timestamp
(
System
.
currentTimeMillis
());
}
public
String
toString
()
{
public
String
toString
()
{
return
province
+
"(省)"
+
city
+
"(市)"
+
district
+
"(区/县)"
+
address
;
return
province
+
"(省)"
+
city
+
"(市)"
+
district
+
"(区/县)"
+
address
;
...
...
src/main/java/cn/quantgroup/xyqb/entity/BaseEntity.java
0 → 100644
View file @
3e05a56b
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
* 所有数据库实体,都要继承 BaseEntity
* 1. 统一的 ID 设计。
* 2. 统一的创建和更新时间。
*/
@MappedSuperclass
@Data
public
abstract
class
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Basic
(
optional
=
false
)
private
Long
id
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
;
@PrePersist
public
void
prePersist
()
{
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
this
.
createdAt
=
now
;
this
.
updatedAt
=
now
;
}
@PreUpdate
public
void
preUpdate
()
{
this
.
updatedAt
=
new
Timestamp
(
System
.
currentTimeMillis
());
}
}
src/main/java/cn/quantgroup/xyqb/entity/Channel.java
deleted
100644 → 0
View file @
e2fd8b2e
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
javax.persistence.*
;
import
java.io.Serializable
;
/**
* Created by FrankChow on 15/7/8.
*/
@Entity
@Table
(
name
=
"channel"
,
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
"channel_code"
))
public
class
Channel
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
//渠道代号
@Column
(
name
=
"channel_code"
)
private
String
channelCode
;
//渠道名称
@Column
(
name
=
"name"
)
private
String
name
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getChannelCode
()
{
return
channelCode
;
}
public
void
setChannelCode
(
String
channelCode
)
{
this
.
channelCode
=
channelCode
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Override
public
String
toString
()
{
return
"Channel{"
+
"channelCode='"
+
channelCode
+
'\''
+
", id="
+
id
+
", name='"
+
name
+
'\''
+
'}'
;
}
}
src/main/java/cn/quantgroup/xyqb/entity/Contact.java
View file @
3e05a56b
...
@@ -15,13 +15,9 @@ import java.sql.Timestamp;
...
@@ -15,13 +15,9 @@ import java.sql.Timestamp;
@Data
@Data
@Entity
@Entity
@Table
(
name
=
"contact"
)
@Table
(
name
=
"contact"
)
public
class
Contact
implements
Serializable
{
public
class
Contact
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
@Column
(
name
=
"name"
)
@Column
(
name
=
"name"
)
...
@@ -30,10 +26,6 @@ public class Contact implements Serializable {
...
@@ -30,10 +26,6 @@ public class Contact implements Serializable {
private
String
phoneNo
;
private
String
phoneNo
;
@Column
(
name
=
"relation"
)
@Column
(
name
=
"relation"
)
private
Relation
relation
;
private
Relation
relation
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updateAt
;
/**
/**
* 数据合法性校验
* 数据合法性校验
...
...
src/main/java/cn/quantgroup/xyqb/entity/Merchant.java
View file @
3e05a56b
...
@@ -4,10 +4,8 @@ import lombok.Data;
...
@@ -4,10 +4,8 @@ import lombok.Data;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
/**
* Created by 11 on 2016/12/30.
* Created by 11 on 2016/12/30.
...
@@ -15,18 +13,11 @@ import java.sql.Timestamp;
...
@@ -15,18 +13,11 @@ import java.sql.Timestamp;
@Data
@Data
@Entity
@Entity
@Table
(
name
=
"merchant"
)
@Table
(
name
=
"merchant"
)
public
class
Merchant
implements
Serializable
{
public
class
Merchant
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
private
Long
id
;
@Column
(
name
=
"name"
)
@Column
(
name
=
"name"
)
private
String
name
;
private
String
name
;
@Column
(
name
=
"enable"
)
@Column
(
name
=
"enable"
)
private
boolean
enable
;
private
boolean
enable
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updateAt
;
}
}
src/main/java/cn/quantgroup/xyqb/entity/MerchantConfig.java
View file @
3e05a56b
...
@@ -4,10 +4,8 @@ import lombok.Data;
...
@@ -4,10 +4,8 @@ import lombok.Data;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
/**
* Created by 11 on 2016/12/30.
* Created by 11 on 2016/12/30.
...
@@ -15,20 +13,13 @@ import java.sql.Timestamp;
...
@@ -15,20 +13,13 @@ import java.sql.Timestamp;
@Data
@Data
@Entity
@Entity
@Table
(
name
=
"merchant_config"
)
@Table
(
name
=
"merchant_config"
)
public
class
MerchantConfig
implements
Serializable
{
public
class
MerchantConfig
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
private
Long
id
;
@Column
(
name
=
"merchant_id"
)
@Column
(
name
=
"merchant_id"
)
private
Long
merchantId
;
private
Long
merchantId
;
@Column
(
name
=
"config_name"
)
@Column
(
name
=
"config_name"
)
private
String
configName
;
private
String
configName
;
@Column
(
name
=
"config_value"
)
@Column
(
name
=
"config_value"
)
private
String
configValue
;
private
String
configValue
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updateAt
;
}
}
src/main/java/cn/quantgroup/xyqb/entity/ModifyPhoneNo.java
View file @
3e05a56b
...
@@ -3,9 +3,10 @@ package cn.quantgroup.xyqb.entity;
...
@@ -3,9 +3,10 @@ package cn.quantgroup.xyqb.entity;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.*
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
* Date: 2019/11/4
* Date: 2019/11/4
...
@@ -16,15 +17,10 @@ import java.util.Date;
...
@@ -16,15 +17,10 @@ import java.util.Date;
@Data
@Data
@Entity
@Entity
@Table
(
name
=
"user_modify_phone_no"
)
@Table
(
name
=
"user_modify_phone_no"
)
public
class
ModifyPhoneNo
implements
Serializable
{
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
public
class
ModifyPhoneNo
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
7797532159380593454L
;
private
static
final
long
serialVersionUID
=
-
7797532159380593454L
;
/**
* id
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
/**
/**
* user.id
* user.id
...
@@ -90,18 +86,4 @@ public class ModifyPhoneNo implements Serializable {
...
@@ -90,18 +86,4 @@ public class ModifyPhoneNo implements Serializable {
*/
*/
@Column
(
name
=
"processing_status"
)
@Column
(
name
=
"processing_status"
)
private
Integer
processingStatus
;
private
Integer
processingStatus
;
/**
*
*/
@Column
(
name
=
"created_at"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createdAt
;
/**
*
*/
@Column
(
name
=
"updated_at"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updatedAt
;
}
}
src/main/java/cn/quantgroup/xyqb/entity/User.java
View file @
3e05a56b
package
cn
.
quantgroup
.
xyqb
.
entity
;
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
cn.quantgroup.xyqb.config.http.Timestamp2LongConverter
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.ToString
;
import
javax.persistence.*
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.Objects
;
import
java.util.Objects
;
/**
/**
...
@@ -18,15 +18,11 @@ import java.util.Objects;
...
@@ -18,15 +18,11 @@ import java.util.Objects;
@Setter
@Setter
@ToString
@ToString
@Entity
@Entity
@Table
(
name
=
"user"
,
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
"phone_no"
))
@Table
(
name
=
"user"
,
public
class
User
implements
Serializable
{
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
"phone_no"
))
public
class
User
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
//手机号
//手机号
@Column
(
name
=
"phone_no"
)
@Column
(
name
=
"phone_no"
)
private
String
phoneNo
;
private
String
phoneNo
;
...
@@ -35,7 +31,6 @@ public class User implements Serializable {
...
@@ -35,7 +31,6 @@ public class User implements Serializable {
@Column
(
name
=
"password"
)
@Column
(
name
=
"password"
)
private
String
password
;
private
String
password
;
//第一次用户来源 channel_id
//第一次用户来源 channel_id
@Column
(
name
=
"registered_from"
)
@Column
(
name
=
"registered_from"
)
private
Long
registeredFrom
;
private
Long
registeredFrom
;
...
@@ -47,17 +42,9 @@ public class User implements Serializable {
...
@@ -47,17 +42,9 @@ public class User implements Serializable {
@Column
(
name
=
"enable"
)
@Column
(
name
=
"enable"
)
private
Boolean
enable
;
private
Boolean
enable
;
//创建时间
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
//上一次修改时间
@Column
(
name
=
"updated_at"
)
@JSONField
(
serializeUsing
=
Timestamp2LongConverter
.
class
)
private
Timestamp
updatedAt
;
/**
/**
* 是否有密码
* 是否有密码
*
* @return
* @return
*/
*/
public
boolean
getHasPassword
()
{
public
boolean
getHasPassword
()
{
...
...
src/main/java/cn/quantgroup/xyqb/entity/UserAttached.java
View file @
3e05a56b
...
@@ -12,19 +12,11 @@ import java.sql.Timestamp;
...
@@ -12,19 +12,11 @@ import java.sql.Timestamp;
@Data
@Data
@Entity
@Entity
@Table
(
name
=
"user_attached"
)
@Table
(
name
=
"user_attached"
)
public
class
UserAttached
implements
Serializable
{
public
class
UserAttached
extends
BaseEntity
implements
Serializable
{
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
@Column
(
name
=
"avatar"
)
@Column
(
name
=
"avatar"
)
private
String
avatar
;
private
String
avatar
;
@Column
(
name
=
"nick"
)
@Column
(
name
=
"nick"
)
private
String
nick
;
private
String
nick
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
;
}
}
src/main/java/cn/quantgroup/xyqb/entity/UserBtRegister.java
View file @
3e05a56b
package
cn
.
quantgroup
.
xyqb
.
entity
;
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
cn.quantgroup.xyqb.config.http.Timestamp2LongConverter
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.ToString
;
import
javax.persistence.*
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
/**
* Created by Administrator on 2017/5/16.
* Created by Administrator on 2017/5/16.
...
@@ -18,14 +17,9 @@ import java.sql.Timestamp;
...
@@ -18,14 +17,9 @@ import java.sql.Timestamp;
@ToString
@ToString
@Entity
@Entity
@Table
(
name
=
"user_bt_register"
)
@Table
(
name
=
"user_bt_register"
)
public
class
UserBtRegister
implements
Serializable
{
public
class
UserBtRegister
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
...
@@ -34,29 +28,4 @@ public class UserBtRegister implements Serializable {
...
@@ -34,29 +28,4 @@ public class UserBtRegister implements Serializable {
@Column
(
name
=
"is_active"
)
@Column
(
name
=
"is_active"
)
private
Boolean
isActive
=
Boolean
.
TRUE
;
private
Boolean
isActive
=
Boolean
.
TRUE
;
//创建时间
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
//上一次修改时间
@Column
(
name
=
"updated_at"
)
@JSONField
(
serializeUsing
=
Timestamp2LongConverter
.
class
)
private
Timestamp
updatedAt
;
@PrePersist
public
void
prePersist
()
{
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
this
.
createdAt
=
now
;
this
.
updatedAt
=
now
;
}
@PreUpdate
public
void
preUpdate
()
{
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
this
.
createdAt
=
now
;
this
.
updatedAt
=
now
;
}
}
}
src/main/java/cn/quantgroup/xyqb/entity/UserDetail.java
View file @
3e05a56b
...
@@ -7,7 +7,10 @@ import lombok.Getter;
...
@@ -7,7 +7,10 @@ import lombok.Getter;
import
lombok.Setter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.ToString
;
import
javax.persistence.*
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.util.Optional
;
import
java.util.Optional
;
...
@@ -19,16 +22,12 @@ import java.util.Optional;
...
@@ -19,16 +22,12 @@ import java.util.Optional;
@Setter
@Setter
@ToString
@ToString
@Entity
@Entity
@Table
(
name
=
"user_detail"
,
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
"user_id"
))
@Table
(
name
=
"user_detail"
,
public
class
UserDetail
implements
Serializable
{
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
"user_id"
))
public
class
UserDetail
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
...
@@ -60,14 +59,6 @@ public class UserDetail implements Serializable {
...
@@ -60,14 +59,6 @@ public class UserDetail implements Serializable {
@Column
(
name
=
"qq"
)
@Column
(
name
=
"qq"
)
private
String
qq
;
private
String
qq
;
//创建时间
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
//上一次修改时间
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
;
public
XUserDetail
toXUserDetail
()
{
public
XUserDetail
toXUserDetail
()
{
XUserDetail
xUserDetail
=
new
XUserDetail
();
XUserDetail
xUserDetail
=
new
XUserDetail
();
xUserDetail
.
setId
(
this
.
getId
());
xUserDetail
.
setId
(
this
.
getId
());
...
@@ -76,10 +67,13 @@ public class UserDetail implements Serializable {
...
@@ -76,10 +67,13 @@ 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
.
motan
.
enums
.
IdType
.
valueOf
(
this
.
getIdType
()
.
name
()));
}
}
if
(
this
.
getGender
()
!=
null
)
{
if
(
this
.
getGender
()
!=
null
)
{
xUserDetail
.
setGender
(
cn
.
quantgroup
.
motan
.
enums
.
Gender
.
valueOf
(
Optional
.
ofNullable
(
this
.
getGender
()).
orElse
(
Gender
.
UNKNOWN
).
name
()));
xUserDetail
.
setGender
(
cn
.
quantgroup
.
motan
.
enums
.
Gender
.
valueOf
(
Optional
.
ofNullable
(
this
.
getGender
())
.
orElse
(
Gender
.
UNKNOWN
)
.
name
()));
}
}
xUserDetail
.
setEmail
(
this
.
getEmail
());
xUserDetail
.
setEmail
(
this
.
getEmail
());
xUserDetail
.
setQq
(
this
.
getQq
());
xUserDetail
.
setQq
(
this
.
getQq
());
...
@@ -90,5 +84,4 @@ public class UserDetail implements Serializable {
...
@@ -90,5 +84,4 @@ public class UserDetail implements Serializable {
return
xUserDetail
;
return
xUserDetail
;
}
}
}
}
src/main/java/cn/quantgroup/xyqb/entity/UserExtInfo.java
View file @
3e05a56b
...
@@ -14,13 +14,9 @@ import java.sql.Timestamp;
...
@@ -14,13 +14,9 @@ import java.sql.Timestamp;
@Data
@Data
@Entity
@Entity
@Table
(
name
=
"user_ext_info"
)
@Table
(
name
=
"user_ext_info"
)
public
class
UserExtInfo
implements
Serializable
{
public
class
UserExtInfo
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"id"
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
@Column
(
name
=
"means_of_income_payment"
)
@Column
(
name
=
"means_of_income_payment"
)
...
@@ -41,14 +37,10 @@ public class UserExtInfo implements Serializable {
...
@@ -41,14 +37,10 @@ public class UserExtInfo implements Serializable {
private
Boolean
hasCreditCard
=
false
;
private
Boolean
hasCreditCard
=
false
;
@Column
(
name
=
"marry_status"
)
@Column
(
name
=
"marry_status"
)
private
MaritalStatus
marryStatus
=
MaritalStatus
.
UNKNOWN
;
private
MaritalStatus
marryStatus
=
MaritalStatus
.
UNKNOWN
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updateAt
;
public
XUserExtInfo
toXUserExtInfo
()
{
public
XUserExtInfo
toXUserExtInfo
()
{
XUserExtInfo
xUserExtInfo
=
new
XUserExtInfo
();
XUserExtInfo
xUserExtInfo
=
new
XUserExtInfo
();
xUserExtInfo
.
setId
(
this
.
id
);
xUserExtInfo
.
setId
(
getId
()
);
xUserExtInfo
.
setUserId
(
this
.
userId
);
xUserExtInfo
.
setUserId
(
this
.
userId
);
xUserExtInfo
.
setEducationEnum
(
cn
.
quantgroup
.
motan
.
enums
.
EducationEnum
.
valueOf
(
this
.
educationEnum
.
name
()));
xUserExtInfo
.
setEducationEnum
(
cn
.
quantgroup
.
motan
.
enums
.
EducationEnum
.
valueOf
(
this
.
educationEnum
.
name
()));
xUserExtInfo
.
setIncomeEnum
(
cn
.
quantgroup
.
motan
.
enums
.
IncomeEnum
.
valueOf
(
this
.
incomeEnum
.
name
()));
xUserExtInfo
.
setIncomeEnum
(
cn
.
quantgroup
.
motan
.
enums
.
IncomeEnum
.
valueOf
(
this
.
incomeEnum
.
name
()));
...
@@ -58,8 +50,8 @@ public class UserExtInfo implements Serializable {
...
@@ -58,8 +50,8 @@ public class UserExtInfo implements Serializable {
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
.
motan
.
enums
.
MaritalStatus
.
valueOf
(
this
.
marryStatus
.
name
()));
xUserExtInfo
.
setCreatedAt
(
this
.
createdAt
);
xUserExtInfo
.
setCreatedAt
(
getCreatedAt
()
);
xUserExtInfo
.
setUpdateAt
(
this
.
updateAt
);
xUserExtInfo
.
setUpdateAt
(
getUpdatedAt
()
);
return
xUserExtInfo
;
return
xUserExtInfo
;
}
}
}
}
src/main/java/cn/quantgroup/xyqb/entity/UserHashMapping.java
View file @
3e05a56b
...
@@ -12,18 +12,13 @@ import java.sql.Timestamp;
...
@@ -12,18 +12,13 @@ import java.sql.Timestamp;
@Entity
@Entity
@Table
(
name
=
"user_hash_mapping"
)
@Table
(
name
=
"user_hash_mapping"
)
@NoArgsConstructor
@NoArgsConstructor
public
class
UserHashMapping
implements
Serializable
{
public
class
UserHashMapping
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
public
UserHashMapping
(
Long
userId
)
{
public
UserHashMapping
(
Long
userId
)
{
this
.
userId
=
userId
;
this
.
userId
=
userId
;
}
}
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
...
@@ -39,25 +34,6 @@ public class UserHashMapping implements Serializable {
...
@@ -39,25 +34,6 @@ public class UserHashMapping implements Serializable {
@Column
(
name
=
"id_no_md5_short"
)
@Column
(
name
=
"id_no_md5_short"
)
private
Long
idNoMd5Short
;
private
Long
idNoMd5Short
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
;
@PrePersist
public
void
prePersist
()
{
Timestamp
timestamp
=
new
Timestamp
(
System
.
currentTimeMillis
());
createdAt
=
timestamp
;
updatedAt
=
timestamp
;
}
@PreUpdate
public
void
preUpdate
()
{
updatedAt
=
new
Timestamp
(
System
.
currentTimeMillis
());
}
public
void
setPhoneNoMd5
(
String
phoneNoMd5
)
{
public
void
setPhoneNoMd5
(
String
phoneNoMd5
)
{
this
.
phoneNoMd5
=
phoneNoMd5
;
this
.
phoneNoMd5
=
phoneNoMd5
;
this
.
phoneNoMd5Short
=
HashUtil
.
crc32
(
phoneNoMd5
);
this
.
phoneNoMd5Short
=
HashUtil
.
crc32
(
phoneNoMd5
);
...
...
src/main/java/cn/quantgroup/xyqb/entity/UserHashPhoneNoIdNoMapping.java
View file @
3e05a56b
...
@@ -8,19 +8,12 @@ import java.sql.Timestamp;
...
@@ -8,19 +8,12 @@ import java.sql.Timestamp;
@Data
@Data
@Entity
@Entity
@Table
(
name
=
"user_hash_phone_no_id_no_mapping"
)
@Table
(
name
=
"user_hash_phone_no_id_no_mapping"
)
public
class
UserHashPhoneNoIdNoMapping
{
public
class
UserHashPhoneNoIdNoMapping
extends
BaseEntity
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
@Column
(
name
=
"phone_no_id_no_md5"
)
@Column
(
name
=
"phone_no_id_no_md5"
)
private
String
phoneNoIdNoMd5
;
private
String
phoneNoIdNoMd5
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
;
public
UserHashPhoneNoIdNoMapping
()
{
public
UserHashPhoneNoIdNoMapping
()
{
}
}
...
@@ -28,16 +21,4 @@ public class UserHashPhoneNoIdNoMapping {
...
@@ -28,16 +21,4 @@ public class UserHashPhoneNoIdNoMapping {
public
UserHashPhoneNoIdNoMapping
(
Long
userId
)
{
public
UserHashPhoneNoIdNoMapping
(
Long
userId
)
{
this
.
userId
=
userId
;
this
.
userId
=
userId
;
}
}
@PrePersist
public
void
prePersist
()
{
Timestamp
timestamp
=
new
Timestamp
(
System
.
currentTimeMillis
());
createdAt
=
timestamp
;
updatedAt
=
timestamp
;
}
@PreUpdate
public
void
preUpdate
()
{
updatedAt
=
new
Timestamp
(
System
.
currentTimeMillis
());
}
}
}
src/main/java/cn/quantgroup/xyqb/entity/UserJr58.java
deleted
100644 → 0
View file @
e2fd8b2e
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
* @author mengfan.feng
* @time 2015-09-10 15:32
*/
@Entity
@Table
(
name
=
"user_jr58"
,
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
"user_id"
))
@Getter
@Setter
@ToString
public
class
UserJr58
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
private
Long
userId
;
@Column
(
name
=
"wb_id"
)
private
String
wbId
;
@Column
(
name
=
"wb_user_name"
)
private
String
wbUserName
;
@Column
(
name
=
"customer_id"
)
private
String
customerId
;
@Column
(
name
=
"name"
)
private
String
name
;
@Column
(
name
=
"id_card"
)
private
String
idcard
;
@Column
(
name
=
"email"
)
private
String
email
;
@Column
(
name
=
"phone"
)
private
String
phone
;
@Column
(
name
=
"info"
)
private
String
info
;
@Column
(
name
=
"role_id"
)
private
String
roleId
;
@Column
(
name
=
"flag"
)
private
String
flag
;
@Column
(
name
=
"city"
)
private
String
city
;
@Column
(
name
=
"access_mode"
)
private
String
accessMode
;
@Column
(
name
=
"app_id"
)
private
String
appId
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
;
@Column
(
name
=
"edu"
)
private
String
edu
;
@Column
(
name
=
"income"
)
private
String
income
;
@Column
(
name
=
"marry"
)
private
String
marry
;
}
src/main/java/cn/quantgroup/xyqb/entity/UserQueryLog.java
View file @
3e05a56b
package
cn
.
quantgroup
.
xyqb
.
entity
;
package
cn
.
quantgroup
.
xyqb
.
entity
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.*
;
import
javax.persistence.Basic
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.PrePersist
;
import
javax.persistence.PreUpdate
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.
util.Date
;
import
java.
sql.Timestamp
;
/**
/**
* Created by 11 on 2016/12/30.
* Created by 11 on 2016/12/30.
...
@@ -16,11 +24,11 @@ import java.util.Date;
...
@@ -16,11 +24,11 @@ import java.util.Date;
public
class
UserQueryLog
implements
Serializable
{
public
class
UserQueryLog
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Basic
(
optional
=
false
)
private
Long
id
;
private
Long
id
;
@Column
(
name
=
"login_user_name"
)
@Column
(
name
=
"login_user_name"
)
private
String
loginUserName
;
private
String
loginUserName
;
@Column
(
name
=
"query_condition"
)
@Column
(
name
=
"query_condition"
)
...
@@ -31,10 +39,16 @@ public class UserQueryLog implements Serializable {
...
@@ -31,10 +39,16 @@ public class UserQueryLog implements Serializable {
private
Long
resultAmount
;
private
Long
resultAmount
;
@Column
(
name
=
"query_detail"
)
@Column
(
name
=
"query_detail"
)
private
String
queryDetail
;
private
String
queryDetail
;
@Column
(
name
=
"created_at"
)
private
Date
createdAt
=
new
Date
();
@Transient
@Transient
private
String
createDate
;
private
String
createDate
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@PrePersist
public
void
prePersist
()
{
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
this
.
createdAt
=
now
;
}
}
}
src/main/java/cn/quantgroup/xyqb/entity/UserSpouse.java
View file @
3e05a56b
...
@@ -16,13 +16,9 @@ import java.sql.Timestamp;
...
@@ -16,13 +16,9 @@ import java.sql.Timestamp;
@Setter
@Setter
@ToString
@ToString
@NoArgsConstructor
@NoArgsConstructor
public
class
UserSpouse
implements
Serializable
{
public
class
UserSpouse
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
...
@@ -33,12 +29,6 @@ public class UserSpouse implements Serializable {
...
@@ -33,12 +29,6 @@ public class UserSpouse implements Serializable {
@Column
(
name
=
"spouse_name"
)
@Column
(
name
=
"spouse_name"
)
private
String
spouseName
;
private
String
spouseName
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updateAt
;
@Column
(
name
=
"status"
)
@Column
(
name
=
"status"
)
private
MaritalStatus
status
;
private
MaritalStatus
status
;
...
...
src/main/java/cn/quantgroup/xyqb/entity/WechatUserInfo.java
View file @
3e05a56b
...
@@ -15,13 +15,9 @@ import java.sql.Timestamp;
...
@@ -15,13 +15,9 @@ import java.sql.Timestamp;
@Entity
@Entity
@Table
(
name
=
"wechat_userinfo"
)
@Table
(
name
=
"wechat_userinfo"
)
@Data
@Data
public
class
WechatUserInfo
implements
Serializable
{
public
class
WechatUserInfo
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
Long
userId
;
private
Long
userId
;
@Column
(
name
=
"open_id"
)
@Column
(
name
=
"open_id"
)
...
@@ -42,10 +38,6 @@ public class WechatUserInfo implements Serializable {
...
@@ -42,10 +38,6 @@ public class WechatUserInfo implements Serializable {
private
String
country
;
private
String
country
;
@Column
(
name
=
"head_img_url"
)
@Column
(
name
=
"head_img_url"
)
private
String
headImgUrl
;
private
String
headImgUrl
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
=
new
Timestamp
(
System
.
currentTimeMillis
());
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
=
new
Timestamp
(
System
.
currentTimeMillis
());
public
WechatUserInfo
convertEmoji
()
{
public
WechatUserInfo
convertEmoji
()
{
...
...
src/main/java/cn/quantgroup/xyqb/event/AddressRegisteredEventListener.java
View file @
3e05a56b
...
@@ -30,9 +30,6 @@ public class AddressRegisteredEventListener implements ApplicationListener<Regis
...
@@ -30,9 +30,6 @@ public class AddressRegisteredEventListener implements ApplicationListener<Regis
}
}
User
user
=
userRegisterParam
.
getUser
();
User
user
=
userRegisterParam
.
getUser
();
address
.
setUserId
(
user
.
getId
());
address
.
setUserId
(
user
.
getId
());
Timestamp
currentTime
=
new
Timestamp
(
System
.
currentTimeMillis
());
address
.
setCreatedAt
(
currentTime
);
address
.
setUpdateAt
(
currentTime
);
addressRepository
.
save
(
address
);
addressRepository
.
save
(
address
);
}
}
}
}
src/main/java/cn/quantgroup/xyqb/event/BtRegisteredEventListener.java
View file @
3e05a56b
...
@@ -36,9 +36,6 @@ public class BtRegisteredEventListener implements ApplicationListener<RegisterEv
...
@@ -36,9 +36,6 @@ public class BtRegisteredEventListener implements ApplicationListener<RegisterEv
userBtRegister
.
setRegisterBtMerchantId
(
btRegisterChannelId
);
userBtRegister
.
setRegisterBtMerchantId
(
btRegisterChannelId
);
}
}
userBtRegister
.
setIsActive
(
true
);
userBtRegister
.
setIsActive
(
true
);
Timestamp
currentTime
=
new
Timestamp
(
System
.
currentTimeMillis
());
userBtRegister
.
setCreatedAt
(
currentTime
);
userBtRegister
.
setUpdatedAt
(
currentTime
);
userBtRegisterService
.
save
(
userBtRegister
);
userBtRegisterService
.
save
(
userBtRegister
);
}
}
}
}
src/main/java/cn/quantgroup/xyqb/event/DetailRegisteredEventListener.java
View file @
3e05a56b
...
@@ -51,9 +51,6 @@ public class DetailRegisteredEventListener implements ApplicationListener<Regist
...
@@ -51,9 +51,6 @@ public class DetailRegisteredEventListener implements ApplicationListener<Regist
userDetail
.
setPhoneNo
(
phoneNo
);
userDetail
.
setPhoneNo
(
phoneNo
);
userDetail
.
setName
(
name
);
userDetail
.
setName
(
name
);
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
userDetail
.
setIdType
(
IdType
.
ID_CARD
);
Timestamp
currentTime
=
new
Timestamp
(
System
.
currentTimeMillis
());
userDetail
.
setCreatedAt
(
currentTime
);
userDetail
.
setUpdatedAt
(
currentTime
);
userDetail
.
setUserId
(
user
.
getId
());
userDetail
.
setUserId
(
user
.
getId
());
userDetail
.
setGender
(
cardInfo
.
getGender
());
userDetail
.
setGender
(
cardInfo
.
getGender
());
userDetailService
.
saveUserDetail
(
userDetail
);
userDetailService
.
saveUserDetail
(
userDetail
);
...
...
src/main/java/cn/quantgroup/xyqb/model/AddressRet.java
View file @
3e05a56b
...
@@ -37,7 +37,7 @@ public class AddressRet {
...
@@ -37,7 +37,7 @@ public class AddressRet {
ret
.
setCity
(
address
.
getCity
());
ret
.
setCity
(
address
.
getCity
());
ret
.
setAddress
(
address
.
getAddress
());
ret
.
setAddress
(
address
.
getAddress
());
ret
.
setCreatedAt
(
address
.
getCreatedAt
().
getTime
());
ret
.
setCreatedAt
(
address
.
getCreatedAt
().
getTime
());
ret
.
setUpdateAt
(
address
.
getUpdateAt
().
getTime
());
ret
.
setUpdateAt
(
address
.
getUpdate
d
At
().
getTime
());
return
ret
;
return
ret
;
}
}
}
}
src/main/java/cn/quantgroup/xyqb/model/ContactRet.java
View file @
3e05a56b
...
@@ -40,8 +40,8 @@ public class ContactRet implements Serializable {
...
@@ -40,8 +40,8 @@ public class ContactRet implements Serializable {
if
(
Objects
.
nonNull
(
c
.
getCreatedAt
())){
if
(
Objects
.
nonNull
(
c
.
getCreatedAt
())){
ret
.
setCreatedAt
(
c
.
getCreatedAt
().
getTime
());
ret
.
setCreatedAt
(
c
.
getCreatedAt
().
getTime
());
}
}
if
(
Objects
.
nonNull
(
c
.
getUpdateAt
()))
{
if
(
Objects
.
nonNull
(
c
.
getUpdate
d
At
()))
{
ret
.
setUpdateAt
(
c
.
getUpdateAt
().
getTime
());
ret
.
setUpdateAt
(
c
.
getUpdate
d
At
().
getTime
());
}
}
return
ret
;
return
ret
;
}
}
...
...
src/main/java/cn/quantgroup/xyqb/model/UserExtInfoRet.java
View file @
3e05a56b
...
@@ -46,7 +46,7 @@ public class UserExtInfoRet {
...
@@ -46,7 +46,7 @@ public class UserExtInfoRet {
ret
.
setHasCreditCard
(
defaultBoolean
(
extInfo
.
getHasCreditCard
()));
ret
.
setHasCreditCard
(
defaultBoolean
(
extInfo
.
getHasCreditCard
()));
ret
.
setMarryStatus
(
extInfo
.
getMarryStatus
());
ret
.
setMarryStatus
(
extInfo
.
getMarryStatus
());
ret
.
setCreatedAt
(
extInfo
.
getCreatedAt
().
getTime
());
ret
.
setCreatedAt
(
extInfo
.
getCreatedAt
().
getTime
());
ret
.
setUpdateAt
(
extInfo
.
getUpdateAt
().
getTime
());
ret
.
setUpdateAt
(
extInfo
.
getUpdate
d
At
().
getTime
());
return
ret
;
return
ret
;
}
}
}
}
src/main/java/cn/quantgroup/xyqb/model/UserSpouseRet.java
View file @
3e05a56b
...
@@ -30,8 +30,8 @@ public class UserSpouseRet {
...
@@ -30,8 +30,8 @@ public class UserSpouseRet {
ret
.
setUserId
(
userSpouse
.
getUserId
());
ret
.
setUserId
(
userSpouse
.
getUserId
());
ret
.
setSpouseName
(
userSpouse
.
getSpouseName
());
ret
.
setSpouseName
(
userSpouse
.
getSpouseName
());
ret
.
setSpousePhone
(
userSpouse
.
getSpousePhone
());
ret
.
setSpousePhone
(
userSpouse
.
getSpousePhone
());
if
(
userSpouse
.
getUpdateAt
()
!=
null
)
{
if
(
userSpouse
.
getUpdate
d
At
()
!=
null
)
{
ret
.
setUpdateAt
(
userSpouse
.
getUpdateAt
().
getTime
());
ret
.
setUpdateAt
(
userSpouse
.
getUpdate
d
At
().
getTime
());
}
}
if
(
userSpouse
.
getCreatedAt
()
!=
null
)
{
if
(
userSpouse
.
getCreatedAt
()
!=
null
)
{
ret
.
setCreatedAt
(
userSpouse
.
getCreatedAt
().
getTime
());
ret
.
setCreatedAt
(
userSpouse
.
getCreatedAt
().
getTime
());
...
...
src/main/java/cn/quantgroup/xyqb/repository/IChannelRepository.java
deleted
100644 → 0
View file @
e2fd8b2e
package
cn
.
quantgroup
.
xyqb
.
repository
;
import
cn.quantgroup.xyqb.entity.Channel
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @author mengfan.feng
* @time 2015-09-11 11:25
*/
public
interface
IChannelRepository
extends
JpaRepository
<
Channel
,
Long
>
{
}
src/main/java/cn/quantgroup/xyqb/repository/IUserJr58Repository.java
deleted
100644 → 0
View file @
e2fd8b2e
package
cn
.
quantgroup
.
xyqb
.
repository
;
import
cn.quantgroup.xyqb.entity.UserJr58
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @author mengfan.feng
* @time 2015-09-11 14:35
*/
public
interface
IUserJr58Repository
extends
JpaRepository
<
UserJr58
,
Long
>
{
}
src/main/java/cn/quantgroup/xyqb/service/auth/impl/UserAuthorizedServiceImpl.java
View file @
3e05a56b
...
@@ -34,7 +34,7 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService {
...
@@ -34,7 +34,7 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService {
@Resource
@Resource
private
IUserRepository
userRepository
;
private
IUserRepository
userRepository
;
@Cacheable
(
value
=
"user_authorized_idno_cache"
,
key
=
"#idNo"
,
unless
=
"#result == false"
,
cacheManager
=
"cacheManager"
)
//
@Cacheable(value = "user_authorized_idno_cache", key = "#idNo", unless = "#result == false", cacheManager = "cacheManager")
@Override
@Override
public
Boolean
hasUserAuthorized
(
String
idNo
)
{
public
Boolean
hasUserAuthorized
(
String
idNo
)
{
try
{
try
{
...
@@ -81,9 +81,6 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService {
...
@@ -81,9 +81,6 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService {
userAuthorized
.
setName
(
userAuthorizedParam
.
getName
());
userAuthorized
.
setName
(
userAuthorizedParam
.
getName
());
userAuthorized
.
setIdNo
(
userAuthorizedParam
.
getIdNo
());
userAuthorized
.
setIdNo
(
userAuthorizedParam
.
getIdNo
());
userAuthorized
.
setUserUuid
(
userAuthorizedParam
.
getUserUuid
());
userAuthorized
.
setUserUuid
(
userAuthorizedParam
.
getUserUuid
());
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
userAuthorized
.
setCreatedAt
(
now
);
userAuthorized
.
setUpdatedAt
(
now
);
try
{
try
{
userAuthorized
=
userAuthorizedRepository
.
save
(
userAuthorized
);
userAuthorized
=
userAuthorizedRepository
.
save
(
userAuthorized
);
...
@@ -95,7 +92,7 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService {
...
@@ -95,7 +92,7 @@ public class UserAuthorizedServiceImpl implements IUserAuthorizedService {
}
}
}
}
@Cacheable
(
value
=
"user_authorized_uuid_2_id_cache"
,
key
=
"#userUuid"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
//
@Cacheable(value = "user_authorized_uuid_2_id_cache", key = "#userUuid", unless = "#result == null", cacheManager = "cacheManager")
@Override
@Override
public
String
getUserAuthorizedId
(
String
userUuid
)
{
public
String
getUserAuthorizedId
(
String
userUuid
)
{
if
(
StringUtils
.
isBlank
(
userUuid
))
{
if
(
StringUtils
.
isBlank
(
userUuid
))
{
...
...
src/main/java/cn/quantgroup/xyqb/service/register/impl/UserRegisterServiceImpl.java
View file @
3e05a56b
...
@@ -94,9 +94,6 @@ public class UserRegisterServiceImpl implements IUserRegisterService {
...
@@ -94,9 +94,6 @@ public class UserRegisterServiceImpl implements IUserRegisterService {
if
(
StringUtils
.
isNotBlank
(
password
))
{
if
(
StringUtils
.
isNotBlank
(
password
))
{
user
.
setPassword
(
PasswordUtil
.
MD5WithSalt
(
password
));
user
.
setPassword
(
PasswordUtil
.
MD5WithSalt
(
password
));
}
}
Timestamp
currentTime
=
new
Timestamp
(
System
.
currentTimeMillis
());
user
.
setUpdatedAt
(
currentTime
);
user
.
setCreatedAt
(
currentTime
);
user
=
userService
.
saveUser
(
user
);
user
=
userService
.
saveUser
(
user
);
userRegisterParam
.
setUser
(
user
);
userRegisterParam
.
setUser
(
user
);
return
user
;
return
user
;
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/AddressServiceImpl.java
View file @
3e05a56b
...
@@ -22,7 +22,7 @@ public class AddressServiceImpl implements IAddressService {
...
@@ -22,7 +22,7 @@ public class AddressServiceImpl implements IAddressService {
private
IAddressRepository
addressRepository
;
private
IAddressRepository
addressRepository
;
@Override
@Override
@Cacheable
(
value
=
"addresscache"
,
key
=
"'address' + #userId"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
//
@Cacheable(value = "addresscache", key = "'address' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public
Address
findByUserId
(
Long
userId
)
{
public
Address
findByUserId
(
Long
userId
)
{
return
addressRepository
.
findByUserId
(
userId
);
return
addressRepository
.
findByUserId
(
userId
);
}
}
...
@@ -30,14 +30,11 @@ public class AddressServiceImpl implements IAddressService {
...
@@ -30,14 +30,11 @@ public class AddressServiceImpl implements IAddressService {
@Override
@Override
@CacheEvict
(
value
=
"addresscache"
,
key
=
"'address' + #addressObj.userId"
,
cacheManager
=
"cacheManager"
)
@CacheEvict
(
value
=
"addresscache"
,
key
=
"'address' + #addressObj.userId"
,
cacheManager
=
"cacheManager"
)
public
Address
save
(
Address
addressObj
)
{
public
Address
save
(
Address
addressObj
)
{
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
/* 替换所有,UTF-8编码时4字节的Emoji表情字符 */
/* 替换所有,UTF-8编码时4字节的Emoji表情字符 */
addressObj
.
setProvince
(
EmojiUtil
.
filterUnicode4
(
addressObj
.
getProvince
()));
addressObj
.
setProvince
(
EmojiUtil
.
filterUnicode4
(
addressObj
.
getProvince
()));
addressObj
.
setCity
(
EmojiUtil
.
filterUnicode4
(
addressObj
.
getCity
()));
addressObj
.
setCity
(
EmojiUtil
.
filterUnicode4
(
addressObj
.
getCity
()));
addressObj
.
setDistrict
(
EmojiUtil
.
filterUnicode4
(
addressObj
.
getDistrict
()));
addressObj
.
setDistrict
(
EmojiUtil
.
filterUnicode4
(
addressObj
.
getDistrict
()));
addressObj
.
setAddress
(
EmojiUtil
.
filterUnicode4
(
addressObj
.
getAddress
()));
addressObj
.
setAddress
(
EmojiUtil
.
filterUnicode4
(
addressObj
.
getAddress
()));
addressObj
.
setCreatedAt
(
now
);
addressObj
.
setUpdateAt
(
now
);
return
addressRepository
.
save
(
addressObj
);
return
addressRepository
.
save
(
addressObj
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/ContactServiceImpl.java
View file @
3e05a56b
...
@@ -28,7 +28,7 @@ public class ContactServiceImpl implements IContactService {
...
@@ -28,7 +28,7 @@ public class ContactServiceImpl implements IContactService {
private
IContactRepository
contactRepository
;
private
IContactRepository
contactRepository
;
@Override
@Override
@Cacheable
(
value
=
"contact"
,
key
=
"'contact:' + #trim + #userId"
,
unless
=
"#result == null or #result.size() == 0"
,
cacheManager
=
"cacheManager"
)
//
@Cacheable(value = "contact", key = "'contact:' + #trim + #userId", unless = "#result == null or #result.size() == 0", cacheManager = "cacheManager")
public
List
<
Contact
>
findByUserId
(
Long
userId
,
boolean
trim
)
{
public
List
<
Contact
>
findByUserId
(
Long
userId
,
boolean
trim
)
{
List
<
Contact
>
contacts
=
contactRepository
.
findByUserId
(
userId
);
List
<
Contact
>
contacts
=
contactRepository
.
findByUserId
(
userId
);
if
(
trim
)
{
if
(
trim
)
{
...
@@ -87,8 +87,6 @@ public class ContactServiceImpl implements IContactService {
...
@@ -87,8 +87,6 @@ public class ContactServiceImpl implements IContactService {
contact
.
setRelation
(
relation
);
contact
.
setRelation
(
relation
);
}
}
log
.
info
(
"修改前联系人信息:{}"
,
contact
);
log
.
info
(
"修改前联系人信息:{}"
,
contact
);
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
contact
.
setUpdateAt
(
now
);
contact
=
save
(
contact
);
contact
=
save
(
contact
);
return
contact
;
return
contact
;
}
}
...
@@ -102,7 +100,6 @@ public class ContactServiceImpl implements IContactService {
...
@@ -102,7 +100,6 @@ public class ContactServiceImpl implements IContactService {
private
void
mergeContacts
(
Long
userId
,
List
<
Contact
>
contacts
)
{
private
void
mergeContacts
(
Long
userId
,
List
<
Contact
>
contacts
)
{
// 当前联系人列表
// 当前联系人列表
List
<
Contact
>
userContact
=
contactRepository
.
findByUserId
(
userId
);
List
<
Contact
>
userContact
=
contactRepository
.
findByUserId
(
userId
);
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
for
(
int
i
=
0
;
i
<
contacts
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
contacts
.
size
();
i
++)
{
Contact
c
=
contacts
.
get
(
i
);
Contact
c
=
contacts
.
get
(
i
);
c
.
setId
(
null
);
c
.
setId
(
null
);
...
@@ -110,8 +107,6 @@ public class ContactServiceImpl implements IContactService {
...
@@ -110,8 +107,6 @@ public class ContactServiceImpl implements IContactService {
if
(
Objects
.
isNull
(
c
.
getRelation
())){
if
(
Objects
.
isNull
(
c
.
getRelation
())){
c
.
setRelation
(
Relation
.
OTHER
);
c
.
setRelation
(
Relation
.
OTHER
);
}
}
c
.
setCreatedAt
(
now
);
c
.
setUpdateAt
(
now
);
if
(
CollectionUtils
.
isEmpty
(
userContact
)
||
userContact
.
size
()
<=
i
)
{
if
(
CollectionUtils
.
isEmpty
(
userContact
)
||
userContact
.
size
()
<=
i
)
{
continue
;
continue
;
}
}
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
View file @
3e05a56b
...
@@ -191,7 +191,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
...
@@ -191,7 +191,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
throw
new
DataException
(
"数据不存在。"
);
throw
new
DataException
(
"数据不存在。"
);
}
}
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
DONE
.
ordinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
DONE
.
ordinal
());
modifyPhoneNo
.
setUpdatedAt
(
new
Date
());
}
}
@Override
@Override
...
@@ -205,7 +204,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
...
@@ -205,7 +204,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
NO_ALLOW
.
ordinal
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
NO_ALLOW
.
ordinal
());
modifyPhoneNo
.
setApplyStatusReason
(
auditReq
.
getApplyStatusReason
());
modifyPhoneNo
.
setApplyStatusReason
(
auditReq
.
getApplyStatusReason
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
WAIT_4_USER_FEEDBACK
.
ordinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
WAIT_4_USER_FEEDBACK
.
ordinal
());
modifyPhoneNo
.
setUpdatedAt
(
new
Date
());
}
}
if
(
ModifyPhoneNoApplyStatusEnum
.
DONE
==
auditReq
.
getApplyStatus
())
{
if
(
ModifyPhoneNoApplyStatusEnum
.
DONE
==
auditReq
.
getApplyStatus
())
{
log
.
info
(
"audit userId = 【{}】, name = 【{}】, idCard = 【{}】, prevPhoneNo = 【{}】, "
+
log
.
info
(
"audit userId = 【{}】, name = 【{}】, idCard = 【{}】, prevPhoneNo = 【{}】, "
+
...
@@ -220,7 +218,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
...
@@ -220,7 +218,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
userService
.
modifyPhoneNo
(
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getCurPhoneNo
());
userService
.
modifyPhoneNo
(
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getCurPhoneNo
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
DONE
.
ordinal
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
DONE
.
ordinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
WAIT_4_USER_FEEDBACK
.
ordinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
WAIT_4_USER_FEEDBACK
.
ordinal
());
modifyPhoneNo
.
setUpdatedAt
(
new
Date
());
}
}
}
}
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserBtRegisterServiceImpl.java
View file @
3e05a56b
...
@@ -20,7 +20,7 @@ public class UserBtRegisterServiceImpl implements IUserBtRegisterService {
...
@@ -20,7 +20,7 @@ public class UserBtRegisterServiceImpl implements IUserBtRegisterService {
private
IUserBtRegisterRepository
userBtRegisterRepository
;
private
IUserBtRegisterRepository
userBtRegisterRepository
;
@Override
@Override
@Cacheable
(
value
=
"btRegisterCache"
,
key
=
"'userId' + #userId"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
//
@Cacheable(value = "btRegisterCache", key = "'userId' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public
UserBtRegister
findByUserId
(
Long
userId
)
{
public
UserBtRegister
findByUserId
(
Long
userId
)
{
if
(
null
!=
userId
)
{
if
(
null
!=
userId
)
{
return
userBtRegisterRepository
.
findOne
((
root
,
query
,
cb
)
->
{
return
userBtRegisterRepository
.
findOne
((
root
,
query
,
cb
)
->
{
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserCenterServiceImpl.java
View file @
3e05a56b
...
@@ -28,7 +28,7 @@ public class UserCenterServiceImpl implements UserCenterService {
...
@@ -28,7 +28,7 @@ public class UserCenterServiceImpl implements UserCenterService {
private
IUserAttachedRepository
userAttachedRepository
;
private
IUserAttachedRepository
userAttachedRepository
;
@Override
@Override
@Cacheable
(
value
=
"userAttachedCache"
,
key
=
"'xyqbUserAttached' + #userId"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
//
@Cacheable(value = "userAttachedCache", key = "'xyqbUserAttached' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public
UserAttached
searchUserAttachedByUserId
(
long
userId
)
{
public
UserAttached
searchUserAttachedByUserId
(
long
userId
)
{
return
userAttachedRepository
.
findByUserId
(
userId
);
return
userAttachedRepository
.
findByUserId
(
userId
);
}
}
...
@@ -47,7 +47,6 @@ public class UserCenterServiceImpl implements UserCenterService {
...
@@ -47,7 +47,6 @@ public class UserCenterServiceImpl implements UserCenterService {
}
}
if
(!
Objects
.
equals
(
avatar
,
userAttached
.
getAvatar
())){
if
(!
Objects
.
equals
(
avatar
,
userAttached
.
getAvatar
())){
userAttached
.
setAvatar
(
avatar
);
userAttached
.
setAvatar
(
avatar
);
userAttached
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
userAttached
=
userAttachedRepository
.
save
(
userAttached
);
userAttached
=
userAttachedRepository
.
save
(
userAttached
);
}
}
return
userAttached
;
return
userAttached
;
...
@@ -64,7 +63,6 @@ public class UserCenterServiceImpl implements UserCenterService {
...
@@ -64,7 +63,6 @@ public class UserCenterServiceImpl implements UserCenterService {
}
}
if
(!
Objects
.
equals
(
nick
,
userAttached
.
getNick
())){
if
(!
Objects
.
equals
(
nick
,
userAttached
.
getNick
())){
userAttached
.
setNick
(
nick
);
userAttached
.
setNick
(
nick
);
userAttached
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
try
{
try
{
userAttached
=
userAttachedRepository
.
save
(
userAttached
);
userAttached
=
userAttachedRepository
.
save
(
userAttached
);
}
catch
(
ConstraintViolationException
e
){
}
catch
(
ConstraintViolationException
e
){
...
@@ -87,7 +85,6 @@ public class UserCenterServiceImpl implements UserCenterService {
...
@@ -87,7 +85,6 @@ public class UserCenterServiceImpl implements UserCenterService {
UserAttached
userAttached
=
userAttachedRepository
.
findByUserId
(
userId
);
UserAttached
userAttached
=
userAttachedRepository
.
findByUserId
(
userId
);
// 更新实例
// 更新实例
userAttached
=
Optional
.
ofNullable
(
userAttached
).
orElse
(
new
UserAttached
());
userAttached
=
Optional
.
ofNullable
(
userAttached
).
orElse
(
new
UserAttached
());
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
userAttached
.
setUserId
(
userId
);
userAttached
.
setUserId
(
userId
);
if
(
StringUtils
.
isBlank
(
userAttached
.
getAvatar
())){
if
(
StringUtils
.
isBlank
(
userAttached
.
getAvatar
())){
userAttached
.
setAvatar
(
avatar
);
userAttached
.
setAvatar
(
avatar
);
...
@@ -95,10 +92,6 @@ public class UserCenterServiceImpl implements UserCenterService {
...
@@ -95,10 +92,6 @@ public class UserCenterServiceImpl implements UserCenterService {
if
(
StringUtils
.
isBlank
(
userAttached
.
getNick
())){
if
(
StringUtils
.
isBlank
(
userAttached
.
getNick
())){
userAttached
.
setNick
(
nick
);
userAttached
.
setNick
(
nick
);
}
}
if
(
Objects
.
isNull
(
userAttached
.
getCreatedAt
())){
userAttached
.
setCreatedAt
(
now
);
}
userAttached
.
setUpdatedAt
(
now
);
return
userAttachedRepository
.
save
(
userAttached
);
return
userAttachedRepository
.
save
(
userAttached
);
}
}
}
}
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserExtInfoServiceImpl.java
View file @
3e05a56b
...
@@ -21,7 +21,7 @@ public class UserExtInfoServiceImpl implements IUserExtInfoService {
...
@@ -21,7 +21,7 @@ public class UserExtInfoServiceImpl implements IUserExtInfoService {
private
IUserExtInfoRepository
userExtInfoRepository
;
private
IUserExtInfoRepository
userExtInfoRepository
;
@Override
@Override
@Cacheable
(
value
=
"userextinfocache"
,
key
=
"'extinfo' + #userId"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
//
@Cacheable(value = "userextinfocache", key = "'extinfo' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public
UserExtInfo
findByUserId
(
Long
userId
)
{
public
UserExtInfo
findByUserId
(
Long
userId
)
{
return
userExtInfoRepository
.
findByUserId
(
userId
);
return
userExtInfoRepository
.
findByUserId
(
userId
);
}
}
...
@@ -30,13 +30,6 @@ public class UserExtInfoServiceImpl implements IUserExtInfoService {
...
@@ -30,13 +30,6 @@ public class UserExtInfoServiceImpl implements IUserExtInfoService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@CacheEvict
(
value
=
"userextinfocache"
,
key
=
"'extinfo' + #info.userId"
,
cacheManager
=
"cacheManager"
)
@CacheEvict
(
value
=
"userextinfocache"
,
key
=
"'extinfo' + #info.userId"
,
cacheManager
=
"cacheManager"
)
public
UserExtInfo
save
(
UserExtInfo
info
)
{
public
UserExtInfo
save
(
UserExtInfo
info
)
{
Timestamp
timestamp
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
info
.
getCreatedAt
()
==
null
)
{
info
.
setCreatedAt
(
timestamp
);
}
if
(
info
.
getUpdateAt
()
==
null
)
{
info
.
setUpdateAt
(
timestamp
);
}
return
userExtInfoRepository
.
save
(
info
);
return
userExtInfoRepository
.
save
(
info
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
View file @
3e05a56b
...
@@ -82,7 +82,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
...
@@ -82,7 +82,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
private
IContactService
contactService
;
private
IContactService
contactService
;
@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
findByPhoneInDb
(
String
phone
)
{
public
User
findByPhoneInDb
(
String
phone
)
{
return
userRepository
.
findByPhoneNo
(
phone
);
return
userRepository
.
findByPhoneNo
(
phone
);
}
}
...
@@ -136,13 +136,13 @@ public class UserServiceImpl implements IUserService, IBaseController {
...
@@ -136,13 +136,13 @@ public class UserServiceImpl implements IUserService, IBaseController {
}
}
@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
findByPhoneWithCache
(
String
phone
)
{
public
User
findByPhoneWithCache
(
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")
public
User
findByUuidWithCache
(
String
uuid
)
{
public
User
findByUuidWithCache
(
String
uuid
)
{
return
userRepository
.
findByUuid
(
uuid
);
return
userRepository
.
findByUuid
(
uuid
);
}
}
...
@@ -167,7 +167,6 @@ public class UserServiceImpl implements IUserService, IBaseController {
...
@@ -167,7 +167,6 @@ public class UserServiceImpl implements IUserService, IBaseController {
if
(
user
==
null
)
{
if
(
user
==
null
)
{
throw
new
RuntimeException
(
"用户["
+
phoneNo
+
"]不存在"
);
throw
new
RuntimeException
(
"用户["
+
phoneNo
+
"]不存在"
);
}
}
user
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
user
.
setPassword
(
PasswordUtil
.
MD5WithSalt
(
password
));
user
.
setPassword
(
PasswordUtil
.
MD5WithSalt
(
password
));
user
=
userRepository
.
save
(
user
);
user
=
userRepository
.
save
(
user
);
stringRedisTemplate
.
expire
(
"usercache:xyqbuser"
+
phoneNo
,
1L
,
TimeUnit
.
MILLISECONDS
);
stringRedisTemplate
.
expire
(
"usercache:xyqbuser"
+
phoneNo
,
1L
,
TimeUnit
.
MILLISECONDS
);
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserSpouseServiceImpl.java
View file @
3e05a56b
...
@@ -15,7 +15,7 @@ public class UserSpouseServiceImpl implements IUserSpouseService {
...
@@ -15,7 +15,7 @@ public class UserSpouseServiceImpl implements IUserSpouseService {
private
IUserSpouseRepository
userSpouseRepository
;
private
IUserSpouseRepository
userSpouseRepository
;
@Override
@Override
@Cacheable
(
value
=
"userSpouseCache"
,
key
=
"'spouse' + #userId"
,
unless
=
"#result == null"
,
cacheManager
=
"cacheManager"
)
//
@Cacheable(value = "userSpouseCache", key = "'spouse' + #userId", unless = "#result == null", cacheManager = "cacheManager")
public
UserSpouse
findByUserId
(
Long
userId
)
{
public
UserSpouse
findByUserId
(
Long
userId
)
{
return
userSpouseRepository
.
findByUserId
(
userId
);
return
userSpouseRepository
.
findByUserId
(
userId
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/service/user/vo/UserDetailVO.java
View file @
3e05a56b
...
@@ -84,7 +84,6 @@ public class UserDetailVO {
...
@@ -84,7 +84,6 @@ public class UserDetailVO {
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/test/java/service/UserServiceTest.java
View file @
3e05a56b
...
@@ -66,9 +66,6 @@ public class UserServiceTest {
...
@@ -66,9 +66,6 @@ public class UserServiceTest {
addressObj
.
setProvince
(
"悉尼"
);
addressObj
.
setProvince
(
"悉尼"
);
addressObj
.
setProvinceCode
(
1L
);
addressObj
.
setProvinceCode
(
1L
);
addressObj
.
setAddress
(
"嘻哈"
);
addressObj
.
setAddress
(
"嘻哈"
);
Timestamp
timestamp
=
Timestamp
.
valueOf
(
LocalDateTime
.
now
());
addressObj
.
setCreatedAt
(
timestamp
);
addressObj
.
setUpdateAt
(
timestamp
);
return
Arrays
.
asList
(
new
Object
[][]{{
addressObj
}});
return
Arrays
.
asList
(
new
Object
[][]{{
addressObj
}});
}
}
...
...
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