20200414-zlp-1
班级管理
This commit is contained in:
114
ruoyi/src/main/resources/mybatis/system/ByClassMapper.xml
Normal file
114
ruoyi/src/main/resources/mybatis/system/ByClassMapper.xml
Normal file
@ -0,0 +1,114 @@
|
||||
<?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.system.mapper.ByClassMapper">
|
||||
|
||||
<resultMap type="ByClass" id="ByClassResult">
|
||||
<result property="bjbh" column="bjbh" />
|
||||
<result property="schoolid" column="schoolid" />
|
||||
<result property="bjtype" column="bjtype" />
|
||||
<result property="bhxh" column="bhxh" />
|
||||
<result property="xn" column="xn" />
|
||||
<result property="bjmc" column="bjmc" />
|
||||
<result property="bjrych" column="bjrych" />
|
||||
<result property="jbny" column="jbny" />
|
||||
<result property="zbjs" column="zbjs" />
|
||||
<result property="pbjs" column="pbjs" />
|
||||
<result property="zljs" column="zljs" />
|
||||
<result property="isdel" column="isdel" />
|
||||
<result property="createtime" column="createtime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByClassVo">
|
||||
select bjbh, schoolid, bjtype, bhxh, xn, bjmc, bjrych, jbny, zbjs, pbjs, zljs, isdel, createtime from by_class
|
||||
</sql>
|
||||
|
||||
<select id="selectByClassList" parameterType="ByClass" resultMap="ByClassResult">
|
||||
<include refid="selectByClassVo"/>
|
||||
<where>
|
||||
<if test="schoolid != null and schoolid != ''"> and schoolid = #{schoolid}</if>
|
||||
<if test="bjtype != null and bjtype != ''"> and bjtype = #{bjtype}</if>
|
||||
<if test="bhxh != null "> and bhxh = #{bhxh}</if>
|
||||
<if test="xn != null and xn != ''"> and xn = #{xn}</if>
|
||||
<if test="bjmc != null and bjmc != ''"> and bjmc = #{bjmc}</if>
|
||||
<if test="bjrych != null and bjrych != ''"> and bjrych = #{bjrych}</if>
|
||||
<if test="jbny != null "> and jbny = #{jbny}</if>
|
||||
<if test="zbjs != null "> and zbjs = #{zbjs}</if>
|
||||
<if test="pbjs != null "> and pbjs = #{pbjs}</if>
|
||||
<if test="zljs != null "> and zljs = #{zljs}</if>
|
||||
<if test="isdel != null and isdel != ''"> and isdel = #{isdel}</if>
|
||||
<if test="createtime != null "> and createtime = #{createtime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByClassById" parameterType="String" resultMap="ByClassResult">
|
||||
<include refid="selectByClassVo"/>
|
||||
where bjbh = #{bjbh}
|
||||
</select>
|
||||
|
||||
<insert id="insertByClass" parameterType="ByClass">
|
||||
insert into by_class
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="bjbh != null and bjbh != ''">bjbh,</if>
|
||||
<if test="schoolid != null and schoolid != ''">schoolid,</if>
|
||||
<if test="bjtype != null and bjtype != ''">bjtype,</if>
|
||||
<if test="bhxh != null ">bhxh,</if>
|
||||
<if test="xn != null and xn != ''">xn,</if>
|
||||
<if test="bjmc != null and bjmc != ''">bjmc,</if>
|
||||
<if test="bjrych != null and bjrych != ''">bjrych,</if>
|
||||
<if test="jbny != null ">jbny,</if>
|
||||
<if test="zbjs != null ">zbjs,</if>
|
||||
<if test="pbjs != null ">pbjs,</if>
|
||||
<if test="zljs != null ">zljs,</if>
|
||||
<if test="isdel != null and isdel != ''">isdel,</if>
|
||||
<if test="createtime != null ">createtime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="bjbh != null and bjbh != ''">#{bjbh},</if>
|
||||
<if test="schoolid != null and schoolid != ''">#{schoolid},</if>
|
||||
<if test="bjtype != null and bjtype != ''">#{bjtype},</if>
|
||||
<if test="bhxh != null ">#{bhxh},</if>
|
||||
<if test="xn != null and xn != ''">#{xn},</if>
|
||||
<if test="bjmc != null and bjmc != ''">#{bjmc},</if>
|
||||
<if test="bjrych != null and bjrych != ''">#{bjrych},</if>
|
||||
<if test="jbny != null ">#{jbny},</if>
|
||||
<if test="zbjs != null ">#{zbjs},</if>
|
||||
<if test="pbjs != null ">#{pbjs},</if>
|
||||
<if test="zljs != null ">#{zljs},</if>
|
||||
<if test="isdel != null and isdel != ''">#{isdel},</if>
|
||||
<if test="createtime != null ">#{createtime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByClass" parameterType="ByClass">
|
||||
update by_class
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="schoolid != null and schoolid != ''">schoolid = #{schoolid},</if>
|
||||
<if test="bjtype != null and bjtype != ''">bjtype = #{bjtype},</if>
|
||||
<if test="bhxh != null ">bhxh = #{bhxh},</if>
|
||||
<if test="xn != null and xn != ''">xn = #{xn},</if>
|
||||
<if test="bjmc != null and bjmc != ''">bjmc = #{bjmc},</if>
|
||||
<if test="bjrych != null and bjrych != ''">bjrych = #{bjrych},</if>
|
||||
<if test="jbny != null ">jbny = #{jbny},</if>
|
||||
<if test="zbjs != null ">zbjs = #{zbjs},</if>
|
||||
<if test="pbjs != null ">pbjs = #{pbjs},</if>
|
||||
<if test="zljs != null ">zljs = #{zljs},</if>
|
||||
<if test="isdel != null and isdel != ''">isdel = #{isdel},</if>
|
||||
<if test="createtime != null ">createtime = #{createtime},</if>
|
||||
</trim>
|
||||
where bjbh = #{bjbh}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByClassById" parameterType="String">
|
||||
delete from by_class where bjbh = #{bjbh}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByClassByIds" parameterType="String">
|
||||
delete from by_class where bjbh in
|
||||
<foreach item="bjbh" collection="array" open="(" separator="," close=")">
|
||||
#{bjbh}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user