Browse Source

fix: org sync status

MetaPunkGames 8 months ago
parent
commit
a147978bb7

+ 12 - 0
server/cloud/aliyun/func-aliyun-oss.js

@@ -0,0 +1,12 @@
+
+const argv = require('yargs').argv
+
+
+async function getAliyunOssAccessToken(){
+
+}
+
+module.exports.getAliyunOssAccessToken = getAliyunOssAccessToken
+if(argv?.test){
+    getAliyunOssAccessToken()
+}

+ 3 - 3
server/cloud/authing/func-authing-org-sync.js

@@ -82,14 +82,14 @@ async function InsertAllDepartment(departList){
     //   },
     let rowData = []
     departList.forEach(depart=>{
-        rowData.push([depart?.departmentId,depart?.organizationCode,depart?.name,depart?.description,depart?.branch,depart?.parent?.departmentId,depart?.code,depart?.status,depart?.createdAt,depart?.updatedAt])
+        rowData.push([depart?.departmentId,depart?.organizationCode,depart?.name,depart?.description,depart?.parent?.name,depart?.parent?.departmentId,depart?.code,depart?.createdAt,depart?.updatedAt])
     })
     let flattenedParams = rowData.flat();
 
     let syncDepartSQL = `
-    INSERT INTO "_Session" ("objectId", "organizationCode", "name", "description","branch","parent","code", "status","createdAt","updatedAt")
+    INSERT INTO "_Session" ("objectId", "organizationCode", "name", "description","branch","parent","code","createdAt","updatedAt")
     VALUES
-        ${rowData.map((_, i) => `($${i * 5 + 1}, $${i * 5 + 2}, $${i * 5 + 3}, $${i * 5 + 4}, $${i * 5 + 5}, $${i * 5 + 6}, $${i * 5 + 7}, $${i * 5 + 8}, $${i * 5 + 9}, $${i * 5 + 10})`).join(',\n')}    
+        ${rowData.map((_, i) => `($${i * 5 + 1}, $${i * 5 + 2}, $${i * 5 + 3}, $${i * 5 + 4}, $${i * 5 + 5}, $${i * 5 + 6}, $${i * 5 + 7}, $${i * 5 + 8}, $${i * 5 + 9})`).join(',\n')}    
     ON CONFLICT ("objectId") DO UPDATE
     SET 
         "organizationCode" = EXCLUDED."organizationCode",