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
c3d54feb
Commit
c3d54feb
authored
Sep 01, 2025
by
wujipeng
Browse files
人与人关系弹框分页-优化
parent
a6575947
Changes
6
Show whitespace changes
Inline
Side-by-side
src/main/java/com/platform/mapper/ExcelDataMapper.java
View file @
c3d54feb
...
...
@@ -40,4 +40,6 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryListByPayeeNameAndPayUserName
(
@Param
(
"payeeName"
)
String
payeeName
,
@Param
(
"caseId"
)
int
caseId
);
List
<
ExcelDataVO
>
queryListByGroupId
(
CaseDTO
caseDTO
);
List
<
ExcelDataVO
>
queryOtherAccountList
(
@Param
(
"otherUserName"
)
String
otherUserName
,
@Param
(
"caseId"
)
int
caseId
);
}
src/main/java/com/platform/service/ExcelDataService.java
View file @
c3d54feb
...
...
@@ -73,4 +73,5 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List
<
ExcelDataVO
>
queryListByGroupId
(
CaseDTO
caseDTO
);
List
<
ExcelDataEntity
>
queryListByCaseIdAndPayeeName
(
int
caseId
,
String
payUserName
);
List
<
ExcelDataVO
>
queryOtherAccountList
(
String
otherUserName
,
int
caseId
);
}
src/main/java/com/platform/service/UserAccountService.java
View file @
c3d54feb
...
...
@@ -2,6 +2,7 @@ package com.platform.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.platform.model.entity.UserAccountEntity
;
import
com.platform.model.vo.ExcelDataVO
;
import
java.util.List
;
...
...
src/main/java/com/platform/service/impl/ExcelDataServiceImpl.java
View file @
c3d54feb
...
...
@@ -145,4 +145,9 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
public
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
)
{
return
baseMapper
.
accountCashFlow
(
userDTO
);
}
@Override
public
List
<
ExcelDataVO
>
queryOtherAccountList
(
String
otherUserName
,
int
caseId
)
{
return
baseMapper
.
queryOtherAccountList
(
otherUserName
,
caseId
);
}
}
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
c3d54feb
...
...
@@ -241,16 +241,22 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
public
EveryoneVO
relationPage
(
UserDTO
userDTO
)
{
EveryoneVO
everyoneVO
=
new
EveryoneVO
();
//标题
everyoneVO
.
setTitle
(
userDTO
.
getUserName
()
+
","
+
userDTO
.
getOtherName
());
everyoneVO
.
setTitle
(
userDTO
.
getUserName
()
+
","
+
userDTO
.
getOther
User
Name
());
//查询关系
List
<
UserRelationEntity
>
userRelation
=
userRelationService
.
bothSides
(
userDTO
.
getUserName
(),
userDTO
.
getOtherName
());
List
<
UserRelationEntity
>
userRelation
=
userRelationService
.
bothSides
(
userDTO
.
getUserName
(),
userDTO
.
getOther
User
Name
());
//指认关系
if
(!
ObjectUtils
.
isEmpty
(
userRelation
))
{
everyoneVO
.
setRelation
(
userRelation
);
}
//查询账户
List
<
String
>
oneselfAccountList
=
userAccountService
.
queryUserAccountList
(
userDTO
.
getUserName
());
List
<
String
>
otherAccountList
=
userAccountService
.
queryUserAccountList
(
userDTO
.
getOtherName
());
List
<
ExcelDataVO
>
ExcelDataList
=
excelDataService
.
queryOtherAccountList
(
userDTO
.
getOtherUserName
(),
userDTO
.
getCaseId
());
Set
<
String
>
otherAccountSet
=
new
HashSet
<>();
for
(
ExcelDataVO
excelDataVO
:
ExcelDataList
)
{
otherAccountSet
.
add
(
excelDataVO
.
getPayAccount
());
otherAccountSet
.
add
(
excelDataVO
.
getPaymentAccount
());
}
List
<
String
>
otherAccountList
=
Lists
.
newArrayList
(
otherAccountSet
);
PageHelper
.
startPage
(
userDTO
.
getPageNum
(),
userDTO
.
getPageSize
());
...
...
@@ -280,11 +286,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
outTotal
+=
detail
.
getAmount
();
}
}
totalDescription
.
add
(
userDTO
.
getUserName
()
+
"向"
+
userDTO
.
getOtherName
()
+
"转账"
+
outCount
+
"次,合计"
+
outTotal
+
"元;"
);
totalDescription
.
add
(
userDTO
.
getOtherName
()
+
"向"
+
userDTO
.
getUserName
()
+
"转账"
+
inCount
+
"次,合计"
+
inTotal
+
"元;"
);
totalDescription
.
add
(
userDTO
.
getUserName
()
+
"向"
+
userDTO
.
getOther
User
Name
()
+
"转账"
+
outCount
+
"次,合计"
+
outTotal
+
"元;"
);
totalDescription
.
add
(
userDTO
.
getOther
User
Name
()
+
"向"
+
userDTO
.
getUserName
()
+
"转账"
+
inCount
+
"次,合计"
+
inTotal
+
"元;"
);
}
else
{
totalDescription
.
add
(
userDTO
.
getUserName
()
+
"向"
+
userDTO
.
getOtherName
()
+
"转账0次,合计0元;"
);
totalDescription
.
add
(
userDTO
.
getOtherName
()
+
"向"
+
userDTO
.
getUserName
()
+
"转账0次,合计0元;"
);
totalDescription
.
add
(
userDTO
.
getUserName
()
+
"向"
+
userDTO
.
getOther
User
Name
()
+
"转账0次,合计0元;"
);
totalDescription
.
add
(
userDTO
.
getOther
User
Name
()
+
"向"
+
userDTO
.
getUserName
()
+
"转账0次,合计0元;"
);
}
everyoneVO
.
setTotalDescription
(
totalDescription
);
return
everyoneVO
;
...
...
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
c3d54feb
...
...
@@ -167,7 +167,7 @@
</if>
</select>
<select
id=
"relationPage"
resultType=
"com.platform.model.entity.ExcelDataEntity"
>
SELECT amount, time, payee_account, payment_account
SELECT
distinct direction,
amount, time, payee_account, payment_account
FROM excel_data
WHERE
(payee_account IN
...
...
@@ -357,4 +357,15 @@
</if>
group by ed.pay_user_name,ed.payee_name
</select>
<select
id=
"queryOtherAccountList"
resultType=
"com.platform.model.vo.ExcelDataVO"
>
SELECT
payee_account,
payment_account
from
excel_data
where
case_id = #{caseId}
and
payee_name = #{otherUserName}
</select>
</mapper>
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