|
|
@ -1,537 +0,0 @@
|
|
|
|
<?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.ssf.mysqloracletest.mapper.VillageUserInfoMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ssf.mysqloracletest.domain.VillageUserInfo" id="VillageUserInfoResult">
|
|
|
|
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
|
|
|
|
<result property="villageCode" column="village_code"/>
|
|
|
|
|
|
|
|
<result property="villageName" column="village_name"/>
|
|
|
|
|
|
|
|
<result property="gridCode" column="grid_code"/>
|
|
|
|
|
|
|
|
<result property="gridName" column="grid_name"/>
|
|
|
|
|
|
|
|
<result property="buildingCode" column="building_code"/>
|
|
|
|
|
|
|
|
<result property="buildingName" column="building_name"/>
|
|
|
|
|
|
|
|
<result property="unitCode" column="unit_code"/>
|
|
|
|
|
|
|
|
<result property="unitName" column="unit_name"/>
|
|
|
|
|
|
|
|
<result property="homeCode" column="home_code"/>
|
|
|
|
|
|
|
|
<result property="homeName" column="home_name"/>
|
|
|
|
|
|
|
|
<result property="userName" column="user_name"/>
|
|
|
|
|
|
|
|
<result property="userPic" column="user_pic"/>
|
|
|
|
|
|
|
|
<result property="userStandardPic" column="user_standard_pic"/>
|
|
|
|
|
|
|
|
<result property="userStandardPicIsNull" column="user_standard_pic_is_null"/>
|
|
|
|
|
|
|
|
<result property="identityType" column="identity_type"/>
|
|
|
|
|
|
|
|
<result property="idcard" column="idcard"/>
|
|
|
|
|
|
|
|
<result property="sex" column="sex"/>
|
|
|
|
|
|
|
|
<result property="nation" column="nation"/>
|
|
|
|
|
|
|
|
<result property="birthday" column="birthday"/>
|
|
|
|
|
|
|
|
<result property="company" column="company"/>
|
|
|
|
|
|
|
|
<result property="phone" column="phone"/>
|
|
|
|
|
|
|
|
<result property="nationality" column="nationality"/>
|
|
|
|
|
|
|
|
<result property="nativeplace" column="nativeplace"/>
|
|
|
|
|
|
|
|
<result property="education" column="education"/>
|
|
|
|
|
|
|
|
<result property="houseHoldRegister" column="house_hold_register"/>
|
|
|
|
|
|
|
|
<result property="houseHoldAddress" column="house_hold_address"/>
|
|
|
|
|
|
|
|
<result property="areaCode" column="area_code"/>
|
|
|
|
|
|
|
|
<result property="areaName" column="area_name"/>
|
|
|
|
|
|
|
|
<result property="habitation" column="habitation"/>
|
|
|
|
|
|
|
|
<result property="religious" column="religious"/>
|
|
|
|
|
|
|
|
<result property="politicalOutlook" column="political_outlook"/>
|
|
|
|
|
|
|
|
<result property="entryTime" column="entry_time"/>
|
|
|
|
|
|
|
|
<result property="marriage" column="marriage"/>
|
|
|
|
|
|
|
|
<result property="personType" column="person_type"/>
|
|
|
|
|
|
|
|
<result property="personCategory" column="person_category"/>
|
|
|
|
|
|
|
|
<result property="caringLabel" column="caring_label"/>
|
|
|
|
|
|
|
|
<result property="isHouseholder" column="is_householder"/>
|
|
|
|
|
|
|
|
<result property="householderRelation" column="householder_relation"/>
|
|
|
|
|
|
|
|
<result property="isVaccinate" column="is_vaccinate"/>
|
|
|
|
|
|
|
|
<result property="isFirstVaccinate" column="is_first_vaccinate"/>
|
|
|
|
|
|
|
|
<result property="isSecondVaccinate" column="is_second_vaccinate"/>
|
|
|
|
|
|
|
|
<result property="isThirdVaccinate" column="is_third_vaccinate"/>
|
|
|
|
|
|
|
|
<result property="isactive" column="isactive"/>
|
|
|
|
|
|
|
|
<result property="c1" column="c1"/>
|
|
|
|
|
|
|
|
<result property="c2" column="c2"/>
|
|
|
|
|
|
|
|
<result property="c3" column="c3"/>
|
|
|
|
|
|
|
|
<result property="c4" column="c4"/>
|
|
|
|
|
|
|
|
<result property="c5" column="c5"/>
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectVillageUserInfoVo">
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
id,
|
|
|
|
|
|
|
|
village_code,
|
|
|
|
|
|
|
|
village_name,
|
|
|
|
|
|
|
|
grid_code,
|
|
|
|
|
|
|
|
grid_name,
|
|
|
|
|
|
|
|
building_code,
|
|
|
|
|
|
|
|
building_name,
|
|
|
|
|
|
|
|
unit_code,
|
|
|
|
|
|
|
|
unit_name,
|
|
|
|
|
|
|
|
home_code,
|
|
|
|
|
|
|
|
home_name,
|
|
|
|
|
|
|
|
user_name,
|
|
|
|
|
|
|
|
user_pic,
|
|
|
|
|
|
|
|
user_standard_pic,
|
|
|
|
|
|
|
|
identity_type,
|
|
|
|
|
|
|
|
idcard,
|
|
|
|
|
|
|
|
sex,
|
|
|
|
|
|
|
|
nation,
|
|
|
|
|
|
|
|
birthday,
|
|
|
|
|
|
|
|
company,
|
|
|
|
|
|
|
|
phone,
|
|
|
|
|
|
|
|
nationality,
|
|
|
|
|
|
|
|
nativeplace,
|
|
|
|
|
|
|
|
education,
|
|
|
|
|
|
|
|
house_hold_register,
|
|
|
|
|
|
|
|
house_hold_address,
|
|
|
|
|
|
|
|
area_code,
|
|
|
|
|
|
|
|
area_name,
|
|
|
|
|
|
|
|
habitation,
|
|
|
|
|
|
|
|
religious,
|
|
|
|
|
|
|
|
political_outlook,
|
|
|
|
|
|
|
|
entry_time,
|
|
|
|
|
|
|
|
marriage,
|
|
|
|
|
|
|
|
person_type,
|
|
|
|
|
|
|
|
person_category,
|
|
|
|
|
|
|
|
caring_label,
|
|
|
|
|
|
|
|
is_householder,
|
|
|
|
|
|
|
|
householder_relation,
|
|
|
|
|
|
|
|
is_vaccinate,
|
|
|
|
|
|
|
|
is_first_vaccinate,
|
|
|
|
|
|
|
|
is_second_vaccinate,
|
|
|
|
|
|
|
|
is_third_vaccinate,
|
|
|
|
|
|
|
|
isactive,
|
|
|
|
|
|
|
|
c1,
|
|
|
|
|
|
|
|
c2,
|
|
|
|
|
|
|
|
c3,
|
|
|
|
|
|
|
|
c4,
|
|
|
|
|
|
|
|
c5
|
|
|
|
|
|
|
|
from village_user_info
|
|
|
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectVillageUserInfoList" parameterType="com.ssf.mysqloracletest.domain.VillageUserInfo" resultMap="VillageUserInfoResult">
|
|
|
|
|
|
|
|
<include refid="selectVillageUserInfoVo"/>
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="id != null and id != ''">and id = #{id}</if>
|
|
|
|
|
|
|
|
<if test="villageCode != null and villageCode != ''">and village_code = #{villageCode}</if>
|
|
|
|
|
|
|
|
<if test="villageName != null and villageName != ''">and village_name like concat('%', #{villageName},
|
|
|
|
|
|
|
|
'%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="gridCode != null and gridCode != ''">and grid_code = #{gridCode}</if>
|
|
|
|
|
|
|
|
<if test="gridName != null and gridName != ''">and grid_name like concat('%', #{gridName}, '%')</if>
|
|
|
|
|
|
|
|
<if test="buildingCode != null and buildingCode != ''">and building_code = #{buildingCode}</if>
|
|
|
|
|
|
|
|
<if test="buildingName != null and buildingName != ''"> and building_name = #{buildingName}</if>
|
|
|
|
|
|
|
|
<if test="unitName != null and unitName != ''"> and unit_name = #{unitName}</if>
|
|
|
|
|
|
|
|
<if test="homeName != null and homeName != ''"> and home_name = #{homeName}</if>
|
|
|
|
|
|
|
|
<if test="unitCode != null and unitCode != ''">and unit_code = #{unitCode}</if>
|
|
|
|
|
|
|
|
<if test="homeCode != null and homeCode != ''">and home_code = #{homeCode}</if>
|
|
|
|
|
|
|
|
<if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
|
|
|
<if test="userPic != null and userPic != ''">and user_pic = #{userPic}</if>
|
|
|
|
|
|
|
|
<if test="userStandardPic != null and userStandardPic != ''">and user_standard_pic = #{userStandardPic}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="userStandardPicIsNull != null and userStandardPicIsNull != ''">and (user_standard_pic is null or user_standard_pic ='') and c3 is null
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="identityType != null ">and identity_type = #{identityType}</if>
|
|
|
|
|
|
|
|
<if test="idcard != null and idcard != ''">and idcard = #{idcard}</if>
|
|
|
|
|
|
|
|
<if test="sex != null ">and sex = #{sex}</if>
|
|
|
|
|
|
|
|
<if test="nation != null ">and nation = #{nation}</if>
|
|
|
|
|
|
|
|
<if test="birthday != null ">and birthday = #{birthday}</if>
|
|
|
|
|
|
|
|
<if test="company != null and company != ''">and company = #{company}</if>
|
|
|
|
|
|
|
|
<if test="phone != null and phone != ''">and phone = #{phone}</if>
|
|
|
|
|
|
|
|
<if test="nationality != null ">and nationality = #{nationality}</if>
|
|
|
|
|
|
|
|
<if test="nativeplace != null and nativeplace != ''">and nativeplace = #{nativeplace}</if>
|
|
|
|
|
|
|
|
<if test="education != null ">and education = #{education}</if>
|
|
|
|
|
|
|
|
<if test="houseHoldRegister != null and houseHoldRegister != ''">and house_hold_register =
|
|
|
|
|
|
|
|
#{houseHoldRegister}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="houseHoldAddress != null and houseHoldAddress != ''">and house_hold_address =
|
|
|
|
|
|
|
|
#{houseHoldAddress}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="areaCode != null and areaCode != ''">and area_code = #{areaCode}</if>
|
|
|
|
|
|
|
|
<if test="areaName != null and areaName != ''">and area_name like concat('%', #{areaName}, '%')</if>
|
|
|
|
|
|
|
|
<if test="habitation != null and habitation != ''">and habitation = #{habitation}</if>
|
|
|
|
|
|
|
|
<if test="religious != null and religious != ''">and religious = #{religious}</if>
|
|
|
|
|
|
|
|
<if test="politicalOutlook != null ">and political_outlook = #{politicalOutlook}</if>
|
|
|
|
|
|
|
|
<if test="entryTime != null ">and entry_time = #{entryTime}</if>
|
|
|
|
|
|
|
|
<if test="marriage != null ">and marriage = #{marriage}</if>
|
|
|
|
|
|
|
|
<if test="personType != null ">and person_type = #{personType}</if>
|
|
|
|
|
|
|
|
<if test="personCategory != null ">and person_category = #{personCategory}</if>
|
|
|
|
|
|
|
|
<if test="caringLabel != null ">and caring_label = #{caringLabel}</if>
|
|
|
|
|
|
|
|
<if test="isHouseholder != null ">and is_householder = #{isHouseholder}</if>
|
|
|
|
|
|
|
|
<if test="householderRelation != null ">and householder_relation = #{householderRelation}</if>
|
|
|
|
|
|
|
|
<if test="isVaccinate != null ">and is_vaccinate = #{isVaccinate}</if>
|
|
|
|
|
|
|
|
<if test="isFirstVaccinate != null ">and is_first_vaccinate = #{isFirstVaccinate}</if>
|
|
|
|
|
|
|
|
<if test="isSecondVaccinate != null ">and is_second_vaccinate = #{isSecondVaccinate}</if>
|
|
|
|
|
|
|
|
<if test="isThirdVaccinate != null ">and is_third_vaccinate = #{isThirdVaccinate}</if>
|
|
|
|
|
|
|
|
<if test="c1 != null and c1 != ''">and c1 = #{c1}</if>
|
|
|
|
|
|
|
|
<if test="c2 != null and c2 != ''">and c2 = #{c2}</if>
|
|
|
|
|
|
|
|
<if test="c3 != null and c3 != ''">and c3 = #{c3}</if>
|
|
|
|
|
|
|
|
<if test="c4 != null and c4 != ''">and c4 = #{c4}</if>
|
|
|
|
|
|
|
|
<if test="c5 != null and c5 != ''">and c5 = #{c5}</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
<if test="orderByTomany == 'true'">
|
|
|
|
|
|
|
|
ORDER BY
|
|
|
|
|
|
|
|
CASE WHEN c1 ='1' AND user_pic IS NOT NULL THEN 0
|
|
|
|
|
|
|
|
WHEN c1 ='2' AND user_pic IS NOT NULL THEN 1
|
|
|
|
|
|
|
|
when user_pic is not null then 2
|
|
|
|
|
|
|
|
when c1 is not null then 3
|
|
|
|
|
|
|
|
WHEN c1 IS NULL OR user_pic IS NULL THEN 4 END,
|
|
|
|
|
|
|
|
c1,
|
|
|
|
|
|
|
|
user_Pic
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="archivesList" parameterType="com.ssf.mysqloracletest.domain.VillageUserInfo" resultMap="VillageUserInfoResult">
|
|
|
|
|
|
|
|
select * from (
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
a.*,
|
|
|
|
|
|
|
|
(select b.imp_user_type from village_imp_user_info b where a.idcard = b.idcard order by id desc limit 1) imp_user_type
|
|
|
|
|
|
|
|
from village_user_info a
|
|
|
|
|
|
|
|
where a.isactive = 1
|
|
|
|
|
|
|
|
) a
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="id != null and id != ''">and a.id = #{id}</if>
|
|
|
|
|
|
|
|
<if test="villageCode != null and villageCode != ''">and a.village_code = #{villageCode}</if>
|
|
|
|
|
|
|
|
<if test="villageName != null and villageName != ''">and a.village_name like concat('%', #{villageName},
|
|
|
|
|
|
|
|
'%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="gridCode != null and gridCode != ''">and a.grid_code = #{gridCode}</if>
|
|
|
|
|
|
|
|
<if test="gridName != null and gridName != ''">and a.grid_name like concat('%', #{gridName}, '%')</if>
|
|
|
|
|
|
|
|
<if test="buildingCode != null and buildingCode != ''">and a.building_code = #{buildingCode}</if>
|
|
|
|
|
|
|
|
<if test="buildingName != null and buildingName != ''"> and a.building_name = #{buildingName}</if>
|
|
|
|
|
|
|
|
<if test="unitName != null and unitName != ''"> and a.unit_name = #{unitName}</if>
|
|
|
|
|
|
|
|
<if test="homeName != null and homeName != ''"> and a.home_name = #{homeName}</if>
|
|
|
|
|
|
|
|
<if test="unitCode != null and unitCode != ''">and a.unit_code = #{unitCode}</if>
|
|
|
|
|
|
|
|
<if test="homeCode != null and homeCode != ''">and a.home_code = #{homeCode}</if>
|
|
|
|
|
|
|
|
<if test="userName != null and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
|
|
|
<if test="userPic != null and userPic != ''">and a.user_pic = #{userPic}</if>
|
|
|
|
|
|
|
|
<if test="userStandardPic != null and userStandardPic != ''">and a.user_standard_pic = #{userStandardPic}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="identityType != null ">and a.identity_type = #{identityType}</if>
|
|
|
|
|
|
|
|
<if test="idcard != null and idcard != ''">and a.idcard = #{idcard}</if>
|
|
|
|
|
|
|
|
<if test="sex != null ">and a.sex = #{sex}</if>
|
|
|
|
|
|
|
|
<if test="nation != null ">and a.nation = #{nation}</if>
|
|
|
|
|
|
|
|
<if test="birthday != null ">and a.birthday = #{birthday}</if>
|
|
|
|
|
|
|
|
<if test="company != null and company != ''">and a.company = #{company}</if>
|
|
|
|
|
|
|
|
<if test="phone != null and phone != ''">and a.phone = #{phone}</if>
|
|
|
|
|
|
|
|
<if test="nationality != null ">and a.nationality = #{nationality}</if>
|
|
|
|
|
|
|
|
<if test="nativeplace != null and nativeplace != ''">and a.nativeplace = #{nativeplace}</if>
|
|
|
|
|
|
|
|
<if test="education != null ">and a.education = #{education}</if>
|
|
|
|
|
|
|
|
<if test="houseHoldRegister != null and houseHoldRegister != ''">and a.house_hold_register =
|
|
|
|
|
|
|
|
#{houseHoldRegister}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="houseHoldAddress != null and houseHoldAddress != ''">and a.house_hold_address =
|
|
|
|
|
|
|
|
#{houseHoldAddress}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="areaCode != null and areaCode != ''">and a.area_code = #{areaCode}</if>
|
|
|
|
|
|
|
|
<if test="areaName != null and areaName != ''">and a.area_name like concat('%', #{areaName}, '%')</if>
|
|
|
|
|
|
|
|
<if test="habitation != null and habitation != ''">and a.habitation = #{habitation}</if>
|
|
|
|
|
|
|
|
<if test="religious != null and religious != ''">and a.religious = #{religious}</if>
|
|
|
|
|
|
|
|
<if test="politicalOutlook != null ">and a.political_outlook = #{politicalOutlook}</if>
|
|
|
|
|
|
|
|
<if test="entryTime != null ">and a.entry_time = #{entryTime}</if>
|
|
|
|
|
|
|
|
<if test="marriage != null ">and a.marriage = #{marriage}</if>
|
|
|
|
|
|
|
|
<if test="personType != null ">and a.person_type = #{personType}</if>
|
|
|
|
|
|
|
|
<if test="personCategory != null ">and a.person_category = #{personCategory}</if>
|
|
|
|
|
|
|
|
<if test="caringLabel != null ">and a.caring_label = #{caringLabel}</if>
|
|
|
|
|
|
|
|
<if test="isHouseholder != null ">and a.is_householder = #{isHouseholder}</if>
|
|
|
|
|
|
|
|
<if test="householderRelation != null ">and a.householder_relation = #{householderRelation}</if>
|
|
|
|
|
|
|
|
<if test="isVaccinate != null ">and a.is_vaccinate = #{isVaccinate}</if>
|
|
|
|
|
|
|
|
<if test="isFirstVaccinate != null ">and a.is_first_vaccinate = #{isFirstVaccinate}</if>
|
|
|
|
|
|
|
|
<if test="isSecondVaccinate != null ">and a.is_second_vaccinate = #{isSecondVaccinate}</if>
|
|
|
|
|
|
|
|
<if test="isThirdVaccinate != null ">and a.is_third_vaccinate = #{isThirdVaccinate}</if>
|
|
|
|
|
|
|
|
<if test="c1 != null and c1 != ''">and a.c1 = #{c1}</if>
|
|
|
|
|
|
|
|
<if test="c2 != null and c2 != ''">and a.c2 = #{c2}</if>
|
|
|
|
|
|
|
|
<if test="c3 != null and c3 != ''">and a.c3 = #{c3}</if>
|
|
|
|
|
|
|
|
<if test="c4 != null and c4 != ''">and a.c4 = #{c4}</if>
|
|
|
|
|
|
|
|
<if test="c5 != null and c5 != ''">and a.c5 = #{c5}</if>
|
|
|
|
|
|
|
|
<if test="isImpUser != null and isImpUser == 'false'">and (a.imp_user_type is null or a.imp_user_type = '')</if>
|
|
|
|
|
|
|
|
<if test="isImpUser != null and isImpUser == 'true'">and (a.imp_user_type is not null or a.imp_user_type!='')</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
<if test="orderByTomany == 'true'">
|
|
|
|
|
|
|
|
ORDER BY
|
|
|
|
|
|
|
|
CASE WHEN a.c1 ='1' AND a.user_pic IS NOT NULL THEN 0
|
|
|
|
|
|
|
|
WHEN a.c1 ='2' AND a.user_pic IS NOT NULL THEN 1
|
|
|
|
|
|
|
|
when a.user_pic is not null then 2
|
|
|
|
|
|
|
|
when a.c1 is not null then 3
|
|
|
|
|
|
|
|
WHEN a.c1 IS NULL OR a.user_pic IS NULL THEN 4 END,
|
|
|
|
|
|
|
|
a.c1,
|
|
|
|
|
|
|
|
a.user_Pic
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectVillageUserInfoById" parameterType="Long" resultMap="VillageUserInfoResult">
|
|
|
|
|
|
|
|
<include refid="selectVillageUserInfoVo"/>
|
|
|
|
|
|
|
|
where id = #{id}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectVillageUserInfoByIdcard" parameterType="String" resultMap="VillageUserInfoResult">
|
|
|
|
|
|
|
|
<include refid="selectVillageUserInfoVo"/>
|
|
|
|
|
|
|
|
where idcard = #{idcard} limit 1
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertVillageUserInfo" parameterType="com.ssf.mysqloracletest.domain.VillageUserInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
|
|
|
insert into village_user_info
|
|
|
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="villageCode != null">village_code,</if>
|
|
|
|
|
|
|
|
<if test="villageName != null">village_name,</if>
|
|
|
|
|
|
|
|
<if test="gridCode != null">grid_code,</if>
|
|
|
|
|
|
|
|
<if test="gridName != null">grid_name,</if>
|
|
|
|
|
|
|
|
<if test="buildingCode != null">building_code,</if>
|
|
|
|
|
|
|
|
<if test="buildingName != null">building_name,</if>
|
|
|
|
|
|
|
|
<if test="unitCode != null">unit_code,</if>
|
|
|
|
|
|
|
|
<if test="unitName != null">unit_name,</if>
|
|
|
|
|
|
|
|
<if test="homeCode != null">home_code,</if>
|
|
|
|
|
|
|
|
<if test="homeName != null">home_name,</if>
|
|
|
|
|
|
|
|
<if test="userName != null">user_name,</if>
|
|
|
|
|
|
|
|
<if test="userPic != null">user_pic,</if>
|
|
|
|
|
|
|
|
<if test="userStandardPic != null">user_standard_pic,</if>
|
|
|
|
|
|
|
|
<if test="identityType != null">identity_type,</if>
|
|
|
|
|
|
|
|
<if test="idcard != null and idcard != ''">idcard,</if>
|
|
|
|
|
|
|
|
<if test="sex != null">sex,</if>
|
|
|
|
|
|
|
|
<if test="nation != null">nation,</if>
|
|
|
|
|
|
|
|
<if test="birthday != null">birthday,</if>
|
|
|
|
|
|
|
|
<if test="company != null">company,</if>
|
|
|
|
|
|
|
|
<if test="phone != null and phone != ''">phone,</if>
|
|
|
|
|
|
|
|
<if test="nationality != null">nationality,</if>
|
|
|
|
|
|
|
|
<if test="nativeplace != null">nativeplace,</if>
|
|
|
|
|
|
|
|
<if test="education != null">education,</if>
|
|
|
|
|
|
|
|
<if test="houseHoldRegister != null">house_hold_register,</if>
|
|
|
|
|
|
|
|
<if test="houseHoldAddress != null">house_hold_address,</if>
|
|
|
|
|
|
|
|
<if test="areaCode != null">area_code,</if>
|
|
|
|
|
|
|
|
<if test="areaName != null">area_name,</if>
|
|
|
|
|
|
|
|
<if test="habitation != null">habitation,</if>
|
|
|
|
|
|
|
|
<if test="religious != null">religious,</if>
|
|
|
|
|
|
|
|
<if test="politicalOutlook != null">political_outlook,</if>
|
|
|
|
|
|
|
|
<if test="entryTime != null">entry_time,</if>
|
|
|
|
|
|
|
|
<if test="marriage != null">marriage,</if>
|
|
|
|
|
|
|
|
<if test="personType != null">person_type,</if>
|
|
|
|
|
|
|
|
<if test="personCategory != null">person_category,</if>
|
|
|
|
|
|
|
|
<if test="caringLabel != null">caring_label,</if>
|
|
|
|
|
|
|
|
<if test="isHouseholder != null">is_householder,</if>
|
|
|
|
|
|
|
|
<if test="householderRelation != null">householder_relation,</if>
|
|
|
|
|
|
|
|
<if test="isVaccinate != null">is_vaccinate,</if>
|
|
|
|
|
|
|
|
<if test="isFirstVaccinate != null">is_first_vaccinate,</if>
|
|
|
|
|
|
|
|
<if test="isSecondVaccinate != null">is_second_vaccinate,</if>
|
|
|
|
|
|
|
|
<if test="isThirdVaccinate != null">is_third_vaccinate,</if>
|
|
|
|
|
|
|
|
<if test="c1 != null">c1,</if>
|
|
|
|
|
|
|
|
<if test="c2 != null">c2,</if>
|
|
|
|
|
|
|
|
<if test="c3 != null">c3,</if>
|
|
|
|
|
|
|
|
<if test="c4 != null">c4,</if>
|
|
|
|
|
|
|
|
<if test="c5 != null">c5,</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="villageCode != null">#{villageCode},</if>
|
|
|
|
|
|
|
|
<if test="villageName != null">#{villageName},</if>
|
|
|
|
|
|
|
|
<if test="gridCode != null">#{gridCode},</if>
|
|
|
|
|
|
|
|
<if test="gridName != null">#{gridName},</if>
|
|
|
|
|
|
|
|
<if test="buildingCode != null">#{buildingCode},</if>
|
|
|
|
|
|
|
|
<if test="buildingName != null">#{buildingName},</if>
|
|
|
|
|
|
|
|
<if test="unitCode != null">#{unitCode},</if>
|
|
|
|
|
|
|
|
<if test="unitName != null">#{unitName},</if>
|
|
|
|
|
|
|
|
<if test="homeCode != null">#{homeCode},</if>
|
|
|
|
|
|
|
|
<if test="homeName != null">#{homeName},</if>
|
|
|
|
|
|
|
|
<if test="userName != null">#{userName},</if>
|
|
|
|
|
|
|
|
<if test="userPic != null">#{userPic},</if>
|
|
|
|
|
|
|
|
<if test="userStandardPic != null">#{userStandardPic},</if>
|
|
|
|
|
|
|
|
<if test="identityType != null">#{identityType},</if>
|
|
|
|
|
|
|
|
<if test="idcard != null and idcard != ''">#{idcard},</if>
|
|
|
|
|
|
|
|
<if test="sex != null">#{sex},</if>
|
|
|
|
|
|
|
|
<if test="nation != null">#{nation},</if>
|
|
|
|
|
|
|
|
<if test="birthday != null">#{birthday},</if>
|
|
|
|
|
|
|
|
<if test="company != null">#{company},</if>
|
|
|
|
|
|
|
|
<if test="phone != null and phone != ''">#{phone},</if>
|
|
|
|
|
|
|
|
<if test="nationality != null">#{nationality},</if>
|
|
|
|
|
|
|
|
<if test="nativeplace != null">#{nativeplace},</if>
|
|
|
|
|
|
|
|
<if test="education != null">#{education},</if>
|
|
|
|
|
|
|
|
<if test="houseHoldRegister != null">#{houseHoldRegister},</if>
|
|
|
|
|
|
|
|
<if test="houseHoldAddress != null">#{houseHoldAddress},</if>
|
|
|
|
|
|
|
|
<if test="areaCode != null">#{areaCode},</if>
|
|
|
|
|
|
|
|
<if test="areaName != null">#{areaName},</if>
|
|
|
|
|
|
|
|
<if test="habitation != null">#{habitation},</if>
|
|
|
|
|
|
|
|
<if test="religious != null">#{religious},</if>
|
|
|
|
|
|
|
|
<if test="politicalOutlook != null">#{politicalOutlook},</if>
|
|
|
|
|
|
|
|
<if test="entryTime != null">#{entryTime},</if>
|
|
|
|
|
|
|
|
<if test="marriage != null">#{marriage},</if>
|
|
|
|
|
|
|
|
<if test="personType != null">#{personType},</if>
|
|
|
|
|
|
|
|
<if test="personCategory != null">#{personCategory},</if>
|
|
|
|
|
|
|
|
<if test="caringLabel != null">#{caringLabel},</if>
|
|
|
|
|
|
|
|
<if test="isHouseholder != null">#{isHouseholder},</if>
|
|
|
|
|
|
|
|
<if test="householderRelation != null">#{householderRelation},</if>
|
|
|
|
|
|
|
|
<if test="isVaccinate != null">#{isVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isFirstVaccinate != null">#{isFirstVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isSecondVaccinate != null">#{isSecondVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isThirdVaccinate != null">#{isThirdVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="c1 != null">#{c1},</if>
|
|
|
|
|
|
|
|
<if test="c2 != null">#{c2},</if>
|
|
|
|
|
|
|
|
<if test="c3 != null">#{c3},</if>
|
|
|
|
|
|
|
|
<if test="c4 != null">#{c4},</if>
|
|
|
|
|
|
|
|
<if test="c5 != null">#{c5},</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateVillageUserInfo" parameterType="com.ssf.mysqloracletest.domain.VillageUserInfo">
|
|
|
|
|
|
|
|
update village_user_info
|
|
|
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="villageCode != null and villageCode != ''">village_code = #{villageCode},</if>
|
|
|
|
|
|
|
|
<if test="villageName != null and villageName != ''">village_name = #{villageName},</if>
|
|
|
|
|
|
|
|
<if test="gridCode != null and gridCode != ''">grid_code = #{gridCode},</if>
|
|
|
|
|
|
|
|
<if test="gridName != null and gridName != ''">grid_name = #{gridName},</if>
|
|
|
|
|
|
|
|
<if test="buildingCode != null and buildingCode != ''">building_code = #{buildingCode},</if>
|
|
|
|
|
|
|
|
<if test="buildingName != null and buildingName != ''">building_name = #{buildingName},</if>
|
|
|
|
|
|
|
|
<if test="unitCode != null and unitCode != ''">unit_code = #{unitCode},</if>
|
|
|
|
|
|
|
|
<if test="unitName != null and unitName != ''">unit_name = #{unitName},</if>
|
|
|
|
|
|
|
|
<if test="homeCode != null and homeCode != ''">home_code = #{homeCode},</if>
|
|
|
|
|
|
|
|
<if test="homeName != null and homeName != ''">home_name = #{homeName},</if>
|
|
|
|
|
|
|
|
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
|
|
|
|
|
|
|
<if test="userPic != null and userPic != ''">user_pic = #{userPic},</if>
|
|
|
|
|
|
|
|
<if test="userStandardPic != null and userStandardPic != ''">user_standard_pic = #{userStandardPic},</if>
|
|
|
|
|
|
|
|
<if test="identityType != null and identityType != ''">identity_type = #{identityType},</if>
|
|
|
|
|
|
|
|
<if test="idcard != null and idcard != '' and idcard != ''">idcard = #{idcard},</if>
|
|
|
|
|
|
|
|
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
|
|
|
|
|
|
|
<if test="nation != null and nation != ''">nation = #{nation},</if>
|
|
|
|
|
|
|
|
<!-- <if test="birthday != null and birthday != ''">birthday = #{birthday},</if>-->
|
|
|
|
|
|
|
|
<if test="company != null and company != ''">company = #{company},</if>
|
|
|
|
|
|
|
|
<if test="phone != null and phone != '' and phone!='' ">phone = #{phone},</if>
|
|
|
|
|
|
|
|
<if test="nationality != null and nationality != ''">nationality = #{nationality},</if>
|
|
|
|
|
|
|
|
<if test="nativeplace != null and nativeplace != ''">nativeplace = #{nativeplace},</if>
|
|
|
|
|
|
|
|
<if test="education != null and education != ''">education = #{education},</if>
|
|
|
|
|
|
|
|
<if test="houseHoldRegister != null and houseHoldRegister != ''">house_hold_register = #{houseHoldRegister},</if>
|
|
|
|
|
|
|
|
<if test="houseHoldAddress != null and houseHoldAddress != ''">house_hold_address = #{houseHoldAddress},</if>
|
|
|
|
|
|
|
|
<if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
|
|
|
|
|
|
|
|
<if test="areaName != null and areaName != ''">area_name = #{areaName},</if>
|
|
|
|
|
|
|
|
<if test="habitation != null and habitation != ''">habitation = #{habitation},</if>
|
|
|
|
|
|
|
|
<if test="religious != null and religious != ''">religious = #{religious},</if>
|
|
|
|
|
|
|
|
<if test="politicalOutlook != null and politicalOutlook != ''">political_outlook = #{politicalOutlook},</if>
|
|
|
|
|
|
|
|
<!-- <if test="entryTime != null and entryTime != ''">entry_time = #{entryTime},</if>-->
|
|
|
|
|
|
|
|
<if test="marriage != null and marriage != ''">marriage = #{marriage},</if>
|
|
|
|
|
|
|
|
<if test="personType != null and personType != ''">person_type = #{personType},</if>
|
|
|
|
|
|
|
|
<if test="personCategory != null and personCategory != ''">person_category = #{personCategory},</if>
|
|
|
|
|
|
|
|
<if test="caringLabel != null and caringLabel != ''">caring_label = #{caringLabel},</if>
|
|
|
|
|
|
|
|
<if test="isHouseholder != null and isHouseholder != ''">is_householder = #{isHouseholder},</if>
|
|
|
|
|
|
|
|
<if test="householderRelation != null and householderRelation != ''">householder_relation = #{householderRelation},</if>
|
|
|
|
|
|
|
|
<if test="isVaccinate != null and isVaccinate != ''">is_vaccinate = #{isVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isFirstVaccinate != null and isFirstVaccinate != ''">is_first_vaccinate = #{isFirstVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isSecondVaccinate != null and isSecondVaccinate != ''">is_second_vaccinate = #{isSecondVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isThirdVaccinate != null and isThirdVaccinate != ''">is_third_vaccinate = #{isThirdVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isactive != null and c1 != ''">isactive = #{isactive},</if>
|
|
|
|
|
|
|
|
<if test="c1 != null and c1 != ''">c1 = #{c1},</if>
|
|
|
|
|
|
|
|
<if test="c2 != null and c2 != ''">c2 = #{c2},</if>
|
|
|
|
|
|
|
|
<if test="c3 != null and c3 != ''">c3 = #{c3},</if>
|
|
|
|
|
|
|
|
<if test="c4 != null and c4 != ''">c4 = #{c4},</if>
|
|
|
|
|
|
|
|
<if test="c5 != null and c5 != ''">c5 = #{c5},</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
where id = #{id}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateVillageUserInfoByIdcard" parameterType="com.ssf.mysqloracletest.domain.VillageUserInfo">
|
|
|
|
|
|
|
|
update village_user_info
|
|
|
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="villageCode != null and villageCode != ''">village_code = #{villageCode},</if>
|
|
|
|
|
|
|
|
<if test="villageName != null and villageName != ''">village_name = #{villageName},</if>
|
|
|
|
|
|
|
|
<if test="gridCode != null and gridCode != ''">grid_code = #{gridCode},</if>
|
|
|
|
|
|
|
|
<if test="gridName != null and gridName != ''">grid_name = #{gridName},</if>
|
|
|
|
|
|
|
|
<if test="buildingCode != null and buildingCode != ''">building_code = #{buildingCode},</if>
|
|
|
|
|
|
|
|
<if test="buildingName != null and buildingName != ''">building_name = #{buildingName},</if>
|
|
|
|
|
|
|
|
<if test="unitCode != null and unitCode != ''">unit_code = #{unitCode},</if>
|
|
|
|
|
|
|
|
<if test="unitName != null and unitName != ''">unit_name = #{unitName},</if>
|
|
|
|
|
|
|
|
<if test="homeCode != null and homeCode != ''">home_code = #{homeCode},</if>
|
|
|
|
|
|
|
|
<if test="homeName != null and homeName != ''">home_name = #{homeName},</if>
|
|
|
|
|
|
|
|
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
|
|
|
|
|
|
|
<if test="userPic != null and userPic != ''">user_pic = #{userPic},</if>
|
|
|
|
|
|
|
|
<if test="userStandardPic != null and userStandardPic != ''">user_standard_pic = #{userStandardPic},</if>
|
|
|
|
|
|
|
|
<if test="identityType != null and identityType != ''">identity_type = #{identityType},</if>
|
|
|
|
|
|
|
|
<if test="idcard != null and idcard != ''">idcard = #{idcard},</if>
|
|
|
|
|
|
|
|
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
|
|
|
|
|
|
|
<if test="nation != null and nation != ''">nation = #{nation},</if>
|
|
|
|
|
|
|
|
<if test="birthday != null and birthday != ''">birthday = #{birthday},</if>
|
|
|
|
|
|
|
|
<if test="company != null and company != ''">company = #{company},</if>
|
|
|
|
|
|
|
|
<if test="phone != null and phone!='' ">phone = #{phone},</if>
|
|
|
|
|
|
|
|
<if test="nationality != null and nationality != ''">nationality = #{nationality},</if>
|
|
|
|
|
|
|
|
<if test="nativeplace != null and nativeplace != ''">nativeplace = #{nativeplace},</if>
|
|
|
|
|
|
|
|
<if test="education != null and education != ''">education = #{education},</if>
|
|
|
|
|
|
|
|
<if test="houseHoldRegister != null and houseHoldRegister != ''">house_hold_register = #{houseHoldRegister},</if>
|
|
|
|
|
|
|
|
<if test="houseHoldAddress != null and houseHoldAddress != ''">house_hold_address = #{houseHoldAddress},</if>
|
|
|
|
|
|
|
|
<if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
|
|
|
|
|
|
|
|
<if test="areaName != null and areaName != ''">area_name = #{areaName},</if>
|
|
|
|
|
|
|
|
<if test="habitation != null and habitation != ''">habitation = #{habitation},</if>
|
|
|
|
|
|
|
|
<if test="religious != null and religious != ''">religious = #{religious},</if>
|
|
|
|
|
|
|
|
<if test="politicalOutlook != null and politicalOutlook != ''">political_outlook = #{politicalOutlook},</if>
|
|
|
|
|
|
|
|
<if test="entryTime != null and entryTime != ''">entry_time = #{entryTime},</if>
|
|
|
|
|
|
|
|
<if test="marriage != null and marriage != ''">marriage = #{marriage},</if>
|
|
|
|
|
|
|
|
<if test="personType != null and personType != ''">person_type = #{personType},</if>
|
|
|
|
|
|
|
|
<if test="personCategory != null and personCategory != ''">person_category = #{personCategory},</if>
|
|
|
|
|
|
|
|
<if test="caringLabel != null and caringLabel != ''">caring_label = #{caringLabel},</if>
|
|
|
|
|
|
|
|
<if test="isHouseholder != null and isHouseholder != ''">is_householder = #{isHouseholder},</if>
|
|
|
|
|
|
|
|
<if test="householderRelation != null and householderRelation != ''">householder_relation = #{householderRelation},</if>
|
|
|
|
|
|
|
|
<if test="isVaccinate != null and isVaccinate != ''">is_vaccinate = #{isVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isFirstVaccinate != null and isFirstVaccinate != ''">is_first_vaccinate = #{isFirstVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isSecondVaccinate != null and isSecondVaccinate != ''">is_second_vaccinate = #{isSecondVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isThirdVaccinate != null and isThirdVaccinate != ''">is_third_vaccinate = #{isThirdVaccinate},</if>
|
|
|
|
|
|
|
|
<if test="isactive != null and isactive != ''">isactive = #{isactive},</if>
|
|
|
|
|
|
|
|
<if test="c1 != null and c1 != ''">c1 = #{c1},</if>
|
|
|
|
|
|
|
|
<if test="c3 != null and c3 != ''">c3 = #{c3},</if>
|
|
|
|
|
|
|
|
<if test="c4 != null and c4 != ''">c4 = #{c4},</if>
|
|
|
|
|
|
|
|
<if test="c5 != null and c5 != ''">c5 = #{c5},</if>
|
|
|
|
|
|
|
|
<if test="c2 != null and c2 != ''">c2 = #{c2New},</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
where idcard = #{idcard} and c2 = #{c2}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteVillageUserInfoById" parameterType="Long">
|
|
|
|
|
|
|
|
delete from village_user_info where id = #{id}
|
|
|
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteVillageUserInfoByUpdatetime" parameterType="com.ssf.mysqloracletest.domain.VillageUserInfo">
|
|
|
|
|
|
|
|
delete from village_user_info where DATE_FORMAT(updatetime, '%Y-%m-%d') != '${updatetimeV}'
|
|
|
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteVillageUserInfoByIds" parameterType="String">
|
|
|
|
|
|
|
|
delete from village_user_info where id in
|
|
|
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
|
|
|
#{id}
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="logicDelete">
|
|
|
|
|
|
|
|
update village_user_info
|
|
|
|
|
|
|
|
set isactive='0'
|
|
|
|
|
|
|
|
where id in (${idsIn})
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="deleteVillageUserInfo">
|
|
|
|
|
|
|
|
update village_user_info
|
|
|
|
|
|
|
|
set isactive='0'
|
|
|
|
|
|
|
|
where village_code= #{villageCode} and idcard = #{idcard}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="userArchivesTask" parameterType="com.ssf.mysqloracletest.domain.VillageUserInfo"
|
|
|
|
|
|
|
|
resultMap="VillageUserInfoResult">
|
|
|
|
|
|
|
|
select a.* from village_user_info a
|
|
|
|
|
|
|
|
left join model_suspected_user_info b on a.idcard = b.idcard
|
|
|
|
|
|
|
|
where b.idcard is not null and b.is_entity='1'
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="userArchivesTaskNotIn" parameterType="com.ssf.mysqloracletest.domain.VillageUserInfo"
|
|
|
|
|
|
|
|
resultMap="VillageUserInfoResult">
|
|
|
|
|
|
|
|
select * from (
|
|
|
|
|
|
|
|
select * from village_user_info a
|
|
|
|
|
|
|
|
where id not in (
|
|
|
|
|
|
|
|
select a.id from village_user_info a
|
|
|
|
|
|
|
|
left join model_suspected_user_info b on a.idcard = b.idcard
|
|
|
|
|
|
|
|
where b.idcard is not null and b.is_entity='1'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
) a
|
|
|
|
|
|
|
|
left join model_notfound_user_info b on a.idcard = b.idcard
|
|
|
|
|
|
|
|
where b.idcard is not null
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|