caipin před 5 roky
rodič
revize
7995f1197c
1 změnil soubory, kde provedl 9 přidání a 10 odebrání
  1. 9 10
      app/models/client.js

+ 9 - 10
app/models/client.js

@@ -106,15 +106,14 @@ client.findById=async function(cid,attributes){
     }
 
     var staffDetail=[];
-    
-    //var cid = '20160923 AND 1=1;-- hack';
+
     var sqlQuery = 'SELECT b.* FROM CLD_client_staff as a left join CLD_staff as b on (a.sid=b.sid) where a.cid=?';
     
-    sequelize.query(sqlQuery,
-    		  { replacements: [cid], type: sequelize.QueryTypes.SELECT }
-    		).then(function(projects) {
-    		  console.log(projects)
-    		})
+//    sequelize.query(sqlQuery,
+//    		  { replacements: [cid], type: sequelize.QueryTypes.SELECT }
+//    		).then(function(projects) {
+//    		  console.log(projects)
+//    		})
     
 //       await this.sequelize.query(sqlQuery,
 //    		type: sequelize.QueryTypes.SELECT,
@@ -127,9 +126,9 @@ client.findById=async function(cid,attributes){
     
 
     
-//    await this.sequelize.query('SELECT b.* FROM CLD_client_staff as a left join CLD_staff as b on (a.sid=b.sid) where a.cid=7').spread((results, metadata) => {
-//        staffDetail=results[0];
-//    });
+    await this.sequelize.query('SELECT b.* FROM CLD_client_staff as a left join CLD_staff as b on (a.sid=b.sid) where a.cid=7').spread((results, metadata) => {
+        staffDetail=results[0];
+    });
     
     
     detail['staff']=staffDetail;