记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
董敬伟
liquidnet-bus-v1
Commits
7f8c6785
Commit
7f8c6785
authored
Jun 17, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+DM for adam;
parent
d1d3aba6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
267 additions
and
0 deletions
+267
-0
AdamUserInfo.java
.../java/com/liquidnet/service/adam/entity/AdamUserInfo.java
+12
-0
AdamDMAdminController.java
.../service/adam/controller/admin/AdamDMAdminController.java
+80
-0
DataMigrationProcessorService.java
...t/service/adam/service/DataMigrationProcessorService.java
+44
-0
DMUserInformationProcessor.java
...ce/adam/service/processor/DMUserInformationProcessor.java
+131
-0
No files found.
liquidnet-bus-do/liquidnet-service-adam-do/src/main/java/com/liquidnet/service/adam/entity/AdamUserInfo.java
View file @
7f8c6785
...
@@ -77,6 +77,18 @@ public class AdamUserInfo implements Serializable {
...
@@ -77,6 +77,18 @@ public class AdamUserInfo implements Serializable {
*/
*/
private
String
tagMe
;
private
String
tagMe
;
/**
* 旧数据迁移
* 融云token
*/
private
String
rongCloudToken
;
/**
* 旧数据迁移(stringid为上上版系统用户id,uid为上版系统用户id,旧数据迁移至当前版本延用原uid)
* 0-老融云token(用stringid生成),1重新生成过的token(用uid生成)
*/
private
Integer
rongCloudTag
;
private
String
comment
;
private
String
comment
;
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/admin/AdamDMAdminController.java
0 → 100644
View file @
7f8c6785
package
com
.
liquidnet
.
service
.
adam
.
controller
.
admin
;
import
com.liquidnet.service.adam.service.processor.DMUserInformationProcessor
;
import
com.liquidnet.service.base.ResponseDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.time.LocalDateTime
;
@Api
(
tags
=
"DM"
)
@Slf4j
@Validated
@RestController
@RequestMapping
(
"dm"
)
public
class
AdamDMAdminController
{
@Autowired
DMUserInformationProcessor
dmUserInformationProcessor
;
@ApiOperation
(
value
=
"user"
)
@GetMapping
(
value
=
{
"user"
})
public
ResponseDto
<
Object
>
dataMigrationForUser
(
@RequestParam
int
alis
,
@RequestParam
boolean
flg
)
{
if
(
verify
(
alis
))
dmUserInformationProcessor
.
handler
(
flg
);
return
ResponseDto
.
success
();
}
@ApiOperation
(
value
=
"tpa"
)
@GetMapping
(
value
=
{
"tpa"
})
public
ResponseDto
<
Object
>
dataMigrationForTpa
(
@RequestParam
int
alis
,
@RequestParam
boolean
flg
)
{
if
(
verify
(
alis
))
dmUserInformationProcessor
.
handler
(
flg
);
return
ResponseDto
.
success
();
}
@ApiOperation
(
value
=
"real"
)
@GetMapping
(
value
=
{
"real"
})
public
ResponseDto
<
Object
>
dataMigrationForReal
(
@RequestParam
int
alis
,
@RequestParam
boolean
flg
)
{
if
(
verify
(
alis
))
dmUserInformationProcessor
.
handler
(
flg
);
return
ResponseDto
.
success
();
}
@ApiOperation
(
value
=
"vip"
)
@GetMapping
(
value
=
{
"vip"
})
public
ResponseDto
<
Object
>
dataMigrationForVip
(
@RequestParam
int
alis
,
@RequestParam
boolean
flg
)
{
if
(
verify
(
alis
))
dmUserInformationProcessor
.
handler
(
flg
);
return
ResponseDto
.
success
();
}
@ApiOperation
(
value
=
"morder"
)
@GetMapping
(
value
=
{
"morder"
})
public
ResponseDto
<
Object
>
dataMigrationForMOrder
(
@RequestParam
int
alis
,
@RequestParam
boolean
flg
)
{
if
(
verify
(
alis
))
dmUserInformationProcessor
.
handler
(
flg
);
return
ResponseDto
.
success
();
}
@ApiOperation
(
value
=
"enters"
)
@GetMapping
(
value
=
{
"enters"
})
public
ResponseDto
<
Object
>
dataMigrationForEnters
(
@RequestParam
int
alis
,
@RequestParam
boolean
flg
)
{
if
(
verify
(
alis
))
dmUserInformationProcessor
.
handler
(
flg
);
return
ResponseDto
.
success
();
}
@ApiOperation
(
value
=
"addr"
)
@GetMapping
(
value
=
{
"addr"
})
public
ResponseDto
<
Object
>
dataMigrationForAddr
(
@RequestParam
int
alis
,
@RequestParam
boolean
flg
)
{
if
(
verify
(
alis
))
dmUserInformationProcessor
.
handler
(
flg
);
return
ResponseDto
.
success
();
}
private
boolean
verify
(
int
alis
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
int
hour
=
now
.
getHour
();
return
alis
==
Integer
.
parseInt
((
hour
>
12
?
hour
-
12
:
hour
)
+
""
+
now
.
getMinute
());
}
}
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/DataMigrationProcessorService.java
0 → 100644
View file @
7f8c6785
package
com
.
liquidnet
.
service
.
adam
.
service
;
import
lombok.SneakyThrows
;
import
java.sql.*
;
public
abstract
class
DataMigrationProcessorService
{
public
Connection
connection
=
null
;
public
PreparedStatement
statement
=
null
;
public
ResultSet
resultSet
=
null
;
public
void
handler
(
boolean
flg
)
{
preHandler
();
try
{
dataProcessing
(
flg
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
postHandler
();
}
@SneakyThrows
private
void
preHandler
()
{
Class
.
forName
(
"com.mysql.cj.jdbc.Driver"
);
connection
=
DriverManager
.
getConnection
(
"jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport"
,
"readonly"
,
"ZWDsf8Fy"
);
}
protected
abstract
void
dataProcessing
(
boolean
flg
);
private
void
postHandler
()
{
try
{
assert
resultSet
!=
null
;
resultSet
.
close
();
statement
.
close
();
connection
.
close
();
}
catch
(
SQLException
throwables
)
{
throwables
.
printStackTrace
();
}
}
}
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/processor/DMUserInformationProcessor.java
0 → 100644
View file @
7f8c6785
This diff is collapsed.
Click to expand it.
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