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
65190994
Commit
65190994
authored
Aug 05, 2025
by
wujipeng
Browse files
人与人关系弹框分页-优化
parent
aa13e53a
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/platform/mapper/UserRelationMapper.java
View file @
65190994
...
...
@@ -18,4 +18,6 @@ public interface UserRelationMapper extends BaseMapper<UserRelationEntity> {
List
<
UserRelationEntity
>
queryListByUserNameList
(
@Param
(
"caseId"
)
int
caseId
,
@Param
(
"nodeList"
)
List
<
String
>
nodeList
);
List
<
UserRelationEntity
>
bothSides
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"otherName"
)
String
otherName
);
}
src/main/java/com/platform/model/dto/UserDTO.java
View file @
65190994
...
...
@@ -18,10 +18,10 @@ public class UserDTO extends UserEntity {
private
String
otherUserName
;
@ApiModelProperty
(
value
=
"页数"
,
example
=
"0"
)
private
Integer
pageNum
;
private
Integer
pageNum
=
0
;
@ApiModelProperty
(
value
=
"每页显示的数量"
,
example
=
"10"
)
private
Integer
pageSize
;
private
Integer
pageSize
=
10
;
@ApiModelProperty
(
value
=
"用户id"
)
private
String
userName
;
...
...
src/main/java/com/platform/model/entity/ExcelDataEntity.java
View file @
65190994
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -18,6 +19,7 @@ import java.util.Date;
*/
@Data
@TableName
(
"excel_data"
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
class
ExcelDataEntity
{
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
...
...
src/main/java/com/platform/model/vo/UserVO.java
View file @
65190994
...
...
@@ -2,6 +2,7 @@ package com.platform.model.vo;
import
com.platform.model.entity.UserAccountEntity
;
import
com.platform.model.entity.UserEntity
;
import
com.platform.model.entity.UserRelationEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -24,4 +25,7 @@ public class UserVO extends UserEntity {
@ApiModelProperty
(
"资金类型,关联交易明细"
)
private
Map
<
String
,
List
<
AssociationVO
>>
detailsFunds
;
@ApiModelProperty
(
"用户关系"
)
private
List
<
UserRelationEntity
>
relationShipList
;
}
src/main/java/com/platform/service/UserRelationService.java
View file @
65190994
...
...
@@ -22,4 +22,13 @@ public interface UserRelationService extends IService<UserRelationEntity> {
* @return List<UserRelationEntity>
*/
List
<
UserRelationEntity
>
queryListByUserNameList
(
int
caseId
,
List
<
String
>
nodeList
);
/**
* 查看用户关系
*
* @param userName
* @param otherName
* @return
*/
List
<
UserRelationEntity
>
bothSides
(
String
userName
,
String
otherName
);
}
src/main/java/com/platform/service/impl/UserRelationServiceImpl.java
View file @
65190994
...
...
@@ -25,4 +25,9 @@ public class UserRelationServiceImpl extends ServiceImpl<UserRelationMapper, Use
}
return
baseMapper
.
queryListByUserNameList
(
caseId
,
nodeList
);
}
@Override
public
List
<
UserRelationEntity
>
bothSides
(
String
userName
,
String
otherName
)
{
return
baseMapper
.
bothSides
(
userName
,
otherName
);
}
}
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
65190994
...
...
@@ -165,9 +165,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
//标题
everyoneVO
.
setTitle
(
oneself
.
getUserName
()
+
","
+
other
.
getUserName
());
//查询关系
List
<
UserRelationEntity
>
userRelation
=
userRelationService
.
list
(
new
LambdaQueryWrapper
<
UserRelationEntity
>()
.
eq
(
UserRelationEntity:
:
getUserName
,
userDTO
.
getUserName
())
.
eq
(
UserRelationEntity:
:
getOtherName
,
userDTO
.
getOtherName
()));
List
<
UserRelationEntity
>
userRelation
=
userRelationService
.
bothSides
(
userDTO
.
getUserName
(),
userDTO
.
getOtherName
());
//指认关系
if
(
ObjectUtils
.
isEmpty
(
userRelation
))
{
everyoneVO
.
setRelation
(
userRelation
);
...
...
src/main/resources/application.yml
View file @
65190994
...
...
@@ -14,3 +14,7 @@ spring:
max-file-size
:
50MB
# 单个文件最大大小(默认 1MB)
max-request-size
:
100MB
# 整个请求的最大大小(默认 10MB)
file-size-threshold
:
1MB
mybatis
:
configuration
:
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
65190994
...
...
@@ -127,9 +127,26 @@
)
</select>
<select
id=
"relationPage"
resultType=
"com.platform.model.entity.ExcelDataEntity"
>
select amount,time,payee_account,payment_account
from excel_data
where (payment_account in (#{oneselfAccountList}) and payment_account in (#{otherAccountList})) or (payment_account in (#{otherAccountList}) and payment_account in (#{oneselfAccountList}))
SELECT amount, time, payee_account, payment_account
FROM excel_data
WHERE
(payee_account IN
<foreach
item=
"item"
collection=
"oneselfAccountList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
AND payment_account IN
<foreach
item=
"item"
collection=
"otherAccountList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
OR
(payee_account IN
<foreach
item=
"item"
collection=
"otherAccountList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
AND payment_account IN
<foreach
item=
"item"
collection=
"oneselfAccountList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
</select>
<select
id=
"queryInfoList"
resultType=
"com.platform.model.entity.ExcelDataEntity"
>
...
...
src/main/resources/com/platform/mapper/UserRelationMapper.xml
View file @
65190994
...
...
@@ -18,4 +18,9 @@
#{userName}
</foreach>
</select>
<select
id=
"bothSides"
resultType=
"com.platform.model.entity.UserRelationEntity"
>
select id, user_name, other_name, relation_ship, case_id, remark
from user_relation
where (user_name = #{userName} and other_name = #{otherName}) or (other_name = #{userName} and user_name = #{otherName});
</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