wms_serve_xugongteji/ruoyi-system/src/main/resources/mapper/app/AppWaveMapper.xml

82 lines
3.7 KiB
XML
Raw Normal View History

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.AppWaveMapper">
<resultMap type="AppWave" id="AppWaveResult">
<result property="waveId" column="wave_id" />
<result property="outRule" column="out_rule" />
<result property="isChad" column="is_chad" />
<result property="waveStatus" column="wave_status" />
<result property="orderWbs" column="order_wbs" />
<result property="remark" column="remark" />
<result property="waveDestination" column="wave_destination" />
</resultMap>
<sql id="selectAppWaveVo">
select wave_id, out_rule, is_chad, wave_status, order_wbs, remark, wave_destination from app_wave
</sql>
<select id="selectAppWaveList" parameterType="AppWave" resultMap="AppWaveResult">
<include refid="selectAppWaveVo"/>
<where>
<if test="outRule != null "> and out_rule = #{outRule}</if>
<if test="isChad != null "> and is_chad = #{isChad}</if>
<if test="waveStatus != null "> and wave_status = #{waveStatus}</if>
<if test="orderWbs != null and orderWbs != ''"> and order_wbs = #{orderWbs}</if>
<if test="waveDestination != null and waveDestination != ''"> and wave_destination = #{waveDestination}</if>
</where>
</select>
<select id="selectAppWaveByWaveId" parameterType="String" resultMap="AppWaveResult">
<include refid="selectAppWaveVo"/>
where wave_id = #{waveId}
</select>
<insert id="insertAppWave" parameterType="AppWave">
insert into app_wave
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="waveId != null">wave_id,</if>
<if test="outRule != null">out_rule,</if>
<if test="isChad != null">is_chad,</if>
<if test="waveStatus != null">wave_status,</if>
<if test="orderWbs != null">order_wbs,</if>
<if test="remark != null">remark,</if>
<if test="waveDestination != null and waveDestination != ''">wave_destination,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="waveId != null">#{waveId},</if>
<if test="outRule != null">#{outRule},</if>
<if test="isChad != null">#{isChad},</if>
<if test="waveStatus != null">#{waveStatus},</if>
<if test="orderWbs != null">#{orderWbs},</if>
<if test="remark != null">#{remark},</if>
<if test="waveDestination != null and waveDestination != ''">#{waveDestination},</if>
</trim>
</insert>
<update id="updateAppWave" parameterType="AppWave">
update app_wave
<trim prefix="SET" suffixOverrides=",">
<if test="outRule != null">out_rule = #{outRule},</if>
<if test="isChad != null">is_chad = #{isChad},</if>
<if test="waveStatus != null">wave_status = #{waveStatus},</if>
<if test="orderWbs != null">order_wbs = #{orderWbs},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="waveDestination != null and waveDestination != ''">wave_destination = #{waveDestination},</if>
</trim>
where wave_id = #{waveId}
</update>
<delete id="deleteAppWaveByWaveId" parameterType="String">
delete from app_wave where wave_id = #{waveId}
</delete>
<delete id="deleteAppWaveByWaveIds" parameterType="String">
delete from app_wave where wave_id in
<foreach item="waveId" collection="array" open="(" separator="," close=")">
#{waveId}
</foreach>
</delete>
</mapper>