作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

合并分支 'heshupeng' 到 'master'

Heshupeng



查看合并请求 !198
@@ -602,7 +602,6 @@ class HouseBoard extends Api @@ -602,7 +602,6 @@ class HouseBoard extends Api
602 */ 602 */
603 public function activity() 603 public function activity()
604 { 604 {
605 - $user_id = $this->auth->id;  
606 $house_id = $this->request->param('house_id'); //社区id 605 $house_id = $this->request->param('house_id'); //社区id
607 empty($house_id) && $this->error('缺少必要参数'); 606 empty($house_id) && $this->error('缺少必要参数');
608 $list = $this->getActivityList("find_in_set({$house_id},house_ids)"); 607 $list = $this->getActivityList("find_in_set({$house_id},house_ids)");
@@ -637,7 +636,6 @@ class HouseBoard extends Api @@ -637,7 +636,6 @@ class HouseBoard extends Api
637 */ 636 */
638 public function activityInfo() 637 public function activityInfo()
639 { 638 {
640 - $user_id = $this->auth->id;  
641 $house_activity_id = $this->request->param('house_activity_id'); //社区id 639 $house_activity_id = $this->request->param('house_activity_id'); //社区id
642 empty($house_activity_id) && $this->error('缺少必要参数'); 640 empty($house_activity_id) && $this->error('缺少必要参数');
643 $list = $this->getActivityList(['ha.id'=>$house_activity_id]); 641 $list = $this->getActivityList(['ha.id'=>$house_activity_id]);
@@ -651,7 +649,7 @@ class HouseBoard extends Api @@ -651,7 +649,7 @@ class HouseBoard extends Api
651 private function getActivityList($where){ 649 private function getActivityList($where){
652 $list = Db::name('house_activity') 650 $list = Db::name('house_activity')
653 ->alias('ha') 651 ->alias('ha')
654 - ->join('house_join hj','hj.house_activity_id = ha.id','left') 652 + ->join('house_join hj','ha.id = hj.house_activity_id and hj.user_id ='.$this->auth->id,'left')
655 ->where($where) 653 ->where($where)
656 ->field(' 654 ->field('
657 ha.id, 655 ha.id,