| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?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 assetAccount()
- {
- $params = [
- 'user_id' => $this->userId,
- 'user_info' => $this->userInfo
- ];
- return $this->success('资金账户', PropertyCommissionLogic::assetAccount($params), 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());
- }
- }
|