Commit 8eaca9c7 authored by 全洪江's avatar 全洪江

用户模块保存、删除、修改bug

Signed-off-by: 全洪江's avatarHongjiang <hongjiang.quan@topsunit.com>
parent de725c04
......@@ -3,7 +3,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,combox,commonTree"/>
<x:base include="layout,dialog,grid,tree,dateTime,combox,commonTree"/>
<x:script src='/system/opm/js/OpmUtil.js'/>
<x:script src='/biz/topsun/common/purchaseCommon.js'/>
<x:script src='/biz/topsun/customer/customerDetail.js'/>
......@@ -44,12 +44,13 @@
<x:inputC name="customerCode" label="客户编码" labelCol="1" fieldCol="2"/>
<x:inputC name="customerName" label="客户全称" labelCol="1" fieldCol="2"/>
<x:inputC name="customerShortName" label="客户简称" labelCol="1" fieldCol="2"/>
<x:inputC name="customerWorkTime" label="客户工作时间" wrapper="date" labelCol="1" fieldCol="2"/>
<x:inputC name="customerWorkTime" label="客户工作时间" wrapper="dateTime" labelCol="1" fieldCol="2"/>
<x:inputC name="customerEnName" label="英文名称" labelCol="1" fieldCol="2"/>
<x:inputC name="customerEnShortName" label="英文名简称" labelCol="1" fieldCol="2"/>
<x:inputC name="provinceInfo" label="所属地区" maxLength="32" labelCol="1" fieldCol="2"
readonly="true"/>
<x:inputC name="customerLevel" label="客户等级" maxLength="32" labelCol="1" fieldCol="2"/>
<x:hidden name="provinceCode"></x:hidden>
<x:selectC name="customerLevel" label="客户等级" dictionary="customerLevel" labelCol="1" fieldCol="2"/>
<x:inputC name="customerFactoryCode" label="工厂代号" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="customerAddress" label="地址" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="customerGroup" label="所属集团" maxLength="32" labelCol="1" fieldCol="2"/>
......
......@@ -98,11 +98,5 @@ function updateHandler(data) {
})
}
/**
* 刷新表格
*/
function reloadGrid(obj) {
sizeGroupGridManager.loadData();
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.topsun.customer.domain.CustomerDebtContact;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import com.huigou.topsun.customer.domain.CustomerRelated;
import com.huigou.topsun.customer.domain.query.ContactQueryRequest;
import com.huigou.topsun.customer.domain.query.CustomerQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerVo;
import java.util.List;
import java.util.Map;
......@@ -17,4 +21,8 @@ public interface CustomerApplication {
void deleteContactById(String id);
void deleteContactByIds(List<String> ids);
CustomerVo saveCustomer(CustomerVo customerVo, List<CustomerContact> customerContactList, List<CustomerDebtContact> baoshenEmailList, List<CustomerDebtContact> customerEmailList, List<CustomerRelated> customerRelatedList, List<CustomerPayInfo> customerPayInfoList);
void deleteCustomerAndAffiliatedInfoByCustomerId(List<String> customerIds);
}
......@@ -19,4 +19,6 @@ public interface CustomerBaseInfoApplication {
CustomerBank findCustomerBankByCustomerId(String customerId);
List<CustomerContact> findCustomerContactByCustomerId(String customerId);
void deleteByCustomerId(String customerId);
}
package com.huigou.topsun.customer.application;
public interface CustomerOtherInfoApplication {
public interface CustomerContactApplication {
void deleteByCustomerId(String customerId);
}
......@@ -15,4 +15,5 @@ public interface CustomerDebtContactApplication {
void deleteCustomerDebtContact(List<String> ids);
void deleteByCustomerId(String customerId);
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import com.huigou.topsun.customer.domain.query.CustomerPayInfoQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerPayInfoVo;
import java.util.List;
import java.util.Map;
/**
* title:
......@@ -14,9 +12,9 @@ import java.util.Map;
* description:
*/
public interface CustomerPayInfoApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
Map<String, Object> getCustomerPayInfoList(CustomerPayInfoQueryRequest queryRequest);
List<CustomerPayInfo> getCustomerPayInfoList(String customerId);
CustomerPayInfoVo updateCustomerPayInfo(CustomerPayInfo customerPayInfo);
......@@ -25,4 +23,6 @@ public interface CustomerPayInfoApplication {
void deleteCustomerPayInfo(List<String> ids);
CustomerPayInfoVo getCustomerPayInfoById(String customerPayInfoId);
void deleteByCustomerId(String customerId);
}
......@@ -23,4 +23,5 @@ public interface CustomerRelatedApplication {
void deleteCustomerRelated(List<String> ids);
void deleteByCustomerId(String customerId);
}
......@@ -3,16 +3,19 @@ package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.customer.application.CustomerApplication;
import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.topsun.customer.application.*;
import com.huigou.topsun.customer.domain.*;
import com.huigou.topsun.customer.domain.query.CustomerQueryRequest;
import com.huigou.topsun.customer.repository.CustomerContactRepository;
import com.huigou.topsun.customer.domain.vo.CustomerVo;
import com.huigou.topsun.customer.repository.*;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -21,11 +24,32 @@ import java.util.Map;
public class CustomerApplicationImpl extends BaseApplication implements CustomerApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Autowired
private CustomerRepository customerRepository;
@Autowired
private CustomerBaseInfoApplication customerBaseInfoApplication;
@Autowired
private CustomerBankRepository customerBankRepository;
@Autowired
private CustomerContactRepository customerContactRepository;
@Autowired
private CustomerContactApplication customerContactApplication;
@Autowired
private CustomerDebtContactRepository CustomerDebtContactRepository;
@Autowired
private CustomerDebtContactApplication customerDebtContactApplication;
@Autowired
private CustomerRelatedRepository customerRelatedRepository;
@Autowired
private CustomerRelatedApplication customerRelatedApplication;
@Autowired
private CustomerPayInfoRepository customerPayInfoRepository;
@Autowired
private CustomerPayInfoApplication customerPayInfoApplication;
/**
* 分页查询客户信息数据
*
* @param customerQueryRequest
* @return
*/
......@@ -38,6 +62,7 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
/**
* 分页查询联系人信息
*
* @param customerId
* @return
*/
......@@ -50,6 +75,7 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
/**
* 根据单个id删除
*
* @param id
*/
@Override
......@@ -60,6 +86,7 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
/**
* 批量进行删除
*
* @param ids
*/
......@@ -68,4 +95,83 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
public void deleteContactByIds(List<String> ids) {
ids.forEach(this::deleteContactById);
}
/**
* 保存客户信息(多表保存)
*
* @param customerVo
* @param customerContactList
* @param baoshenEmailList
* @param customerEmailList
* @param customerRelatedList
* @param customerPayInfoList
* @return
*/
@Override
public CustomerVo saveCustomer(CustomerVo customerVo, List<CustomerContact> customerContactList, List<CustomerDebtContact> baoshenEmailList, List<CustomerDebtContact> customerEmailList, List<CustomerRelated> customerRelatedList, List<CustomerPayInfo> customerPayInfoList) {
Customer customer = getCustomer(customerVo);
CustomerBank customerBank = getCustomerBank(customerVo);
Customer saveCustomer = customerRepository.saveAndFlush(customer);
String customerId = saveCustomer.getCustomerId();
customerBank.setCustomerId(customerId);
CustomerBank saveCustomerBank = customerBankRepository.saveAndFlush(customerBank);
customerContactList.forEach(customerContact -> {
customerContact.setCustomerId(customerId);
customerContactRepository.saveAndFlush(customerContact);
});
// for (CustomerDebtContact customerDebtContact : baoshenEmailList) {
// customerDebtContact.setCustomerEmailType("1");
// CustomerDebtContactRepository.saveAndFlush(customerDebtContact);
// }
customerEmailList.forEach(customerDebtContact ->{
customerDebtContact.setCustomerId(customerId);
customerDebtContact.setCustomerEmailType("1");
CustomerDebtContactRepository.saveAndFlush(customerDebtContact);
});
baoshenEmailList.forEach(customerDebtContact ->{
customerDebtContact.setCustomerId(customerId);
customerDebtContact.setCustomerEmailType("0");
CustomerDebtContactRepository.saveAndFlush(customerDebtContact);
});
customerRelatedList.forEach(customerRelated -> {
customerRelated.setCustomerId(customerId);
customerRelatedRepository.saveAndFlush(customerRelated);
});
customerPayInfoList.forEach(customerPayInfo -> {
customerPayInfo.setCustomerId(customerId);
customerPayInfoRepository.saveAndFlush(customerPayInfo);
});
CustomerVo saveCustomerVo = new CustomerVo();
BeanUtils.copyProperties(saveCustomer, saveCustomerVo);
BeanUtils.copyProperties(saveCustomerBank, saveCustomerVo);
return saveCustomerVo;
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void deleteCustomerAndAffiliatedInfoByCustomerId(List<String> customerIds) {
for (String customerId : customerIds) {
customerRepository.delete(customerId);
customerBaseInfoApplication.deleteByCustomerId(customerId);
customerContactApplication.deleteByCustomerId(customerId);
customerDebtContactApplication.deleteByCustomerId(customerId);
customerRelatedApplication.deleteByCustomerId(customerId);
customerPayInfoApplication.deleteByCustomerId(customerId);
}
}
public Customer getCustomer(CustomerVo customerVo) {
Customer customer = new Customer();
BeanUtils.copyProperties(customerVo, customer);
return customer;
}
public CustomerBank getCustomerBank(CustomerVo customerVo) {
CustomerBank customerBank = new CustomerBank();
BeanUtils.copyProperties(customerVo, customerBank);
return customerBank;
}
}
package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.customer.application.CustomerBaseInfoApplication;
import com.huigou.topsun.customer.domain.Customer;
import com.huigou.topsun.customer.domain.CustomerBank;
import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.topsun.customer.domain.Province;
import com.huigou.topsun.customer.domain.*;
import com.huigou.topsun.customer.domain.vo.CustomerVo;
import com.huigou.topsun.customer.repository.CustomerBankRepository;
import com.huigou.topsun.customer.repository.CustomerContactRepository;
import com.huigou.topsun.customer.repository.CustomerRepository;
import com.huigou.topsun.customer.repository.ProvinceRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -18,7 +17,9 @@ import java.util.ArrayList;
import java.util.List;
@Service
public class CustomerBaseInfoApplicationImpl implements CustomerBaseInfoApplication {
public class CustomerBaseInfoApplicationImpl extends BaseApplication implements CustomerBaseInfoApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Autowired
private ProvinceRepository provinceRepository;
@Autowired
......@@ -82,6 +83,12 @@ public class CustomerBaseInfoApplicationImpl implements CustomerBaseInfoApplicat
}
@Override
public void deleteByCustomerId(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "deleteCustomerBank");
this.sqlExecutorDao.executeUpdate(queryDescriptor.getSql(),customerId);
}
// /**
// * @param provinceCode
// * @return provinceList
......
package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.customer.application.CustomerContactApplication;
import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.stereotype.Service;
@Service
public class CustomerContactApplicationImpl extends BaseApplication implements CustomerContactApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Override
public void deleteByCustomerId(String customerId) {
QueryDescriptor queryDescriptor = sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "deleteContact");
sqlExecutorDao.executeUpdate(queryDescriptor.getSql(), customerId);
}
}
......@@ -12,6 +12,8 @@ import com.huigou.topsun.customer.repository.CustomerDebtContactRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
......@@ -45,7 +47,14 @@ public class CustomerDebtContactApplicationImpl extends BaseApplication implemen
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void deleteCustomerDebtContact(List<String> ids) {
ids.forEach(id -> customerDebtContactRepository.delete(id));
}
@Override
public void deleteByCustomerId(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "deleteCustomerDebtContact");
this.sqlExecutorDao.executeUpdate(queryDescriptor.getSql(), customerId);
}
}
package com.huigou.topsun.customer.application.Impl;
import com.huigou.topsun.customer.application.CustomerOtherInfoApplication;
public class CustomerOtherInfoApplicationImpl implements CustomerOtherInfoApplication {
}
......@@ -3,6 +3,7 @@ package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.customer.application.CustomerPayInfoApplication;
import com.huigou.topsun.customer.domain.CustomerDebtContact;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import com.huigou.topsun.customer.domain.query.CustomerPayInfoQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerPayInfoVo;
......@@ -28,11 +29,10 @@ public class CustomerPayInfoApplicationImpl extends BaseApplication implements C
private CustomerPayInfoRepository customerPayInfoRepository;
@Override
public Map<String, Object> getCustomerPayInfoList(CustomerPayInfoQueryRequest queryRequest) {
public List<CustomerPayInfo> getCustomerPayInfoList(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "CustomerPayInfo");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
return map;
List<CustomerPayInfo> customerPayInfoList = this.sqlExecutorDao.queryToList(queryDescriptor.getSql(), CustomerPayInfo.class, customerId);
return customerPayInfoList;
}
@Override
......@@ -65,4 +65,10 @@ public class CustomerPayInfoApplicationImpl extends BaseApplication implements C
return CustomerPayInfoVo.getCustomerPayInfoVo(one);
}
@Override
public void deleteByCustomerId(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "deleteCustomerPayInfo");
this.sqlExecutorDao.executeUpdate(queryDescriptor.getSql(), customerId);
}
}
......@@ -3,6 +3,7 @@ package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.customer.application.CustomerRelatedApplication;
import com.huigou.topsun.customer.domain.CustomerDebtContact;
import com.huigou.topsun.customer.domain.CustomerRelated;
import com.huigou.topsun.customer.domain.query.CustomerRelatedQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerRelatedVo;
......@@ -51,5 +52,11 @@ public class CustomerRelatedApplicationImpl extends BaseApplication implements C
ids.forEach(id -> customerRelatedRepository.delete(id));
}
@Override
public void deleteByCustomerId(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "deleteCustomerRelated");
this.sqlExecutorDao.executeUpdate(queryDescriptor.getSql(), customerId);
}
}
......@@ -2,9 +2,8 @@ package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerBaseInfoApplication;
import com.huigou.topsun.customer.application.CustomerApplication;
import com.huigou.topsun.customer.domain.CustomerBank;
import com.huigou.topsun.customer.domain.*;
import com.huigou.topsun.customer.domain.query.CustomerQueryRequest;
import com.huigou.topsun.customer.domain.Province;
import com.huigou.topsun.customer.domain.vo.CustomerVo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
......@@ -70,6 +69,7 @@ public class CustomerController extends CommonController {
/**
* 转跳到客户详细信息页面
*
* @return
*/
public String forwardCustomerDetail() {
......@@ -84,6 +84,7 @@ public class CustomerController extends CommonController {
/**
* 新增客户,转跳到新增页面
*
* @return
*/
public String addCustomerDetail() {
......@@ -92,6 +93,7 @@ public class CustomerController extends CommonController {
/**
* 根据id列表删除用户
*
* @return
*/
public String deleteCustomer() {
......@@ -105,15 +107,23 @@ public class CustomerController extends CommonController {
/**
* 保存客户信息(多表保存,添加事务)
*
* @return
*/
public String saveCustomer() {
SDO sdo = getSDO();
String customerId = sdo.getString("customerId");
//TODO
//保存客户信息
return null;
CustomerVo customerVo = sdo.toObject(CustomerVo.class);
List<CustomerContact> customerContactList = sdo.getList("contactList", CustomerContact.class);
List<CustomerDebtContact> baoshenEmailList = sdo.getList("baoshenEmailList", CustomerDebtContact.class);
List<CustomerDebtContact> customerEmailList = sdo.getList("customerEmailList", CustomerDebtContact.class);
List<CustomerRelated> customerRelatedList = sdo.getList("customerRelatedList", CustomerRelated.class);
List<CustomerPayInfo> customerPayInfoList = sdo.getList("customerPayInfoList", CustomerPayInfo.class);
customerVo = customerApplication.saveCustomer(customerVo, customerContactList, baoshenEmailList, customerEmailList, customerRelatedList, customerPayInfoList);
return success(customerVo);
}
/**
* 展示客户省市数据,如果客户的省份编码是省级行政单位,直接返回省份数据,
* 如果客户的省份编码是二级或者三级行政单位,则需要返回对应的省级或者市级行政单位
......@@ -160,6 +170,7 @@ public class CustomerController extends CommonController {
/**
* 根据id列表删除联系人
*
* @return
*/
public String deleteContact() {
......@@ -171,17 +182,17 @@ public class CustomerController extends CommonController {
/**
* 删除客户及其附属信息
*
* @return
*/
public String deleteCustomerAndAffiliatedInfoByCustomerId() {
SDO sdo = getSDO();
String customerId = sdo.getString("customerId");
//TODO
//多表联删
List<String> customerIds = sdo.getIds();
customerApplication.deleteCustomerAndAffiliatedInfoByCustomerId(customerIds);
return success();
}
}
}
......@@ -8,10 +8,14 @@ import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.annotation.SkipAuth;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import com.huigou.util.StringUtil;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
import java.util.stream.Collectors;
/**
* title:
......@@ -44,6 +48,7 @@ public class CustomerDebtContactController extends CommonController {
public String saveCustomerDebtContactDetail() {
return forward("customerDebtContactDetail");
}
/**
* 获取催货款通知邮箱
*/
......@@ -52,7 +57,20 @@ public class CustomerDebtContactController extends CommonController {
String customerId = sdo.getString("customerId");
String customerEmailType = sdo.getString("customerEmailType");
List<CustomerDebtContact> customerDebtContactList = customerDebtContactApplication.getCustomerDebtContactList(customerId, customerEmailType);
return packGridDataAndResult(customerDebtContactList);
List<CustomerDebtContactVo> customerDebtContactVoList = customerDebtContactList.stream().map(customerDebtContact -> {
CustomerDebtContactVo customerDebtContactVo = new CustomerDebtContactVo();
BeanUtils.copyProperties(customerDebtContact, customerDebtContactVo);
String sendEmail = customerDebtContact.getSendEmail();
if (!StringUtils.isEmpty(sendEmail)) {
if (sendEmail.equals("0")) {
customerDebtContactVo.setSendEmailTextView("否");
} else {
customerDebtContactVo.setSendEmailTextView("是");
}
}
return customerDebtContactVo;
}).collect(Collectors.toList());
return packGridDataAndResult(customerDebtContactVoList);
}
/**
......
......@@ -2,6 +2,7 @@ package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerPayInfoApplication;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import com.huigou.topsun.customer.domain.CustomerRelated;
import com.huigou.topsun.customer.domain.query.CustomerPayInfoQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerPayInfoVo;
import com.huigou.uasp.annotation.ControllerMapping;
......@@ -49,9 +50,9 @@ public class CustomerPayInfoController extends CommonController {
*/
public String slicedCustomerPayInfoList() {
SDO sdo = this.getSDO();
CustomerPayInfoQueryRequest queryRequest = sdo.toQueryRequest(CustomerPayInfoQueryRequest.class);
return toResult(customerPayInfoApplication.getCustomerPayInfoList(queryRequest));
String customerId = sdo.getString("customerId");
List<CustomerPayInfo> customerPayInfoList = customerPayInfoApplication.getCustomerPayInfoList(customerId);
return packGridDataAndResult(customerPayInfoList);
}
/**
......
......@@ -42,6 +42,11 @@ public class CustomerDebtContactVo implements Serializable {
*/
private String sendEmail;
/**
* 前端展示字段
*/
private String sendEmailTextView;
/**
* 邮箱类型(customerEmailType)-(宝绅邮箱、客户邮箱)
*/
......
......@@ -5,4 +5,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
public interface CustomerBankRepository extends JpaRepository<CustomerBank,String> {
CustomerBank findCustomerBankByCustomerId(String customerId);
}
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query name="deleteCustomerBank" label="删除客户银行信息" table="customer_bank">
<sql-query>
delete
from customer_bank c
where customer_id = ?
</sql-query>
</query>
<query name="customerList" label="客户信息表" table="customer">
<sql-query>
select c.* from customer c where 1=1
......@@ -17,6 +25,15 @@
</sql-query>
</query>
<query name="deleteCustomerDebtContact" label="删除催货款通知邮箱" table="customer_debt_contact">
<sql-query>
delete
from customer_debt_contact c
where customer_id = ?
</sql-query>
</query>
<query name="customerRelated" label="客户关系关联信息表" table="customer_related">
<sql-query>
select c.*
......@@ -24,6 +41,13 @@
where customer_id = ?
</sql-query>
</query>
<query name="deleteCustomerRelated" label="删除客户关系关联信息" table="customer_related">
<sql-query>
delete
from customer_related c
where customer_id = ?
</sql-query>
</query>
<query name="CustomerPayInfo" label="客户付款信息表" table="customer_pay_info">
<sql-query>
......@@ -32,12 +56,26 @@
where customer_id = ?
</sql-query>
</query>
<query name="deleteCustomerPayInfo" label="删除客户付款信息" table="customer_pay_info">
<sql-query>
delete
from customer_pay_info c
where customer_id = ?
</sql-query>
</query>
<query name="contactList" label="联系人信息表" table="customerContact">
<query name="contactList" label="联系人信息表" table="customer_contact">
<sql-query>
select c.* from customer_contact c where c.customer_id = ?
</sql-query>
</query>
<query name="deleteContact" label="删除联系人信息" table="customer_contact">
<sql-query>
delete
from customer_contact c
where customer_id = ?
</sql-query>
</query>
<query name="monthlySettlementMethod" label="月结方式表" table="monthly_settlement_method">
<sql-query>
......
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