
13 changed files with 1058 additions and 0 deletions
@ -0,0 +1,51 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBank.java <br/> |
||||
|
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBank <br/> |
||||
|
* Description: 资方信息表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@ApiModel(value = "资方信息表", description = "资方信息表") |
||||
|
@TableName("loan_fin_bank") |
||||
|
@Data |
||||
|
public class LoanFinBank extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("资方名称(陕汽必须字段)") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("联系人(陕汽必须字段)") |
||||
|
private String contactor; |
||||
|
@ApiModelProperty("联系电话(陕汽必须字段)") |
||||
|
private String mobile; |
||||
|
@ApiModelProperty("资方简称") |
||||
|
private String bankShortName; |
||||
|
@ApiModelProperty("消贷合同打印设置Key001一车一合同/002一人一合同/003自行选择") |
||||
|
private String contractSetKey; |
||||
|
@ApiModelProperty("消贷合同打印设置Value") |
||||
|
private String contractSetValue; |
||||
|
@ApiModelProperty("银行卡要求说明") |
||||
|
private String bankCardRemark; |
||||
|
@ApiModelProperty("创建组织sid") |
||||
|
private String createOrgSid; |
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; |
||||
|
@ApiModelProperty("使用组织名称") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("使用组织全路径") |
||||
|
private String orgSidPath; |
||||
|
|
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBankDto.java <br/> |
||||
|
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankDto <br/> |
||||
|
* Description: 资方信息表 数据传输对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@ApiModel(value = "资方信息表 数据传输对象", description = "资方信息表 数据传输对象") |
||||
|
@Data |
||||
|
public class LoanFinBankDto implements Dto { |
||||
|
|
||||
|
private String sid; |
||||
|
private String userSid; |
||||
|
@ApiModelProperty(value = "资方名称(陕汽必须字段)", required = true) |
||||
|
@NotBlank(message = "资方名称不允许为空") |
||||
|
@JsonProperty("manageName") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty(value = "联系人(陕汽必须字段)", required = true) |
||||
|
@NotBlank(message = "联系人不允许为空") |
||||
|
@JsonProperty("name") |
||||
|
private String contactor; |
||||
|
@ApiModelProperty(value = "联系电话(陕汽必须字段)", required = true) |
||||
|
@NotBlank(message = "联系电话不允许为空") |
||||
|
private String mobile; |
||||
|
@ApiModelProperty(value = "创建组织sid", required = true) |
||||
|
@NotBlank(message = "创建组织不允许为空") |
||||
|
private String createOrgSid; |
||||
|
@ApiModelProperty("资方简称") |
||||
|
private String bankShortName; |
||||
|
@ApiModelProperty("消贷合同打印设置Key001一车一合同/002一人一合同/003自行选择") |
||||
|
private String contractSetKey; |
||||
|
@ApiModelProperty("消贷合同打印设置Value") |
||||
|
private String contractSetValue; |
||||
|
@ApiModelProperty("银行卡要求说明") |
||||
|
private String bankCardRemark; |
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; |
||||
|
@ApiModelProperty("使用组织名称") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("使用组织全路径") |
||||
|
private String orgSidPath; |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/9/17 10:06 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LoanFinBankExportQuery implements Query { |
||||
|
|
||||
|
@ApiModelProperty(value = "资方名称", required = false) |
||||
|
private String manageName; |
||||
|
|
||||
|
@ApiModelProperty(value = "联系人", required = false) |
||||
|
private String name; |
||||
|
|
||||
|
@ApiModelProperty(value = "联系电话", required = false) |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 选中的sid的list |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "sid", required = false) |
||||
|
private List<String> sids; |
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
|
||||
|
import com.yxt.common.core.utils.ExportEntityMap; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/9/17 10:10 |
||||
|
* @description |
||||
|
*/ |
||||
|
|
||||
|
public class LoanFinBankExportVo { |
||||
|
|
||||
|
@ExportEntityMap(CnName = "序号", EnName = "rankNo") |
||||
|
private Integer rankNo; |
||||
|
|
||||
|
@ExportEntityMap(CnName = "资方名称", EnName = "manageName") |
||||
|
private String manageName; |
||||
|
|
||||
|
@ExportEntityMap(CnName = "联系人", EnName = "name") |
||||
|
private String name; |
||||
|
|
||||
|
@ExportEntityMap(CnName = "联系电话", EnName = "mobile") |
||||
|
private String mobile; |
||||
|
|
||||
|
public Integer getRankNo() { |
||||
|
return rankNo; |
||||
|
} |
||||
|
|
||||
|
public void setRankNo(Integer rankNo) { |
||||
|
this.rankNo = rankNo; |
||||
|
} |
||||
|
|
||||
|
public String getManageName() { |
||||
|
return manageName; |
||||
|
} |
||||
|
|
||||
|
public void setManageName(String manageName) { |
||||
|
this.manageName = manageName; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getMobile() { |
||||
|
return mobile; |
||||
|
} |
||||
|
|
||||
|
public void setMobile(String mobile) { |
||||
|
this.mobile = mobile; |
||||
|
} |
||||
|
} |
@ -0,0 +1,116 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.AppResultData; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBankFeign.java <br/> |
||||
|
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankFeign <br/> |
||||
|
* Description: 资方信息表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Api(tags = "资方信息表") |
||||
|
@FeignClient( |
||||
|
contextId = "anrui-riskcenter-LoanFinBank", |
||||
|
name = "anrui-riskcenter", |
||||
|
path = "v1/loanfinbank", |
||||
|
fallback = LoanFinBankFeignFallback.class) |
||||
|
public interface LoanFinBankFeign { |
||||
|
/** |
||||
|
* 新增保存(已测试) |
||||
|
* |
||||
|
* @param dto |
||||
|
*/ |
||||
|
@ApiOperation("新增修改") |
||||
|
@PostMapping("/saveOrUpdate") |
||||
|
public ResultBean save(@Valid @RequestBody LoanFinBankDto dto); |
||||
|
|
||||
|
/** |
||||
|
* 根据条件分页查询数据的列表(已测试) |
||||
|
* |
||||
|
* @param pq |
||||
|
*/ |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<LoanFinBankVo>> listPage(@RequestBody PagerQuery<LoanFinBankQuery> pq); |
||||
|
|
||||
|
/** |
||||
|
* 修改保存(已测试) |
||||
|
* |
||||
|
* @param dto |
||||
|
* @param sid |
||||
|
*/ |
||||
|
@ApiOperation("修改保存") |
||||
|
@PostMapping("/update/{sid}") |
||||
|
public ResultBean update(@Valid @RequestBody LoanFinBankDto dto, @PathVariable("sid") String sid); |
||||
|
|
||||
|
/** |
||||
|
* 资方信息初始化 |
||||
|
* |
||||
|
* @param sid |
||||
|
*/ |
||||
|
@ApiOperation("资方信息初始化") |
||||
|
@GetMapping("/init/{sid}") |
||||
|
public ResultBean<LoanFinBankInitVo> init(@PathVariable("sid") String sid); |
||||
|
|
||||
|
/** |
||||
|
* 资方信息详情(已测试) |
||||
|
* |
||||
|
* @param sid |
||||
|
*/ |
||||
|
@ApiOperation("获取一条记录") |
||||
|
@GetMapping("/details/{sid}") |
||||
|
public ResultBean<LoanFinBankVo> details(@PathVariable("sid") String sid); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除(已测试) |
||||
|
* |
||||
|
* @param sids |
||||
|
*/ |
||||
|
@ApiOperation("批量删除") |
||||
|
@DeleteMapping("/deleteBySids") |
||||
|
@ResponseBody |
||||
|
public ResultBean deleteBySids(@RequestBody String[] sids); |
||||
|
|
||||
|
/** |
||||
|
* 资方管理列表导出(已测试) |
||||
|
* |
||||
|
* @param query |
||||
|
*/ |
||||
|
@GetMapping("exportExcel") |
||||
|
@ApiOperation(value = "资方管理列表导出") |
||||
|
public void exportExcel(LoanFinBankExportQuery query); |
||||
|
|
||||
|
/** |
||||
|
* 根据资方名称模糊搜索资方名称下拉框 |
||||
|
* |
||||
|
* @param managgeName 政策名称 |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/namesDown") |
||||
|
@ApiOperation(value = "根据资方名称模糊搜索资方名称下拉框") |
||||
|
@ResponseBody |
||||
|
ResultBean<List<Map<String, Object>>> namesDown(@RequestParam(value = "managgeName", required = false) String managgeName); |
||||
|
|
||||
|
|
||||
|
@ApiOperation("手机端查询资方的列表") |
||||
|
@PostMapping("/selectAppFinBankList") |
||||
|
public ResultBean<PagerVo<AppResultData>> selectAppFinBankList(@RequestBody PagerQuery<LoanFinBankQuery> pq); |
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBankFeignFallback.java <br/> |
||||
|
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankFeignFallback <br/> |
||||
|
* Description: 资方信息表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class LoanFinBankFeignFallback implements LoanFinBankFeign { |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<LoanFinBankVo>> listPage(PagerQuery<LoanFinBankQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
return rb.setMsg("接口anrui-base/basefinbank/listPage无法访问"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean save(LoanFinBankDto dto) { |
||||
|
return ResultBean.fireFail().setMsg("接口anrui-base/basefinbank/save无法访问"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean update(LoanFinBankDto dto, String sid) { |
||||
|
return ResultBean.fireFail().setMsg("接口anrui-base/basefinbank/update无法访问"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<LoanFinBankInitVo> init(String sid) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean deleteBySids(String[] sids) { |
||||
|
return ResultBean.fireFail().setMsg("接口anrui-base/basefinbank/deleteBySids无法访问"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<LoanFinBankVo> details(String sid) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void exportExcel(LoanFinBankExportQuery query) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<Map<String, Object>>> namesDown(String managgeName) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean selectAppFinBankList(PagerQuery<LoanFinBankQuery> pq) { |
||||
|
return ResultBean.fireFail().setMsg("接口anrui-base/basefinbank/selectAppFinBankList无法访问"); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
* @description |
||||
|
* @date 2023/7/4 11:43 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LoanFinBankInitVo implements Vo { |
||||
|
private String sid; |
||||
|
// private String userSid;
|
||||
|
@ApiModelProperty(value = "资方名称(陕汽必须字段)", required = true) |
||||
|
@JsonProperty("manageName") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty(value = "联系人(陕汽必须字段)", required = true) |
||||
|
@JsonProperty("name") |
||||
|
private String contactor; |
||||
|
@ApiModelProperty(value = "联系电话(陕汽必须字段)", required = true) |
||||
|
private String mobile; |
||||
|
// @ApiModelProperty(value = "创建组织sid", required = true)
|
||||
|
// @NotBlank(message = "创建组织不允许为空")
|
||||
|
// private String createOrgSid;
|
||||
|
@ApiModelProperty("资方简称") |
||||
|
private String bankShortName; |
||||
|
@ApiModelProperty("消贷合同打印设置Key001一车一合同/002一人一合同/003自行选择") |
||||
|
private String contractSetKey; |
||||
|
@ApiModelProperty("消贷合同打印设置Value") |
||||
|
private String contractSetValue; |
||||
|
@ApiModelProperty("银行卡要求说明") |
||||
|
private String bankCardRemark; |
||||
|
// @ApiModelProperty("使用组织sid")
|
||||
|
// private String useOrgSid;
|
||||
|
// @ApiModelProperty("使用组织名称")
|
||||
|
// private String useOrgName;
|
||||
|
// @ApiModelProperty("使用组织全路径")
|
||||
|
// private String orgSidPath;
|
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBankQuery.java <br/> |
||||
|
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankQuery <br/> |
||||
|
* Description: 资方信息表 查询条件. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@ApiModel(value = "资方信息表 查询条件", description = "资方信息表 查询条件") |
||||
|
@Data |
||||
|
public class LoanFinBankQuery implements Query { |
||||
|
|
||||
|
@ApiModelProperty("资方名称(陕汽必须字段)") |
||||
|
private String manageName; |
||||
|
@ApiModelProperty("联系人(陕汽必须字段)") |
||||
|
private String name; |
||||
|
@ApiModelProperty("联系电话(陕汽必须字段)") |
||||
|
private String mobile; |
||||
|
@ApiModelProperty("创建组织sid") |
||||
|
private String createOrgSid; |
||||
|
private String orgSidPath; |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanfinbank; |
||||
|
|
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBankVo.java <br/> |
||||
|
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankVo <br/> |
||||
|
* Description: 资方信息表 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@ApiModel(value = "资方信息表 视图数据对象", description = "资方信息表 视图数据对象") |
||||
|
@Data |
||||
|
public class LoanFinBankVo implements Vo { |
||||
|
@ApiModelProperty("资方名称(陕汽必须字段)") |
||||
|
@JsonProperty("manageName") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("联系人(陕汽必须字段)") |
||||
|
@JsonProperty("name") |
||||
|
private String contactor; |
||||
|
@ApiModelProperty("联系电话(陕汽必须字段)") |
||||
|
private String mobile; |
||||
|
@ApiModelProperty(value = "sid") |
||||
|
private String sid; |
||||
|
@ApiModelProperty("资方简称") |
||||
|
private String bankShortName; |
||||
|
@ApiModelProperty("消贷合同打印设置Value") |
||||
|
private String contractSetValue; |
||||
|
@ApiModelProperty("银行卡要求说明") |
||||
|
private String bankCardRemark; |
||||
|
} |
@ -0,0 +1,88 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanfinbank; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBank; |
||||
|
import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBankExportVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBankVo; |
||||
|
import com.yxt.common.core.result.AppResultData; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.apache.ibatis.annotations.Update; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBankMapper.java <br/> |
||||
|
* Class: com.yxt.anrui.base.biz.basefinbank.BaseFinBankMapper <br/> |
||||
|
* Description: 资方信息表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LoanFinBankMapper extends BaseMapper<LoanFinBank> { |
||||
|
|
||||
|
IPage<LoanFinBankVo> selectPageVo(IPage<LoanFinBank> page, @Param(Constants.WRAPPER) Wrapper<LoanFinBank> qw); |
||||
|
|
||||
|
/** |
||||
|
* 根据资方名称查询是否存在与该资方名称相同的数据 |
||||
|
* |
||||
|
* @param managerName 资方名称 |
||||
|
* @return |
||||
|
*/ |
||||
|
int selectBaseFinBankByName(String managerName); |
||||
|
|
||||
|
/** |
||||
|
* 修改时根据资方名称查询是否存在与该资方名称相同的数据 |
||||
|
* |
||||
|
* @param managerName 资方名称 |
||||
|
* @return |
||||
|
*/ |
||||
|
int selectAllByIdAndManageName(@Param("managerName") String managerName, @Param("sid") String sid); |
||||
|
|
||||
|
/** |
||||
|
* 资方信息详情 |
||||
|
* |
||||
|
* @param sid 资方SID |
||||
|
* @return |
||||
|
*/ |
||||
|
LoanFinBankVo selectBySid(@Param("sid") String sid); |
||||
|
|
||||
|
/** |
||||
|
* 根据查询条件查询资方管理列表数据 |
||||
|
* |
||||
|
* @param qw 查询条件 |
||||
|
* @return |
||||
|
*/ |
||||
|
List<LoanFinBankExportVo> listExcel(@Param(Constants.WRAPPER) Wrapper<LoanFinBankExportVo> qw); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param sids |
||||
|
* @return |
||||
|
*/ |
||||
|
int deleteBySids(List<String> sids); |
||||
|
|
||||
|
IPage<AppResultData> selectAppFinBankList(IPage<LoanFinBank> page, @Param(Constants.WRAPPER) Wrapper<LoanFinBank> qw); |
||||
|
|
||||
|
/** |
||||
|
* 根据资方名称模糊搜索资方名称下拉框 |
||||
|
* |
||||
|
* @param qw |
||||
|
* @return |
||||
|
*/ |
||||
|
List<Map<String, Object>> namesDown(@Param(Constants.WRAPPER) Wrapper<Map<String, Object>> qw); |
||||
|
|
||||
|
@Update("update loan_fin_bank set isDelete = 1 where sid =#{sid}") |
||||
|
int updateBySidDelete(String sid); |
||||
|
} |
@ -0,0 +1,75 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.riskcenter.biz.loanfinbank.LoanFinBankMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="selectPageVo" resultType="com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBankVo"> |
||||
|
SELECT * |
||||
|
FROM loan_fin_bank |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectListAllVo" resultType="com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBankVo"> |
||||
|
SELECT * |
||||
|
FROM loan_fin_bank |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<!--根据资方名称查询是否重复--> |
||||
|
<select id="selectBaseFinBankByName" resultType="int"> |
||||
|
select count(*) |
||||
|
FROM loan_fin_bank |
||||
|
where bankName = #{managerName} |
||||
|
</select> |
||||
|
|
||||
|
<!--修改时根据资方名称查询是否存在与该资方名称相同的数据--> |
||||
|
<select id="selectAllByIdAndManageName" resultType="int"> |
||||
|
select count(*) |
||||
|
FROM loan_fin_bank |
||||
|
where sid != #{sid} |
||||
|
and bankName = #{managerName} |
||||
|
</select> |
||||
|
|
||||
|
<!--修改时数据回显--> |
||||
|
<select id="selectBySid" resultType="com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBankVo"> |
||||
|
select * |
||||
|
from loan_fin_bank |
||||
|
where sid = #{sid} |
||||
|
</select> |
||||
|
<!--批量删除--> |
||||
|
<delete id="deleteBySids" parameterType="java.util.List"> |
||||
|
DELETE |
||||
|
FROM loan_fin_bank WHERE sid IN |
||||
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
||||
|
#{item} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
<!--导出资方管理列表--> |
||||
|
<select id="listExcel" resultType="com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBankExportVo"> |
||||
|
SELECT bfb.contactor, |
||||
|
bfb.bankName, |
||||
|
bfb.mobile |
||||
|
FROM loan_fin_bank bfb |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectAppFinBankList" resultType="com.yxt.common.core.result.AppResultData"> |
||||
|
SELECT sid AS dictKey, bankName AS dictValue |
||||
|
FROM loan_fin_bank |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<!--根据资方名称模糊搜索资方名称下拉框--> |
||||
|
<select id="namesDown" resultType="java.util.Map"> |
||||
|
SELECT bb.bankName manageName, bb.sid |
||||
|
FROM loan_fin_bank bb |
||||
|
${ew.customSqlSegment} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,174 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanfinbank; |
||||
|
|
||||
|
import com.yxt.anrui.base.api.basefinbank.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loanfinbank.*; |
||||
|
import com.yxt.common.base.utils.ExportExcelUtils; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.AppResultData; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.UnsupportedEncodingException; |
||||
|
import java.net.URLEncoder; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBankFeignFallback.java <br/> |
||||
|
* Class: com.yxt.anrui.base.biz.basefinbank.BaseFinBankRest <br/> |
||||
|
* Description: 资方信息表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Api(tags = "资方信息表") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/loanfinbank") |
||||
|
public class LoanFinBankRest implements LoanFinBankFeign { |
||||
|
|
||||
|
@Autowired |
||||
|
private LoanFinBankService loanFinBankService; |
||||
|
@Autowired |
||||
|
private HttpServletResponse response; |
||||
|
// @Autowired
|
||||
|
// private LoanFinPolicyService loanFinPolicyService;
|
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<LoanFinBankVo>> listPage(PagerQuery<LoanFinBankQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<LoanFinBankVo> pv = loanFinBankService.listPageVo(pq); |
||||
|
pv.setMsg("搜索到以下" + pv.getTotal() + "个资方"); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean save(LoanFinBankDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String manageName = dto.getBankName(); |
||||
|
if (StringUtils.isNotBlank(dto.getSid())) { |
||||
|
String sid = dto.getSid(); |
||||
|
LoanFinBank baseFinBank = loanFinBankService.fetchBySid(sid); |
||||
|
if (baseFinBank == null) { |
||||
|
return ResultBean.fireFail().setMsg("该资方信息不存在"); |
||||
|
} |
||||
|
int count = loanFinBankService.selectAllByIdAndManageName(manageName, sid); |
||||
|
if (count > 0) { |
||||
|
return ResultBean.fireFail().setMessage("资方名称已存在"); |
||||
|
} |
||||
|
int i = loanFinBankService.updateBySid(dto.toMap(), sid); |
||||
|
if (i == 0) { |
||||
|
return ResultBean.fireFail().setMessage("修改失败"); |
||||
|
} |
||||
|
return rb.success().setMessage("修改成功"); |
||||
|
} else { |
||||
|
//查询资方名称是否重复
|
||||
|
int count = loanFinBankService.selectBaseFinBankByName(manageName); |
||||
|
if (count > 0) { |
||||
|
return ResultBean.fireFail().setMsg("添加失败,资方名称已存在"); |
||||
|
} |
||||
|
loanFinBankService.saveOrUpdateDto(dto); |
||||
|
return rb.success().setMessage("添加成功"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean update(LoanFinBankDto dto, String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String manageName = dto.getBankName(); |
||||
|
LoanFinBank baseFinBank = loanFinBankService.fetchBySid(sid); |
||||
|
if (baseFinBank == null) { |
||||
|
return ResultBean.fireFail().setMsg("该资方信息不存在"); |
||||
|
} |
||||
|
int count = loanFinBankService.selectAllByIdAndManageName(manageName, sid); |
||||
|
if (count > 0) { |
||||
|
return ResultBean.fireFail().setMessage("资方名称已存在"); |
||||
|
} |
||||
|
int i = loanFinBankService.updateBySid(dto.toMap(), sid); |
||||
|
if (i == 0) { |
||||
|
return ResultBean.fireFail().setMessage("修改失败"); |
||||
|
} |
||||
|
return rb.success().setMessage("修改成功"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<LoanFinBankInitVo> init(String sid) { |
||||
|
return loanFinBankService.init(sid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<LoanFinBankVo> details(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
LoanFinBankVo vo = loanFinBankService.selectBySid(sid); |
||||
|
if (vo == null) { |
||||
|
return new ResultBean<LoanFinBankVo>().fail().setMsg("资方信息不存在"); |
||||
|
} |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean deleteBySids(String[] sids) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
// int count = baseFinBankService.deleteBySids(sidList);
|
||||
|
for (String sid : sids) { |
||||
|
// List<LoanFinPolicy> loanFinPolicy = loanFinPolicyService.selectByBankSid(sid);
|
||||
|
// loanFinPolicy.removeAll(Collections.singleton(null));
|
||||
|
// if (!loanFinPolicy.isEmpty()) {
|
||||
|
// return rb.setMsg("已有金融产品政策使用了该资方,不能删除");
|
||||
|
// }
|
||||
|
int count = loanFinBankService.updateBySidDelete(sid); |
||||
|
if (count == 0) { |
||||
|
return rb.setMsg("删除失败"); |
||||
|
} |
||||
|
} |
||||
|
return ResultBean.fireSuccess().setMsg("删除成功"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void exportExcel(LoanFinBankExportQuery query) { |
||||
|
//得到所有要导出的数据
|
||||
|
List<LoanFinBankExportVo> loanFinBankExportVos = loanFinBankService.listExcel(query); |
||||
|
//定义导出的excel名字
|
||||
|
String excelName = "资方管理列表"; |
||||
|
String fileNameURL = ""; |
||||
|
try { |
||||
|
fileNameURL = URLEncoder.encode(excelName, "UTF-8"); |
||||
|
} catch (UnsupportedEncodingException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
//导出资方管理列表
|
||||
|
ExportExcelUtils.export(fileNameURL, loanFinBankExportVos, LoanFinBankExportVo.class, response); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据资方名称模糊搜索资方名称下拉框 |
||||
|
* |
||||
|
* @param manageName 资方名称 |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public ResultBean<List<Map<String, Object>>> namesDown(String manageName) { |
||||
|
List<Map<String, Object>> stringList = loanFinBankService.namesDown(manageName); |
||||
|
return new ResultBean<List<Map<String, Object>>>().success().setData(stringList); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<AppResultData>> selectAppFinBankList(PagerQuery<LoanFinBankQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<AppResultData> pv = loanFinBankService.selectAppFinBankList(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
} |
@ -0,0 +1,213 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanfinbank; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
||||
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanfinbank.*; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.AppResultData; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-base(安瑞基础信息模块) <br/> |
||||
|
* File: BaseFinBankService.java <br/> |
||||
|
* Class: com.yxt.anrui.base.biz.basefinbank.BaseFinBankService <br/> |
||||
|
* Description: 资方信息表 业务逻辑. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021-09-10 11:31:46 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class LoanFinBankService extends MybatisBaseService<LoanFinBankMapper, LoanFinBank> { |
||||
|
|
||||
|
// @Autowired
|
||||
|
// private LoanFinPolicyService loanFinPolicyService;
|
||||
|
@Autowired |
||||
|
private SysOrganizationFeign sysOrganizationFeign; |
||||
|
|
||||
|
public PagerVo<LoanFinBank> listPage(PagerQuery<LoanFinBankQuery> pq) { |
||||
|
LoanFinBankQuery query = pq.getParams(); |
||||
|
QueryWrapper<LoanFinBank> qw = createQueryWrapper(query); |
||||
|
IPage<LoanFinBank> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<LoanFinBank> pagging = baseMapper.selectPage(page, qw); |
||||
|
PagerVo<LoanFinBank> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
|
||||
|
public List<LoanFinBank> listAll(LoanFinBankQuery query) { |
||||
|
QueryWrapper<LoanFinBank> qw = createQueryWrapper(query); |
||||
|
return baseMapper.selectList(qw); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<LoanFinBank> createQueryWrapper(LoanFinBankQuery query) { |
||||
|
// todo: 这里根据具体业务调整查询条件
|
||||
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
||||
|
QueryWrapper<LoanFinBank> qw = new QueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(query.getManageName())) { |
||||
|
qw.like("bankName", query.getManageName()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getName())) { |
||||
|
qw.like("contactor", query.getName()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getMobile())) { |
||||
|
qw.like("mobile", query.getMobile()); |
||||
|
} |
||||
|
qw.eq("createOrgSid", query.getCreateOrgSid()); |
||||
|
qw.eq("isDelete", 0); |
||||
|
qw.orderByDesc("createTime"); |
||||
|
return qw; |
||||
|
} |
||||
|
|
||||
|
public PagerVo<LoanFinBankVo> listPageVo(PagerQuery<LoanFinBankQuery> pq) { |
||||
|
LoanFinBankQuery query = pq.getParams(); |
||||
|
QueryWrapper<LoanFinBank> qw = createQueryWrapper(query); |
||||
|
IPage<LoanFinBank> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<LoanFinBankVo> pagging = baseMapper.selectPageVo(page, qw); |
||||
|
PagerVo<LoanFinBankVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
|
||||
|
public void saveOrUpdateDto(LoanFinBankDto dto) { |
||||
|
LoanFinBank entity = new LoanFinBank(); |
||||
|
if (StringUtils.isNotBlank(dto.getCreateOrgSid())) { |
||||
|
String useOrgSid = dto.getCreateOrgSid(); |
||||
|
dto.setUseOrgSid(useOrgSid); |
||||
|
ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(useOrgSid); |
||||
|
if (organizationVo.getSuccess()) { |
||||
|
SysOrganizationVo organizationVoData = organizationVo.getData(); |
||||
|
if (null != organizationVoData) { |
||||
|
dto.setUseOrgName(organizationVoData.getName()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
if (StringUtils.isNotBlank(dto.getUserSid())) { |
||||
|
entity.setCreateBySid(dto.getUserSid()); |
||||
|
} |
||||
|
this.saveOrUpdate(entity); |
||||
|
} |
||||
|
|
||||
|
public LoanFinBankVo fetchByIdVo(String id) { |
||||
|
LoanFinBank entity = this.fetchById(id); |
||||
|
LoanFinBankVo vo = new LoanFinBankVo(); |
||||
|
BeanUtil.copyProperties(entity, vo); |
||||
|
return vo; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据资方名称查询是否存在与该资方名称相同的数据 |
||||
|
* |
||||
|
* @param managerName 资方名称 |
||||
|
* @return |
||||
|
*/ |
||||
|
public int selectBaseFinBankByName(String managerName) { |
||||
|
return baseMapper.selectBaseFinBankByName(managerName); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改时根据资方名称查询是否存在与该资方名称相同的数据 |
||||
|
* |
||||
|
* @param managerName 资方名称 |
||||
|
* @param sid 资方sid |
||||
|
*/ |
||||
|
public int selectAllByIdAndManageName(String managerName, String sid) { |
||||
|
return baseMapper.selectAllByIdAndManageName(managerName, sid); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 资方信息详情 |
||||
|
* |
||||
|
* @param sid 资方sid |
||||
|
*/ |
||||
|
public LoanFinBankVo selectBySid(String sid) { |
||||
|
return baseMapper.selectBySid(sid); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据条件查询资方管理列表数据 |
||||
|
* |
||||
|
* @param query 查询条件 |
||||
|
*/ |
||||
|
public List<LoanFinBankExportVo> listExcel(LoanFinBankExportQuery query) { |
||||
|
QueryWrapper<LoanFinBankExportVo> qw = new QueryWrapper<>(); |
||||
|
List<String> sids = query.getSids(); |
||||
|
if (sids != null) { |
||||
|
if (sids.size() != 0) { |
||||
|
qw.in("bfb.sid", sids); |
||||
|
} |
||||
|
} |
||||
|
String name = query.getName(); |
||||
|
if (StringUtils.isNotBlank(name)) { |
||||
|
qw.like("bfb.contactor", name); |
||||
|
} |
||||
|
String manageName = query.getManageName(); |
||||
|
if (StringUtils.isNotBlank(manageName)) { |
||||
|
qw.like("bfb.bankName", manageName); |
||||
|
} |
||||
|
String mobile = query.getMobile(); |
||||
|
if (StringUtils.isNotBlank(mobile)) { |
||||
|
qw.like("bfb.mobile", mobile); |
||||
|
} |
||||
|
|
||||
|
return baseMapper.listExcel(qw); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param sids |
||||
|
*/ |
||||
|
public int deleteBySids(List<String> sids) { |
||||
|
return baseMapper.deleteBySids(sids); |
||||
|
} |
||||
|
|
||||
|
public PagerVo<AppResultData> selectAppFinBankList(PagerQuery<LoanFinBankQuery> pq) { |
||||
|
LoanFinBankQuery query = pq.getParams(); |
||||
|
QueryWrapper<LoanFinBank> qw = createQueryWrapper(query); |
||||
|
IPage<LoanFinBank> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<AppResultData> pagging = baseMapper.selectAppFinBankList(page, qw); |
||||
|
PagerVo<AppResultData> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据资方名称模糊搜索资方名称下拉框 |
||||
|
* |
||||
|
* @param manageName 资方名称 |
||||
|
* @return |
||||
|
*/ |
||||
|
public List<Map<String, Object>> namesDown(String manageName) { |
||||
|
QueryWrapper<Map<String, Object>> qw = new QueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(manageName)) { |
||||
|
qw.like("bb.bankName", manageName); |
||||
|
} |
||||
|
return baseMapper.namesDown(qw); |
||||
|
} |
||||
|
|
||||
|
public int updateBySidDelete(String sid) { |
||||
|
return baseMapper.updateBySidDelete(sid); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<LoanFinBankInitVo> init(String sid) { |
||||
|
ResultBean<LoanFinBankInitVo> rb = ResultBean.fireFail(); |
||||
|
LoanFinBankInitVo vo = new LoanFinBankInitVo(); |
||||
|
LoanFinBank loanFinBank = fetchBySid(sid); |
||||
|
BeanUtil.copyProperties(loanFinBank, vo); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue