55 lines
1.5 KiB
PHP
55 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace app\api\controller;
|
|
|
|
use app\api\logic\SubmitFormLogic;
|
|
|
|
class SubmitFormController extends BaseApiController
|
|
{
|
|
|
|
public array $notNeedLogin = [];
|
|
|
|
|
|
public function addTeamaster(){
|
|
|
|
$data = $this->request->post();
|
|
$data['user_id'] = $this->userId;
|
|
$result = SubmitFormLogic::addTeamaster($data);
|
|
if ($result === false) {
|
|
return $this->fail(SubmitFormLogic::getError());
|
|
}
|
|
return $this->success('',$result, 1, 1);
|
|
}
|
|
|
|
public function addStore(){
|
|
|
|
$data = $this->request->post();
|
|
$data['user_id'] = $this->userId;
|
|
$result = SubmitFormLogic::addStore($data);
|
|
if ($result === false) {
|
|
return $this->fail(SubmitFormLogic::getError());
|
|
}
|
|
return $this->success('',$result, 1, 1);
|
|
}
|
|
|
|
public function teamasterRealStatus(){
|
|
$data = $this->request->post();
|
|
$data['user_id'] = $this->userId;
|
|
$result = SubmitFormLogic::teamasterRealStatus($data);
|
|
if ($result === false) {
|
|
return $this->fail(SubmitFormLogic::getError());
|
|
}
|
|
return $this->success('',$result, 1, 1);
|
|
}
|
|
|
|
public function storeRealStatus(){
|
|
$data = $this->request->post();
|
|
$data['user_id'] = $this->userId;
|
|
$result = SubmitFormLogic::storeRealStatus($data);
|
|
if ($result === false) {
|
|
return $this->fail(SubmitFormLogic::getError());
|
|
}
|
|
return $this->success('',$result, 1, 1);
|
|
}
|
|
|
|
} |