|
@@ -8,11 +8,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<insert id="add">
|
|
<insert id="add">
|
|
INSERT INTO fxry(`id`, `name`, `sex`, `age`, `id_card`, `village_towns_id`, `village_towns`, `village_id`,
|
|
INSERT INTO fxry(`id`, `name`, `sex`, `age`, `id_card`, `village_towns_id`, `village_towns`, `village_id`,
|
|
`village`, `group_id`, `group`, `detail_addr`, `id_card_hide`, `addr_outside_province`,
|
|
`village`, `group_id`, `group`, `detail_addr`, `id_card_hide`, `addr_outside_province`,
|
|
- `intended_return_time`, `telephone`, `remark`, `delete`,
|
|
|
|
|
|
+ `intended_return_time`, `telephone`, `remark`, `detail_addr`, `wzhjdz`
|
|
`create_time`, `create_by`, `update_time`, `update_by`)
|
|
`create_time`, `create_by`, `update_time`, `update_by`)
|
|
VALUES (#{id}, #{name}, #{sex}, #{age}, #{idCard}, #{villageTownsId}, #{villageTowns}, #{villageId},
|
|
VALUES (#{id}, #{name}, #{sex}, #{age}, #{idCard}, #{villageTownsId}, #{villageTowns}, #{villageId},
|
|
#{village}, #{groupId}, #{group}, #{detailAddr}, #{idCardHide}, #{addrOutsideProvince},
|
|
#{village}, #{groupId}, #{group}, #{detailAddr}, #{idCardHide}, #{addrOutsideProvince},
|
|
- #{IntendedReturnTime}, #{telephone}, #{remark}, #{delete},
|
|
|
|
|
|
+ #{intendedReturnTime}, #{telephone}, #{remark}, #{detailAddr}, #{wzhjdz},
|
|
SYSDATE(), #{createBy}, SYSDATE(), #{updateBy});
|
|
SYSDATE(), #{createBy}, SYSDATE(), #{updateBy});
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -31,10 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="groupId != null and groupId != ''">group_id = #{groupId},</if>
|
|
<if test="groupId != null and groupId != ''">group_id = #{groupId},</if>
|
|
<if test="group != null and group != ''">`group` = #{group},</if>
|
|
<if test="group != null and group != ''">`group` = #{group},</if>
|
|
<if test="detailAddr != null and detailAddr != ''">detail_addr = #{detailAddr},</if>
|
|
<if test="detailAddr != null and detailAddr != ''">detail_addr = #{detailAddr},</if>
|
|
|
|
+ <if test="wzhjdz != null and wzhjdz != ''">wzhjdz = #{wzhjdz},</if>
|
|
<if test="idCardHide != null and idCardHide != ''">id_card_hide = #{idCardHide},</if>
|
|
<if test="idCardHide != null and idCardHide != ''">id_card_hide = #{idCardHide},</if>
|
|
<if test="addrOutsideProvince != null and addrOutsideProvince != ''">addr_outside_province = #{addrOutsideProvince},</if>
|
|
<if test="addrOutsideProvince != null and addrOutsideProvince != ''">addr_outside_province = #{addrOutsideProvince},</if>
|
|
- <if test="IntendedReturnTime != null and IntendedReturnTime != ''">intended_return_time = #{IntendedReturnTime},</if>
|
|
|
|
- <if test="IntendedReturnTime != null and IntendedReturnTime != ''">intended_return_time = #{IntendedReturnTime},</if>
|
|
|
|
|
|
+ <if test="intendedReturnTime != null and intendedReturnTime != ''">intended_return_time = #{intendedReturnTime},</if>
|
|
|
|
+ <if test="intendedReturnTime != null and intendedReturnTime != ''">intended_return_time = #{intendedReturnTime},</if>
|
|
<if test="telephone != null and telephone != ''">telephone = #{telephone},</if>
|
|
<if test="telephone != null and telephone != ''">telephone = #{telephone},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="delete != null and delete != ''">`delete` = #{delete},</if>
|
|
<if test="delete != null and delete != ''">`delete` = #{delete},</if>
|
|
@@ -55,19 +56,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<select id="list" resultType="com.boman.domain.Fxry">
|
|
<select id="list" resultType="com.boman.domain.Fxry">
|
|
select id,
|
|
select id,
|
|
`name`,
|
|
`name`,
|
|
- sex,
|
|
|
|
- age,
|
|
|
|
- village_towns,
|
|
|
|
- village,
|
|
|
|
- id_card_hide,
|
|
|
|
- addr_outside_province,
|
|
|
|
- intended_return_time,
|
|
|
|
- telephone
|
|
|
|
|
|
+ telephone,
|
|
|
|
+ id_card_hide idCard,
|
|
|
|
+ wzhjdz,
|
|
|
|
+ addr_outside_province addrOutsideProvince,
|
|
|
|
+ intended_return_time intendedReturnTime
|
|
from fxry
|
|
from fxry
|
|
- where 1 = 1
|
|
|
|
|
|
+ where `delete` = '否'
|
|
<if test="name != null and name != ''">and `name` like concat('%', #{name}, '%')</if>
|
|
<if test="name != null and name != ''">and `name` like concat('%', #{name}, '%')</if>
|
|
<if test="sex != null and sex != ''">and `sex` like concat('%', #{sex}, '%')</if>
|
|
<if test="sex != null and sex != ''">and `sex` like concat('%', #{sex}, '%')</if>
|
|
<if test="idCard != null and idCard != ''">and `id_card` like concat('%', #{idCard}, '%')</if>
|
|
<if test="idCard != null and idCard != ''">and `id_card` like concat('%', #{idCard}, '%')</if>
|
|
<if test="telephone != null and telephone != ''">and telephone = #{telephone}</if>
|
|
<if test="telephone != null and telephone != ''">and telephone = #{telephone}</if>
|
|
|
|
+ order by create_time desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getById" resultType="com.boman.domain.Fxry">
|
|
|
|
+ select id,
|
|
|
|
+ `name`,
|
|
|
|
+ detail_addr detailAddr,
|
|
|
|
+ id_card idCard,
|
|
|
|
+ addr_outside_province addrOutsideProvince,
|
|
|
|
+ intended_return_time intendedReturnTime,
|
|
|
|
+ telephone
|
|
|
|
+ from fxry
|
|
|
|
+ where id = #{id} limit 1;
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|