|
@@ -4,17 +4,6 @@
|
|
|
|
|
|
<select id="studentQuery" resultType="com.qmth.themis.business.dto.response.TEStudentDto">
|
|
|
select
|
|
|
- t.id,
|
|
|
- t.name,
|
|
|
- t.identity,
|
|
|
- t.orgName,
|
|
|
- t.enable,
|
|
|
- t.basePhotoPath,
|
|
|
- if(t.updateName is not null, t.updateName, t.createName) as updateName,
|
|
|
- if(t.updateTime is not null, t.updateTime, t.createTime) as updateTime,
|
|
|
- t.photo
|
|
|
- from
|
|
|
- (select
|
|
|
tes.id,
|
|
|
tes.name,
|
|
|
tes.`identity`,
|
|
@@ -43,14 +32,18 @@
|
|
|
<if test="orgId != null and orgId != ''">
|
|
|
and tes.org_id = #{orgId}
|
|
|
</if>
|
|
|
- </where>
|
|
|
- ) t
|
|
|
- <where>
|
|
|
<if test="photo != null and photo != '' or photo == 0">
|
|
|
- and t.photo = #{photo}
|
|
|
+ <choose>
|
|
|
+ <when test="photo == true">
|
|
|
+ and tes.base_photo_path is not null
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and tes.base_photo_path is null
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by t.id
|
|
|
+ order by tes.id
|
|
|
</select>
|
|
|
|
|
|
<select id="studentExamRecordQuery" resultType="com.qmth.themis.business.dto.response.TEStudentExamRecordDto">
|