Commit 7d6588f1 authored by 赵汉亭's avatar 赵汉亭

催货款通知邮箱增删查、客户关联关系信息增删查、客户付款信息增删改查完成(未测试)

parent 4d1337c9
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerDebtContact;
import com.huigou.topsun.customer.domain.query.CustomerDebtContactQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerDebtContactVo;
import java.util.List;
import java.util.Map;
public interface CustomerDebtContactApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
Map<String, Object> getCustomerDebtContactList(CustomerDebtContactQueryRequest queryRequest);
CustomerDebtContactVo saveCustomerDebtContact(CustomerDebtContact customerDebtContact);
void deleteCustomerDebtContact(List<String> ids);
}
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:
* author:ZHT
* date:2023/12/19
* description:
*/
public interface CustomerPayInfoApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
Map<String, Object> getCustomerPayInfoList(CustomerPayInfoQueryRequest queryRequest);
CustomerPayInfoVo updateCustomerPayInfo(CustomerPayInfo customerPayInfo);
CustomerPayInfoVo saveCustomerPayInfo(CustomerPayInfo customerPayInfo);
void deleteCustomerPayInfo(List<String> ids);
CustomerPayInfoVo getCustomerPayInfoById(String customerPayInfoId);
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerRelated;
import com.huigou.topsun.customer.domain.query.CustomerRelatedQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerRelatedVo;
import java.util.List;
import java.util.Map;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
*/
public interface CustomerRelatedApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
Map<String, Object> getCustomerRelatedList(CustomerRelatedQueryRequest queryRequest);
CustomerRelatedVo saveCustomerRelated(CustomerRelated customerRelated);
void deleteCustomerRelated(List<String> ids);
}
package com.huigou.topsun.customer.application.Impl;
import com.huigou.cache.DictUtil;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.customer.application.CustomerDebtContactApplication;
import com.huigou.topsun.customer.domain.CustomerDebtContact;
import com.huigou.topsun.customer.domain.query.CustomerDebtContactQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerDebtContactVo;
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;
public class CustomerDebtContactApplicationImpl implements CustomerDebtContactApplication {
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service
public class CustomerDebtContactApplicationImpl extends BaseApplication implements CustomerDebtContactApplication {
// 导入催货款通知邮箱Dao层
@Autowired
private CustomerDebtContactRepository customerDebtContactRepository;
@Override
public Map<String, Object> getCustomerDebtContactList(CustomerDebtContactQueryRequest queryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "customerDebtContact");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
queryModel.putDictionary("customerEmailType", DictUtil.getDictionary("customerEmailType"));
queryModel.putDictionary("sendEamil", DictUtil.getDictionary("sendEamil"));
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
return map;
}
@Override
public CustomerDebtContactVo saveCustomerDebtContact(CustomerDebtContact customerDebtContact) {
// 封装创建时间
long timestamp = System.currentTimeMillis();
customerDebtContact.setCreatedDate(new Date(timestamp));
customerDebtContact = customerDebtContactRepository.saveAndFlush(customerDebtContact);
CustomerDebtContactVo customerDebtContactVo = CustomerDebtContactVo.getCustomerDebtContactVo(customerDebtContact);
return customerDebtContactVo;
}
@Override
public void deleteCustomerDebtContact(List<String> ids) {
ids.forEach(id -> customerDebtContactRepository.delete(id));
}
}
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.CustomerPayInfo;
import com.huigou.topsun.customer.domain.query.CustomerPayInfoQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerPayInfoVo;
import com.huigou.topsun.customer.repository.CustomerPayInfoRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
*/
@Service
public class CustomerPayInfoApplicationImpl extends BaseApplication implements CustomerPayInfoApplication {
@Autowired
private CustomerPayInfoRepository customerPayInfoRepository;
@Override
public Map<String, Object> getCustomerPayInfoList(CustomerPayInfoQueryRequest queryRequest) {
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;
}
@Override
public CustomerPayInfoVo updateCustomerPayInfo(CustomerPayInfo customerPayInfo) {
// 获取时间
long timeMillis = System.currentTimeMillis();
customerPayInfo.setLastModifiedDate(new Date(timeMillis));
customerPayInfo = customerPayInfoRepository.saveAndFlush(customerPayInfo);
return CustomerPayInfoVo.getCustomerPayInfoVo(customerPayInfo);
}
@Override
public CustomerPayInfoVo saveCustomerPayInfo(CustomerPayInfo customerPayInfo) {
// 获取时间
long timeMillis = System.currentTimeMillis();
customerPayInfo.setCreatedDate(new Date(timeMillis));
customerPayInfo = customerPayInfoRepository.saveAndFlush(customerPayInfo);
return CustomerPayInfoVo.getCustomerPayInfoVo(customerPayInfo);
}
@Override
public void deleteCustomerPayInfo(List<String> ids) {
ids.forEach(id -> customerPayInfoRepository.delete(id));
}
@Override
public CustomerPayInfoVo getCustomerPayInfoById(String customerPayInfoId) {
CustomerPayInfo one = customerPayInfoRepository.getOne(customerPayInfoId);
return CustomerPayInfoVo.getCustomerPayInfoVo(one);
}
}
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.CustomerRelated;
import com.huigou.topsun.customer.domain.query.CustomerRelatedQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerRelatedVo;
import com.huigou.topsun.customer.repository.CustomerRelatedRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
*/
@Service
public class CustomerRelatedApplicationImpl extends BaseApplication implements CustomerRelatedApplication {
@Autowired
private CustomerRelatedRepository customerRelatedRepository;
@Override
public Map<String, Object> getCustomerRelatedList(CustomerRelatedQueryRequest queryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "customerRelated");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
return map;
}
@Override
public CustomerRelatedVo saveCustomerRelated(CustomerRelated customerRelated) {
// 封装时间
long timestamp = System.currentTimeMillis();
customerRelated.setCreatedDate(new Date(timestamp));
customerRelated = customerRelatedRepository.saveAndFlush(customerRelated);
return CustomerRelatedVo.getCustomerRelatedVo(customerRelated);
}
@Override
public void deleteCustomerRelated(List<String> ids) {
ids.forEach(id -> customerRelatedRepository.delete(id));
}
}
package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerDebtContactApplication;
import com.huigou.topsun.customer.domain.CustomerDebtContact;
import com.huigou.topsun.customer.domain.query.CustomerDebtContactQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerDebtContactVo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.annotation.SkipAuth;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
* 催货款通知邮箱
*/
@Controller
@ControllerMapping("/customerDebtContact")
public class CustomerDebtContactController extends CommonController {
@Autowired
private CustomerDebtContactApplication customerDebtContactApplication;
@Override
protected String getPagePath() {
return "/biz/topsun/custcomer/";
}
/**
* 获取催货款通知邮箱
*/
@SkipAuth
public String slicedCustomerDebtContactList() {
SDO sdo = this.getSDO();
CustomerDebtContactQueryRequest queryRequest = sdo.toQueryRequest(CustomerDebtContactQueryRequest.class);
return toResult(customerDebtContactApplication.getCustomerDebtContactList(queryRequest));
}
/**
* 新增催货款通知邮箱
*/
@SkipAuth
public String saveCustomerDebtContact() {
SDO sdo = this.getSDO();
CustomerDebtContactVo customerDebtContactVo = sdo.toObject(CustomerDebtContactVo.class);
CustomerDebtContact customerDebtContact = CustomerDebtContactVo.getCustomerDebtContact(customerDebtContactVo);
// 获取操作人信息
String personMemberName = sdo.getOperator().getPersonMemberName();
String personMemberId = sdo.getOperator().getPersonMemberId();
customerDebtContact.setCreatedById(personMemberId);
customerDebtContact.setCreatedByName(personMemberName);
customerDebtContactVo = customerDebtContactApplication.saveCustomerDebtContact(customerDebtContact);
return success(customerDebtContactVo);
}
/**
* 删除催货款信息邮箱
*/
@SkipAuth
public String deleteCustomerDebtContact() {
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
customerDebtContactApplication.deleteCustomerDebtContact(ids);
return success();
}
}
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.query.CustomerPayInfoQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerPayInfoVo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import com.huigou.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
* 客户付款信息
*/
@Controller
@ControllerMapping("/customerPayInfo")
public class CustomerPayInfoController extends CommonController {
@Autowired
private CustomerPayInfoApplication customerPayInfoApplication;
@Override
protected String getPagePath() {
return "/biz/topsun/custcomer/";
}
/**
* 获取客户付款信息
*/
public String slicedCustomerPayInfoList() {
SDO sdo = this.getSDO();
CustomerPayInfoQueryRequest queryRequest = sdo.toQueryRequest(CustomerPayInfoQueryRequest.class);
return toResult(customerPayInfoApplication.getCustomerPayInfoList(queryRequest));
}
/**
* 添加、修改客户付款信息
*/
public String saveCustomerPayInfo() {
SDO sdo = this.getSDO();
CustomerPayInfoVo customerPayInfoVo = sdo.toObject(CustomerPayInfoVo.class);
CustomerPayInfo customerPayInfo = CustomerPayInfoVo.getCustomerPayInfo(customerPayInfoVo);
// 获取操作人信息
String personMemberName = sdo.getOperator().getPersonMemberName();
String personMemberId = sdo.getOperator().getPersonMemberId();
if (StringUtil.isNotBlank(customerPayInfo.getCustomerPayInfoId())) {
// 封装修改人信息
customerPayInfo.setLastModifiedByName(personMemberName);
customerPayInfo.setLastModifiedById(personMemberId);
customerPayInfoVo = customerPayInfoApplication.updateCustomerPayInfo(customerPayInfo);
} else {
// 封装创建人信息
customerPayInfo.setCreatedById(personMemberId);
customerPayInfo.setCreatedByName(personMemberName);
customerPayInfoVo = customerPayInfoApplication.saveCustomerPayInfo(customerPayInfo);
}
return success(customerPayInfoVo);
}
/**
* 删除客户付款信息
*/
public String deleteCustomerPayInfo() {
List<String> ids = this.getSDO().getIds();
customerPayInfoApplication.deleteCustomerPayInfo(ids);
return success();
}
/**
* 根据id获取客户付款信息
*/
public String findCustomerPayInfoById() {
SDO sdo = this.getSDO();
String customerPayInfoId = sdo.getString("customerPayInfoId");
CustomerPayInfoVo customerPayInfoVo = customerPayInfoApplication.getCustomerPayInfoById(customerPayInfoId);
return success(customerPayInfoVo);
}
}
package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerRelatedApplication;
import com.huigou.topsun.customer.domain.CustomerRelated;
import com.huigou.topsun.customer.domain.query.CustomerRelatedQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerRelatedVo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
* 客户关联信息
*/
@Controller
@ControllerMapping("/customerRelated")
public class CustomerRelatedController extends CommonController {
@Autowired
private CustomerRelatedApplication customerRelatedApplication;
@Override
protected String getPagePath() {
return "/biz/topsun/custcomer/";
}
/**
* 获取客户关联信息
*/
public String slicedCustomerRelatedList() {
SDO sdo = this.getSDO();
CustomerRelatedQueryRequest queryRequest = sdo.toQueryRequest(CustomerRelatedQueryRequest.class);
return toResult(customerRelatedApplication.getCustomerRelatedList(queryRequest));
}
/**
* 新增客户关联信息
*/
public String saveCustomerRelated() {
SDO sdo = this.getSDO();
CustomerRelatedVo customerRelatedVo = sdo.toObject(CustomerRelatedVo.class);
CustomerRelated customerRelated = CustomerRelatedVo.getCustomerRelated(customerRelatedVo);
// 封装录入人信息
String personMemberName = sdo.getOperator().getPersonMemberName();
customerRelated.setCreatedByName(personMemberName);
customerRelatedVo = customerRelatedApplication.saveCustomerRelated(customerRelated);
return success(customerRelatedVo);
}
/**
* 删除客户关联信息
*/
public String deleteCustomerRelated() {
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
customerRelatedApplication.deleteCustomerRelated(ids);
return success();
}
}
package com.huigou.topsun.customer.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;
/**
* 催货款通知邮箱
* @TableName customer_debt_contact
*/
@Table(name="customer_debt_contact")
@Entity
@Data
public class CustomerDebtContact implements Serializable {
/**
* 催货款通知邮箱id
*/
@Id
@Column(name = "customer_debt_contact_id")
private String customerDebtContactId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 邮箱地址
*/
@Column(name = "customer_eamil")
private String customerEamil;
/**
* 联系人
*/
@Column(name = "customer_contact")
private String customerContact;
/**
* 是否开启邮件发送
*/
@Column(name = "send_eamil")
private String sendEamil;
/**
* 邮箱类型(customerEmailType)-(宝绅邮箱、客户邮箱)
*/
@Column(name = "customer_email_type")
private String customerEmailType;
/**
* 创建人id
*/
@Column(name = "created_by_id")
private String createdById;
/**
* 创建人名称
*/
@Column(name = "created_by_name")
private String createdByName;
/**
* 创建日期
*/
@Column(name = "created_date")
private Date createdDate;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;
/**
* 客户付款信息
* @TableName customer_pay_info
*/
@Table(name="customer_pay_info")
@Data
@Entity
public class CustomerPayInfo implements Serializable {
/**
* 客户付款信息表id
*/
@Id
@Column(name = "customer_pay_info_id")
private String customerPayInfoId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 支付方户名
*/
@Column(name = "customer_pay_account_name")
private String customerPayAccountName;
/**
* 录入人
*/
@Column(name = "created_by_name")
private String createdByName;
/**
* 录入人id
*/
@Column(name = "created_by_id")
private String createdById;
/**
* 录入时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人id
*/
@Column(name = "last_modified_by_id")
private String lastModifiedById;
/**
* 修改人
*/
@Column(name = "last_modified_by_name")
private String lastModifiedByName;
/**
* 修改日期
*/
@Column(name = "last_modified_date")
private Date lastModifiedDate;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;
/**
* 关联客户
* @TableName customer_related
*/
@Table(name="customer_related")
@Data
@Entity
public class CustomerRelated implements Serializable {
/**
* 关联客户id
*/
@Id
@Column(name = "customer_related_id")
private String customerRelatedId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 关联客户编码
*/
@Column(name = "customer_code_related")
private String customerCodeRelated;
/**
* 关联客户简称
*/
@Column(name = "customer_short_name_related")
private String customerShortNameRelated;
/**
* 关联客户全称
*/
@Column(name = "customer_name_related")
private String customerNameRelated;
/**
* 录入人
*/
@Column(name = "created_by_name")
private String createdByName;
/**
* 录入时间
*/
@Column(name = "created_date")
private Date createdDate;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain.query;
import com.huigou.data.domain.query.QueryAbstractRequest;
import lombok.Data;
import java.util.Date;
/**
* title:
* author:ZHT
* date:2023/12/18
* description:
*/
@Data
public class CustomerDebtContactQueryRequest extends QueryAbstractRequest {
/**
* 催货款通知邮箱id
*/
private String customerDebtContactId;
/**
* 客户id
*/
private String customerId;
/**
* 邮箱地址
*/
private String customerEamil;
/**
* 联系人
*/
private String customerContact;
/**
* 是否开启邮件发送
*/
private String sendEamil;
/**
* 邮箱类型(customerEmailType)-(宝绅邮箱、客户邮箱)
*/
private String customerEmailType;
/**
* 创建人id
*/
private String createdById;
/**
* 创建人名称
*/
private String createdByName;
/**
* 创建日期
*/
private Date createdDate;
}
package com.huigou.topsun.customer.domain.query;
import com.huigou.data.domain.query.QueryAbstractRequest;
import lombok.Data;
import java.util.Date;
/**
* title:
* author:ZHT
* date:2023/12/18
* description:
*/
@Data
public class CustomerPayInfoQueryRequest extends QueryAbstractRequest {
/**
* 客户付款信息表id
*/
private String customerPayInfoId;
/**
* 客户id
*/
private String customerId;
/**
* 支付方户名
*/
private String customerPayAccountName;
/**
* 录入人
*/
private String createdByName;
/**
* 录入人id
*/
private String createdById;
/**
* 录入时间
*/
private Date createdDate;
/**
* 修改人id
*/
private String lastModifiedById;
/**
* 修改人
*/
private String lastModifiedByName;
/**
* 修改日期
*/
private Date lastModifiedDate;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain.query;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Id;
import com.huigou.data.domain.query.QueryAbstractRequest;
import lombok.Data;
/**
* title:
* author:ZHT
* date:2023/12/18
* description:
*/
@Data
public class CustomerRelatedQueryRequest extends QueryAbstractRequest {
/**
* 关联客户id
*/
private String customerRelatedId;
/**
* 客户id
*/
private String customerId;
/**
* 关联客户编码
*/
private String customerCodeRelated;
/**
* 关联客户简称
*/
private String customerShortNameRelated;
/**
* 关联客户全称
*/
private String customerNameRelated;
/**
* 录入人
*/
private String createdByName;
/**
* 录入时间
*/
private Date createdDate;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain.vo;
import com.alibaba.fastjson.JSON;
import com.huigou.topsun.customer.domain.CustomerDebtContact;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
*/
@Data
public class CustomerDebtContactVo implements Serializable {
/**
* 催货款通知邮箱id
*/
private String customerDebtContactId;
/**
* 客户id
*/
private String customerId;
/**
* 邮箱地址
*/
private String customerEamil;
/**
* 联系人
*/
private String customerContact;
/**
* 是否开启邮件发送
*/
private String sendEamil;
/**
* 邮箱类型(customerEmailType)-(宝绅邮箱、客户邮箱)
*/
private String customerEmailType;
/**
* 创建人id
*/
private String createdById;
/**
* 创建人名称
*/
private String createdByName;
/**
* 创建日期
*/
private Date createdDate;
public static CustomerDebtContact getCustomerDebtContact(CustomerDebtContactVo customerDebtContactVo){
return JSON.parseObject(JSON.toJSONString(customerDebtContactVo),CustomerDebtContact.class);
}
public static CustomerDebtContactVo getCustomerDebtContactVo(CustomerDebtContact customerDebtContact){
return JSON.parseObject(JSON.toJSONString(customerDebtContact), CustomerDebtContactVo.class);
}
}
package com.huigou.topsun.customer.domain.vo;
import com.alibaba.fastjson.JSON;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
*/
@Data
public class CustomerPayInfoVo implements Serializable {
/**
* 客户付款信息表id
*/
private String customerPayInfoId;
/**
* 客户id
*/
private String customerId;
/**
* 支付方户名
*/
private String customerPayAccountName;
/**
* 录入人
*/
private String createdByName;
/**
* 录入人id
*/
private String createdById;
/**
* 录入时间
*/
private Date createdDate;
/**
* 修改人id
*/
private String lastModifiedById;
/**
* 修改人
*/
private String lastModifiedByName;
/**
* 修改日期
*/
private Date lastModifiedDate;
public static CustomerPayInfo getCustomerPayInfo(CustomerPayInfoVo customerPayInfoVo){
return JSON.parseObject(JSON.toJSONString(customerPayInfoVo),CustomerPayInfo.class);
}
public static CustomerPayInfoVo getCustomerPayInfoVo(CustomerPayInfo customerPayInfo){
return JSON.parseObject(JSON.toJSONString(customerPayInfo),CustomerPayInfoVo.class);
}
}
package com.huigou.topsun.customer.domain.vo;
import com.alibaba.fastjson.JSON;
import com.huigou.topsun.customer.domain.CustomerRelated;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* title:
* author:ZHT
* date:2023/12/19
* description:
*/
@Data
public class CustomerRelatedVo implements Serializable {
/**
* 关联客户id
*/
private String customerRelatedId;
/**
* 客户id
*/
private String customerId;
/**
* 关联客户编码
*/
private String customerCodeRelated;
/**
* 关联客户简称
*/
private String customerShortNameRelated;
/**
* 关联客户全称
*/
private String customerNameRelated;
/**
* 录入人
*/
private String createdByName;
/**
* 录入时间
*/
private Date createdDate;
public static CustomerRelated getCustomerRelated(CustomerRelatedVo customerRelatedVo){
return JSON.parseObject(JSON.toJSONString(customerRelatedVo),CustomerRelated.class);
}
public static CustomerRelatedVo getCustomerRelatedVo(CustomerRelated customerRelated){
return JSON.parseObject(JSON.toJSONString(customerRelated), CustomerRelatedVo.class);
}
}
package com.huigou.topsun.customer.repository;
import com.huigou.topsun.customer.domain.CustomerDebtContact;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* title:
* author:ZHT
* date:2023/12/18
* description:
*/
public interface CustomerDebtContactRepository extends JpaRepository<CustomerDebtContact, String> {
}
package com.huigou.topsun.customer.repository;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* title:
* author:ZHT
* date:2023/12/18
* description:
*/
public interface CustomerPayInfoRepository extends JpaRepository<CustomerPayInfo, String> {
}
package com.huigou.topsun.customer.repository;
import com.huigou.topsun.customer.domain.CustomerRelated;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* title:
* author:ZHT
* date:2023/12/18
* description:
*/
public interface CustomerRelatedRepository extends JpaRepository<CustomerRelated,String> {
}
......@@ -7,4 +7,29 @@
</sql-query>
<condition column="customer_name" name="customerName" type="java.lang.String" symbol="like" alias="c"/>
</query>
<query name="customerDebtContact" label="催货款通知邮箱表" table="customer_debt_contact">
<sql-query>
select c.*
from customer_debt_contact c
where customer_email_type = ?
and customer_id = ?
</sql-query>
</query>
<query name="customerRelated" label="客户关系关联信息表" table="customer_related">
<sql-query>
select c.*
from customer_related c
where customer_id = ?
</sql-query>
</query>
<query name="CustomerPayInfo" label="客户付款信息表" table="customer_pay_info">
<sql-query>
select c.*
from customer_pay_info c
where customer_id = ?
</sql-query>
</query>
</query-mappings>
\ No newline at end of file
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