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
3399be45
Commit
3399be45
authored
Feb 12, 2020
by
xiaoguang.xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
非关键代码,使用 baseEntity 生成createdAt&updatedAt
parent
88f90166
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
59 additions
and
171 deletions
+59
-171
InnerController.java
...tgroup/xyqb/controller/internal/user/InnerController.java
+0
-8
UserCenterController.java
...controller/internal/user/center/UserCenterController.java
+0
-6
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
ModifyPhoneNo.java
src/main/java/cn/quantgroup/xyqb/entity/ModifyPhoneNo.java
+1
-21
UserAttached.java
src/main/java/cn/quantgroup/xyqb/entity/UserAttached.java
+1
-9
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
+1
-12
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
AddressRet.java
src/main/java/cn/quantgroup/xyqb/model/AddressRet.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
+2
-2
ModifyPhoneNoServiceImpl.java
...roup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
+0
-3
UserCenterServiceImpl.java
...ntgroup/xyqb/service/user/impl/UserCenterServiceImpl.java
+0
-7
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/internal/user/InnerController.java
View file @
3399be45
...
...
@@ -519,9 +519,6 @@ public class InnerController implements IBaseController {
Address
addressObj
=
addressService
.
findByUserId
(
userId
);
if
(
addressObj
==
null
)
{
addressObj
=
new
Address
();
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
addressObj
.
setCreatedAt
(
now
);
addressObj
.
setUpdateAt
(
now
);
}
addressObj
.
setUserId
(
userId
);
addressObj
.
setProvince
(
province
);
...
...
@@ -546,13 +543,10 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
"用户ID不能为空"
,
null
);
}
UserExtInfo
info
=
userExtInfoService
.
findByUserId
(
userId
);
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
info
==
null
)
{
info
=
new
UserExtInfo
();
info
.
setUserId
(
userId
);
info
.
setCreatedAt
(
now
);
}
info
.
setUpdateAt
(
now
);
if
(
incomeEnum
!=
null
)
{
info
.
setIncomeEnum
(
cn
.
quantgroup
.
user
.
enums
.
IncomeEnum
.
valueOf
(
incomeEnum
.
name
()));
}
...
...
@@ -946,12 +940,10 @@ public class InnerController implements IBaseController {
Timestamp
timestamp
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
userSpouse
==
null
)
{
userSpouse
=
new
UserSpouse
(
userId
);
userSpouse
.
setCreatedAt
(
timestamp
);
}
userSpouse
.
setSpouseName
(
status
==
MaritalStatus
.
MARRIED
?
spouseName
:
""
);
userSpouse
.
setSpousePhone
(
status
==
MaritalStatus
.
MARRIED
?
spousePhone
:
""
);
userSpouse
.
setStatus
(
cn
.
quantgroup
.
user
.
enums
.
MaritalStatus
.
valueOf
(
status
.
name
()));
userSpouse
.
setUpdateAt
(
timestamp
);
userSpouse
=
userSpouseService
.
save
(
userSpouse
);
return
JsonResult
.
buildSuccessResult
(
null
,
UserSpouseRet
.
getUserSpouseRet
(
userSpouse
));
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/center/UserCenterController.java
View file @
3399be45
...
...
@@ -253,10 +253,8 @@ public class UserCenterController {
}
//查询用户是否有保存地址信息
Address
addressInfo
=
addressService
.
findByUserId
(
userId
);
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
null
==
addressInfo
)
{
addressInfo
=
new
Address
();
addressInfo
.
setCreatedAt
(
now
);
}
addressInfo
.
setUserId
(
userId
);
addressInfo
.
setProvince
(
province
);
...
...
@@ -266,7 +264,6 @@ public class UserCenterController {
addressInfo
.
setDistrictCode
(
districtCode
);
addressInfo
.
setDistrict
(
district
);
addressInfo
.
setAddress
(
address
);
addressInfo
.
setUpdateAt
(
now
);
addressService
.
save
(
addressInfo
);
return
JsonResult
.
buildSuccessResult
(
null
,
addressInfo
);
}
...
...
@@ -336,13 +333,10 @@ public class UserCenterController {
}
//查询用户是否保存过.
UserExtInfo
userExtInfo
=
userExtInfoService
.
findByUserId
(
userId
);
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
null
==
userExtInfo
)
{
userExtInfo
=
new
UserExtInfo
();
userExtInfo
.
setUserId
(
userId
);
}
userExtInfo
.
setCreatedAt
(
now
);
userExtInfo
.
setUpdateAt
(
now
);
userExtInfo
.
setEducationEnum
(
educationEnum
);
userExtInfo
.
setMarryStatus
(
maritalStatus
);
userExtInfo
.
setOccupationEnum
(
occupationEnum
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/modifyphoneno/req/Step1Req.java
View file @
3399be45
...
...
@@ -65,9 +65,6 @@ public class Step1Req implements Serializable {
public
static
ModifyPhoneNo
adapt
(
Step1Req
step1Req
)
{
ModifyPhoneNo
modifyPhoneNo
=
new
ModifyPhoneNo
();
BeanUtils
.
copyProperties
(
step1Req
,
modifyPhoneNo
);
Date
date
=
new
Date
();
modifyPhoneNo
.
setCreatedAt
(
date
);
modifyPhoneNo
.
setUpdatedAt
(
date
);
return
modifyPhoneNo
;
}
}
src/main/java/cn/quantgroup/xyqb/entity/Address.java
View file @
3399be45
...
...
@@ -13,14 +13,10 @@ import java.sql.Timestamp;
@Data
@Entity
@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
;
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
private
Long
userId
;
@Column
(
name
=
"province_code"
)
...
...
@@ -37,15 +33,7 @@ public class Address implements Serializable {
private
String
district
;
@Column
(
name
=
"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
()
{
return
province
+
"(省)"
+
city
+
"(市)"
+
district
+
"(区/县)"
+
address
;
...
...
src/main/java/cn/quantgroup/xyqb/entity/BaseEntity.java
0 → 100644
View file @
3399be45
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/ModifyPhoneNo.java
View file @
3399be45
...
...
@@ -16,15 +16,9 @@ import java.util.Date;
@Data
@Entity
@Table
(
name
=
"user_modify_phone_no"
)
public
class
ModifyPhoneNo
implements
Serializable
{
public
class
ModifyPhoneNo
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
7797532159380593454L
;
/**
* id
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
/**
* user.id
...
...
@@ -90,18 +84,4 @@ public class ModifyPhoneNo implements Serializable {
*/
@Column
(
name
=
"processing_status"
)
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/UserAttached.java
View file @
3399be45
...
...
@@ -12,19 +12,11 @@ import java.sql.Timestamp;
@Data
@Entity
@Table
(
name
=
"user_attached"
)
public
class
UserAttached
implements
Serializable
{
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
public
class
UserAttached
extends
BaseEntity
implements
Serializable
{
@Column
(
name
=
"user_id"
)
private
Long
userId
;
@Column
(
name
=
"avatar"
)
private
String
avatar
;
@Column
(
name
=
"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/UserExtInfo.java
View file @
3399be45
...
...
@@ -14,13 +14,9 @@ import java.sql.Timestamp;
@Data
@Entity
@Table
(
name
=
"user_ext_info"
)
public
class
UserExtInfo
implements
Serializable
{
public
class
UserExtInfo
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"id"
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
private
Long
userId
;
@Column
(
name
=
"means_of_income_payment"
)
...
...
@@ -41,14 +37,10 @@ public class UserExtInfo implements Serializable {
private
Boolean
hasCreditCard
=
false
;
@Column
(
name
=
"marry_status"
)
private
MaritalStatus
marryStatus
=
MaritalStatus
.
UNKNOWN
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updateAt
;
public
XUserExtInfo
toXUserExtInfo
()
{
XUserExtInfo
xUserExtInfo
=
new
XUserExtInfo
();
xUserExtInfo
.
setId
(
this
.
id
);
xUserExtInfo
.
setId
(
getId
()
);
xUserExtInfo
.
setUserId
(
this
.
userId
);
xUserExtInfo
.
setEducationEnum
(
cn
.
quantgroup
.
motan
.
enums
.
EducationEnum
.
valueOf
(
this
.
educationEnum
.
name
()));
xUserExtInfo
.
setIncomeEnum
(
cn
.
quantgroup
.
motan
.
enums
.
IncomeEnum
.
valueOf
(
this
.
incomeEnum
.
name
()));
...
...
@@ -58,8 +50,8 @@ public class UserExtInfo implements Serializable {
xUserExtInfo
.
setHasSocialSecurity
(
this
.
hasSocialSecurity
);
xUserExtInfo
.
setHasCreditCard
(
this
.
hasCreditCard
);
xUserExtInfo
.
setMarryStatus
(
cn
.
quantgroup
.
motan
.
enums
.
MaritalStatus
.
valueOf
(
this
.
marryStatus
.
name
()));
xUserExtInfo
.
setCreatedAt
(
this
.
createdAt
);
xUserExtInfo
.
setUpdateAt
(
this
.
updateAt
);
xUserExtInfo
.
setCreatedAt
(
getCreatedAt
()
);
xUserExtInfo
.
setUpdateAt
(
getUpdatedAt
()
);
return
xUserExtInfo
;
}
}
src/main/java/cn/quantgroup/xyqb/entity/UserHashMapping.java
View file @
3399be45
...
...
@@ -12,18 +12,13 @@ import java.sql.Timestamp;
@Entity
@Table
(
name
=
"user_hash_mapping"
)
@NoArgsConstructor
public
class
UserHashMapping
implements
Serializable
{
public
class
UserHashMapping
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
public
UserHashMapping
(
Long
userId
)
{
this
.
userId
=
userId
;
}
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Column
(
name
=
"user_id"
)
private
Long
userId
;
...
...
@@ -39,25 +34,6 @@ public class UserHashMapping implements Serializable {
@Column
(
name
=
"id_no_md5_short"
)
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
)
{
this
.
phoneNoMd5
=
phoneNoMd5
;
this
.
phoneNoMd5Short
=
HashUtil
.
crc32
(
phoneNoMd5
);
...
...
src/main/java/cn/quantgroup/xyqb/entity/UserHashPhoneNoIdNoMapping.java
View file @
3399be45
...
...
@@ -8,19 +8,12 @@ import java.sql.Timestamp;
@Data
@Entity
@Table
(
name
=
"user_hash_phone_no_id_no_mapping"
)
public
class
UserHashPhoneNoIdNoMapping
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
public
class
UserHashPhoneNoIdNoMapping
extends
BaseEntity
{
@Column
(
name
=
"user_id"
)
private
Long
userId
;
@Column
(
name
=
"phone_no_id_no_md5"
)
private
String
phoneNoIdNoMd5
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
;
public
UserHashPhoneNoIdNoMapping
()
{
}
...
...
@@ -28,16 +21,4 @@ public class UserHashPhoneNoIdNoMapping {
public
UserHashPhoneNoIdNoMapping
(
Long
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
View file @
3399be45
...
...
@@ -17,15 +17,10 @@ import java.sql.Timestamp;
@Getter
@Setter
@ToString
public
class
UserJr58
implements
Serializable
{
public
class
UserJr58
extends
BaseEntity
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
;
...
...
@@ -68,12 +63,6 @@ public class UserJr58 implements Serializable {
@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"
)
...
...
src/main/java/cn/quantgroup/xyqb/entity/UserSpouse.java
View file @
3399be45
...
...
@@ -16,13 +16,9 @@ import java.sql.Timestamp;
@Setter
@ToString
@NoArgsConstructor
public
class
UserSpouse
implements
Serializable
{
public
class
UserSpouse
extends
BaseEntity
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
;
...
...
@@ -33,12 +29,6 @@ public class UserSpouse implements Serializable {
@Column
(
name
=
"spouse_name"
)
private
String
spouseName
;
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Timestamp
updateAt
;
@Column
(
name
=
"status"
)
private
MaritalStatus
status
;
...
...
src/main/java/cn/quantgroup/xyqb/entity/WechatUserInfo.java
View file @
3399be45
...
...
@@ -15,13 +15,9 @@ import java.sql.Timestamp;
@Entity
@Table
(
name
=
"wechat_userinfo"
)
@Data
public
class
WechatUserInfo
implements
Serializable
{
public
class
WechatUserInfo
extends
BaseEntity
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
=
"open_id"
)
...
...
@@ -42,10 +38,6 @@ public class WechatUserInfo implements Serializable {
private
String
country
;
@Column
(
name
=
"head_img_url"
)
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
()
{
...
...
src/main/java/cn/quantgroup/xyqb/event/AddressRegisteredEventListener.java
View file @
3399be45
...
...
@@ -30,9 +30,6 @@ public class AddressRegisteredEventListener implements ApplicationListener<Regis
}
User
user
=
userRegisterParam
.
getUser
();
address
.
setUserId
(
user
.
getId
());
Timestamp
currentTime
=
new
Timestamp
(
System
.
currentTimeMillis
());
address
.
setCreatedAt
(
currentTime
);
address
.
setUpdateAt
(
currentTime
);
addressRepository
.
save
(
address
);
}
}
src/main/java/cn/quantgroup/xyqb/model/AddressRet.java
View file @
3399be45
...
...
@@ -37,7 +37,7 @@ public class AddressRet {
ret
.
setCity
(
address
.
getCity
());
ret
.
setAddress
(
address
.
getAddress
());
ret
.
setCreatedAt
(
address
.
getCreatedAt
().
getTime
());
ret
.
setUpdateAt
(
address
.
getUpdateAt
().
getTime
());
ret
.
setUpdateAt
(
address
.
getUpdate
d
At
().
getTime
());
return
ret
;
}
}
src/main/java/cn/quantgroup/xyqb/model/UserExtInfoRet.java
View file @
3399be45
...
...
@@ -46,7 +46,7 @@ public class UserExtInfoRet {
ret
.
setHasCreditCard
(
defaultBoolean
(
extInfo
.
getHasCreditCard
()));
ret
.
setMarryStatus
(
extInfo
.
getMarryStatus
());
ret
.
setCreatedAt
(
extInfo
.
getCreatedAt
().
getTime
());
ret
.
setUpdateAt
(
extInfo
.
getUpdateAt
().
getTime
());
ret
.
setUpdateAt
(
extInfo
.
getUpdate
d
At
().
getTime
());
return
ret
;
}
}
src/main/java/cn/quantgroup/xyqb/model/UserSpouseRet.java
View file @
3399be45
...
...
@@ -30,8 +30,8 @@ public class UserSpouseRet {
ret
.
setUserId
(
userSpouse
.
getUserId
());
ret
.
setSpouseName
(
userSpouse
.
getSpouseName
());
ret
.
setSpousePhone
(
userSpouse
.
getSpousePhone
());
if
(
userSpouse
.
getUpdateAt
()
!=
null
)
{
ret
.
setUpdateAt
(
userSpouse
.
getUpdateAt
().
getTime
());
if
(
userSpouse
.
getUpdate
d
At
()
!=
null
)
{
ret
.
setUpdateAt
(
userSpouse
.
getUpdate
d
At
().
getTime
());
}
if
(
userSpouse
.
getCreatedAt
()
!=
null
)
{
ret
.
setCreatedAt
(
userSpouse
.
getCreatedAt
().
getTime
());
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
View file @
3399be45
...
...
@@ -191,7 +191,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
throw
new
DataException
(
"数据不存在。"
);
}
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
DONE
.
ordinal
());
modifyPhoneNo
.
setUpdatedAt
(
new
Date
());
}
@Override
...
...
@@ -205,7 +204,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
NO_ALLOW
.
ordinal
());
modifyPhoneNo
.
setApplyStatusReason
(
auditReq
.
getApplyStatusReason
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
WAIT_4_USER_FEEDBACK
.
ordinal
());
modifyPhoneNo
.
setUpdatedAt
(
new
Date
());
}
if
(
ModifyPhoneNoApplyStatusEnum
.
DONE
==
auditReq
.
getApplyStatus
())
{
log
.
info
(
"audit userId = 【{}】, name = 【{}】, idCard = 【{}】, prevPhoneNo = 【{}】, "
+
...
...
@@ -220,7 +218,6 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
userService
.
modifyPhoneNo
(
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getCurPhoneNo
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
DONE
.
ordinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
WAIT_4_USER_FEEDBACK
.
ordinal
());
modifyPhoneNo
.
setUpdatedAt
(
new
Date
());
}
}
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserCenterServiceImpl.java
View file @
3399be45
...
...
@@ -41,7 +41,6 @@ public class UserCenterServiceImpl implements UserCenterService {
}
if
(!
Objects
.
equals
(
avatar
,
userAttached
.
getAvatar
())){
userAttached
.
setAvatar
(
avatar
);
userAttached
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
userAttached
=
userAttachedRepository
.
save
(
userAttached
);
}
return
userAttached
;
...
...
@@ -58,7 +57,6 @@ public class UserCenterServiceImpl implements UserCenterService {
}
if
(!
Objects
.
equals
(
nick
,
userAttached
.
getNick
())){
userAttached
.
setNick
(
nick
);
userAttached
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
try
{
userAttached
=
userAttachedRepository
.
save
(
userAttached
);
}
catch
(
ConstraintViolationException
e
){
...
...
@@ -81,7 +79,6 @@ public class UserCenterServiceImpl implements UserCenterService {
UserAttached
userAttached
=
userAttachedRepository
.
findByUserId
(
userId
);
// 更新实例
userAttached
=
Optional
.
ofNullable
(
userAttached
).
orElse
(
new
UserAttached
());
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
userAttached
.
setUserId
(
userId
);
if
(
StringUtils
.
isBlank
(
userAttached
.
getAvatar
())){
userAttached
.
setAvatar
(
avatar
);
...
...
@@ -89,10 +86,6 @@ public class UserCenterServiceImpl implements UserCenterService {
if
(
StringUtils
.
isBlank
(
userAttached
.
getNick
())){
userAttached
.
setNick
(
nick
);
}
if
(
Objects
.
isNull
(
userAttached
.
getCreatedAt
())){
userAttached
.
setCreatedAt
(
now
);
}
userAttached
.
setUpdatedAt
(
now
);
return
userAttachedRepository
.
save
(
userAttached
);
}
}
src/main/java/cn/quantgroup/xyqb/service/user/vo/UserDetailVO.java
View file @
3399be45
...
...
@@ -84,7 +84,6 @@ public class UserDetailVO {
xUserDetail
.
setUpdatedAt
(
new
Timestamp
(
this
.
getUpdatedAt
()));
}
xUserDetail
.
setIsAuthenticated
(
this
.
getIsAuthenticated
());
xUserDetail
.
setEnable
(
this
.
getEnable
());
return
xUserDetail
;
...
...
src/test/java/service/UserServiceTest.java
View file @
3399be45
...
...
@@ -66,9 +66,6 @@ public class UserServiceTest {
addressObj
.
setProvince
(
"悉尼"
);
addressObj
.
setProvinceCode
(
1L
);
addressObj
.
setAddress
(
"嘻哈"
);
Timestamp
timestamp
=
Timestamp
.
valueOf
(
LocalDateTime
.
now
());
addressObj
.
setCreatedAt
(
timestamp
);
addressObj
.
setUpdateAt
(
timestamp
);
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