|
|
@@ -234,13 +234,15 @@
|
|
|
<result column="parents_address" property="parents_address" jdbcType="VARCHAR" />
|
|
|
<result column="parents_honor" property="parents_honor" jdbcType="VARCHAR" />
|
|
|
<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" />
|
|
|
</resultMap>
|
|
|
<resultMap id="ResultMapWithBLOBs" type="com.usoftchina.smartschool.school.po.SysParents" extends="parentMap" >
|
|
|
<result column="parents_photo" property="parents_photo" jdbcType="LONGVARCHAR" />
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectParent" resultMap="parentMap">
|
|
|
- select sys_parents.* from sys_parents left join sys_parents_stu on sys_parents.parent_id =
|
|
|
+ select sys_parents.*, sys_parents_stu.parent_stu_id,sys_parents_stu.ps_relation from sys_parents left join sys_parents_stu on sys_parents.parent_id =
|
|
|
sys_parents_stu.parent_id where sys_parents_stu.stu_id=#{id}
|
|
|
</select>
|
|
|
|
|
|
@@ -354,6 +356,10 @@
|
|
|
delete from sys_parents_stu where stu_id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
+ <delete id="deleteRelationById" parameterType="long">
|
|
|
+ delete from sys_parents_stu where parent_stu_id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
<select id="checkStu" parameterType="long" resultType="integer">
|
|
|
select count(1) from sys_student where clazz_id=#{id}
|
|
|
</select>
|