Browse Source

添加ssoid查询接口

laiguoran 6 years atrás
parent
commit
95d557447a
1 changed files with 10 additions and 1 deletions
  1. 10 1
      modules/users/controllers/cld_controller.js

+ 10 - 1
modules/users/controllers/cld_controller.js

@@ -41,10 +41,19 @@ class CLDController {
      */
     async getUsersAndCompilationList(request, response) {
         let mobile = request.query.mobile;
+        let ssoID = request.query.ssoID;
         try {
             //获取用户信息
+            if (mobile === undefined && ssoID === undefined) {
+                throw '传参有误';
+            }
             let userModel = new UserModel();
-            let userData = await userModel.findDataByMobile(mobile);
+            let userData = '';
+            if (mobile !== undefined) {
+                userData = await userModel.findDataByMobile(mobile);
+            } else {
+                userData = await userModel.findDataBySsoId(ssoID);
+            }
             if (userData === null || userData === '') {
                 throw '不存在该建筑用户';
             }