You've already forked FrameTour-BE
分账表格优化
This commit is contained in:
@ -39,4 +39,39 @@
|
||||
</where>
|
||||
ORDER BY r.create_time desc
|
||||
</select>
|
||||
<select id="listGroupByOrderId" resultType="com.ycwl.basic.profitsharing.dto.ProfitSharingRecordGroupVO">
|
||||
SELECT order_id, min(create_time) as create_time
|
||||
FROM profit_sharing_record r
|
||||
<where>
|
||||
<if test="withDeleted != true">
|
||||
delete_time is null
|
||||
</if>
|
||||
<if test="scenicId != null">
|
||||
AND r.scenic_id = #{scenicId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND r.status = #{status}
|
||||
</if>
|
||||
<if test="rateMode != null">
|
||||
AND r.rate_mode = #{rateMode}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
AND r.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND r.create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY order_id
|
||||
</select>
|
||||
<select id="listByOrderIds" resultType="com.ycwl.basic.profitsharing.dto.ProfitSharingRecordRespVO">
|
||||
SELECT r.*, s.name as scenic_name
|
||||
FROM profit_sharing_record r
|
||||
LEFT JOIN scenic s ON s.id = r.scenic_id
|
||||
WHERE r.order_id IN
|
||||
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
ORDER BY r.create_time desc
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user