|
|
@@ -297,6 +297,7 @@
|
|
|
<result column="parents_remarks" property="parents_remarks" jdbcType="VARCHAR" />
|
|
|
<result column="ps_relation" property="ps_relation" jdbcType="VARCHAR" />
|
|
|
<result column="parent_stu_id" property="parent_stu_id" jdbcType="BIGINT" />
|
|
|
+ <result property="pa_phone" column="pa_phone" jdbcType="VARCHAR"/>
|
|
|
</resultMap>
|
|
|
<resultMap id="ResultMapWithBLOBs" type="com.usoftchina.smartschool.school.po.SysParents" extends="parentMap" >
|
|
|
<result column="parents_photo" property="parents_photo" jdbcType="LONGVARCHAR" />
|
|
|
@@ -346,6 +347,9 @@
|
|
|
<if test="parents_remarks != null" >
|
|
|
parents_remarks,
|
|
|
</if>
|
|
|
+ <if test="pa_phone != null" >
|
|
|
+ pa_phone,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="user_id != null" >
|
|
|
@@ -381,24 +385,27 @@
|
|
|
<if test="parents_remarks != null" >
|
|
|
#{parents_remarks,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="pa_phone != null" >
|
|
|
+ #{pa_phone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertrelation">
|
|
|
- insert into sys_parents_stu (stu_id,parent_id) VALUES (#{id},#{pr_id})
|
|
|
+ insert into sys_parents_stu (stu_id,parent_id,ps_relation) VALUES (#{id},#{pr_id},#{relation})
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateParents" parameterType="com.usoftchina.smartschool.school.po.SysParents" >
|
|
|
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
|
|
update sys_parents <set>
|
|
|
- parents_name = #{item.parents_name,jdbcType=VARCHAR}
|
|
|
+ parents_name = #{item.parents_name,jdbcType=VARCHAR},pa_phone = #{item.pa_phone,jdbcType=VARCHAR}
|
|
|
</set>
|
|
|
where parent_id = #{item.parent_id,jdbcType=BIGINT}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|
|
|
<update id="updateRelation">
|
|
|
- update sys_parents_stu set ps_relation=#{relation} where parent_id=#{parent_id} and stu_id =#{id}
|
|
|
+ update sys_parents_stu set ps_relation=#{relation} where parent_stu_id =#{id}
|
|
|
</update>
|
|
|
|
|
|
<select id="selectByCode" resultMap="BaseResultMap">
|