Commit 65190994 authored by wujipeng's avatar wujipeng
Browse files

人与人关系弹框分页-优化

parent aa13e53a
...@@ -18,4 +18,6 @@ public interface UserRelationMapper extends BaseMapper<UserRelationEntity> { ...@@ -18,4 +18,6 @@ public interface UserRelationMapper extends BaseMapper<UserRelationEntity> {
List<UserRelationEntity> queryListByUserNameList(@Param("caseId") int caseId, List<UserRelationEntity> queryListByUserNameList(@Param("caseId") int caseId,
@Param("nodeList") List<String> nodeList); @Param("nodeList") List<String> nodeList);
List<UserRelationEntity> bothSides(@Param("userName") String userName, @Param("otherName") String otherName);
} }
...@@ -18,10 +18,10 @@ public class UserDTO extends UserEntity { ...@@ -18,10 +18,10 @@ public class UserDTO extends UserEntity {
private String otherUserName; private String otherUserName;
@ApiModelProperty(value = "页数", example = "0") @ApiModelProperty(value = "页数", example = "0")
private Integer pageNum; private Integer pageNum = 0;
@ApiModelProperty(value = "每页显示的数量", example = "10") @ApiModelProperty(value = "每页显示的数量", example = "10")
private Integer pageSize; private Integer pageSize = 10;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private String userName; private String userName;
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -18,6 +19,7 @@ import java.util.Date; ...@@ -18,6 +19,7 @@ import java.util.Date;
*/ */
@Data @Data
@TableName("excel_data") @TableName("excel_data")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ExcelDataEntity { public class ExcelDataEntity {
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
......
...@@ -2,6 +2,7 @@ package com.platform.model.vo; ...@@ -2,6 +2,7 @@ package com.platform.model.vo;
import com.platform.model.entity.UserAccountEntity; import com.platform.model.entity.UserAccountEntity;
import com.platform.model.entity.UserEntity; import com.platform.model.entity.UserEntity;
import com.platform.model.entity.UserRelationEntity;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -24,4 +25,7 @@ public class UserVO extends UserEntity { ...@@ -24,4 +25,7 @@ public class UserVO extends UserEntity {
@ApiModelProperty("资金类型,关联交易明细") @ApiModelProperty("资金类型,关联交易明细")
private Map<String,List<AssociationVO>> detailsFunds; private Map<String,List<AssociationVO>> detailsFunds;
@ApiModelProperty("用户关系")
private List<UserRelationEntity> relationShipList;
} }
...@@ -22,4 +22,13 @@ public interface UserRelationService extends IService<UserRelationEntity> { ...@@ -22,4 +22,13 @@ public interface UserRelationService extends IService<UserRelationEntity> {
* @return List<UserRelationEntity> * @return List<UserRelationEntity>
*/ */
List<UserRelationEntity> queryListByUserNameList(int caseId, List<String> nodeList); List<UserRelationEntity> queryListByUserNameList(int caseId, List<String> nodeList);
/**
* 查看用户关系
*
* @param userName
* @param otherName
* @return
*/
List<UserRelationEntity> bothSides(String userName, String otherName);
} }
...@@ -25,4 +25,9 @@ public class UserRelationServiceImpl extends ServiceImpl<UserRelationMapper, Use ...@@ -25,4 +25,9 @@ public class UserRelationServiceImpl extends ServiceImpl<UserRelationMapper, Use
} }
return baseMapper.queryListByUserNameList(caseId, nodeList); return baseMapper.queryListByUserNameList(caseId, nodeList);
} }
@Override
public List<UserRelationEntity> bothSides(String userName, String otherName) {
return baseMapper.bothSides(userName,otherName);
}
} }
...@@ -165,9 +165,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme ...@@ -165,9 +165,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
//标题 //标题
everyoneVO.setTitle(oneself.getUserName() + "," + other.getUserName()); everyoneVO.setTitle(oneself.getUserName() + "," + other.getUserName());
//查询关系 //查询关系
List<UserRelationEntity> userRelation = userRelationService.list(new LambdaQueryWrapper<UserRelationEntity>() List<UserRelationEntity> userRelation = userRelationService.bothSides(userDTO.getUserName(), userDTO.getOtherName());
.eq(UserRelationEntity::getUserName, userDTO.getUserName())
.eq(UserRelationEntity::getOtherName, userDTO.getOtherName()));
//指认关系 //指认关系
if (ObjectUtils.isEmpty(userRelation)) { if (ObjectUtils.isEmpty(userRelation)) {
everyoneVO.setRelation(userRelation); everyoneVO.setRelation(userRelation);
......
...@@ -14,3 +14,7 @@ spring: ...@@ -14,3 +14,7 @@ spring:
max-file-size: 50MB # 单个文件最大大小(默认 1MB) max-file-size: 50MB # 单个文件最大大小(默认 1MB)
max-request-size: 100MB # 整个请求的最大大小(默认 10MB) max-request-size: 100MB # 整个请求的最大大小(默认 10MB)
file-size-threshold: 1MB file-size-threshold: 1MB
mybatis:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
...@@ -127,9 +127,26 @@ ...@@ -127,9 +127,26 @@
) )
</select> </select>
<select id="relationPage" resultType="com.platform.model.entity.ExcelDataEntity"> <select id="relationPage" resultType="com.platform.model.entity.ExcelDataEntity">
select amount,time,payee_account,payment_account SELECT amount, time, payee_account, payment_account
from excel_data FROM excel_data
where (payment_account in (#{oneselfAccountList}) and payment_account in (#{otherAccountList})) or (payment_account in (#{otherAccountList}) and payment_account in (#{oneselfAccountList})) 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>
<select id="queryInfoList" resultType="com.platform.model.entity.ExcelDataEntity"> <select id="queryInfoList" resultType="com.platform.model.entity.ExcelDataEntity">
......
...@@ -18,4 +18,9 @@ ...@@ -18,4 +18,9 @@
#{userName} #{userName}
</foreach> </foreach>
</select> </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> </mapper>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment