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
59027d3a
Commit
59027d3a
authored
Dec 08, 2021
by
guangjing.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除主键生成格式,新建对象
parent
bde9923a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
CustomerInfoEntity.java
...in/java/cn/quantgroup/xyqb/entity/CustomerInfoEntity.java
+1
-1
CustomerLoginEntity.java
...n/java/cn/quantgroup/xyqb/entity/CustomerLoginEntity.java
+1
-1
ProductLoginEntity.java
...in/java/cn/quantgroup/xyqb/entity/ProductLoginEntity.java
+1
-1
OauthLoginInfoServiceImpl.java
...oup/xyqb/service/user/impl/OauthLoginInfoServiceImpl.java
+4
-4
No files found.
src/main/java/cn/quantgroup/xyqb/entity/CustomerInfoEntity.java
View file @
59027d3a
...
...
@@ -26,7 +26,7 @@ public class CustomerInfoEntity extends PartitionEntity implements Serializable
@Id
@Column
(
name
=
"ID"
,
nullable
=
false
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
//
@GeneratedValue(strategy = GenerationType.IDENTITY)
private
long
id
;
@Column
(
name
=
"CUSTOMER_ID"
,
nullable
=
false
)
...
...
src/main/java/cn/quantgroup/xyqb/entity/CustomerLoginEntity.java
View file @
59027d3a
...
...
@@ -25,7 +25,7 @@ public class CustomerLoginEntity extends PartitionEntity implements Serializable
@Id
@Column
(
name
=
"ID"
,
nullable
=
false
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
//
@GeneratedValue(strategy = GenerationType.IDENTITY)
private
long
id
;
@Column
(
name
=
"INSTITUTION_ID"
,
nullable
=
false
,
length
=
4
)
...
...
src/main/java/cn/quantgroup/xyqb/entity/ProductLoginEntity.java
View file @
59027d3a
...
...
@@ -27,7 +27,7 @@ public class ProductLoginEntity extends PartitionEntity implements Serializable
@Id
@Column
(
name
=
"ID"
,
nullable
=
false
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
//
@GeneratedValue(strategy = GenerationType.IDENTITY)
private
long
id
;
@Column
(
name
=
"CUSTOMER_ID"
,
nullable
=
false
)
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/OauthLoginInfoServiceImpl.java
View file @
59027d3a
...
...
@@ -50,11 +50,11 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
String
productId
=
oauthClientDetailsEntity
.
getProductId
();
String
phoneNo
=
user
.
getPhoneNo
();
Long
userId
=
user
.
getId
();
ProductLoginEntity
p
roductLoginEntity
=
productLoginRepository
.
findFirstByInstitutionIdAndProductIdAndPhoneNo
(
institutionId
,
productId
,
phoneNo
);
log
.
info
(
"=findProductLoginEntity -> {}"
,
JSON
.
toJSONString
(
p
roductLoginEntity
));
ProductLoginEntity
findP
roductLoginEntity
=
productLoginRepository
.
findFirstByInstitutionIdAndProductIdAndPhoneNo
(
institutionId
,
productId
,
phoneNo
);
log
.
info
(
"=findProductLoginEntity -> {}"
,
JSON
.
toJSONString
(
findP
roductLoginEntity
));
long
uuid
=
0L
;
// 如果找不到该用户就创建
if
(
p
roductLoginEntity
==
null
)
{
if
(
findP
roductLoginEntity
==
null
)
{
// 添加用户到产品登录表
long
customerId
=
atomicSequencer
.
nextId
();
// long id = session.nextId();
...
...
@@ -63,7 +63,7 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
uuid
=
RandomSequencer
.
randomUUID
(
customerId
);
ProductLoginEntity
entity
=
new
ProductLoginEntity
();
Integer
partitionKey
=
atomicSequencer
.
partitionKey
(
customerId
);
productLoginEntity
=
EntityBuilder
.
productLogin
(
productId
,
institutionId
,
phoneNo
,
customerId
,
customerName
,
partitionKey
,
id
);
ProductLoginEntity
productLoginEntity
=
EntityBuilder
.
productLogin
(
productId
,
institutionId
,
phoneNo
,
customerId
,
customerName
,
partitionKey
,
id
);
productLoginEntity
.
setExtensionAccountId
(
userId
);
log
.
info
(
"=addLoginInfo=save begin productLoginRepository={}"
,
JSON
.
toJSONString
(
productLoginEntity
));
productLoginRepository
.
save
(
productLoginEntity
);
...
...
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