增加扩展表
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?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.price.mapper.PrcOrderBillExtMapper">
|
||||
|
||||
<resultMap type="PrcOrderBillExt" id="PrcOrderBillExtResult">
|
||||
<id property="billId" column="bill_id" />
|
||||
<result property="orderNo" column="order_no" />
|
||||
<result property="syncJson" column="sync_json" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPrcOrderBillExtVo">
|
||||
select bill_id, order_no, sync_json, create_time, update_time
|
||||
from prc_order_bill_ext
|
||||
</sql>
|
||||
|
||||
<select id="selectByBillId" parameterType="String" resultMap="PrcOrderBillExtResult">
|
||||
<include refid="selectPrcOrderBillExtVo"/>
|
||||
where bill_id = #{billId}
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderNo" parameterType="String" resultMap="PrcOrderBillExtResult">
|
||||
<include refid="selectPrcOrderBillExtVo"/>
|
||||
where order_no = #{orderNo}
|
||||
</select>
|
||||
|
||||
<insert id="insertPrcOrderBillExt" parameterType="PrcOrderBillExt">
|
||||
insert into prc_order_bill_ext (
|
||||
bill_id, order_no, sync_json, create_time, update_time
|
||||
) values (
|
||||
#{billId}, #{orderNo}, #{syncJson}, sysdate(), sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="upsertPrcOrderBillExt" parameterType="PrcOrderBillExt">
|
||||
insert into prc_order_bill_ext (
|
||||
bill_id, order_no, sync_json, create_time, update_time
|
||||
) values (
|
||||
#{billId}, #{orderNo}, #{syncJson}, sysdate(), sysdate()
|
||||
)
|
||||
on duplicate key update
|
||||
order_no = values(order_no),
|
||||
sync_json = values(sync_json),
|
||||
update_time = sysdate()
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user