You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.5 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.system.mapper.BaseBoxPlanMapper">
<resultMap type="BaseBoxPlan" id="BaseBoxPlanResult">
<result property="id" column="id" />
<result property="planNumber" column="plan_number" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectBaseBoxPlanVo">
select id, plan_number, create_time from base_box_plan
</sql>
<select id="selectBaseBoxPlanList" parameterType="BaseBoxPlan" resultMap="BaseBoxPlanResult">
<include refid="selectBaseBoxPlanVo"/>
<where>
<if test="planNumber != null and planNumber != ''"> and plan_number = #{planNumber}</if>
</where>
</select>
<select id="selectBaseBoxPlanById" parameterType="Long" resultMap="BaseBoxPlanResult">
<include refid="selectBaseBoxPlanVo"/>
where id = #{id}
</select>
<insert id="insertBaseBoxPlan" parameterType="BaseBoxPlan">
<selectKey keyProperty="id" resultType="long" order="BEFORE">
SELECT seq_base_box_plan.NEXTVAL as id FROM DUAL
</selectKey>
insert into base_box_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="planNumber != null">plan_number,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="planNumber != null">#{planNumber},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateBaseBoxPlan" parameterType="BaseBoxPlan">
update base_box_plan
<trim prefix="SET" suffixOverrides=",">
<if test="planNumber != null">plan_number = #{planNumber},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseBoxPlanById" parameterType="Long">
delete from base_box_plan where id = #{id}
</delete>
<delete id="deleteBaseBoxPlanByIds" parameterType="String">
delete from base_box_plan where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>