116 lines
6.6 KiB
XML
116 lines
6.6 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.OmsPaymentBillMapper">
|
||
|
|
|
||
|
|
<resultMap type="OmsPaymentBill" id="OmsPaymentBillResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="paymentBillCode" column="payment_bill_code" />
|
||
|
|
<result property="paymentBillType" column="payment_bill_type" />
|
||
|
|
<result property="paymentTime" column="payment_time" />
|
||
|
|
<result property="vendorCode" column="vendor_code" />
|
||
|
|
<result property="orderCode" column="order_code" />
|
||
|
|
<result property="totalPriceWithTax" column="total_price_with_tax" />
|
||
|
|
<result property="totalPriceWithoutTax" column="total_price_without_tax" />
|
||
|
|
<result property="taxAmount" column="tax_amount" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
<result property="remark" column="remark" />
|
||
|
|
<result property="delFlag" column="del_flag" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectOmsPaymentBillVo">
|
||
|
|
select id, payment_bill_code, payment_bill_type, payment_time, vendor_code, order_code, total_price_with_tax, total_price_without_tax, tax_amount, create_by, create_time, update_by, update_time, remark, del_flag from oms_payment_bill
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectOmsPaymentBillList" parameterType="OmsPaymentBill" resultMap="OmsPaymentBillResult">
|
||
|
|
<include refid="selectOmsPaymentBillVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="paymentBillCode != null and paymentBillCode != ''"> and payment_bill_code = #{paymentBillCode}</if>
|
||
|
|
<if test="paymentBillType != null and paymentBillType != ''"> and payment_bill_type = #{paymentBillType}</if>
|
||
|
|
<if test="paymentTime != null "> and payment_time = #{paymentTime}</if>
|
||
|
|
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
|
||
|
|
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||
|
|
<if test="totalPriceWithTax != null "> and total_price_with_tax = #{totalPriceWithTax}</if>
|
||
|
|
<if test="totalPriceWithoutTax != null "> and total_price_without_tax = #{totalPriceWithoutTax}</if>
|
||
|
|
<if test="taxAmount != null "> and tax_amount = #{taxAmount}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectOmsPaymentBillById" parameterType="Long" resultMap="OmsPaymentBillResult">
|
||
|
|
<include refid="selectOmsPaymentBillVo"/>
|
||
|
|
where id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertOmsPaymentBill" parameterType="OmsPaymentBill" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into oms_payment_bill
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="paymentBillCode != null and paymentBillCode != ''">payment_bill_code,</if>
|
||
|
|
<if test="paymentBillType != null">payment_bill_type,</if>
|
||
|
|
<if test="paymentTime != null">payment_time,</if>
|
||
|
|
<if test="vendorCode != null">vendor_code,</if>
|
||
|
|
<if test="orderCode != null">order_code,</if>
|
||
|
|
<if test="totalPriceWithTax != null">total_price_with_tax,</if>
|
||
|
|
<if test="totalPriceWithoutTax != null">total_price_without_tax,</if>
|
||
|
|
<if test="taxAmount != null">tax_amount,</if>
|
||
|
|
<if test="createBy != null">create_by,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
<if test="updateBy != null">update_by,</if>
|
||
|
|
<if test="updateTime != null">update_time,</if>
|
||
|
|
<if test="remark != null">remark,</if>
|
||
|
|
<if test="delFlag != null">del_flag,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="paymentBillCode != null and paymentBillCode != ''">#{paymentBillCode},</if>
|
||
|
|
<if test="paymentBillType != null">#{paymentBillType},</if>
|
||
|
|
<if test="paymentTime != null">#{paymentTime},</if>
|
||
|
|
<if test="vendorCode != null">#{vendorCode},</if>
|
||
|
|
<if test="orderCode != null">#{orderCode},</if>
|
||
|
|
<if test="totalPriceWithTax != null">#{totalPriceWithTax},</if>
|
||
|
|
<if test="totalPriceWithoutTax != null">#{totalPriceWithoutTax},</if>
|
||
|
|
<if test="taxAmount != null">#{taxAmount},</if>
|
||
|
|
<if test="createBy != null">#{createBy},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
|
<if test="remark != null">#{remark},</if>
|
||
|
|
<if test="delFlag != null">#{delFlag},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateOmsPaymentBill" parameterType="OmsPaymentBill">
|
||
|
|
update oms_payment_bill
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="paymentBillCode != null and paymentBillCode != ''">payment_bill_code = #{paymentBillCode},</if>
|
||
|
|
<if test="paymentBillType != null">payment_bill_type = #{paymentBillType},</if>
|
||
|
|
<if test="paymentTime != null">payment_time = #{paymentTime},</if>
|
||
|
|
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
|
||
|
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||
|
|
<if test="totalPriceWithTax != null">total_price_with_tax = #{totalPriceWithTax},</if>
|
||
|
|
<if test="totalPriceWithoutTax != null">total_price_without_tax = #{totalPriceWithoutTax},</if>
|
||
|
|
<if test="taxAmount != null">tax_amount = #{taxAmount},</if>
|
||
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteOmsPaymentBillById" parameterType="Long">
|
||
|
|
delete from oms_payment_bill where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteOmsPaymentBillByIds" parameterType="String">
|
||
|
|
delete from oms_payment_bill where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
</mapper>
|