Commit b7bf1879 authored by zhuxiang's avatar zhuxiang
Browse files

优化节点类型

parent 8eedeb12
...@@ -11,12 +11,8 @@ public class EdgeVO { ...@@ -11,12 +11,8 @@ public class EdgeVO {
private String source; private String source;
private String sourceType;
private String target; private String target;
private String targetType;
private String relation; private String relation;
// 总汇款笔数 // 总汇款笔数
private int totalTransactions; private int totalTransactions;
...@@ -34,13 +30,7 @@ public class EdgeVO { ...@@ -34,13 +30,7 @@ public class EdgeVO {
public EdgeVO(String source, String target, int totalTransactions, double totalAmount, String groupId, public EdgeVO(String source, String target, int totalTransactions, double totalAmount, String groupId,
String ip, String mac, String account) { String ip, String mac, String account) {
this.source = source; this.source = source;
this.sourceType = "个人";
this.target = target; this.target = target;
if (target.contains("公司")) {
this.targetType = "银联";
}else{
this.targetType = "个人";
}
this.totalTransactions = totalTransactions; this.totalTransactions = totalTransactions;
this.totalAmount = totalAmount; this.totalAmount = totalAmount;
this.groupId = groupId; this.groupId = groupId;
...@@ -52,13 +42,7 @@ public class EdgeVO { ...@@ -52,13 +42,7 @@ public class EdgeVO {
public EdgeVO(String id, String source, String target, int totalTransactions, double totalAmount) { public EdgeVO(String id, String source, String target, int totalTransactions, double totalAmount) {
this.id = id; this.id = id;
this.source = source; this.source = source;
this.sourceType = "个人";
this.target = target; this.target = target;
if (target.contains("公司")) {
this.targetType = "银联";
}else{
this.targetType = "个人";
}
this.totalTransactions = totalTransactions; this.totalTransactions = totalTransactions;
this.totalAmount = totalAmount; this.totalAmount = totalAmount;
} }
......
...@@ -19,6 +19,11 @@ public class NodeVO { ...@@ -19,6 +19,11 @@ public class NodeVO {
public NodeVO(String node) { public NodeVO(String node) {
this.node = node; this.node = node;
if (node.contains("公司") || node.length() > 4) {
this.nodeType = "对公";
} else {
this.nodeType = "个人";
}
} }
// 添加无参构造方法 // 添加无参构造方法
......
package com.platform.service.impl; package com.platform.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.platform.mapper.UserRelationMapper; import com.platform.mapper.UserRelationMapper;
import com.platform.model.entity.UserRelationEntity; import com.platform.model.entity.UserRelationEntity;
import com.platform.service.UserRelationService; import com.platform.service.UserRelationService;
...@@ -18,6 +20,9 @@ import java.util.List; ...@@ -18,6 +20,9 @@ import java.util.List;
public class UserRelationServiceImpl extends ServiceImpl<UserRelationMapper, UserRelationEntity> implements UserRelationService { public class UserRelationServiceImpl extends ServiceImpl<UserRelationMapper, UserRelationEntity> implements UserRelationService {
@Override @Override
public List<UserRelationEntity> queryListByUserNameList(int caseId, List<String> nodeList) { public List<UserRelationEntity> queryListByUserNameList(int caseId, List<String> nodeList) {
return baseMapper.queryListByUserNameList(caseId,nodeList); if (CollUtil.isEmpty(nodeList)) {
return Lists.newArrayList();
}
return baseMapper.queryListByUserNameList(caseId, nodeList);
} }
} }
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
ed.file_id = fu.id ed.file_id = fu.id
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and ed.id = #{id} and ed.case_id = #{id}
</if> </if>
<if test="payUserName != null and payUserName != ''"> <if test="payUserName != null and payUserName != ''">
and (ed.pay_user_name like concat('%',#{payUserName},'%') or fu.file_name like concat('%',#{fileName},'%') and (ed.pay_user_name like concat('%',#{payUserName},'%') or fu.file_name like concat('%',#{fileName},'%')
......
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