| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- namespace app\api\controller;
- use app\adminapi\validate\property\PropertyOrderValidate;
- use app\api\lists\property\PropertyCommissionLists;
- use app\api\lists\property\PropertyOrderLists;
- use app\api\lists\property\PropertySurplusLogLists;
- use app\api\logic\PropertyCommissionLogic;
- use app\api\logic\PropertyOrderLogic;
- use app\api\validate\PropertyValidate;
- use think\facade\Log;
- /**
- * 物业模块类
- */
- class PropertyController extends BaseApiController
- {
- public array $notNeedLogin = ['orderByQrcode'];
- /**
- * @notes 二维码扫码下物业单
- * @return \think\response\Json
- */
- public function orderByQrcode()
- {
- $params = (new PropertyOrderValidate())->post()->goCheck('add');
- $result = PropertyOrderLogic::add($params);
- if (true === $result) {
- return $this->success('下单成功', [], 1, 1);
- }
- return $this->fail(PropertyOrderLogic::getError());
- }
- /**
- * 提现申请
- * @return \think\response\Json
- */
- public function withdrawCash()
- {
- $params = (new PropertyValidate())->post()->goCheck('withdrawCash', [
- 'user_id' => $this->userId,
- 'user_info' => $this->userInfo
- ]);
- $result = PropertyCommissionLogic::withdrawCash($params);
- if (false === $result) {
- return $this->fail(PropertyCommissionLogic::getError());
- }
- return $this->success('申请成功,等待审核', [], 1, 1);
- }
- /**
- * 下单列表
- * @return \think\response\Json
- */
- public function orderLists()
- {
- return $this->dataLists(new PropertyOrderLists());
- }
- /**
- * 进出记录列表
- * @return \think\response\Json
- */
- public function surplusLists()
- {
- return $this->dataLists(new PropertySurplusLogLists());
- }
- /**
- * 分成列表
- * @return \think\response\Json
- */
- public function commissionLists()
- {
- return $this->dataLists(new PropertyCommissionLists());
- }
- }
|