You've already forked FrameTour-BE
分账小改动
This commit is contained in:
@ -2,13 +2,13 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.ycwl.basic.profitsharing.mapper.ProfitSharingRecordMapper" >
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO profit_sharing_record (scenic_id, order_id, user_id, user_name, amount, wx_amount, manual_amount, wx_rate, real_rate, order_amount, create_time)
|
||||
INSERT INTO profit_sharing_record (scenic_id, order_id, user_id, user_name, amount, wx_amount, manual_amount, rate_mode, wx_rate, real_rate, order_amount, create_time)
|
||||
VALUES
|
||||
<foreach collection="records" item="record" separator=",">
|
||||
(#{record.scenicId}, #{record.orderId}, #{record.userId}, #{record.userName}, #{record.amount}, #{record.wxAmount}, #{record.manualAmount}, #{record.wxRate}, #{record.realRate}, #{record.orderAmount}, #{record.createTime})
|
||||
(#{record.scenicId}, #{record.orderId}, #{record.userId}, #{record.userName}, #{record.amount}, #{record.wxAmount}, #{record.manualAmount}, #{record.rateMode}, #{record.wxRate}, #{record.realRate}, #{record.orderAmount}, #{record.createTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<select id="findByScenicId" resultType="com.ycwl.basic.model.pc.profitsharing.resp.ProfitSharingRecordRespVO">
|
||||
<select id="list" 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
|
||||
@ -16,6 +16,18 @@
|
||||
<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>
|
||||
ORDER BY r.create_time desc
|
||||
</select>
|
||||
|
Reference in New Issue
Block a user