request->params([ [ 'cash_out_no', '' ], [ 'status', '' ], [ 'keyword', '' ], [ 'transfer_type', '' ], [ 'create_time', [] ], [ 'audit_time', [] ], [ 'transfer_time', [] ] ]); return success(( new ShopCashOutService() )->getPage($data)); } /** * 店铺提现详情 * @param int $id * @return \think\Response */ public function info(int $id) { return success(( new ShopCashOutService() )->getInfo($id)); } /** * 店铺提现审核 * @return \think\Response */ public function audit($id) { $data = $this->request->params([ ['status', ''], ['refuse_reason', ''] ]); $this->validate($data, 'app\validate\shop\ShopCashOut.audit'); ( new ShopCashOutService() )->audit($id, $data); return success('AUDIT_SUCCESS'); } /** * 店铺提现转账 * @return \think\Response */ public function transfer($id) { $data = $this->request->params([ ['transfer_no', ''], ['transfer_voucher', ''] ]); $this->validate($data, 'app\validate\shop\ShopCashOut.transfer'); ( new ShopCashOutService() )->transfer($id, $data); return success('TRANSFER_SUCCESS'); } /** * 获取店铺提现设置 * @return \think\Response */ public function getCashOutConfig() { return success((new ShopConfigService())->getCashOutConfig()); } /** * 店铺提现设置 * @return \think\Response */ public function setCashOutConfig() { $data = $this->request->params([ ['is_open', 1], //是否开启 ['min', 0.01], //最低提现金额 ['rate', 0], //提现手续费比率 ['is_auto_verify', 0], //是否自动审核 ['is_auto_transfer', 0], //是否自动转账 ['transfer_type', []] //转账方式 ]); $this->validate($data, 'app\validate\shop\CashOutConfig.set'); (new ShopConfigService())->setCashOutConfig($data); return success('SET_SUCCESS'); } /** * 转账方式 * @return \think\Response */ public function getTransferType() { return success(ShopTransferDict::getType()); } /** * 提现状态 * @return \think\Response */ public function getStatus() { return success(ShopCashOutDict::getStatus()); } /** * 查询提现统计数据 * @return \think\Response */ public function getWithdrawData() { return success(( new ShopCashOutService() )->getWithdrawData()); } }