查询所有客户编号和名称

master
shijie 4 years ago
parent e08f009964
commit ecbb71b831
  1. 12
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java
  2. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CompanyCustomerDao.java
  3. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerDao.java
  4. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java
  5. 7
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  6. 5
      dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml
  7. 4
      dq-financial-crms/src/main/resources/mapper/crms/CustomerDao.xml

@ -2,6 +2,8 @@ package com.daqing.financial.crms.controller;
import com.daqing.financial.crms.CustomerControllerApi; import com.daqing.financial.crms.CustomerControllerApi;
import com.daqing.financial.crms.service.CustomerService; import com.daqing.financial.crms.service.CustomerService;
import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.domain.crms.ext.CustomerCompanyTOI; import com.daqing.framework.domain.crms.ext.CustomerCompanyTOI;
import com.daqing.framework.domain.crms.ext.CustomerCompanyTOU; import com.daqing.framework.domain.crms.ext.CustomerCompanyTOU;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI; import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI;
@ -153,4 +155,14 @@ public class CustomerController implements CustomerControllerApi {
return customerService.queryCustomerInfoById(applyAmountInfo); return customerService.queryCustomerInfoById(applyAmountInfo);
} }
/**
* 查询所有客户编号/客户名称
*/
@GetMapping("/queryCompanyCodeAndName")
public ResponseResult queryCompanyCodeAndName(){
List<CustomerEntity>list = customerService.queryCompanyCodeAndName();
return ResponseResult.SUCCESS(list);
}
} }

@ -2,6 +2,7 @@ package com.daqing.financial.crms.dao;
import com.daqing.framework.domain.crms.CompanyCustomerEntity; import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CompanyCustomerResponse; import com.daqing.framework.domain.crms.response.CompanyCustomerResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -27,6 +28,4 @@ public interface CompanyCustomerDao extends BaseMapper<CompanyCustomerEntity> {
CompanyCustomerResponse queryCompanyInfo(@Param("applyAmountInfo") DgApplyAmountInfoRequest applyAmountInfo); CompanyCustomerResponse queryCompanyInfo(@Param("applyAmountInfo") DgApplyAmountInfoRequest applyAmountInfo);
List<CompanyCustomerEntity> queryCompanyCodeAndName();
} }

@ -34,4 +34,6 @@ public interface CustomerDao extends BaseMapper<CustomerEntity> {
boolean updateCustomer(CustomerEntity customerEntity); boolean updateCustomer(CustomerEntity customerEntity);
List<Long> listCustomerId(); List<Long> listCustomerId();
List<CustomerEntity> queryCompanyCodeAndName();
} }

@ -1,6 +1,7 @@
package com.daqing.financial.crms.service; package com.daqing.financial.crms.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.daqing.framework.domain.crms.ext.CustomerCompanyTOI; import com.daqing.framework.domain.crms.ext.CustomerCompanyTOI;
import com.daqing.framework.domain.crms.ext.CustomerCompanyTOU; import com.daqing.framework.domain.crms.ext.CustomerCompanyTOU;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI; import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI;
@ -45,5 +46,7 @@ public interface CustomerService extends IService<CustomerEntity> {
void excelTemplate(HttpServletResponse response); void excelTemplate(HttpServletResponse response);
ResponseResult queryCustomerInfoById(DgApplyAmountInfoRequest applyAmountInfo); ResponseResult queryCustomerInfoById(DgApplyAmountInfoRequest applyAmountInfo);
List<CustomerEntity> queryCompanyCodeAndName();
} }

@ -533,9 +533,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
return new ResponseResult<CompanyCustomerResponse>().SUCCESS(companyCustomerResponse); return new ResponseResult<CompanyCustomerResponse>().SUCCESS(companyCustomerResponse);
} }
/* @Override public List<CustomerEntity> queryCompanyCodeAndName() {
public List<CompanyCustomerEntity> queryCustomerCodeAndName() { List<CustomerEntity>list = customerDao.queryCompanyCodeAndName();
List<CompanyCustomerEntity>list = companyCustomerDao.queryCustomerCodeAndName();
return list; return list;
}*/ }
} }

@ -59,9 +59,6 @@
</where> </where>
</select> </select>
<!-- 根据客户编号/客户名称获取企业信息 -->
<select id="queryCompanyCodeAndName" resultMap="companyCustomerMap">
SELECT code,`name` from crms_customer
</select>
</mapper> </mapper>

@ -90,6 +90,10 @@
WHERE del_or_not = 0; WHERE del_or_not = 0;
</select> </select>
<!-- 获取所有客户编号和客户名称 -->
<select id="queryCompanyCodeAndName" resultMap="customerMap">
SELECT code,`name` from crms_customer
</select>
</mapper> </mapper>
Loading…
Cancel
Save