feat(crm): 更新订单VO字段并优化SQL查询
- 在CrmOrderVo中移除customerName字段,新增customerCode、contactPerson和address字段 - 修改CrmOrderMapper.xml中的SQL查询语句,为所有字段添加表别名前缀co - 在SQL查询中增加客户编码、联系人和地址字段的映射 - 优化LEFT JOIN语句明确指定关联条件 - 更新SELECT子句字段列表以匹配新的VO结构
This commit is contained in:
@@ -107,7 +107,12 @@ public class CrmOrderVo {
|
|||||||
@ExcelProperty(value = "备注")
|
@ExcelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
//联查客户名称
|
|
||||||
private String customerName;
|
// @ExcelProperty(value = "客户编号")
|
||||||
|
private String customerCode;
|
||||||
|
// @ExcelProperty(value = "联系人")
|
||||||
|
private String contactPerson;
|
||||||
|
// @ExcelProperty(value = "地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,25 +27,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="selectVoPagePlus" resultType="com.klp.crm.domain.vo.CrmOrderVo">
|
<select id="selectVoPagePlus" resultType="com.klp.crm.domain.vo.CrmOrderVo">
|
||||||
SELECT
|
SELECT
|
||||||
order_id AS orderId,
|
co.order_id AS orderId,
|
||||||
order_code AS orderCode,
|
co.order_code AS orderCode,
|
||||||
order_type AS orderType,
|
co.order_type AS orderType,
|
||||||
customer_id AS customerId,
|
co.customer_id AS customerId,
|
||||||
order_amount AS orderAmount,
|
co.order_amount AS orderAmount,
|
||||||
salesman,
|
co.salesman,
|
||||||
delivery_date AS deliveryDate,
|
co.delivery_date AS deliveryDate,
|
||||||
pre_order_status AS preOrderStatus,
|
co.pre_order_status AS preOrderStatus,
|
||||||
audit_user AS auditUser,
|
co.audit_user AS auditUser,
|
||||||
audit_time AS auditTime,
|
co.audit_time AS auditTime,
|
||||||
order_status AS orderStatus,
|
co.order_status AS orderStatus,
|
||||||
finance_status AS financeStatus,
|
co.finance_status AS financeStatus,
|
||||||
unpaid_amount AS unpaidAmount,
|
co.unpaid_amount AS unpaidAmount,
|
||||||
remark,
|
co.remark,
|
||||||
create_by AS createBy,
|
co.create_by AS createBy,
|
||||||
create_time AS createTime,
|
co.create_time AS createTime,
|
||||||
update_by AS updateBy,
|
co.update_by AS updateBy,
|
||||||
update_time AS updateTime,
|
co.update_time AS updateTime,
|
||||||
cu.customer_name AS customerName
|
cu.customer_code AS customerCode,
|
||||||
|
cu.contact_person AS contactPerson,
|
||||||
|
cu.address AS address
|
||||||
FROM crm_order co
|
FROM crm_order co
|
||||||
LEFT JOIN crm_customer cu ON co.customer_id = cu.customer_id
|
LEFT JOIN crm_customer cu ON co.customer_id = cu.customer_id
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
|
|||||||
Reference in New Issue
Block a user