Browse Source

调整错误sql

zsf 1 year ago
parent
commit
d937f7b29c

+ 1 - 1
src/main/java/com/rf/psychological/user/dao/repository/UserRepository.java

@@ -51,7 +51,7 @@ public interface UserRepository extends BaseRepository<UserEntity, String> {
      * @param institutionNo
      * @return
      */
-    @Query(value = "select id,gender,password,pet_name,phone,birthday,profession,institution_name,institution_no,user_status,g_id,model,role_type from t_user_info where institution_no = :institutionNo   and role_type ='1' and  " +
+    @Query(value = "select id,gender,password,pet_name,phone,birthday,profession,institution_name,institution_no,user_status,g_id,model,role_type,create_time from t_user_info where institution_no = :institutionNo   and role_type ='1' and  " +
             " if(:searchKey is not null and :searchKey!='',(pet_name like %:searchKey% or phone like %:searchKey% ) , 1=1) " +
             "and if(:status is not null and :status!='',(t_user_info.user_status = :status) , 1=1) limit :pageNum ,:pageSize ", nativeQuery = true)
     List<UserEntity> getUserListByInstitutionNo(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize, @Param("searchKey") String searchKey, @Param("institutionNo") String institutionNo, @Param("status") String status);