diff --git a/app/admin/controller/store_extract/StoreExtractController.php b/app/admin/controller/store_extract/StoreExtractController.php index 855d4f55e..941546a7b 100644 --- a/app/admin/controller/store_extract/StoreExtractController.php +++ b/app/admin/controller/store_extract/StoreExtractController.php @@ -62,7 +62,18 @@ class StoreExtractController extends BaseAdminController } return $this->fail(StoreExtractLogic::getError()); } - + /** + * @notes 确认提现 + * @return \think\response\Json + * @author admin + * @date 2024/05/31 17:09 + */ + public function enter() + { + $params = $this->request->post(); + $result = StoreExtractLogic::Enter($params); + return $this->success('提现成功', [], 1, 1); + } /** * @notes 删除门店提现 diff --git a/app/admin/lists/store_extract/StoreExtractLists.php b/app/admin/lists/store_extract/StoreExtractLists.php index 12c550434..c4853b8c3 100644 --- a/app/admin/lists/store_extract/StoreExtractLists.php +++ b/app/admin/lists/store_extract/StoreExtractLists.php @@ -66,6 +66,8 @@ class StoreExtractLists extends BaseAdminDataLists implements ListsSearchInterfa $item->id_card=$find['id_card']; $item->openid=$openid; } + $item->status_name=$item->status==1?"通过":"审核中"; + $item->pay_status_name=$item->pay_status==1?"已转账":"未转账"; }) ->toArray(); } diff --git a/app/admin/logic/store_extract/StoreExtractLogic.php b/app/admin/logic/store_extract/StoreExtractLogic.php index 70b5a4622..4d3150f43 100644 --- a/app/admin/logic/store_extract/StoreExtractLogic.php +++ b/app/admin/logic/store_extract/StoreExtractLogic.php @@ -40,6 +40,25 @@ class StoreExtractLogic extends BaseLogic throw new BusinessException($e->getMessage()); } } + /** + * @notes 确认提现 + * @param array $params + * @return bool + * @author admin + * @date 2024/05/31 17:09 + */ + public static function Enter(array $params): bool + { + Db::startTrans(); + try { + StoreExtract::update(['status'=>1,'pay_status'=>1],['id'=>$params['id']]); + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + throw new BusinessException($e->getMessage()); + } + } /**