118 lines
6.0 KiB
XML
118 lines
6.0 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.project.benyi.mapper.ByMathTermplanMapper">
|
|
|
|
<resultMap type="ByMathTermplan" id="ByMathTermplanResult">
|
|
<result property="id" column="id"/>
|
|
<result property="schoolid" column="schoolid"/>
|
|
<result property="classid" column="classid"/>
|
|
<result property="name" column="name"/>
|
|
<result property="startmonth" column="startmonth"/>
|
|
<result property="endmonth" column="endmonth"/>
|
|
<result property="xnxq" column="xnxq"/>
|
|
<result property="status" column="status"/>
|
|
<result property="spr" column="spr"/>
|
|
<result property="sptime" column="sptime"/>
|
|
<result property="spyj" column="spyj"/>
|
|
<result property="remark" column="remark"/>
|
|
<result property="createuserid" column="createuserid"/>
|
|
<result property="createTime" column="create_time"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectByMathTermplanVo">
|
|
select id, schoolid, classid, name, startmonth, endmonth, xnxq, status, spr, sptime, spyj, remark, createuserid, create_time from by_math_termplan
|
|
</sql>
|
|
|
|
<select id="selectByMathTermplanList" parameterType="ByMathTermplan" resultMap="ByMathTermplanResult">
|
|
<include refid="selectByMathTermplanVo"/>
|
|
<where>
|
|
<if test="schoolid != null ">and schoolid = #{schoolid}</if>
|
|
<if test="classid != null and classid != ''">and classid = #{classid}</if>
|
|
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
|
<if test="startmonth != null ">and startmonth = #{startmonth}</if>
|
|
<if test="endmonth != null ">and endmonth = #{endmonth}</if>
|
|
<if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
|
|
<if test="status != null and status != ''">and status = #{status}</if>
|
|
<if test="spr != null ">and spr = #{spr}</if>
|
|
<if test="sptime != null ">and sptime = #{sptime}</if>
|
|
<if test="spyj != null and spyj != ''">and spyj = #{spyj}</if>
|
|
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectByMathTermplanById" parameterType="String" resultMap="ByMathTermplanResult">
|
|
<include refid="selectByMathTermplanVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertByMathTermplan" parameterType="ByMathTermplan">
|
|
insert into by_math_termplan
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null and id != ''">id,</if>
|
|
<if test="schoolid != null ">schoolid,</if>
|
|
<if test="classid != null and classid != ''">classid,</if>
|
|
<if test="name != null and name != ''">name,</if>
|
|
<if test="startmonth != null ">startmonth,</if>
|
|
<if test="endmonth != null ">endmonth,</if>
|
|
<if test="xnxq != null and xnxq != ''">xnxq,</if>
|
|
<if test="status != null and status != ''">status,</if>
|
|
<if test="spr != null ">spr,</if>
|
|
<if test="sptime != null ">sptime,</if>
|
|
<if test="spyj != null and spyj != ''">spyj,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
<if test="createuserid != null ">createuserid,</if>
|
|
<if test="createTime != null ">create_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null and id != ''">#{id},</if>
|
|
<if test="schoolid != null ">#{schoolid},</if>
|
|
<if test="classid != null and classid != ''">#{classid},</if>
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
<if test="startmonth != null ">#{startmonth},</if>
|
|
<if test="endmonth != null ">#{endmonth},</if>
|
|
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
<if test="spr != null ">#{spr},</if>
|
|
<if test="sptime != null ">#{sptime},</if>
|
|
<if test="spyj != null and spyj != ''">#{spyj},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
<if test="createuserid != null ">#{createuserid},</if>
|
|
<if test="createTime != null ">#{createTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateByMathTermplan" parameterType="ByMathTermplan">
|
|
update by_math_termplan
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="schoolid != null ">schoolid = #{schoolid},</if>
|
|
<if test="classid != null and classid != ''">classid = #{classid},</if>
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
<if test="startmonth != null ">startmonth = #{startmonth},</if>
|
|
<if test="endmonth != null ">endmonth = #{endmonth},</if>
|
|
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
<if test="spr != null ">spr = #{spr},</if>
|
|
<if test="sptime != null ">sptime = #{sptime},</if>
|
|
<if test="spyj != null and spyj != ''">spyj = #{spyj},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteByMathTermplanById" parameterType="String">
|
|
delete from by_math_termplan where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteByMathTermplanByIds" parameterType="String">
|
|
delete from by_math_termplan where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |