* [refac] optimize code.
This commit is contained in:
+2
-2
@@ -161,11 +161,11 @@ class myTao extends myModel
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
|
||||
->leftJoin(TABLE_PLANSTORY)->alias('t3')->on('t1.id = t3.plan')
|
||||
->leftJoin(TABLE_PRODUCTPLAN)->alias('t4')->on('t3.plan = t4.id')
|
||||
->leftJoin(TABLE_STORYREVIEW)->alias('t5')->on('t1.id = t5.story and t1.version=t5.version')
|
||||
->leftJoin(TABLE_STORYREVIEW)->alias('t5')->on('t1.id = t5.story AND t1.version=t5.version')
|
||||
->where($myStoryQuery)
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere('t1.assignedTo',1)->eq($this->app->user->account)
|
||||
->orWhere("(t5.reviewer = '{$this->app->user->account}' and t5.result = '' and t1.status = 'reviewing')")
|
||||
->orWhere("(t5.reviewer = '{$this->app->user->account}' AND t5.result = '' AND t1.status = 'reviewing')")
|
||||
->markRight(1)
|
||||
->andWhere('t1.product')->ne('0')
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
|
||||
Reference in New Issue
Block a user