作者 潘浩文
1 个管道 的构建 通过 耗费 1 秒

接口对接测试

... ... @@ -119,9 +119,19 @@ class MoneyController extends Controller
*/
public function messageIndex()
{
$user=$this->getUser();
$data=Db::name('message')->select()->each(function($item){
$item['create_time']=date('Y.m.d H:i:s',$item['create_time']);
});
return $item;
})->toArray();
foreach ($data as $k=>$v){
$re=Db::name('message_read')->where(['user_id'=>$user['id'],'message_id'=>$data[$k]['id']])->find();
if ($re){
$data[$k]['status']=1;
}else{
$data[$k]['status']=0;
}
}
$this->success('获取数据成功',$data);
}
... ...
... ... @@ -175,6 +175,23 @@ class PortalController extends Controller
$this->success('操作成功');
}
/**
* @title 系统通知阅读
* @description
* @author panhaowen
* @url /portal/portal/read
* @method POST
* @param name:id type:int require:1 desc:信息id
*/
public function read()
{
$param=$this->request->param();
$user=$this->getUser();
Db::name('message_read')->insert(['user_id'=>$user['id'],'message_id'=>$param['id']]);
$this->success('操作成功');
}
/**
* @title excel表格导出
* @description
... ...