|
|
@@ -67,6 +67,36 @@ class SupplyDemandInfoController extends BaseApiController
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public function submitSupplyDemandInfo()
|
|
|
+ {
|
|
|
+ if($this->request->isPost()) {
|
|
|
+
|
|
|
+ $params = (new SupplyDemandValidate())->post()->goCheck('submitSupplyDemand');
|
|
|
+ $userId = $this->userId;
|
|
|
+ $params['user_id'] = $userId;
|
|
|
+ $result = SupplyDemandLogic::submitSupplyDemand($params);
|
|
|
+ if (true === $result) {
|
|
|
+ switch ($params['type']){
|
|
|
+ case 1 :
|
|
|
+ $type_name = '供应';
|
|
|
+ break;
|
|
|
+ case 2 :
|
|
|
+ $type_name = '需求';
|
|
|
+ break ;
|
|
|
+ default :
|
|
|
+ $type_name = '';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return $this->success($type_name.'信息提交审核成功', [], 1, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }else{
|
|
|
+ return $this->fail('请求方式错误');
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @notes 供需列表
|
|
|
* @return \think\response\Json
|