项目列表按创建日期倒序
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
5a1b1e09e6
commit
c8c90b007e
@ -53,10 +53,10 @@ class Project extends BasicApi
|
|||||||
|
|
||||||
$orgCode = getCurrentOrganizationCode();
|
$orgCode = getCurrentOrganizationCode();
|
||||||
if ($type == 'my' || $type == 'other') {
|
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);
|
$list = CommonModel::limitByQuery($sql, $page, $pageSize);
|
||||||
} else {
|
} 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);
|
$list = CommonModel::limitByQuery($sql, $page, $pageSize);
|
||||||
}
|
}
|
||||||
$newList = [];
|
$newList = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user