refactor(wms): 重构产品销售脚本查询接口

-移除 WmsProductSalesScriptMapper 中的 LambdaQueryWrapper 参数
- 添加 WmsProductSalesScriptBo 参数替代原有的查询封装方式
- 更新 XML 文件中的 SQL 查询逻辑,使用动态 SQL 替代自定义 SQL 段
- 简化 WmsProductSalesScriptServiceImpl 中的查询方法
This commit is contained in:
JR
2025-08-15 17:05:35 +08:00
parent 16815c64d1
commit 228627518b
3 changed files with 29 additions and 7 deletions

View File

@@ -21,8 +21,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectVoPagePlus" resultType="com.klp.domain.vo.WmsProductSalesScriptVo">
SELECT s.*, p.product_code, p.product_name
FROM wms_product_sales_script s
LEFT JOIN wms_product p ON s.product_id = p.product_id
${ew.customSqlSegment}
LEFT JOIN wms_product p ON s.product_id = p.product_id and p.del_flag = 0
<where>
s.del_flag = 0
<if test="bo.scriptId!= null">
AND s.script_id = #{bo.scriptId}
</if>
<if test="bo.productId!= null">
AND s.product_id = #{bo.productId}
</if>
<if test="bo.scriptTitle!= null and bo.scriptTitle!= ''">
AND s.script_title LIKE CONCAT('%', #{bo.scriptTitle}, '%')
</if>
<if test="bo.scriptContent!= null and bo.scriptContent!= ''">
AND s.script_content LIKE CONCAT('%', #{bo.scriptContent}, '%')
</if>
<if test="bo.featurePoint!= null">
AND s.feature_point = #{bo.featurePoint}
</if>
<if test="bo.isEnabled!= null">
AND s.is_enabled = #{bo.isEnabled}
</if>
<if test="bo.keyword!= null and bo.keyword!= ''">
AND (s.script_title LIKE CONCAT('%', #{bo.keyword}, '%')
OR s.script_content LIKE CONCAT('%', #{bo.keyword}, '%'))
</if>
</where>
</select>