|
@@ -1,6 +1,8 @@
|
|
|
<?php
|
|
<?php
|
|
|
namespace app\api\controller;
|
|
namespace app\api\controller;
|
|
|
|
|
|
|
|
|
|
+use app\api\logic\works\IssueWorkLogic;
|
|
|
|
|
+use app\api\validate\IssueWorkValidate;
|
|
|
use app\common\model\dict\DictData;
|
|
use app\common\model\dict\DictData;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -22,4 +24,17 @@ class IssueWorkController extends BaseApiController
|
|
|
$list = DictData::where(['type_value'=>'complaint_type','status'=>1])->field('value,name')->select()->toArray();
|
|
$list = DictData::where(['type_value'=>'complaint_type','status'=>1])->field('value,name')->select()->toArray();
|
|
|
return $this->data($list);
|
|
return $this->data($list);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public function complaint()
|
|
|
|
|
+ {
|
|
|
|
|
+ $params = (new IssueWorkValidate())->post()->goCheck('add', [
|
|
|
|
|
+ 'user_id' => $this->userId,
|
|
|
|
|
+ 'user_info' => $this->userInfo
|
|
|
|
|
+ ]);
|
|
|
|
|
+ $result = IssueWorkLogic::add($params);
|
|
|
|
|
+ if (false === $result) {
|
|
|
|
|
+ return $this->fail(IssueWorkLogic::getError());
|
|
|
|
|
+ }
|
|
|
|
|
+ return $this->success('评论成功', [], 1, 1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|