feat: 修改了商店控制器以从配置表中获取充值价格

This commit is contained in:
mkm 2024-06-24 18:04:33 +08:00
parent 8139416648
commit 57f6cf0e3b
2 changed files with 2 additions and 7 deletions

View File

@ -12,6 +12,7 @@ use app\api\validate\UserValidate;
use app\common\enum\PayEnum; use app\common\enum\PayEnum;
use app\common\logic\PaymentLogic; use app\common\logic\PaymentLogic;
use app\common\logic\PayNotifyLogic; use app\common\logic\PayNotifyLogic;
use app\common\model\Config;
use app\common\model\user\User; use app\common\model\user\User;
use app\common\model\user_create_log\UserCreateLog; use app\common\model\user_create_log\UserCreateLog;
use app\common\model\user_recharge\UserRecharge; use app\common\model\user_recharge\UserRecharge;
@ -80,7 +81,7 @@ class StoreController extends BaseApiController
'uid'=>$find['id'], 'uid'=>$find['id'],
'staff_id'=>0, 'staff_id'=>0,
'order_id'=>getNewOrderId('CZ'), 'order_id'=>getNewOrderId('CZ'),
'price'=>1000, 'price'=>Config::where('name','recharge')->value('value')??1000,
'recharge_type'=>'INDUSTRYMEMBERS', 'recharge_type'=>'INDUSTRYMEMBERS',
]; ];
$order = UserRecharge::create($data); $order = UserRecharge::create($data);

View File

@ -345,12 +345,6 @@ class StoreOrderController extends BaseAdminController
*/ */
public function rechange_amount() public function rechange_amount()
{ {
// $order = UserRecharge::where('order_id','CZ1719052252643357')->find();
// $order['pay_price'] = $order['price'];
// d(1);
// PayNotifyLogic::handle('recharge', $order['order_id'], $order);
// d(1);
$pay_type = $this->request->post('pay_type'); $pay_type = $this->request->post('pay_type');
$auth_code = $this->request->post('auth_code'); //微信支付条码 $auth_code = $this->request->post('auth_code'); //微信支付条码
if ($auth_code == '' && $pay_type != PayEnum::CASH_PAY) { if ($auth_code == '' && $pay_type != PayEnum::CASH_PAY) {