From 4e634f07d240880cd497c42f5e1583e79b4eec9c Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Thu, 12 Nov 2020 16:44:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=89=80=E6=9C=89=E7=9A=84?= =?UTF-8?q?=E9=93=B6=E8=A1=8C=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crms/controller/CustomerController.java | 4 +- .../financial/crms/dao/CustomerDao.java | 2 +- .../crms/service/CustomerService.java | 2 +- .../service/impl/CustomerServiceImpl.java | 4 +- .../resources/mapper/crms/CustomerDao.xml | 4 +- dq-financial-guarantee/pom.xml | 7 +- .../controller/DgBankController.java | 41 ++++++++++++ .../guarantee/mapper/DgBankMapper.java | 18 +++++ .../guarantee/service/IDgBankService.java | 16 +++++ .../service/impl/DgBankServiceImpl.java | 20 ++++++ .../util/MyBatisPlusCodeGenerator.java | 2 +- .../mapper/guarantee/DgBankMapper.xml | 12 ++++ .../framework/domain/guarantee/DgBank.java | 65 +++++++++++++++++++ 13 files changed, 187 insertions(+), 10 deletions(-) create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBankMapper.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgBankService.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgBankServiceImpl.java create mode 100644 dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBankMapper.xml create mode 100644 dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBank.java diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java index 82833dbf..efe663a8 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java @@ -160,9 +160,9 @@ public class CustomerController implements CustomerControllerApi { * 查询所有客户编号/客户名称 */ @GetMapping("/queryCompanyCodeAndName") - public ResponseResult queryCompanyCodeAndName(){ + public ResponseResult queryCompanyCodeAndName(int type){ - Listlist = customerService.queryCompanyCodeAndName(); + Listlist = customerService.queryCompanyCodeAndName(type); return ResponseResult.SUCCESS(list); } } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerDao.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerDao.java index 41ced049..5863ef98 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerDao.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerDao.java @@ -35,5 +35,5 @@ public interface CustomerDao extends BaseMapper { List listCustomerId(); - List queryCompanyCodeAndName(); + List queryCompanyCodeAndName(int type); } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java index 3bccb734..bc9c708a 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java @@ -47,6 +47,6 @@ public interface CustomerService extends IService { ResponseResult queryCustomerInfoById(DgApplyAmountInfoRequest applyAmountInfo); - List queryCompanyCodeAndName(); + List queryCompanyCodeAndName(int type); } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java index 3a37c89e..3edab2ac 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java @@ -533,8 +533,8 @@ public class CustomerServiceImpl extends ServiceImpl().SUCCESS(companyCustomerResponse); } - public List queryCompanyCodeAndName() { - Listlist = customerDao.queryCompanyCodeAndName(); + public List queryCompanyCodeAndName(int type) { + Listlist = customerDao.queryCompanyCodeAndName(type); return list; } } \ No newline at end of file diff --git a/dq-financial-crms/src/main/resources/mapper/crms/CustomerDao.xml b/dq-financial-crms/src/main/resources/mapper/crms/CustomerDao.xml index dcc1cd71..807dbea4 100644 --- a/dq-financial-crms/src/main/resources/mapper/crms/CustomerDao.xml +++ b/dq-financial-crms/src/main/resources/mapper/crms/CustomerDao.xml @@ -91,8 +91,8 @@ - + SELECT code,`name` from crms_customer where `type` =#{type} diff --git a/dq-financial-guarantee/pom.xml b/dq-financial-guarantee/pom.xml index b562ea92..7f2fbe96 100644 --- a/dq-financial-guarantee/pom.xml +++ b/dq-financial-guarantee/pom.xml @@ -64,7 +64,12 @@ lombok 1.18.12 --> - + + org.freemarker + freemarker + 2.3.28 + compile + com.baomidou diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java new file mode 100644 index 00000000..e8cb9a8a --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java @@ -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; + +/** + *

+ * 前端控制器 + *

+ * + * @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 result = dgBankService.list(); + return ResponseResult.SUCCESS(result); + } + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBankMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBankMapper.java new file mode 100644 index 00000000..525f9f6c --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBankMapper.java @@ -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; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Qyq + * @since 2020-11-12 + */ +@Mapper +public interface DgBankMapper extends BaseMapper { + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgBankService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgBankService.java new file mode 100644 index 00000000..b31a6779 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgBankService.java @@ -0,0 +1,16 @@ +package com.daqing.financial.guarantee.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.daqing.framework.domain.guarantee.DgBank; + +/** + *

+ * 服务类 + *

+ * + * @author Qyq + * @since 2020-11-12 + */ +public interface IDgBankService extends IService { + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgBankServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgBankServiceImpl.java new file mode 100644 index 00000000..c344f9cf --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgBankServiceImpl.java @@ -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; + +/** + *

+ * 服务实现类 + *

+ * + * @author Qyq + * @since 2020-11-12 + */ +@Service +public class DgBankServiceImpl extends ServiceImpl implements IDgBankService { + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/MyBatisPlusCodeGenerator.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/MyBatisPlusCodeGenerator.java index bbc6905c..49d8c26b 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/MyBatisPlusCodeGenerator.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/MyBatisPlusCodeGenerator.java @@ -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); } diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBankMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBankMapper.xml new file mode 100644 index 00000000..851becde --- /dev/null +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBankMapper.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBank.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBank.java new file mode 100644 index 00000000..bfeeafd9 --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBank.java @@ -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; + +/** + *

+ * + *

+ * + * @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 + + "}"; + } +}