|
|
@@ -1145,8 +1145,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectStoreOrderScrmByCompanyCustomerParam" parameterType="com.fs.hisStore.param.FsCompanyCustomerOrderParam" resultType="com.fs.hisStore.vo.FsStoreOrderVO">
|
|
|
- select o.*, u.phone, u.register_code, u.register_date, u.source,
|
|
|
+ <select id="selectStoreOrderScrmByCompanyCustomerParam" resultType="com.fs.hisStore.vo.FsStoreOrderVO">
|
|
|
+ select distinct o.*, u.phone, u.register_code, u.register_date, u.source,
|
|
|
c.company_name,
|
|
|
cu.nick_name as company_user_nick_name,
|
|
|
cu.phonenumber as company_usere_phonenumber
|
|
|
@@ -1155,10 +1155,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join company c on c.company_id = o.company_id
|
|
|
left join company_user cu on cu.user_id = o.company_user_id
|
|
|
<where>
|
|
|
- company_customer_id = #{maps.companyCustomerId}
|
|
|
+ o.company_customer_id = #{maps.companyCustomerId}
|
|
|
+ <if test="maps.orderCode != null and maps.orderCode != ''">
|
|
|
+ and o.order_code = #{maps.orderCode}
|
|
|
+ </if>
|
|
|
<if test="maps.productName != null and maps.productName != ''">
|
|
|
- and fsp.product_name like concat('%', #{maps.productName}, '%')
|
|
|
+ and exists (
|
|
|
+ select 1 from fs_store_order_item_scrm oi
|
|
|
+ left join fs_store_product_scrm p on oi.product_id = p.product_id
|
|
|
+ where oi.order_id = o.id
|
|
|
+ and p.product_name like concat('%', #{maps.productName}, '%')
|
|
|
+ )
|
|
|
</if>
|
|
|
</where>
|
|
|
+ order by o.create_time desc
|
|
|
</select>
|
|
|
</mapper>
|