|
@@ -63,12 +63,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
viu.id as id_user,viu.id_card as id_card_user,viu.vaccine_name as vaccine_name_user,viu.jici as jici_user,viu.vaccination_time as vaccination_time_user,
|
|
|
viu.vaccination_place as vaccination_place_user,viu.progress as progress_user,viu.status as status_user
|
|
|
from vaccine_info vi left join vaccine_info_user viu
|
|
|
- on vi.id_card = viu.id_card
|
|
|
+ on vi.id_card = viu.id_card and viu.is_del = 'N'
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectVaccineInfoList" parameterType="VaccineInfoOperation" resultMap="VaccineInfoResult">
|
|
|
<include refid="selectVaccineInfoVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
+ vi.is_del = 'N'
|
|
|
<if test="villageTowns != null and villageTowns != ''"> and vi.village_towns = #{villageTowns}</if>
|
|
|
<if test="village != null and village != ''"> and vi.village = #{village}</if>
|
|
|
<if test="villagerGroup != null and villagerGroup != ''"> and vi.villager_group = #{villagerGroup}</if>
|
|
@@ -95,7 +96,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="other != null and other != ''"> and vi.other = #{other}</if>
|
|
|
<if test="progress != null and progress != ''"> and viu.progress = #{progress}</if>
|
|
|
<if test="status != null and status != ''"> and vi.status = #{status}</if>
|
|
|
- <if test="isDel != null and isDel != ''"> and vi.is_del = #{isDel}</if>
|
|
|
<if test="code != null and code != ''"> and vi.code = #{code}</if>
|
|
|
<if test="birthday != null and birthday != ''"> and vi.birthday = #{birthday}</if>
|
|
|
<if test="workUnit != null and workUnit != ''"> and vi.work_unit = #{workUnit}</if>
|
|
@@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectVaccineInfoById" parameterType="Long" resultMap="VaccineInfoResult">
|
|
|
<include refid="selectVaccineInfoVo"/>
|
|
|
- where vi.id = #{id}
|
|
|
+ where vi.id = #{id} and vi.is_del = 'N'
|
|
|
</select>
|
|
|
<select id="selectVaccineInfoByIds" parameterType="Long" resultMap="VaccineInfoResult">
|
|
|
<include refid="selectVaccineInfoVo"/>
|
|
@@ -116,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
+ and vi.is_del = 'N'
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertVaccineInfo" parameterType="VaccineInfoOperation" useGeneratedKeys="true" keyProperty="id">
|
|
@@ -251,11 +252,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteVaccineInfoById" parameterType="Long">
|
|
|
- delete from vaccine_info where id = #{id}
|
|
|
+ update vaccine_info set is_del = 'Y' where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteVaccineInfoByIds" parameterType="String">
|
|
|
- delete from vaccine_info where id in
|
|
|
+ update vaccine_info set is_del = 'Y' where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|