记得上下班打卡 | 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
38a6373f
Commit
38a6373f
authored
Sep 28, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sweet redis同步整理;同步用户整理
parent
7ce34196
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
20 deletions
+35
-20
RedisDataController.java
...rvice/sweet/controller/syncRedis/RedisDataController.java
+19
-12
UserDataController.java
...ervice/sweet/controller/syncRedis/UserDataController.java
+13
-5
RedisDataServiceImpl.java
...ce/sweet/service/impl/syncRedis/RedisDataServiceImpl.java
+1
-1
UserDataServiceImpl.java
...ice/sweet/service/impl/syncRedis/UserDataServiceImpl.java
+2
-2
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/syncRedis/
Jxl
DataController.java
→
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/syncRedis/
Redis
DataController.java
View file @
38a6373f
package
com
.
liquidnet
.
service
.
sweet
.
controller
.
syncRedis
;
package
com
.
liquidnet
.
service
.
sweet
.
controller
.
syncRedis
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.service.impl.syncRedis.
JxlData
Impl
;
import
com.liquidnet.service.sweet.service.impl.syncRedis.
RedisDataService
Impl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -9,14 +9,21 @@ import org.springframework.web.bind.annotation.PostMapping;
...
@@ -9,14 +9,21 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 同步redis数据
* </p>
*
* @author jiangxiulong
* @since 2021-08-12
*/
@Api
(
tags
=
"redis数据迁移-jxl"
)
@Api
(
tags
=
"redis数据迁移-jxl"
)
@RestController
@RestController
@RequestMapping
(
"sync"
)
@RequestMapping
(
"sync"
)
public
class
Jxl
DataController
{
public
class
Redis
DataController
{
@Autowired
@Autowired
private
JxlDataImpl
jxlData
;
private
RedisDataServiceImpl
redisDataService
;
/**
/**
* basicServices
* basicServices
...
@@ -25,14 +32,14 @@ public class JxlDataController {
...
@@ -25,14 +32,14 @@ public class JxlDataController {
@PostMapping
(
"basicServices/versions"
)
@PostMapping
(
"basicServices/versions"
)
@ApiOperation
(
"basicServices版本控制数据迁移-可以通过后台编辑"
)
@ApiOperation
(
"basicServices版本控制数据迁移-可以通过后台编辑"
)
public
ResponseDto
<
Boolean
>
basicServicesVersions
()
{
public
ResponseDto
<
Boolean
>
basicServicesVersions
()
{
Boolean
result
=
jxlData
.
basicServicesVersions
();
Boolean
result
=
redisDataService
.
basicServicesVersions
();
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
@PostMapping
(
"basicServices/upush"
)
@PostMapping
(
"basicServices/upush"
)
@ApiOperation
(
"basicServices推送数据迁移"
)
@ApiOperation
(
"basicServices推送数据迁移"
)
public
ResponseDto
<
Boolean
>
basicServicesUpush
()
{
public
ResponseDto
<
Boolean
>
basicServicesUpush
()
{
Boolean
result
=
jxlData
.
basicServicesUpush
();
Boolean
result
=
redisDataService
.
basicServicesUpush
();
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
...
@@ -43,7 +50,7 @@ public class JxlDataController {
...
@@ -43,7 +50,7 @@ public class JxlDataController {
@PostMapping
(
"kylin/banner"
)
@PostMapping
(
"kylin/banner"
)
@ApiOperation
(
"kylin-banner数据迁移-可以通过后台编辑"
)
@ApiOperation
(
"kylin-banner数据迁移-可以通过后台编辑"
)
public
ResponseDto
<
Boolean
>
kylinBanner
()
{
public
ResponseDto
<
Boolean
>
kylinBanner
()
{
Boolean
result
=
jxlData
.
kylinBanner
();
Boolean
result
=
redisDataService
.
kylinBanner
();
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
...
@@ -54,35 +61,35 @@ public class JxlDataController {
...
@@ -54,35 +61,35 @@ public class JxlDataController {
@PostMapping
(
"sweet/accessToken"
)
@PostMapping
(
"sweet/accessToken"
)
@ApiOperation
(
"sweet-AccessToken数据迁移-可不迁可自动生成"
)
@ApiOperation
(
"sweet-AccessToken数据迁移-可不迁可自动生成"
)
public
ResponseDto
<
Boolean
>
sweetAccessToken
()
{
public
ResponseDto
<
Boolean
>
sweetAccessToken
()
{
Boolean
result
=
jxlData
.
sweetAccessToken
();
Boolean
result
=
redisDataService
.
sweetAccessToken
();
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
@PostMapping
(
"sweet/answer"
)
@PostMapping
(
"sweet/answer"
)
@ApiOperation
(
"sweet-answer数据迁移"
)
@ApiOperation
(
"sweet-answer数据迁移"
)
public
ResponseDto
<
Boolean
>
sweetAnswer
()
{
public
ResponseDto
<
Boolean
>
sweetAnswer
()
{
Boolean
result
=
jxlData
.
sweetAnswer
();
Boolean
result
=
redisDataService
.
sweetAnswer
();
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
@PostMapping
(
"sweet/wechatUser/openId"
)
@PostMapping
(
"sweet/wechatUser/openId"
)
@ApiOperation
(
"sweet-wechatUser-openId数据迁移"
)
@ApiOperation
(
"sweet-wechatUser-openId数据迁移"
)
public
ResponseDto
<
Boolean
>
sweetOpenId
()
{
public
ResponseDto
<
Boolean
>
sweetOpenId
()
{
Boolean
result
=
jxlData
.
sweetOpenId
();
Boolean
result
=
redisDataService
.
sweetOpenId
();
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
@PostMapping
(
"sweet/wechatUser/unionId"
)
@PostMapping
(
"sweet/wechatUser/unionId"
)
@ApiOperation
(
"sweet-wechatUser-unionId数据迁移-这里也会同步unionIdStr会抛异常过滤掉"
)
@ApiOperation
(
"sweet-wechatUser-unionId数据迁移-这里也会同步unionIdStr会抛异常过滤掉"
)
public
ResponseDto
<
Boolean
>
sweetUnionId
()
{
public
ResponseDto
<
Boolean
>
sweetUnionId
()
{
Boolean
result
=
jxlData
.
sweetUnionId
();
Boolean
result
=
redisDataService
.
sweetUnionId
();
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
@PostMapping
(
"sweet/wechatUser/unionIdStr"
)
@PostMapping
(
"sweet/wechatUser/unionIdStr"
)
@ApiOperation
(
"sweet-wechatUser-unionIdStr数据迁移"
)
@ApiOperation
(
"sweet-wechatUser-unionIdStr数据迁移"
)
public
ResponseDto
<
Boolean
>
sweetUnionIdStr
()
{
public
ResponseDto
<
Boolean
>
sweetUnionIdStr
()
{
Boolean
result
=
jxlData
.
sweetUnionIdStr
();
Boolean
result
=
redisDataService
.
sweetUnionIdStr
();
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/syncRedis/
SweetWechatSync
DataController.java
→
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/syncRedis/
User
DataController.java
View file @
38a6373f
package
com
.
liquidnet
.
service
.
sweet
.
controller
.
syncRedis
;
package
com
.
liquidnet
.
service
.
sweet
.
controller
.
syncRedis
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.service.sweet.service.impl.
SweetWechatMpService
;
import
com.liquidnet.service.sweet.service.impl.
syncRedis.UserDataServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
...
@@ -17,14 +17,22 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -17,14 +17,22 @@ import org.springframework.web.bind.annotation.RestController;
import
java.io.*
;
import
java.io.*
;
/**
* <p>
* 外部用户注册、微信服务号关注用户数据同步
* </p>
*
* @author jiangxiulong
* @since 2021-08-12
*/
@Api
(
tags
=
"同步微信用户数据"
)
@Api
(
tags
=
"同步微信用户数据"
)
@RestController
@RestController
@RequestMapping
(
"/wechatSync"
)
@RequestMapping
(
"/wechatSync"
)
@Slf4j
@Slf4j
public
class
SweetWechatSync
DataController
{
public
class
User
DataController
{
@Autowired
@Autowired
private
SweetWechatMpService
sweetWechatMp
Service
;
private
UserDataServiceImpl
userData
Service
;
@GetMapping
(
"regMobile"
)
@GetMapping
(
"regMobile"
)
@ApiOperation
(
"注册"
)
@ApiOperation
(
"注册"
)
...
@@ -61,7 +69,7 @@ public class SweetWechatSyncDataController {
...
@@ -61,7 +69,7 @@ public class SweetWechatSyncDataController {
@ApiOperation
(
"关注用户"
)
@ApiOperation
(
"关注用户"
)
public
void
getUsers
()
{
public
void
getUsers
()
{
try
{
try
{
sweetWechatMp
Service
.
userInfo
();
userData
Service
.
userInfo
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"getUsers"
,
e
);
log
.
error
(
"getUsers"
,
e
);
}
}
...
@@ -74,7 +82,7 @@ public class SweetWechatSyncDataController {
...
@@ -74,7 +82,7 @@ public class SweetWechatSyncDataController {
})
})
public
void
getUser
(
@RequestParam
()
String
openId
)
{
public
void
getUser
(
@RequestParam
()
String
openId
)
{
try
{
try
{
sweetWechatMp
Service
.
getUser
(
openId
);
userData
Service
.
getUser
(
openId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"getUser"
,
e
);
log
.
error
(
"getUser"
,
e
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/syncRedis/
JxlData
Impl.java
→
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/syncRedis/
RedisDataService
Impl.java
View file @
38a6373f
...
@@ -26,7 +26,7 @@ import java.util.Set;
...
@@ -26,7 +26,7 @@ import java.util.Set;
@Service
@Service
@Slf4j
@Slf4j
public
class
JxlData
Impl
{
public
class
RedisDataService
Impl
{
@Autowired
@Autowired
private
RedisUtil
redisUtil
;
private
RedisUtil
redisUtil
;
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/
SweetWechatMpService
.java
→
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/
syncRedis/UserDataServiceImpl
.java
View file @
38a6373f
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
.
syncRedis
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
...
@@ -22,7 +22,7 @@ import java.util.List;
...
@@ -22,7 +22,7 @@ import java.util.List;
@Slf4j
@Slf4j
@Service
@Service
public
class
SweetWechatMpService
{
public
class
UserDataServiceImpl
{
@Autowired
@Autowired
WechatMpConfigure
wechatMpConfigure
;
WechatMpConfigure
wechatMpConfigure
;
...
...
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