Commit 309dd2d7 authored by 王向伟's avatar 王向伟

修改用户配置信息url,返回参数添加风控数据

parent c4bd1dac
......@@ -11,7 +11,9 @@ import cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
/**
......@@ -20,7 +22,7 @@ import java.util.List;
* @author suntao
*/
@RestController
@RequestMapping("channel")
@RequestMapping("/channel")
public class ChannelConfController {
......@@ -51,6 +53,7 @@ public class ChannelConfController {
/**
* 查询单个渠道配置
* 如果是渠道用户,只能查自己,查询条件置灰
*
* @param channelId
* @return
*/
......@@ -65,6 +68,7 @@ public class ChannelConfController {
/**
* 修改渠道配置,如果是渠道角色登陆 只能修改自己渠道信息
*
* @param channelConfVo
* @return
*/
......@@ -86,10 +90,28 @@ public class ChannelConfController {
@GetMapping("/all")
public Result channelAll(){
public Result channelAll() {
List<ChannelModel> all = channelConfService.getAll();
return Result.buildSuccess(all);
}
@GetMapping("/conf/export")
public void getChannelConf(Long channelId, HttpServletResponse response) {
response.setHeader("Content-Disposition", "attachment;filename=" + channelId + ".sql");
response.setContentType("application/text;charset=UTF-8");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
String insertSql = channelConfService.exportChannelConf(channelId);
try {
response.getOutputStream().write(insertSql.getBytes());
} catch (IOException e) {
e.printStackTrace();
}
}
}
......@@ -225,7 +225,7 @@ public class ChannelConfServiceImpl implements ChannelConfService {
for (Field declaredField : declaredFields) {
declaredField.setAccessible(true);
Id idAnnotation = declaredField.getAnnotation(Id.class);
if(Objects.isNull(idAnnotation)){
if(Objects.nonNull(idAnnotation)){
continue;
}
Column annotation = declaredField.getAnnotation(Column.class);
......@@ -257,6 +257,12 @@ public class ChannelConfServiceImpl implements ChannelConfService {
values.add(value.toString());
continue;
}
//枚举存ordinal 存name的表单独判断
if(value instanceof Enum){
Enum e = (Enum)value;
values.add(e.ordinal()+"");
continue;
}
//其他类型一律按照字符串处理,有问题加if判断
values.add("'"+value.toString()+"'");
}
......
......@@ -21,7 +21,7 @@ public class CustomerController {
@Autowired
private ICustomerService customerService;
@GetMapping("/info")
@GetMapping("/apply/info")
public Result<CustomerInfo> getCustomerInfo(String phoneNo,String channelOrderNo){
CustomerInfo customerInfo = customerService.getCustomerInfo(phoneNo, channelOrderNo);
if(Objects.isNull(customerInfo)){
......
......@@ -2,6 +2,8 @@ package cn.quantgroup.cashloanflowboss.api.customer.entity;
import lombok.Data;
import java.util.List;
/**
* 客户进件信息
* @author Wang Xiangwei
......@@ -73,8 +75,17 @@ public class CustomerInfo {
private String contactRelationB;
private List<RiskInfo> riskInfoList;
@Data
class RiskInfo{
private String key;
private String name;
private String value;
private String success;
}
}
......@@ -58,5 +58,10 @@ public class ChannelApplyInfoStrategy implements Serializable {
@Column(name = "contacts_book")
private Boolean contactsBook;
/**
* 检查节点:1进件;2补充信息
*/
@Column(name = "check_point")
private Integer checkPoint;
}
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