feat(order): 添加管理员端报价单搜索功能
- 实现了管理员端报价单搜索接口 - 添加了按模块ID、系列号、型号等条件筛选功能 - 集成了产品型号、配置、价格关联查询逻辑 - 支持按客户名称、报价单号模糊匹配搜索 - 实现了创建时间范围查询功能 - 添加了折扣和推荐商品筛选选项
This commit is contained in:
parent
49e935f83a
commit
cfac015497
|
|
@ -24,6 +24,61 @@
|
|||
</select>
|
||||
|
||||
<select id="searchFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.QuotationSearchVO">
|
||||
|
||||
SELECT qso.*
|
||||
FROM quotation_shopping_order qso
|
||||
INNER JOIN
|
||||
(
|
||||
SELECT DISTINCT qso1.id
|
||||
FROM quotation_shopping_order qso1
|
||||
INNER JOIN quotation_shopping_order_item qsoi ON qso1.id=qsoi.order_id
|
||||
INNER JOIN quotation_shopping_cart qsc ON qsoi.cart_id=qsc.id
|
||||
LEFT JOIN product_model pm ON qsc.model_id=pm.batch_number AND pm.state=1 AND pm.`enable`=1
|
||||
LEFT JOIN quotation_model_config qmc ON qsc.config_id=qmc.id
|
||||
LEFT JOIN quotation_model_price qmp ON qsc.price_id=qmp.id
|
||||
<where>
|
||||
<if test="request.moduleId!=null">
|
||||
AND pm.module_id=#{request.moduleId}
|
||||
</if>
|
||||
<if test="request.seriesNumber!=null">
|
||||
AND pm.series_number=#{request.seriesNumber}
|
||||
</if>
|
||||
<if test="request.typeNumber!=null">
|
||||
AND pm.type_number=#{request.typeNumber}
|
||||
</if>
|
||||
<if test="request.configId!=null">
|
||||
AND qsc.config_id=#{request.configId}
|
||||
</if>
|
||||
<if test="request.priceId!=null">
|
||||
AND qsc.price_id=#{request.priceId}
|
||||
</if>
|
||||
<if test="request.hasDiscount!=null">
|
||||
and qsc.has_discount=1
|
||||
</if>
|
||||
<if test="request.recommend==true">
|
||||
and qsc.discount_id is not null
|
||||
</if>
|
||||
<if test="request.no!=null and request.no!=''">
|
||||
AND pm.`no` like concat('%', #{request.no}, '%')
|
||||
</if>
|
||||
</where>
|
||||
) AS t ON t.id=qso.id
|
||||
<where>
|
||||
<if test="request.targetId!=null">
|
||||
AND qso.target_id=#{request.targetId}
|
||||
</if>
|
||||
<if test="request.quotationCode!=null and request.quotationCode!=''">
|
||||
AND qso.quotation_code like concat('%', #{request.quotationCode}, '%')
|
||||
</if>
|
||||
<if test="request.customerName!=null and request.customerName!=''">
|
||||
AND qso.customer_name like concat('%', #{request.customerName}, '%')
|
||||
</if>
|
||||
<if test="request.createTimeStart!=null and request.createTimeStart!=''">
|
||||
and qso.create_time>=#{request.createTimeStart}
|
||||
</if>
|
||||
<if test="request.createTimeEnd!=null and request.createTimeEnd!=''">
|
||||
and qso.create_time <= #{request.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
order by qso.id desc
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue