2024-07-04 13:58:59 +08:00
|
|
|
<?php
|
|
|
|
namespace app\admin\controller;
|
|
|
|
|
2024-12-26 18:05:22 +08:00
|
|
|
use app\api\logic\DemoLogic;
|
2024-07-04 13:58:59 +08:00
|
|
|
use app\common\service\pay\PayService;
|
|
|
|
|
|
|
|
class IndexController extends BaseAdminController
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @notes 查询订单支付状态
|
|
|
|
*/
|
|
|
|
public function wechatQuery()
|
|
|
|
{
|
|
|
|
$order_no = $this->request->get('order_no');
|
|
|
|
$order = [
|
|
|
|
'out_trade_no' => $order_no,
|
|
|
|
];
|
|
|
|
$app = new PayService(0);
|
|
|
|
|
|
|
|
try {
|
|
|
|
$res = $app->wechat->query($order);
|
|
|
|
return $this->success('查询成功', $res->toArray());
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
return $this->fail($e->extra['message']);
|
|
|
|
}
|
|
|
|
}
|
2024-12-26 18:05:22 +08:00
|
|
|
public function demo2()
|
|
|
|
{
|
|
|
|
$res=DemoLogic::test();
|
2024-12-28 11:06:06 +08:00
|
|
|
return $this->success('成功');
|
2024-12-26 18:05:22 +08:00
|
|
|
}
|
2025-01-22 10:22:08 +08:00
|
|
|
public function demo3()
|
|
|
|
{
|
|
|
|
$id=$this->request->get('id');
|
2025-01-23 11:40:48 +08:00
|
|
|
$warehouse_id=$this->request->get('warehouse_id',1);
|
|
|
|
$res=DemoLogic::test3($id,$warehouse_id);
|
2025-01-22 10:22:08 +08:00
|
|
|
return $this->success('成功');
|
|
|
|
}
|
2025-02-03 14:22:24 +08:00
|
|
|
|
|
|
|
public function demo4()
|
|
|
|
{
|
|
|
|
$params=$this->request->get();
|
|
|
|
$is_vip=$this->request->get('is_vip',0);
|
|
|
|
$res=DemoLogic::syncPrice($params,$is_vip);
|
|
|
|
return $this->success('成功');
|
|
|
|
}
|
2024-07-04 13:58:59 +08:00
|
|
|
}
|