获取所有的银行信息

master
shijie 4 years ago
parent 0d2a990056
commit 4e634f07d2
  1. 4
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java
  2. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerDao.java
  3. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java
  4. 4
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  5. 4
      dq-financial-crms/src/main/resources/mapper/crms/CustomerDao.xml
  6. 7
      dq-financial-guarantee/pom.xml
  7. 41
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java
  8. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBankMapper.java
  9. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgBankService.java
  10. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgBankServiceImpl.java
  11. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/MyBatisPlusCodeGenerator.java
  12. 12
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBankMapper.xml
  13. 65
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBank.java

@ -160,9 +160,9 @@ public class CustomerController implements CustomerControllerApi {
* 查询所有客户编号/客户名称
*/
@GetMapping("/queryCompanyCodeAndName")
public ResponseResult queryCompanyCodeAndName(){
public ResponseResult queryCompanyCodeAndName(int type){
List<CustomerEntity>list = customerService.queryCompanyCodeAndName();
List<CustomerEntity>list = customerService.queryCompanyCodeAndName(type);
return ResponseResult.SUCCESS(list);
}
}

@ -35,5 +35,5 @@ public interface CustomerDao extends BaseMapper<CustomerEntity> {
List<Long> listCustomerId();
List<CustomerEntity> queryCompanyCodeAndName();
List<CustomerEntity> queryCompanyCodeAndName(int type);
}

@ -47,6 +47,6 @@ public interface CustomerService extends IService<CustomerEntity> {
ResponseResult queryCustomerInfoById(DgApplyAmountInfoRequest applyAmountInfo);
List<CustomerEntity> queryCompanyCodeAndName();
List<CustomerEntity> queryCompanyCodeAndName(int type);
}

@ -533,8 +533,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
return new ResponseResult<CompanyCustomerResponse>().SUCCESS(companyCustomerResponse);
}
public List<CustomerEntity> queryCompanyCodeAndName() {
List<CustomerEntity>list = customerDao.queryCompanyCodeAndName();
public List<CustomerEntity> queryCompanyCodeAndName(int type) {
List<CustomerEntity>list = customerDao.queryCompanyCodeAndName(type);
return list;
}
}

@ -91,8 +91,8 @@
</select>
<!-- 获取所有客户编号和客户名称 -->
<select id="queryCompanyCodeAndName" resultMap="customerMap">
SELECT code,`name` from crms_customer
<select id="queryCompanyCodeAndName" parameterType="int" resultMap="customerMap">
SELECT code,`name` from crms_customer where `type` =#{type}
</select>

@ -64,7 +64,12 @@
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>-->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.28</version>
<scope>compile</scope>
</dependency>
<!-- MP 核心库 -->
<dependency>
<groupId>com.baomidou</groupId>

@ -0,0 +1,41 @@
package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.service.IDgBankService;
import com.daqing.framework.domain.guarantee.DgBank;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
@RestController
@RequestMapping("/dg-bank")
public class DgBankController {
@Resource
private IDgBankService dgBankService;
/**
* 查询所有银行数据
* @param
* @return
*/
@GetMapping("/bankList")
@ApiOperation(value = "查询所有银行数据")
public ResponseResult bankList(){
List<DgBank> result = dgBankService.list();
return ResponseResult.SUCCESS(result);
}
}

@ -0,0 +1,18 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgBank;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
@Mapper
public interface DgBankMapper extends BaseMapper<DgBank> {
}

@ -0,0 +1,16 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.guarantee.DgBank;
/**
* <p>
* 服务类
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
public interface IDgBankService extends IService<DgBank> {
}

@ -0,0 +1,20 @@
package com.daqing.financial.guarantee.service.impl;
import com.daqing.financial.guarantee.mapper.DgBankMapper;
import com.daqing.financial.guarantee.service.IDgBankService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgBank;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
@Service
public class DgBankServiceImpl extends ServiceImpl<DgBankMapper, DgBank> implements IDgBankService {
}

@ -25,7 +25,7 @@ public class MyBatisPlusCodeGenerator {
public static final String PACKAGE_NAME = "com.daqing.financial.guarantee";
public static void main(String[] args) {
String[] tables = new String[] {"dg_guarantee_letter_assign_user"};//表名数组
String[] tables = new String[] {"dg_bank"};//表名数组
String[] tablePrefixs = new String[] {""};//去掉前缀
executeCode(PACKAGE_NAME,tables,tablePrefixs);
}

@ -0,0 +1,12 @@
<?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.daqing.financial.guarantee.mapper.DgBankMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgBank">
<id column="id" property="id" />
<result column="bank_name" property="bankName" />
<result column="bank_code" property="bankCode" />
</resultMap>
</mapper>

@ -0,0 +1,65 @@
package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
@TableName("dg_bank")
public class DgBank implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 银行名称
*/
private String bankName;
/**
* 银行标识码
*/
private String bankCode;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getBankCode() {
return bankCode;
}
public void setBankCode(String bankCode) {
this.bankCode = bankCode;
}
@Override
public String toString() {
return "DgBank{" +
"id=" + id +
", bankName=" + bankName +
", bankCode=" + bankCode +
"}";
}
}
Loading…
Cancel
Save