Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
relation
Commits
d6b94b5f
Commit
d6b94b5f
authored
Aug 06, 2025
by
zhuxiang
Browse files
增加删除节点
parent
02465905
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/platform/controller/NodeController.java
View file @
d6b94b5f
package
com.platform.controller
;
import
com.platform.model.dto.NodeDTO
;
import
com.platform.model.resp.Result
;
import
com.platform.page.TableDataInfo
;
import
com.platform.service.NodeService
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
...
...
@@ -22,4 +20,9 @@ public class NodeController extends BaseController {
startPage
(
nodeDTO
.
getPageNum
(),
nodeDTO
.
getPageSize
());
return
getDataTable
(
nodeService
.
mchRelationUser
(
nodeDTO
));
}
@DeleteMapping
(
"/delete"
)
public
Result
delete
(
@RequestParam
String
nodeName
)
{
return
toAjax
(
nodeService
.
deleteNode
(
nodeName
));
}
}
src/main/java/com/platform/controller/UserController.java
View file @
d6b94b5f
...
...
@@ -23,7 +23,7 @@ public class UserController extends BaseController {
@ApiOperation
(
value
=
"用户详情"
)
@GetMapping
(
"/detail"
)
public
Result
detail
(
@RequestParam
String
userName
,
@RequestParam
Str
in
g
caseId
)
{
public
Result
detail
(
@RequestParam
String
userName
,
@RequestParam
in
t
caseId
)
{
return
Result
.
data
(
userService
.
getDetail
(
userName
,
caseId
));
}
...
...
src/main/java/com/platform/mapper/ExcelDataMapper.java
View file @
d6b94b5f
...
...
@@ -24,7 +24,7 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryList
(
CaseDTO
caseDTO
);
List
<
AssociationVO
>
selectFinancialTransactions
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"caseId"
)
Str
in
g
caseId
);
List
<
AssociationVO
>
selectFinancialTransactions
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"caseId"
)
in
t
caseId
);
List
<
ExcelDataVO
>
queryListByPayUserList
(
@Param
(
"userList"
)
List
<
String
>
userList
,
@Param
(
"caseId"
)
int
caseId
);
...
...
@@ -34,6 +34,6 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
List
<
ExcelDataEntity
>
relationPage
(
@Param
(
"oneselfAccountList"
)
List
<
String
>
oneselfAccountList
,
@Param
(
"otherAccountList"
)
List
<
String
>
otherAccountList
);
List
<
ExcelDataEntity
>
queryInfoList
(
CaseDTO
caseDTO
);
List
<
AssociationVO
>
queryAccountTemporary
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"caseId"
)
Str
in
g
caseId
);
List
<
AssociationVO
>
queryAccountTemporary
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"caseId"
)
in
t
caseId
);
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
);
}
src/main/java/com/platform/service/ExcelDataService.java
View file @
d6b94b5f
...
...
@@ -49,7 +49,7 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List
<
ExcelDataVO
>
queryListByPayUserList
(
List
<
String
>
userList
,
int
caseId
);
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
Str
in
g
caseId
);
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
in
t
caseId
);
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
);
...
...
@@ -59,9 +59,12 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryListByPayUserName
(
ExcelDataDTO
excelDataDTO
);
List
<
ExcelDataEntity
>
queryListByPayeeName
(
String
oldName
,
String
caseId
);
List
<
AssociationVO
>
queryAccountTemporary
(
String
userName
,
String
caseId
);
List
<
AssociationVO
>
queryAccountTemporary
(
String
userName
,
int
caseId
);
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
queryListByPayeeName
(
String
oldName
,
int
caseId
);
void
deleteByPayUserName
(
String
nodeName
);
void
deleteByPayeeName
(
String
nodeName
);
}
src/main/java/com/platform/service/NodeService.java
View file @
d6b94b5f
...
...
@@ -15,4 +15,6 @@ public interface NodeService extends IService<NodeEntity> {
List
<
NodeVO
>
queryByCaseId
(
Integer
id
);
List
<
NodeVO
>
mchRelationUser
(
NodeDTO
nodeDTO
);
boolean
deleteNode
(
String
nodeName
);
}
src/main/java/com/platform/service/UserService.java
View file @
d6b94b5f
...
...
@@ -12,7 +12,7 @@ import com.platform.model.vo.UserVO;
import
java.util.List
;
public
interface
UserService
extends
IService
<
UserEntity
>
{
UserVO
getDetail
(
String
userName
,
Str
in
g
caseId
);
UserVO
getDetail
(
String
userName
,
in
t
caseId
);
boolean
updateUser
(
UserDTO
userDTO
);
...
...
src/main/java/com/platform/service/impl/ExcelDataServiceImpl.java
View file @
d6b94b5f
...
...
@@ -74,7 +74,7 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
}
@Override
public
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
Str
in
g
caseId
)
{
public
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
in
t
caseId
)
{
return
baseMapper
.
selectFinancialTransactions
(
userName
,
caseId
);
}
...
...
@@ -108,8 +108,20 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
}
@Override
public
List
<
AssociationVO
>
queryAccountTemporary
(
String
userName
,
String
caseId
)
{
return
baseMapper
.
queryAccountTemporary
(
userName
,
caseId
);
public
void
deleteByPayUserName
(
String
nodeName
)
{
baseMapper
.
delete
(
new
LambdaQueryWrapper
<
ExcelDataEntity
>()
.
eq
(
ExcelDataEntity:
:
getPayUserName
,
nodeName
));
}
@Override
public
void
deleteByPayeeName
(
String
nodeName
)
{
baseMapper
.
delete
(
new
LambdaQueryWrapper
<
ExcelDataEntity
>()
.
eq
(
ExcelDataEntity:
:
getPayeeName
,
nodeName
));
}
@Override
public
List
<
AssociationVO
>
queryAccountTemporary
(
String
userName
,
int
caseId
)
{
return
baseMapper
.
queryAccountTemporary
(
userName
,
caseId
);
}
@Override
...
...
src/main/java/com/platform/service/impl/GroupDetailServiceImpl.java
View file @
d6b94b5f
...
...
@@ -28,11 +28,9 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
@Override
public
List
<
GroupDetailEntity
>
queryList
(
GroupDetailDTO
groupDetailDTO
)
{
List
<
GroupDetailEntity
>
groupDetailEntityList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
GroupDetailEntity
>()
.
eq
(
GroupDetailEntity:
:
getGroupId
,
groupDetailDTO
.
getGroupId
()));
// 安全移除元素
groupDetailEntityList
.
removeIf
(
groupDetailEntity
->
groupDetailEntity
.
getUserName
().
contains
(
"商户"
));
return
groupDetailEntityList
;
return
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
GroupDetailEntity
>()
.
eq
(
GroupDetailEntity:
:
getGroupId
,
groupDetailDTO
.
getGroupId
())
.
notLike
(
GroupDetailEntity:
:
getUserName
,
"商户"
));
}
@Override
...
...
src/main/java/com/platform/service/impl/NodeServiceImpl.java
View file @
d6b94b5f
...
...
@@ -70,24 +70,21 @@ public class NodeServiceImpl extends ServiceImpl<NodeMapper, NodeEntity> impleme
}
List
<
NodeVO
>
result
=
Lists
.
newArrayList
();
excelDataEntityListNew
.
forEach
(
excelDataVO
->
{
NodeVO
org
=
new
NodeVO
();
if
(
excelDataVO
.
getAccountType
().
equals
(
"银联"
))
{
org
.
setNode
(
excelDataVO
.
getPayUserName
());
org
.
setNodeNum
(
excelDataVO
.
getNodeNum
());
org
.
setBankCode
(
excelDataVO
.
getPayeeBankCard
());
org
.
setNodeType
(
"银联"
);
result
.
add
(
org
);
}
else
{
NodeVO
person
=
new
NodeVO
();
person
.
setNode
(
excelDataVO
.
getPayUserName
());
person
.
setNodeNum
(
excelDataVO
.
getNodeNum
());
person
.
setLabel
(
excelDataVO
.
getLabel
());
person
.
setNodeType
(
"个人"
);
result
.
add
(
person
);
}
NodeVO
person
=
new
NodeVO
();
person
.
setNode
(
excelDataVO
.
getPayUserName
());
person
.
setNodeNum
(
excelDataVO
.
getNodeNum
());
person
.
setLabel
(
excelDataVO
.
getLabel
());
person
.
setNodeType
(
"个人"
);
result
.
add
(
person
);
});
return
result
;
}
@Override
public
boolean
deleteNode
(
String
nodeName
)
{
excelDataService
.
deleteByPayUserName
(
nodeName
);
excelDataService
.
deleteByPayeeName
(
nodeName
);
return
true
;
}
}
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
d6b94b5f
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.map.MapUtil;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
com.platform.exception.BusinessException
;
...
...
@@ -43,7 +44,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
private
ExcelDataService
excelDataService
;
@Override
public
UserVO
getDetail
(
String
userName
,
Str
in
g
caseId
)
{
public
UserVO
getDetail
(
String
userName
,
in
t
caseId
)
{
UserEntity
userEntity
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
.
eq
(
UserEntity:
:
getUserName
,
userName
).
eq
(
UserEntity:
:
getCaseId
,
caseId
));
if
(
ObjectUtils
.
isEmpty
(
userEntity
))
{
...
...
@@ -53,7 +54,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
}
}
private
UserVO
account
(
String
userName
,
Str
in
g
caseId
)
{
private
UserVO
account
(
String
userName
,
in
t
caseId
)
{
UserVO
userVO
=
new
UserVO
();
userVO
.
setUserName
(
userName
);
userVO
.
setCaseId
(
caseId
);
...
...
@@ -109,7 +110,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
}
@NotNull
private
UserVO
personnel
(
String
userName
,
Str
in
g
caseId
,
UserEntity
userEntity
)
{
private
UserVO
personnel
(
String
userName
,
in
t
caseId
,
UserEntity
userEntity
)
{
UserVO
userVO
=
DozerUtils
.
convertBean
(
userEntity
,
UserVO
.
class
);
if
(
userVO
!=
null
)
{
//查看用户账户列表
...
...
@@ -210,7 +211,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
excelDataList
=
excelDataService
.
cashFlow
(
userDTO
);
}
else
if
(
"2"
.
equals
(
userDTO
.
getIdentifier
()))
{
excelDataList
=
excelDataService
.
accountCashFlow
(
userDTO
);
}
else
{
}
else
{
return
null
;
}
for
(
ExcelDataEntity
excelDataEntity
:
excelDataList
)
{
...
...
@@ -289,6 +290,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
@Override
public
List
<
ExcelDataVO
>
queryUserLabel
(
List
<
String
>
userNameList
,
Integer
id
)
{
if
(
CollUtil
.
isEmpty
(
userNameList
))
{
return
Lists
.
newArrayList
();
}
return
baseMapper
.
queryUserLabel
(
userNameList
,
id
);
}
}
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