| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace app\api\controller;
- use app\api\lists\FirmGoodLists;
- use app\api\lists\recharge\FirmOrderLists;
- use app\api\logic\FirmLogic;
- use app\api\logic\GoodsLogic;
- use app\api\validate\FirmRegisterValidate;
- use app\api\validate\GoodsValidate;
- class FirmController extends BaseApiController
- {
- public array $notNeedLogin = [];
- /**
- * 企业注册
- * @return \think\response\Json
- * @author 林海涛
- * @date 2024/7/12 下午2:17
- */
- public function register()
- {
- $params = (new FirmRegisterValidate())->post()->goCheck('register');
- $result = FirmLogic::register($params,$this->userId);
- if (true === $result) {
- return $this->success('已提交', [], 1, 1);
- }
- return $this->fail(FirmLogic::getError());
- }
- public function orderLists()
- {
- return $this->dataLists(new FirmOrderLists());
- }
- public function submitOrder()
- {
- }
- public function goodLists()
- {
- return $this->dataLists(new FirmGoodLists());
- }
- public function submitGood()
- {
- $params = (new GoodsValidate())->post()->goCheck('add');
- $result = GoodsLogic::sync($params,$this->userId);
- if (true === $result) {
- return $this->success('已提交', [], 1, 1);
- }
- return $this->fail(FirmLogic::getError());
- }
- }
|