|
@@ -8,13 +8,18 @@
|
|
|
namespace app\api\controller\v1;
|
|
|
|
|
|
use app\api\business\CydBus;
|
|
|
+use think\exception\ValidateException;
|
|
|
|
|
|
class Cyd
|
|
|
{
|
|
|
public function getCydList()
|
|
|
{
|
|
|
$task_id = request()->param('task_id', '', 'int');
|
|
|
- //todo validate
|
|
|
+ try {
|
|
|
+ validate(\app\api\validate\Sample::class)->scene('get_cyd_list')->check($task_id);
|
|
|
+ } catch (ValidateException $exception) {
|
|
|
+ return show(config('status.err_validate'),$exception->getError());
|
|
|
+ }
|
|
|
|
|
|
$result = (new CydBus())->getCydList($task_id);
|
|
|
if ($result['total'] == 0) {
|