2025-01-15 10:28:03 +08:00
|
|
|
<?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.app.mapper.AppPmsOrderOutMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="AppPmsOrderOut" id="AppPmsOrderOutResult">
|
2025-03-05 09:32:18 +08:00
|
|
|
<id property="recordId" column="record_id" />
|
2025-01-15 10:28:03 +08:00
|
|
|
<result property="listId" column="list_id" />
|
|
|
|
|
<result property="orderType" column="order_type" />
|
|
|
|
|
<result property="customerId" column="customer_id" />
|
|
|
|
|
<result property="goodsId" column="goods_id" />
|
|
|
|
|
<result property="goodsNum" column="goods_num" />
|
|
|
|
|
<result property="goodsDesc" column="goods_desc" />
|
|
|
|
|
<result property="spare1" column="spare1" />
|
|
|
|
|
<result property="spare2" column="spare2" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectAppPmsOrderOutVo">
|
2025-03-05 09:32:18 +08:00
|
|
|
select record_id, list_id, order_type, customer_id, goods_id, goods_num, goods_desc, spare1, spare2 from app_pms_order_out
|
2025-01-15 10:28:03 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectAppPmsOrderOutList" parameterType="AppPmsOrderOut" resultMap="AppPmsOrderOutResult">
|
|
|
|
|
<include refid="selectAppPmsOrderOutVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="orderType != null "> and order_type = #{orderType}</if>
|
|
|
|
|
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
|
|
|
|
<if test="goodsId != null and goodsId != ''"> and goods_id = #{goodsId}</if>
|
|
|
|
|
<if test="goodsNum != null "> and goods_num = #{goodsNum}</if>
|
|
|
|
|
<if test="goodsDesc != null and goodsDesc != ''"> and goods_desc = #{goodsDesc}</if>
|
|
|
|
|
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
|
|
|
|
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAppPmsOrderOutByListId" parameterType="String" resultMap="AppPmsOrderOutResult">
|
|
|
|
|
<include refid="selectAppPmsOrderOutVo"/>
|
2025-03-05 09:32:18 +08:00
|
|
|
where record_id = #{recordId}
|
2025-01-15 10:28:03 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertAppPmsOrderOut" parameterType="AppPmsOrderOut">
|
|
|
|
|
insert into app_pms_order_out
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
2025-03-05 09:32:18 +08:00
|
|
|
<if test="recordId != null">record_id,</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
<if test="listId != null">list_id,</if>
|
|
|
|
|
<if test="orderType != null">order_type,</if>
|
|
|
|
|
<if test="customerId != null and customerId != ''">customer_id,</if>
|
|
|
|
|
<if test="goodsId != null and goodsId != ''">goods_id,</if>
|
|
|
|
|
<if test="goodsNum != null">goods_num,</if>
|
|
|
|
|
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
|
|
|
|
|
<if test="spare1 != null and spare1 != ''">spare1,</if>
|
|
|
|
|
<if test="spare2 != null">spare2,</if>
|
2025-02-24 15:56:21 +08:00
|
|
|
<if test="orderStatus != null">order_status,</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
2025-03-05 09:32:18 +08:00
|
|
|
<if test="recordId != null">#{recordId},</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
<if test="listId != null">#{listId},</if>
|
|
|
|
|
<if test="orderType != null">#{orderType},</if>
|
|
|
|
|
<if test="customerId != null and customerId != ''">#{customerId},</if>
|
|
|
|
|
<if test="goodsId != null and goodsId != ''">#{goodsId},</if>
|
|
|
|
|
<if test="goodsNum != null">#{goodsNum},</if>
|
|
|
|
|
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
|
|
|
|
|
<if test="spare1 != null and spare1 != ''">#{spare1},</if>
|
|
|
|
|
<if test="spare2 != null">#{spare2},</if>
|
2025-02-24 15:56:21 +08:00
|
|
|
<if test="orderStatus != null">#{orderStatus},</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateAppPmsOrderOut" parameterType="AppPmsOrderOut">
|
|
|
|
|
update app_pms_order_out
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
2025-03-05 09:32:18 +08:00
|
|
|
<if test="listId != null">list_id = #{listId},</if>
|
2025-01-15 10:28:03 +08:00
|
|
|
<if test="orderType != null">order_type = #{orderType},</if>
|
|
|
|
|
<if test="customerId != null and customerId != ''">customer_id = #{customerId},</if>
|
|
|
|
|
<if test="goodsId != null and goodsId != ''">goods_id = #{goodsId},</if>
|
|
|
|
|
<if test="goodsNum != null">goods_num = #{goodsNum},</if>
|
|
|
|
|
<if test="goodsDesc != null and goodsDesc != ''">goods_desc = #{goodsDesc},</if>
|
|
|
|
|
<if test="spare1 != null and spare1 != ''">spare1 = #{spare1},</if>
|
|
|
|
|
<if test="spare2 != null">spare2 = #{spare2},</if>
|
|
|
|
|
</trim>
|
2025-03-05 09:32:18 +08:00
|
|
|
where record_id = #{recordId}
|
2025-01-15 10:28:03 +08:00
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteAppPmsOrderOutByListId" parameterType="String">
|
2025-03-05 09:32:18 +08:00
|
|
|
delete from app_pms_order_out where record_id = #{recordId}
|
2025-01-15 10:28:03 +08:00
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteAppPmsOrderOutByListIds" parameterType="String">
|
2025-03-05 09:32:18 +08:00
|
|
|
delete from app_pms_order_out where record_id in
|
|
|
|
|
<foreach item="record_id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{recordId}
|
2025-01-15 10:28:03 +08:00
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
2025-03-05 09:32:18 +08:00
|
|
|
</mapper>
|