...
|
...
|
@@ -602,7 +602,6 @@ class HouseBoard extends Api |
|
|
*/
|
|
|
public function activity()
|
|
|
{
|
|
|
$user_id = $this->auth->id;
|
|
|
$house_id = $this->request->param('house_id'); //社区id
|
|
|
empty($house_id) && $this->error('缺少必要参数');
|
|
|
$list = $this->getActivityList("find_in_set({$house_id},house_ids)");
|
...
|
...
|
@@ -637,7 +636,6 @@ class HouseBoard extends Api |
|
|
*/
|
|
|
public function activityInfo()
|
|
|
{
|
|
|
$user_id = $this->auth->id;
|
|
|
$house_activity_id = $this->request->param('house_activity_id'); //社区id
|
|
|
empty($house_activity_id) && $this->error('缺少必要参数');
|
|
|
$list = $this->getActivityList(['ha.id'=>$house_activity_id]);
|
...
|
...
|
@@ -651,7 +649,7 @@ class HouseBoard extends Api |
|
|
private function getActivityList($where){
|
|
|
$list = Db::name('house_activity')
|
|
|
->alias('ha')
|
|
|
->join('house_join hj','hj.house_activity_id = ha.id','left')
|
|
|
->join('house_join hj','ha.id = hj.house_activity_id and hj.user_id ='.$this->auth->id,'left')
|
|
|
->where($where)
|
|
|
->field('
|
|
|
ha.id,
|
...
|
...
|
|