From c8c90b007e1fb53f8692295441eaa174fe9b95f8 Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Sat, 15 Jun 2019 09:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E6=8C=89?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=A5=E6=9C=9F=E5=80=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: vilson <545522390@qq.com> --- application/project/controller/Project.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = [];