liu 2 лет назад
Родитель
Сommit
ecb84ab4ec
1 измененных файлов с 10 добавлено и 9 удалено
  1. 10 9
      src/main/resources/mapper/template/SmartUserMapper.xml

+ 10 - 9
src/main/resources/mapper/template/SmartUserMapper.xml

@@ -247,15 +247,16 @@
         </if>
         </if>
     </select>
     </select>
     <select id="studentSelect" resultType="com.template.model.vo.StudentSelectVo">
     <select id="studentSelect" resultType="com.template.model.vo.StudentSelectVo">
-        SELECT
-            su.`name` as name,
-            su.head_image as headImage,
-            su.card_no as cardNo,
-            sc.`name` as className
-        FROM
-            `smart_user` su
-                LEFT JOIN smart_class sc on su.school_class=sc.id
-        WHERE (su.`name` LIKE '%' #{keyWord} '%' or su.card_no= #{keyWord})
+        SELECT su.`name`     as name,
+               su.head_image as headImage,
+               su.card_no    as cardNo,
+               sc.`name`     as className
+        FROM `smart_user` su
+                 LEFT JOIN smart_class sc on su.school_class = sc.id
+        WHERE su.deleted = 0
+          AND su.is_cancel = 0
+          AND su.identity_id = 2
+          AND (su.`name` LIKE '%' #{keyWord} '%' or su.card_no= #{keyWord})
     </select>
     </select>
 
 
 </mapper>
 </mapper>