作者 景龙
1 个管道 的构建 通过 耗费 6 秒

修改年检类别

... ... @@ -789,12 +789,11 @@ class CommonController extends RestBaseController
}
//获取年检检测点列表
public function getTestList($page){
public function getTestList($page,$project_id){
//获取登录人所在的项目
$limit = config('site.limit');
$user = $this->getUserIdentity();
$res = Db::name('test')
->where(['project_id'=>$user['project_id']])
->where(['project_id'=>$project_id])
->field('id,project_id,test_time,address,remark')
->page($page,$limit)
->order('id desc')
... ... @@ -2202,6 +2201,7 @@ class CommonController extends RestBaseController
$client = new JPush($app_key, $master_secret);
$result = $client->push()
->setPlatform('all')
->addAllAudience()
->addAlias($alias)
->setMessage($content, $title,'text',$extras)
->addAndroidNotification($content,$title,1,$extras)
... ...
... ... @@ -92,7 +92,7 @@ class YearsController extends RestBaseController
$this->error($validate->getError());
}
$common = new CommonController();
$res = $common->getTestList($page);
$res = $common->getTestList($page,$project_id);
//查询总页数
$total_page = $common->getTestPage();
$this->success('成功',['data'=>$res,'page'=>intval($page),'total_page'=>$total_page]);
... ...