|
@@ -0,0 +1,207 @@
|
|
|
+<?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.boman.web.core.mapper.VaccineInfoMapper">
|
|
|
+
|
|
|
+ <resultMap type="VaccineInfo" id="VaccineInfoResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="villageTowns" column="village_towns" />
|
|
|
+ <result property="village" column="village" />
|
|
|
+ <result property="villagerGroup" column="villager_group" />
|
|
|
+ <result property="houseType" column="house_type" />
|
|
|
+ <result property="domicile" column="domicile" />
|
|
|
+ <result property="province" column="province" />
|
|
|
+ <result property="city" column="city" />
|
|
|
+ <result property="area" column="area" />
|
|
|
+ <result property="userName" column="user_name" />
|
|
|
+ <result property="gender" column="gender" />
|
|
|
+ <result property="idCard" column="id_card" />
|
|
|
+ <result property="phoneNum" column="phone_num" />
|
|
|
+ <result property="keyIndustries" column="key_industries" />
|
|
|
+ <result property="isVaccination" column="is_vaccination" />
|
|
|
+ <result property="vaccineName" column="vaccine_name" />
|
|
|
+ <result property="jici" column="jici" />
|
|
|
+ <result property="vaccinationTime" column="vaccination_time" />
|
|
|
+ <result property="vaccinationPlace" column="vaccination_place" />
|
|
|
+ <result property="contraindication" column="contraindication" />
|
|
|
+ <result property="suspend" column="suspend" />
|
|
|
+ <result property="death" column="death" />
|
|
|
+ <result property="lostInMissing" column="lost_in_missing" />
|
|
|
+ <result property="shouldBe" column="should_be" />
|
|
|
+ <result property="other" column="other" />
|
|
|
+ <result property="progress" column="progress" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="isDel" column="is_del" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectVaccineInfoVo">
|
|
|
+ select id, village_towns, village, villager_group, house_type, domicile, province, city,
|
|
|
+area, user_name, gender, id_card, phone_num, key_industries, is_vaccination, vaccine_name, jici, vaccination_time, vaccination_place, contraindication, suspend, death, lost_in_missing, should_be, other, progress, remark, status, create_by, create_time, update_by, update_time, is_del from vaccine_info
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectVaccineInfoList" parameterType="VaccineInfo" resultMap="VaccineInfoResult">
|
|
|
+ <include refid="selectVaccineInfoVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="villageTowns != null and villageTowns != ''"> and village_towns = #{villageTowns}</if>
|
|
|
+ <if test="village != null and village != ''"> and village = #{village}</if>
|
|
|
+ <if test="villagerGroup != null and villagerGroup != ''"> and villager_group = #{villagerGroup}</if>
|
|
|
+ <if test="houseType != null and houseType != ''"> and house_type = #{houseType}</if>
|
|
|
+ <if test="domicile != null and domicile != ''"> and domicile = #{domicile}</if>
|
|
|
+ <if test="province != null and province != ''"> and province = #{province}</if>
|
|
|
+ <if test="city != null and city != ''"> and city = #{city}</if>
|
|
|
+ <if test="area != null and area != ''"> and area = #{area}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="gender != null and gender != ''"> and gender = #{gender}</if>
|
|
|
+ <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
|
|
+ <if test="phoneNum != null and phoneNum != ''"> and phone_num = #{phoneNum}</if>
|
|
|
+ <if test="keyIndustries != null and keyIndustries != ''"> and key_industries = #{keyIndustries}</if>
|
|
|
+ <if test="isVaccination != null and isVaccination != ''"> and is_vaccination = #{isVaccination}</if>
|
|
|
+ <if test="vaccineName != null and vaccineName != ''"> and vaccine_name like concat('%', #{vaccineName}, '%')</if>
|
|
|
+ <if test="jici != null and jici != ''"> and jici = #{jici}</if>
|
|
|
+ <if test="vaccinationTime != null "> and vaccination_time = #{vaccinationTime}</if>
|
|
|
+ <if test="vaccinationPlace != null and vaccinationPlace != ''"> and vaccination_place = #{vaccinationPlace}</if>
|
|
|
+ <if test="contraindication != null and contraindication != ''"> and contraindication = #{contraindication}</if>
|
|
|
+ <if test="suspend != null and suspend != ''"> and suspend = #{suspend}</if>
|
|
|
+ <if test="death != null and death != ''"> and death = #{death}</if>
|
|
|
+ <if test="lostInMissing != null and lostInMissing != ''"> and lost_in_missing = #{lostInMissing}</if>
|
|
|
+ <if test="shouldBe != null and shouldBe != ''"> and should_be = #{shouldBe}</if>
|
|
|
+ <if test="other != null and other != ''"> and other = #{other}</if>
|
|
|
+ <if test="progress != null and progress != ''"> and progress = #{progress}</if>
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectVaccineInfoById" parameterType="Long" resultMap="VaccineInfoResult">
|
|
|
+ <include refid="selectVaccineInfoVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertVaccineInfo" parameterType="VaccineInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into vaccine_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="villageTowns != null">village_towns,</if>
|
|
|
+ <if test="village != null">village,</if>
|
|
|
+ <if test="villagerGroup != null">villager_group,</if>
|
|
|
+ <if test="houseType != null">house_type,</if>
|
|
|
+ <if test="domicile != null">domicile,</if>
|
|
|
+ <if test="province != null">province,</if>
|
|
|
+ <if test="city != null">city,</if>
|
|
|
+ <if test="area != null and area != ''">area,</if>
|
|
|
+ <if test="userName != null">user_name,</if>
|
|
|
+ <if test="gender != null">gender,</if>
|
|
|
+ <if test="idCard != null">id_card,</if>
|
|
|
+ <if test="phoneNum != null">phone_num,</if>
|
|
|
+ <if test="keyIndustries != null">key_industries,</if>
|
|
|
+ <if test="isVaccination != null">is_vaccination,</if>
|
|
|
+ <if test="vaccineName != null">vaccine_name,</if>
|
|
|
+ <if test="jici != null">jici,</if>
|
|
|
+ <if test="vaccinationTime != null">vaccination_time,</if>
|
|
|
+ <if test="vaccinationPlace != null">vaccination_place,</if>
|
|
|
+ <if test="contraindication != null">contraindication,</if>
|
|
|
+ <if test="suspend != null">suspend,</if>
|
|
|
+ <if test="death != null">death,</if>
|
|
|
+ <if test="lostInMissing != null">lost_in_missing,</if>
|
|
|
+ <if test="shouldBe != null">should_be,</if>
|
|
|
+ <if test="other != null">other,</if>
|
|
|
+ <if test="progress != null">progress,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="isDel != null and isDel != ''">is_del,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="villageTowns != null">#{villageTowns},</if>
|
|
|
+ <if test="village != null">#{village},</if>
|
|
|
+ <if test="villagerGroup != null">#{villagerGroup},</if>
|
|
|
+ <if test="houseType != null">#{houseType},</if>
|
|
|
+ <if test="domicile != null">#{domicile},</if>
|
|
|
+ <if test="province != null">#{province},</if>
|
|
|
+ <if test="city != null">#{city},</if>
|
|
|
+ <if test="area != null and area != ''">#{area},</if>
|
|
|
+ <if test="userName != null">#{userName},</if>
|
|
|
+ <if test="gender != null">#{gender},</if>
|
|
|
+ <if test="idCard != null">#{idCard},</if>
|
|
|
+ <if test="phoneNum != null">#{phoneNum},</if>
|
|
|
+ <if test="keyIndustries != null">#{keyIndustries},</if>
|
|
|
+ <if test="isVaccination != null">#{isVaccination},</if>
|
|
|
+ <if test="vaccineName != null">#{vaccineName},</if>
|
|
|
+ <if test="jici != null">#{jici},</if>
|
|
|
+ <if test="vaccinationTime != null">#{vaccinationTime},</if>
|
|
|
+ <if test="vaccinationPlace != null">#{vaccinationPlace},</if>
|
|
|
+ <if test="contraindication != null">#{contraindication},</if>
|
|
|
+ <if test="suspend != null">#{suspend},</if>
|
|
|
+ <if test="death != null">#{death},</if>
|
|
|
+ <if test="lostInMissing != null">#{lostInMissing},</if>
|
|
|
+ <if test="shouldBe != null">#{shouldBe},</if>
|
|
|
+ <if test="other != null">#{other},</if>
|
|
|
+ <if test="progress != null">#{progress},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="isDel != null and isDel != ''">#{isDel},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateVaccineInfo" parameterType="VaccineInfo">
|
|
|
+ update vaccine_info
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="villageTowns != null">village_towns = #{villageTowns},</if>
|
|
|
+ <if test="village != null">village = #{village},</if>
|
|
|
+ <if test="villagerGroup != null">villager_group = #{villagerGroup},</if>
|
|
|
+ <if test="houseType != null">house_type = #{houseType},</if>
|
|
|
+ <if test="domicile != null">domicile = #{domicile},</if>
|
|
|
+ <if test="province != null">province = #{province},</if>
|
|
|
+ <if test="city != null">city = #{city},</if>
|
|
|
+ <if test="area != null and area != ''">area = #{area},</if>
|
|
|
+ <if test="userName != null">user_name = #{userName},</if>
|
|
|
+ <if test="gender != null">gender = #{gender},</if>
|
|
|
+ <if test="idCard != null">id_card = #{idCard},</if>
|
|
|
+ <if test="phoneNum != null">phone_num = #{phoneNum},</if>
|
|
|
+ <if test="keyIndustries != null">key_industries = #{keyIndustries},</if>
|
|
|
+ <if test="isVaccination != null">is_vaccination = #{isVaccination},</if>
|
|
|
+ <if test="vaccineName != null">vaccine_name = #{vaccineName},</if>
|
|
|
+ <if test="jici != null">jici = #{jici},</if>
|
|
|
+ <if test="vaccinationTime != null">vaccination_time = #{vaccinationTime},</if>
|
|
|
+ <if test="vaccinationPlace != null">vaccination_place = #{vaccinationPlace},</if>
|
|
|
+ <if test="contraindication != null">contraindication = #{contraindication},</if>
|
|
|
+ <if test="suspend != null">suspend = #{suspend},</if>
|
|
|
+ <if test="death != null">death = #{death},</if>
|
|
|
+ <if test="lostInMissing != null">lost_in_missing = #{lostInMissing},</if>
|
|
|
+ <if test="shouldBe != null">should_be = #{shouldBe},</if>
|
|
|
+ <if test="other != null">other = #{other},</if>
|
|
|
+ <if test="progress != null">progress = #{progress},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteVaccineInfoById" parameterType="Long">
|
|
|
+ delete from vaccine_info where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteVaccineInfoByIds" parameterType="String">
|
|
|
+ delete from vaccine_info where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|