|
@@ -8,8 +8,8 @@
|
|
|
|
|
|
<!-- 表查询字段 -->
|
|
<!-- 表查询字段 -->
|
|
<sql id="allColumns">
|
|
<sql id="allColumns">
|
|
- p.id, p.name, p.card_id, p.call_name, p.gender, p.birthday, p.death_date, p.marital_status,
|
|
|
|
- p.mate_id, p.mother_id, p.father_id, p.sort, p.address, p.remark, p.create_time, p.create_by, p.modify_time,
|
|
|
|
|
|
+ p.id, p.name, p.card_id, p.phone, p.call_name, p.gender, p.birthday, p.death_date, p.marital_status,
|
|
|
|
+ p.mate_id, p.mother_id, p.father_id, p.sort, p.address, p.tags, p.remark, p.weight, p.create_time, p.create_by, p.modify_time,
|
|
p.modify_by
|
|
p.modify_by
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
@@ -53,6 +53,9 @@
|
|
<if test="mateId != null">
|
|
<if test="mateId != null">
|
|
AND p.mate_id = #{mateId}
|
|
AND p.mate_id = #{mateId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="mateIsNull != null">
|
|
|
|
+ AND p.mate_id is null
|
|
|
|
+ </if>
|
|
<if test="motherId != null">
|
|
<if test="motherId != null">
|
|
AND p.mother_id = #{motherId}
|
|
AND p.mother_id = #{motherId}
|
|
</if>
|
|
</if>
|
|
@@ -101,11 +104,12 @@
|
|
<!-- 新增人员表信息 -->
|
|
<!-- 新增人员表信息 -->
|
|
<insert id="add" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
|
<insert id="add" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
|
INSERT INTO t_person (
|
|
INSERT INTO t_person (
|
|
- name, card_id, call_name, gender, birthday, death_date, marital_status,
|
|
|
|
- mate_id, mother_id, father_id, sort, address, remark, create_by
|
|
|
|
|
|
+ name, card_id, phone, call_name, gender, birthday, death_date, marital_status,
|
|
|
|
+ mate_id, mother_id, father_id, sort, address, tags, remark, weight, create_by
|
|
) VALUES (
|
|
) VALUES (
|
|
#{name},
|
|
#{name},
|
|
#{cardId},
|
|
#{cardId},
|
|
|
|
+ #{phone},
|
|
#{callName},
|
|
#{callName},
|
|
#{gender},
|
|
#{gender},
|
|
#{birthday},
|
|
#{birthday},
|
|
@@ -116,7 +120,9 @@
|
|
#{fatherId},
|
|
#{fatherId},
|
|
#{sort},
|
|
#{sort},
|
|
#{address},
|
|
#{address},
|
|
|
|
+ #{tags},
|
|
#{remark},
|
|
#{remark},
|
|
|
|
+ #{weight},
|
|
#{createBy}
|
|
#{createBy}
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
@@ -125,13 +131,16 @@
|
|
<update id="update">
|
|
<update id="update">
|
|
UPDATE t_person
|
|
UPDATE t_person
|
|
<set>
|
|
<set>
|
|
- <if test="name != null">
|
|
|
|
|
|
+ <if test="@Ognl@isNotEmpty(name)">
|
|
name = #{name},
|
|
name = #{name},
|
|
</if>
|
|
</if>
|
|
- <if test="cardId != null">
|
|
|
|
|
|
+ <if test="@Ognl@isNotEmpty(cardId)">
|
|
card_id = #{cardId},
|
|
card_id = #{cardId},
|
|
</if>
|
|
</if>
|
|
- <if test="callName != null">
|
|
|
|
|
|
+ <if test="@Ognl@isNotEmpty(phone)">
|
|
|
|
+ phone = #{phone},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="@Ognl@isNotEmpty(callName)">
|
|
call_name = #{callName},
|
|
call_name = #{callName},
|
|
</if>
|
|
</if>
|
|
<if test="gender != null">
|
|
<if test="gender != null">
|
|
@@ -167,12 +176,18 @@
|
|
<if test="sort != null">
|
|
<if test="sort != null">
|
|
sort = #{sort},
|
|
sort = #{sort},
|
|
</if>
|
|
</if>
|
|
- <if test="address != null">
|
|
|
|
|
|
+ <if test="@Ognl@isNotEmpty(address)">
|
|
address = #{address},
|
|
address = #{address},
|
|
</if>
|
|
</if>
|
|
- <if test="remark != null">
|
|
|
|
|
|
+ <if test="@Ognl@isNotEmpty(tags)">
|
|
|
|
+ tags = #{tags},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="@Ognl@isNotEmpty(remark)">
|
|
remark = #{remark},
|
|
remark = #{remark},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="weight != null">
|
|
|
|
+ weight = #{weight},
|
|
|
|
+ </if>
|
|
<if test="modifyBy != null">
|
|
<if test="modifyBy != null">
|
|
modify_by = #{modifyBy}
|
|
modify_by = #{modifyBy}
|
|
</if>
|
|
</if>
|