|
@@ -12,13 +12,13 @@
|
|
|
<!-- 查询私人订制 -->
|
|
|
<select id="getPrivate" resultType="PrivateOrder">
|
|
|
SELECT
|
|
|
- b.*,c.uuid as uuidRele,c.*,c.order_no as orderNoRelease,a.order_type as orderType,e.name as supplieName,d.refundCount
|
|
|
+ b.*,c.uuid as uuidRele,c.*,c.order_no as orderNoRelease,a.order_type as orderType,e.name as supplieName,d.refundCount,d.refund_state,c.code as releCode,e.headpir as releHeadpir
|
|
|
FROM
|
|
|
bus_private_ordering AS b
|
|
|
JOIN bus_private_ordering_type a on order_type = #{orderType} and b.uuid = a.demand_uuid
|
|
|
LEFT JOIN bus_supplier_release c ON b.uuid = c.demand_uuid and a.code = c.code
|
|
|
LEFT JOIN sys_supplier e on c.code = e.code
|
|
|
- LEFT JOIN (SELECT count(*) as refundCount,release_uuid FROM bus_refund GROUP BY release_uuid) d ON c.uuid = d.release_uuid
|
|
|
+ LEFT JOIN (SELECT count(*) as refundCount,release_uuid,refund_state FROM bus_refund GROUP BY release_uuid,refund_state) d ON c.uuid = d.release_uuid
|
|
|
<trim prefix="WHERE" prefixOverrides="and | or">
|
|
|
<if test="uuid != null and uuid != ''">
|
|
|
and b.uuid = #{uuid}
|
|
@@ -143,7 +143,7 @@
|
|
|
a.*,b.code as supplieName
|
|
|
FROM
|
|
|
bus_private_ordering a
|
|
|
- JOIN ( SELECT demand_uuid,code FROM bus_private_ordering_type WHERE order_type = '4') b ON a.uuid = b.demand_uuid
|
|
|
+ JOIN ( SELECT demand_uuid,code FROM bus_private_ordering_type WHERE order_type = '4' or order_type = '13') b ON a.uuid = b.demand_uuid
|
|
|
WHERE CONVERT(date, DateAdd(Day, 7 , a.end_time), 120) <![CDATA[ <= ]]> CONVERT(date, SYSDATETIME(), 120)
|
|
|
</select>
|
|
|
<!-- 查询定制单状态里是否存在这一项 -->
|
|
@@ -404,4 +404,12 @@
|
|
|
<select id="getReleaseVal" resultType="Release">
|
|
|
select * from bus_supplier_release where code = #{supplieName} and demand_uuid = #{uuid}
|
|
|
</select>
|
|
|
+ <!-- 满意 -->
|
|
|
+ <update id="satisfiedRelease" parameterType="SupplierReleasePlay">
|
|
|
+ update
|
|
|
+ bus_supplier_release_play
|
|
|
+ set satisfied = #{satisfied}
|
|
|
+ where
|
|
|
+ id = #{id} and uuid = #{uuid}
|
|
|
+ </update>
|
|
|
</mapper>
|