@ -80,15 +81,17 @@ async function pomsProject (ctx) {
constanxinProjectRes=anxinProjectIds.size?
awaitclickHouse.anxinyun.query(`SELECT id,"name" FROM t_project WHERE id IN (${[...anxinProjectIds].join(',')})`).toPromise():
awaitclickHouse.anxinyun.query(`SELECT id,"name",project_state AS projectState FROM t_project WHERE id IN (${[...anxinProjectIds].join(',')})`).toPromise():
@ -108,8 +111,9 @@ async function projectAnxincloud (ctx) {
try{
constmodels=ctx.fs.dc.models;
const{clickHouse}=ctx.app.fs
const{includeDelete}=ctx.query
constprojectRes=awaitclickHouse.anxinyun.query(`SELECT * FROM t_project WHERE project_state = 4 ORDER BY id DESC`).toPromise()
constprojectRes=awaitclickHouse.anxinyun.query(`SELECT * FROM t_project WHERE project_state = 4 ${includeDelete==1?'OR project_state = -1':''}ORDER BY id DESC`).toPromise()
ctx.status=200;
ctx.body=projectRes
@ -126,8 +130,9 @@ async function projectPManage (ctx) {
try{
constmodels=ctx.fs.dc.models;
const{clickHouse}=ctx.app.fs
const{includeDelete}=ctx.query
constprojectRes=awaitclickHouse.projectManage.query(`SELECT id, project_name FROM t_pim_project WHERE isdelete=0 ORDER BY id DESC`).toPromise()
constprojectRes=awaitclickHouse.projectManage.query(`SELECT id, project_name, isdelete FROM t_pim_project WHERE isdelete=0${includeDelete==1?'OR isdelete=1':''} ORDER BY id DESC`).toPromise()