Quellcode durchsuchen

修改全部学员查询

小么熊🐻 vor 1 Jahr
Ursprung
Commit
4eb2d753e0
1 geänderte Dateien mit 5 neuen und 10 gelöschten Zeilen
  1. 5 10
      jsjp-service/src/main/resources/mapper/tms/TmsStudentInfoMapper.xml

+ 5 - 10
jsjp-service/src/main/resources/mapper/tms/TmsStudentInfoMapper.xml

@@ -147,12 +147,10 @@
         <where>
             AND t1.TSO_HISTORY = '0'
             AND t1.TSO_BUSITYPE in ('0', '1')
-            AND t1.TSO_LOGOUT = 0<if test="field != null  and field != ''">AND (t1.Tso_Name like '%' ||
-            #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or
-            t1.Tso_Phone like '%' || #{
-                field,jdbcType=VARCHAR} || '%')
-        </if>
+            AND t1.TSO_LOGOUT = 0
+            <if test="field != null  and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
             <if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,jdbcType=NUMERIC} </if>
+            <if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
         </where>
         union
         select t1.TSO_ID, t1.TSO_IDCARD, t1.TSO_NAME,t1.TSO_SEX,t1.Tso_Phone,t1.TSO_APPLYDATE, t1.TSO_STATE , t1.
@@ -166,12 +164,9 @@
             AND t1.TSO_HISTORY = '0'
             AND t1.TSO_BUSITYPE in ('0', '1')
             AND t1.TSO_LOGOUT = 0
-            <if test="field != null  and field != ''">AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or
-                t1.
-                TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{
-                field,jdbcType=VARCHAR} || '%')
-            </if>
+            <if test="field != null  and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
             <if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,jdbcType=NUMERIC} </if>
+            <if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
         </where>
         )
         ORDER BY TSO_ID desc