diff --git a/application/project/controller/Project.php b/application/project/controller/Project.php index 1a3eed4..d31bad3 100644 --- a/application/project/controller/Project.php +++ b/application/project/controller/Project.php @@ -53,10 +53,10 @@ class Project extends BasicApi $orgCode = getCurrentOrganizationCode(); if ($type == 'my' || $type == 'other') { - $sql = "select * from {$prefix}project as pp join {$prefix}project_member as pm on pm.project_code = pp.code where pp.organization_code = '{$orgCode}' and (pm.member_code = '{$memberCode}' or pp.private = 0) group by pp.`code`"; + $sql = "select * from {$prefix}project as pp join {$prefix}project_member as pm on pm.project_code = pp.code where pp.organization_code = '{$orgCode}' and (pm.member_code = '{$memberCode}' or pp.private = 0) group by pp.`code` order by pp.id desc"; $list = CommonModel::limitByQuery($sql, $page, $pageSize); } else { - $sql = "select * from {$prefix}project as pp join {$prefix}project_collection as pc on pc.project_code = pp.code where pp.organization_code = '{$orgCode}' and pc.member_code = '{$memberCode}' group by pp.`code`"; + $sql = "select * from {$prefix}project as pp join {$prefix}project_collection as pc on pc.project_code = pp.code where pp.organization_code = '{$orgCode}' and pc.member_code = '{$memberCode}' group by pp.`code` order by pc.id desc"; $list = CommonModel::limitByQuery($sql, $page, $pageSize); } $newList = [];