Commit 9c52c47a authored by wujipeng's avatar wujipeng
Browse files

Merge remote-tracking branch 'origin/dev' into dev

parents cc8b1308 70d1ca13
package com.platform.controller;
import com.platform.model.entity.CaseRuleConfigEntity;
import com.platform.model.resp.Result;
import com.platform.service.CaseRuleConfigService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/case/rule")
public class CaseRuleConfigController extends BaseController {
@Resource
private CaseRuleConfigService caseRuleConfigService;
@PostMapping("/saveOrUpdate")
public Result saveOrUpdate(@RequestBody CaseRuleConfigEntity caseRuleConfigEntity) {
return toAjax(caseRuleConfigService.saveOrUpdate(caseRuleConfigEntity));
}
@GetMapping("/data/{caseId}")
public Result data(@PathVariable String caseId) {
return Result.data(caseRuleConfigService.getByCaseId(caseId));
}
}
package com.platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.platform.model.entity.CaseRuleConfigEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CaseRuleConfigMapper extends BaseMapper<CaseRuleConfigEntity> {
}
package com.platform.model.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("case_rule_config")
public class CaseRuleConfigEntity {
@TableId(value = "id", type = IdType.AUTO)
private int id;
private int caseId;
private boolean directionFlag;
private double minAmount;
private double maxAmount;
private int minTransaction;
private int maxTransaction;
private Date startTime;
private Date endTime;
private String principal;
private boolean whiteFlag;
}
...@@ -19,7 +19,7 @@ public class NodeVO { ...@@ -19,7 +19,7 @@ public class NodeVO {
public NodeVO(String node) { public NodeVO(String node) {
this.node = node; this.node = node;
if (node.contains("公司") || node.length() > 4) { if (node.contains("公司")) {
this.nodeType = "对公"; this.nodeType = "对公";
} else { } else {
this.nodeType = "个人"; this.nodeType = "个人";
......
package com.platform.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.platform.model.entity.CaseRuleConfigEntity;
public interface CaseRuleConfigService extends IService<CaseRuleConfigEntity> {
CaseRuleConfigEntity getByCaseId(String caseId);
}
package com.platform.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.platform.mapper.CaseRuleConfigMapper;
import com.platform.model.entity.CaseRuleConfigEntity;
import com.platform.service.CaseRuleConfigService;
import org.springframework.stereotype.Service;
@Service
public class CaseRuleServiceImpl extends ServiceImpl<CaseRuleConfigMapper, CaseRuleConfigEntity> implements CaseRuleConfigService {
@Override
public CaseRuleConfigEntity getByCaseId(String caseId) {
return baseMapper.selectOne(new LambdaQueryWrapper<CaseRuleConfigEntity>()
.eq(CaseRuleConfigEntity::getCaseId, caseId));
}
}
...@@ -419,7 +419,7 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem ...@@ -419,7 +419,7 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
//获取节点数量 //获取节点数量
int nodeNum = nodeDegreeMap.get(excelDataVO.getPayUserName()); int nodeNum = nodeDegreeMap.get(excelDataVO.getPayUserName());
excelDataVO.setNodeNum(nodeNum); excelDataVO.setNodeNum(nodeNum);
if (StringUtils.isNotEmpty(excelDataVO.getExternalChannel())) { if (excelDataVO.getPayeeName().contains("公司")) {
excelDataVO.setAccountType("银联"); excelDataVO.setAccountType("银联");
} else { } else {
excelDataVO.setAccountType("个人"); excelDataVO.setAccountType("个人");
...@@ -449,7 +449,7 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem ...@@ -449,7 +449,7 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
result.add(person); result.add(person);
NodeVO org = new NodeVO(); NodeVO org = new NodeVO();
if (StringUtils.isNotBlank(excelDataVO.getPayeeName()) && excelDataVO.getPayeeName().contains("公司")) { if (excelDataVO.getPayeeName().contains("公司")) {
org.setNode(excelDataVO.getPayeeName()); org.setNode(excelDataVO.getPayeeName());
org.setNodeNum(excelDataVO.getNodeNum()); org.setNodeNum(excelDataVO.getNodeNum());
org.setBankCode(excelDataVO.getPayeeBankCard()); org.setBankCode(excelDataVO.getPayeeBankCard());
...@@ -468,10 +468,10 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem ...@@ -468,10 +468,10 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
if (caseDTO.getPrincipal() == 1) { if (caseDTO.getPrincipal() == 1) {
// 过滤掉收款人名称中带有公司的数据 // 过滤掉收款人名称中带有公司的数据
return !(node.contains("公司") || node.length() > 4); return !(node.contains("公司"));
} else { } else {
// 过滤掉收款人名称中不含公司的数据 // 过滤掉收款人名称中不含公司的数据
return node.contains("公司") || node.length() > 4; return node.contains("公司");
} }
} }
......
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