dataLists(new MerchantLists()); } //提现列表 public function taking_lists() { return $this->dataLists(new MerchantWithdrawLists()); } //获取用户余额和绑定银行账户信息 public function amount_account() { $merchant = $this->request->userInfo['merchant']; if (!$merchant) { return $this->fail('当前用户非商户'); } if (!$merchant->isEmpty()) { $res=MerchantLogic::amount_account($merchant); if(MerchantLogic::hasError()){ return $this->fail(MerchantLogic::getError()); } return $this->success('获取成功',$res); } return $this->fail('获取失败'); } //用户提现操作 public function withdraw() { $params = (new MerchantWithdrawValidate())->post()->goCheck('withdraw'); $merchant = $this->request->userInfo['merchant']; if (!$merchant) { return $this->fail('当前用户非商户'); } if (!$merchant->isEmpty()) { MerchantLogic::withdraw($params,$merchant); if(MerchantLogic::hasError()){ return $this->fail(MerchantLogic::getError()); } return $this->success('提现成功,等待管理员审核'); } return $this->fail('提现异常'); } /** * 提现总次数和金额 */ public function taking_info() { $merchant = $this->request->userInfo['merchant']; if (!$merchant) { return $this->fail('当前用户非商户'); } if (!$merchant->isEmpty()) { $res=MerchantLogic::taking_info($merchant); if(MerchantLogic::hasError()){ return $this->fail(MerchantLogic::getError()); } return $this->success('ok',$res); } return $this->success('ok'); } }