Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
eacf2b87
Commit
eacf2b87
authored
Aug 19, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
941bcb5d
1ba5a602
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
22 deletions
+57
-22
BaseUserMemberBiz.java
.../github/wxiaoqi/security/admin/biz/BaseUserMemberBiz.java
+7
-0
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+6
-0
MyWalletCathBiz.java
...om/github/wxiaoqi/security/admin/biz/MyWalletCathBiz.java
+7
-0
DataController.java
...om/github/wxiaoqi/security/admin/rest/DataController.java
+37
-22
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BaseUserMemberBiz.java
View file @
eacf2b87
...
...
@@ -25,6 +25,7 @@ import tk.mybatis.mapper.weekend.WeekendSqls;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.Collection
;
import
java.util.List
;
/**
...
...
@@ -257,4 +258,10 @@ public class BaseUserMemberBiz extends BaseBiz<BaseUserMemberMapper, BaseUserMem
}
public
void
deleteByUserIds
(
Collection
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
BaseUserMember
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example
);
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
eacf2b87
...
...
@@ -364,4 +364,10 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
return
ObjectRestResponse
.
succ
();
}
public
void
deleteByUserIds
(
Collection
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
MyWallet
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example
);
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletCathBiz.java
View file @
eacf2b87
...
...
@@ -126,4 +126,11 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
public
WalletCathSumDto
sumCathAmount
(
Integer
userId
,
Integer
type
){
return
mapper
.
sumCathAmount
(
userId
,
type
);
}
public
void
deleteByUserIds
(
Collection
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
MyWalletCath
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example
);
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/DataController.java
View file @
eacf2b87
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
com.github.wxiaoqi.security.admin.biz.AppUserDetailBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserLoginBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserRelationBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserSellingWaterBiz
;
import
com.github.wxiaoqi.security.admin.biz.*
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.feign.ActivityFeign
;
import
com.xxfc.platform.order.feign.OrderFeign
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.tomcat.util.threads.ThreadPoolExecutor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.annotation.PostConstruct
;
import
java.util.*
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
* @author libin
...
...
@@ -22,42 +24,55 @@ import java.util.*;
* @description
* @data 2019/7/24 15:11
*/
@ConditionalOnProperty
(
prefix
=
"data.clean"
,
name
=
"enable"
,
havingValue
=
"true"
)
@ConditionalOnProperty
(
prefix
=
"data.clean"
,
name
=
"enable"
,
havingValue
=
"true"
)
@RequiredArgsConstructor
(
onConstructor
=
@__
({
@Autowired
}))
@RestController
@RequestMapping
(
"/app/unauth/user_data"
)
public
class
DataController
{
@PostConstruct
public
void
init
(){
System
.
out
.
println
(
"启动了****************************"
);
}
private
final
AppUserLoginBiz
appUserLoginBiz
;
private
final
AppUserDetailBiz
appUserDetailBiz
;
private
final
AppUserRelationBiz
appUserRelationBiz
;
private
final
AppUserSellingWaterBiz
appUserSellingWaterBiz
;
private
final
ActivityFeign
activityFeign
;
@Autowired
private
AppUserLoginBiz
appUserLoginBiz
;
private
final
MyWalletBiz
walletBiz
;
@Autowired
private
AppUserDetailBiz
appUserDetailBiz
;
private
final
MyWalletCathBiz
walletCathBiz
;
@Autowired
private
AppUserRelationBiz
appUserRelationBiz
;
private
final
BaseUserMemberBiz
userMemberBiz
;
@Autowired
private
AppUserSellingWaterBiz
appUserSellingWaterBiz
;
private
final
OrderFeign
orderFeign
;
@Autowired
private
ActivityFeign
activityFeign
;
@GetMapping
(
"/clearwithphone"
)
public
ObjectRestResponse
<
Void
>
clearData
(
@RequestParam
(
"phones"
)
List
<
String
>
phons
)
{
Map
<
String
,
Integer
>
phoneAndUserIdMapByPhones
=
appUserLoginBiz
.
findPhoneAndUserIdMapByPhones
(
phons
);
if
(
Objects
.
nonNull
(
phoneAndUserIdMapByPhones
)){
if
(
Objects
.
nonNull
(
phoneAndUserIdMapByPhones
))
{
Collection
<
Integer
>
userIds
=
phoneAndUserIdMapByPhones
.
values
();
//1.删除登录表信息
appUserLoginBiz
.
deleteByPhones
(
phons
);
//2.删除用户详情信息
appUserDetailBiz
.
deleteByUserIds
(
userIds
);
//3.删除用户关系表信息
appUserRelationBiz
.
deleteByMemberIds
(
userIds
);
//4.删除用户钱包
walletBiz
.
deleteByUserIds
(
userIds
);
//5.删除用户提现记录
walletCathBiz
.
deleteByUserIds
(
userIds
);
//6.删除会员信息
userMemberBiz
.
deleteByUserIds
(
userIds
);
//7.删除佣金数据
appUserSellingWaterBiz
.
deleteByMemberIds
(
userIds
);
activityFeign
.
clearDate
(
new
ArrayList
<>(
userIds
));
//8.清除活动和用户优惠券信息
activityFeign
.
clearDate
(
new
ArrayList
(
userIds
));
//9.消除租车订单与旅游订单信息
// orderFeign.clearDateByUserIds(new ArrayList(userIds));
}
return
ObjectRestResponse
.
succ
();
}
...
...
@@ -66,7 +81,7 @@ public class DataController {
public
ObjectRestResponse
<
Void
>
clearRelationphone
(
@RequestParam
(
"phones"
)
List
<
String
>
phons
)
{
Map
<
String
,
Integer
>
phoneAndUserIdMapByPhones
=
appUserLoginBiz
.
findPhoneAndUserIdMapByPhones
(
phons
);
if
(
Objects
.
nonNull
(
phoneAndUserIdMapByPhones
)){
if
(
Objects
.
nonNull
(
phoneAndUserIdMapByPhones
))
{
Collection
<
Integer
>
userIds
=
phoneAndUserIdMapByPhones
.
values
();
appUserRelationBiz
.
deleteByMemberIds
(
userIds
);
appUserSellingWaterBiz
.
deleteByMemberIds
(
userIds
);
...
...
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