157 lines
5.8 KiB
XML
157 lines
5.8 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.sip.mapper.OmsPayableTicketPlanMapper">
|
|
|
|
<resultMap type="com.ruoyi.sip.domain.OmsPayableTicketPlan" id="OmsPayableTicketPlanResult">
|
|
<result property="id" column="id" />
|
|
<result property="payableBillId" column="payable_bill_id" />
|
|
<result property="planTicketDate" column="plan_ticket_date" />
|
|
<result property="planAmount" column="plan_amount" />
|
|
<result property="planRate" column="plan_rate" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectOmsPayableTicketPlanVo">
|
|
select id, payable_bill_id, plan_ticket_date, plan_amount, plan_rate, create_by, create_time, update_by, update_time
|
|
from oms_payable_ticket_plan
|
|
</sql>
|
|
|
|
<select id="selectOmsPayableTicketPlanList" parameterType="com.ruoyi.sip.domain.OmsPayableTicketPlan" resultMap="OmsPayableTicketPlanResult">
|
|
<include refid="selectOmsPayableTicketPlanVo"/>
|
|
<where>
|
|
<if test="payableBillId != null">
|
|
and payable_bill_id = #{payableBillId}
|
|
</if>
|
|
<if test="planTicketDate != null">
|
|
and plan_ticket_date = #{planTicketDate}
|
|
</if>
|
|
<if test="planAmount != null">
|
|
and plan_amount = #{planAmount}
|
|
</if>
|
|
<if test="planRate != null">
|
|
and plan_rate = #{planRate}
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
and create_by = #{createBy}
|
|
</if>
|
|
<if test="createTime != null">
|
|
and create_time = #{createTime}
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
and update_by = #{updateBy}
|
|
</if>
|
|
<if test="updateTime != null">
|
|
and update_time = #{updateTime}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectOmsPayableTicketPlanById" parameterType="Long" resultMap="OmsPayableTicketPlanResult">
|
|
<include refid="selectOmsPayableTicketPlanVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertOmsPayableTicketPlan" parameterType="com.ruoyi.sip.domain.OmsPayableTicketPlan" useGeneratedKeys="true" keyProperty="id">
|
|
insert into oms_payable_ticket_plan
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="payableBillId != null">
|
|
payable_bill_id,
|
|
</if>
|
|
<if test="planTicketDate != null">
|
|
plan_ticket_date,
|
|
</if>
|
|
<if test="planAmount != null">
|
|
plan_amount,
|
|
</if>
|
|
<if test="planRate != null">
|
|
plan_rate,
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
create_by,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
update_by,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="payableBillId != null">
|
|
#{payableBillId},
|
|
</if>
|
|
<if test="planTicketDate != null">
|
|
#{planTicketDate},
|
|
</if>
|
|
<if test="planAmount != null">
|
|
#{planAmount},
|
|
</if>
|
|
<if test="planRate != null">
|
|
#{planRate},
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
#{createBy},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime},
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
#{updateBy},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateOmsPayableTicketPlan" parameterType="com.ruoyi.sip.domain.OmsPayableTicketPlan">
|
|
update oms_payable_ticket_plan
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="payableBillId != null">
|
|
payable_bill_id = #{payableBillId},
|
|
</if>
|
|
<if test="planTicketDate != null">
|
|
plan_ticket_date = #{planTicketDate},
|
|
</if>
|
|
<if test="planAmount != null">
|
|
plan_amount = #{planAmount},
|
|
</if>
|
|
<if test="planRate != null">
|
|
plan_rate = #{planRate},
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
create_by = #{createBy},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime},
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
update_by = #{updateBy},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time = #{updateTime},
|
|
</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteOmsPayableTicketPlanById" parameterType="Long">
|
|
delete from oms_payable_ticket_plan where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteOmsPayableTicketPlanByIds" parameterType="String">
|
|
delete from oms_payable_ticket_plan where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |