* Fix bug #28091,28092.

This commit is contained in:
liugang
2022-09-29 10:38:14 +08:00
parent 010f148222
commit 1941a6936c
2 changed files with 23 additions and 11 deletions
+17
View File
@@ -173,6 +173,23 @@ class projectModel extends model
return $project;
}
/**
* Get a project by its shadow product.
*
* @param int $product
* @access public
* @return object
*/
public function getByShadowProduct($product)
{
return $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->eq($product)
->andWhere('t2.type')->eq('project')
->limit(1)
->fetch();
}
/**
* Get project info.
*