This commit is contained in:
mkm 2024-01-09 10:44:54 +08:00
parent 3c6e6a6e2c
commit c15e44eadf

View File

@ -36,7 +36,8 @@ class Project extends CommonModel
$offset = ($page - 1) * $pageSize;
$limit = $pageSize;
$prefix = config('database.prefix');
$sql = "select *,p.id as id,p.name as name,p.code as code,p.create_time as create_time from {$prefix}project as p join {$prefix}project_member as pm on p.code = pm.project_code left join {$prefix}project_collection as pc on p.code = pc.project_code where pm.member_code = '{$memberCode}' and p.organization_code = '$organizationCode'";
// and p.organization_code = '$organizationCode'
$sql = "select *,p.id as id,p.name as name,p.code as code,p.create_time as create_time from {$prefix}project as p join {$prefix}project_member as pm on p.code = pm.project_code left join {$prefix}project_collection as pc on p.code = pc.project_code where pm.member_code = '{$memberCode}' ";
if ($deleted != -1) {
$sql .= " and p.deleted = {$deleted} ";
}