* [bug,0.5h] fix get pivot with deleted.

This commit is contained in:
qixinzhi
2024-07-03 08:59:31 +08:00
committed by 代婷婷
parent c17c0037f8
commit bcb6635db9
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -36,7 +36,10 @@ class pivotModel extends model
*/
public function getByID(int $pivotID, bool $processDateVar = false): object|bool
{
$pivot = $this->dao->select('*')->from(TABLE_PIVOT)->where('id')->eq($pivotID)->fetch();
$pivot = $this->dao->select('*')->from(TABLE_PIVOT)
->where('id')->eq($pivotID)
->andWhere('deleted')->eq('0')
->fetch();
if(!$pivot) return false;
$pivot->fieldSettings = array();
+1
View File
@@ -402,6 +402,7 @@ EOT)->from(TABLE_TASK)->alias('t1')
return (int)$this->dao->select('id')->from(TABLE_PIVOT)
->where("FIND_IN_SET({$groupID}, `group`)")
->andWhere('stage')->ne('draft')
->andWhere('deleted')->eq('0')
->orderBy('id_desc')
->limit(1)
->fetch('id');