20200720-zlp-1

幼儿管理
This commit is contained in:
paidaxing444
2020-07-20 18:20:13 +08:00
parent ccffb12833
commit ca727677d2
8 changed files with 1531 additions and 0 deletions

View File

@ -0,0 +1,206 @@
<?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.ByChildMapper">
<resultMap type="ByChild" id="ByChildResult">
<result property="id" column="id" />
<result property="schoolid" column="schoolid" />
<result property="classid" column="classid" />
<result property="name" column="name" />
<result property="enName" column="en_name" />
<result property="infantName" column="infant_name" />
<result property="phone" column="phone" />
<result property="xb" column="xb" />
<result property="mz" column="mz" />
<result property="zjhm" column="zjhm" />
<result property="csrq" column="csrq" />
<result property="birthProvince" column="birth_province" />
<result property="birthCity" column="birth_city" />
<result property="birthArea" column="birth_area" />
<result property="registeredProvince" column="registered_province" />
<result property="registeredCity" column="registered_city" />
<result property="registeredArea" column="registered_area" />
<result property="addrProvince" column="addr_province" />
<result property="addrCity" column="addr_city" />
<result property="addrArea" column="addr_area" />
<result property="addrDetail" column="addr_detail" />
<result property="everSchool" column="ever_school" />
<result property="learnEnglish" column="learn_english" />
<result property="source" column="source" />
<result property="status" column="status" />
<result property="enterDate" column="enter_date" />
<result property="outDate" column="out_date" />
<result property="firstLanguage" column="first_language" />
<result property="seconderLanguage" column="seconder_language" />
<result property="otherLanguage" column="other_language" />
<result property="createuserid" column="createuserid" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectByChildVo">
select id, schoolid, classid, name, en_name, infant_name, phone, xb, mz, zjhm, csrq, birth_province, birth_city, birth_area, registered_province, registered_city, registered_area, addr_province, addr_city, addr_area, addr_detail, ever_school, learn_english, source, status, enter_date, out_date, first_language, seconder_language, other_language, createuserid, create_time from by_child
</sql>
<select id="selectByChildList" parameterType="ByChild" resultMap="ByChildResult">
<include refid="selectByChildVo"/>
<where>
<if test="schoolid != null "> and schoolid = #{schoolid}</if>
<if test="classid != null "> and classid = #{classid}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="enName != null and enName != ''"> and en_name like concat('%', #{enName}, '%')</if>
<if test="infantName != null and infantName != ''"> and infant_name like concat('%', #{infantName}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="xb != null and xb != ''"> and xb = #{xb}</if>
<if test="mz != null and mz != ''"> and mz = #{mz}</if>
<if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
<if test="csrq != null "> and csrq = #{csrq}</if>
<if test="birthProvince != null and birthProvince != ''"> and birth_province = #{birthProvince}</if>
<if test="birthCity != null and birthCity != ''"> and birth_city = #{birthCity}</if>
<if test="birthArea != null and birthArea != ''"> and birth_area = #{birthArea}</if>
<if test="registeredProvince != null and registeredProvince != ''"> and registered_province = #{registeredProvince}</if>
<if test="registeredCity != null and registeredCity != ''"> and registered_city = #{registeredCity}</if>
<if test="registeredArea != null and registeredArea != ''"> and registered_area = #{registeredArea}</if>
<if test="addrProvince != null and addrProvince != ''"> and addr_province = #{addrProvince}</if>
<if test="addrCity != null and addrCity != ''"> and addr_city = #{addrCity}</if>
<if test="addrArea != null and addrArea != ''"> and addr_area = #{addrArea}</if>
<if test="addrDetail != null and addrDetail != ''"> and addr_detail = #{addrDetail}</if>
<if test="everSchool != null and everSchool != ''"> and ever_school = #{everSchool}</if>
<if test="learnEnglish != null and learnEnglish != ''"> and learn_english = #{learnEnglish}</if>
<if test="source != null and source != ''"> and source = #{source}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="enterDate != null "> and enter_date = #{enterDate}</if>
<if test="outDate != null "> and out_date = #{outDate}</if>
<if test="firstLanguage != null and firstLanguage != ''"> and first_language = #{firstLanguage}</if>
<if test="seconderLanguage != null and seconderLanguage != ''"> and seconder_language = #{seconderLanguage}</if>
<if test="otherLanguage != null and otherLanguage != ''"> and other_language = #{otherLanguage}</if>
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
</where>
</select>
<select id="selectByChildById" parameterType="Long" resultMap="ByChildResult">
<include refid="selectByChildVo"/>
where id = #{id}
</select>
<insert id="insertByChild" parameterType="ByChild" useGeneratedKeys="true" keyProperty="id">
insert into by_child
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolid != null ">schoolid,</if>
<if test="classid != null ">classid,</if>
<if test="name != null and name != ''">name,</if>
<if test="enName != null and enName != ''">en_name,</if>
<if test="infantName != null and infantName != ''">infant_name,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="xb != null and xb != ''">xb,</if>
<if test="mz != null and mz != ''">mz,</if>
<if test="zjhm != null and zjhm != ''">zjhm,</if>
<if test="csrq != null ">csrq,</if>
<if test="birthProvince != null and birthProvince != ''">birth_province,</if>
<if test="birthCity != null and birthCity != ''">birth_city,</if>
<if test="birthArea != null and birthArea != ''">birth_area,</if>
<if test="registeredProvince != null and registeredProvince != ''">registered_province,</if>
<if test="registeredCity != null and registeredCity != ''">registered_city,</if>
<if test="registeredArea != null and registeredArea != ''">registered_area,</if>
<if test="addrProvince != null and addrProvince != ''">addr_province,</if>
<if test="addrCity != null and addrCity != ''">addr_city,</if>
<if test="addrArea != null and addrArea != ''">addr_area,</if>
<if test="addrDetail != null and addrDetail != ''">addr_detail,</if>
<if test="everSchool != null and everSchool != ''">ever_school,</if>
<if test="learnEnglish != null and learnEnglish != ''">learn_english,</if>
<if test="source != null and source != ''">source,</if>
<if test="status != null and status != ''">status,</if>
<if test="enterDate != null ">enter_date,</if>
<if test="outDate != null ">out_date,</if>
<if test="firstLanguage != null and firstLanguage != ''">first_language,</if>
<if test="seconderLanguage != null and seconderLanguage != ''">seconder_language,</if>
<if test="otherLanguage != null and otherLanguage != ''">other_language,</if>
<if test="createuserid != null ">createuserid,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolid != null ">#{schoolid},</if>
<if test="classid != null ">#{classid},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="enName != null and enName != ''">#{enName},</if>
<if test="infantName != null and infantName != ''">#{infantName},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="xb != null and xb != ''">#{xb},</if>
<if test="mz != null and mz != ''">#{mz},</if>
<if test="zjhm != null and zjhm != ''">#{zjhm},</if>
<if test="csrq != null ">#{csrq},</if>
<if test="birthProvince != null and birthProvince != ''">#{birthProvince},</if>
<if test="birthCity != null and birthCity != ''">#{birthCity},</if>
<if test="birthArea != null and birthArea != ''">#{birthArea},</if>
<if test="registeredProvince != null and registeredProvince != ''">#{registeredProvince},</if>
<if test="registeredCity != null and registeredCity != ''">#{registeredCity},</if>
<if test="registeredArea != null and registeredArea != ''">#{registeredArea},</if>
<if test="addrProvince != null and addrProvince != ''">#{addrProvince},</if>
<if test="addrCity != null and addrCity != ''">#{addrCity},</if>
<if test="addrArea != null and addrArea != ''">#{addrArea},</if>
<if test="addrDetail != null and addrDetail != ''">#{addrDetail},</if>
<if test="everSchool != null and everSchool != ''">#{everSchool},</if>
<if test="learnEnglish != null and learnEnglish != ''">#{learnEnglish},</if>
<if test="source != null and source != ''">#{source},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="enterDate != null ">#{enterDate},</if>
<if test="outDate != null ">#{outDate},</if>
<if test="firstLanguage != null and firstLanguage != ''">#{firstLanguage},</if>
<if test="seconderLanguage != null and seconderLanguage != ''">#{seconderLanguage},</if>
<if test="otherLanguage != null and otherLanguage != ''">#{otherLanguage},</if>
<if test="createuserid != null ">#{createuserid},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateByChild" parameterType="ByChild">
update by_child
<trim prefix="SET" suffixOverrides=",">
<if test="schoolid != null ">schoolid = #{schoolid},</if>
<if test="classid != null ">classid = #{classid},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="enName != null and enName != ''">en_name = #{enName},</if>
<if test="infantName != null and infantName != ''">infant_name = #{infantName},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="xb != null and xb != ''">xb = #{xb},</if>
<if test="mz != null and mz != ''">mz = #{mz},</if>
<if test="zjhm != null and zjhm != ''">zjhm = #{zjhm},</if>
<if test="csrq != null ">csrq = #{csrq},</if>
<if test="birthProvince != null and birthProvince != ''">birth_province = #{birthProvince},</if>
<if test="birthCity != null and birthCity != ''">birth_city = #{birthCity},</if>
<if test="birthArea != null and birthArea != ''">birth_area = #{birthArea},</if>
<if test="registeredProvince != null and registeredProvince != ''">registered_province = #{registeredProvince},</if>
<if test="registeredCity != null and registeredCity != ''">registered_city = #{registeredCity},</if>
<if test="registeredArea != null and registeredArea != ''">registered_area = #{registeredArea},</if>
<if test="addrProvince != null and addrProvince != ''">addr_province = #{addrProvince},</if>
<if test="addrCity != null and addrCity != ''">addr_city = #{addrCity},</if>
<if test="addrArea != null and addrArea != ''">addr_area = #{addrArea},</if>
<if test="addrDetail != null and addrDetail != ''">addr_detail = #{addrDetail},</if>
<if test="everSchool != null and everSchool != ''">ever_school = #{everSchool},</if>
<if test="learnEnglish != null and learnEnglish != ''">learn_english = #{learnEnglish},</if>
<if test="source != null and source != ''">source = #{source},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="enterDate != null ">enter_date = #{enterDate},</if>
<if test="outDate != null ">out_date = #{outDate},</if>
<if test="firstLanguage != null and firstLanguage != ''">first_language = #{firstLanguage},</if>
<if test="seconderLanguage != null and seconderLanguage != ''">seconder_language = #{seconderLanguage},</if>
<if test="otherLanguage != null and otherLanguage != ''">other_language = #{otherLanguage},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByChildById" parameterType="Long">
delete from by_child where id = #{id}
</delete>
<delete id="deleteByChildByIds" parameterType="String">
delete from by_child where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>