Преглед на файлове

cld接口-qq搜索用户

laiguoran преди 5 години
родител
ревизия
b0db5276e0
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      modules/users/models/user_model.js

+ 6 - 0
modules/users/models/user_model.js

@@ -457,6 +457,12 @@ class UserModel extends BaseModel {
             condition.$or = [{real_name : {$regex: keyword}},{email : {$regex: keyword}},{mobile : {$regex: keyword}},{company : {$regex: keyword}}];
         }
 
+        let qq = request.query.qq;
+        qq = qq !== '' && qq !== undefined ? parseInt(qq) : 0;
+        if (qq !== 0) {
+            condition.qq = qq;
+        }
+
         return condition;
     }