123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- namespace app\adminapi\controller\shop\site;
- use app\dict\shop\ShopCashOutDict;
- use app\dict\shop\ShopTransferDict;
- use app\service\admin\shop\site\ShopCashOutService;
- use core\base\BaseAdminController;
- class ShopCashOut extends BaseAdminController
- {
- public function lists()
- {
- $data = $this->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 applyWithdraw()
- {
- $data = $this->request->params([
- ['apply_money', ''],
- ]);
- $this->validate($data, 'app\validate\shop\ShopCashOut.apply');
- $id = ( new ShopCashOutService() )->apply($data);
- return success('ADD_SUCCESS', [ 'id' => $id ]);
- }
- /**
- * 取消申请提现
- * @return \think\Response
- */
- public function cancel($id)
- {
- $data = $this->request->params([
- ['status', ''],
- ]);
- ( new ShopCashOutService() )->cancel($id, $data);
- return success('CANCEL_SUCCESS');
- }
- /**
- * 店铺转账(微信零钱)
- * @return \think\Response
- */
- public function transfer($id)
- {
- return success(data:( new ShopCashOutService() )->transfer($id));
- }
- /**
- * 转账方式
- * @return \think\Response
- */
- public function getTransferType()
- {
- return success(ShopTransferDict::getType());
- }
- /**
- * 提现状态
- * @return \think\Response
- */
- public function getStatus()
- {
- return success(ShopCashOutDict::getStatus());
- }
- }
|