wupengfei 2 年之前
父节点
当前提交
ba1525408e
共有 2 个文件被更改,包括 1 次插入73 次删除
  1. 1 0
      application/api/controller/Expedite.php
  2. 0 73
      application/api/controller/Qc.php

+ 1 - 0
application/api/controller/Expedite.php

@@ -5,6 +5,7 @@ use AlibabaCloud\Client\Exception\ClientException;
 use AlibabaCloud\Client\Exception\ServerException;
 use app\common\model\StoreBanner;
 use app\common\model\User;
+use think\cache\driver\Redis;
 use think\Db;
 /**
  * @title 不需要验证token接口

+ 0 - 73
application/api/controller/Qc.php

@@ -8,33 +8,8 @@ use app\common\model\LevelOrder;
 use app\common\model\LevelOrder as LOM;
 use app\common\model\StoreGoods;
 use app\common\model\User;
-use app\common\model\UserLevelRank;
-use app\common\model\UserMessage;
-use app\common\model\UserWallet;
-use app\common\model\VideoIntro;
-use app\common\service\Activity;
-use app\common\service\OrderCallback;
-use app\order\controller\StoreOrder;
-use EasyWeChat\MiniProgram\Application;
-use library\tools\Data;
-use MongoDB\Driver\Server;
-use Qiniu\Auth;
-use Qiniu\Storage\UploadManager;
-use think\Exception;
-use think\Session;
 use think\cache\driver\Redis;
-use EasyWeChat\Factory;
-use Firebase\JWT\JWT;
 use think\Db;
-use AlibabaCloud\Client\AlibabaCloud;
-use AlibabaCloud\Client\Exception\ClientException;
-use AlibabaCloud\Client\Exception\ServerException;
-use function AlibabaCloud\Client\value;
-use function EasyWeChat\Kernel\data_get;
-use function Stringy\create;
-
-use JPush\Client;
-require_once env('root_path').'vendor/jpush/jpush/autoload.php';
 class Qc extends Base {
 
     public function index()
@@ -45,54 +20,6 @@ class Qc extends Base {
 
 
 
-
-    public function payOrder()
-    {
-        $this->user_id = 22;
-        $order_id = input('post.order_id');
-        $pay_type = input('post.pay_type',1);
-        $order_info = LOM::where('id',$order_id)->find()->toArray();
-        if($order_info['status'] != 0) $this->error('订单状态错误');
-        if($order_info['cancel_state'] != 0 || $order_info['is_deleted'] != 0) $this->error('订单异常');
-        if($order_info['price_total'] <= 0) $this->error('订单金额错误');
-        $pay_no  = $order_info['pay_no'] ? $order_info['pay_no'] : get_order_sn();// 支付单号
-        if(!$order_info['pay_no']) LOM::where('id',$order_id)->update(['pay_no'=>$pay_no]);
-        $user_info = User::where('id',$this->user_id)->find()->toArray();
-        $ret_data = ['pay_status'=>0,'config'=>[],'code_url'=>'','openid'=>$user_info['openid']];
-        Db::startTrans();
-        try {
-            switch ($pay_type){
-                case 1://微信小程序
-                    $notify_url = $this->request->root(true) . '/api/we_chat_pay/LevelOrderNotify';
-                    $pay_config = WeChatPay::wxPay('订单支付',$pay_no,$order_info['price_total'],$notify_url,'MWEB');
-                    if($pay_config['code'] != 200) $this->exception($pay_config['msg']);
-                    $pay_config['config']['mch_id'] = config('app.wx_pay')['mch_id'];
-                    $pay_config['config']['pay_no'] = $pay_no;
-                    $pay_config['config']['notify_url'] = $notify_url;
-                    $pay_config['config']['mweb_url'] = $pay_config['mweb_url'];
-                    $pay_config['config']['total_fee'] = $order_info['price_total'] * 100;
-                    $ret_data['config'] = $pay_config['config'];
-                    break;
-                case 2 :
-                    if(!$user_info['openid']) $this->exception('请绑定公众号');
-                    $notify_url = $this->request->root(true) . '/api/we_chat_pay/LevelOrderNotify';
-                    $pay_config = WeChatPay::wxPay('订单支付',$pay_no,$order_info['price_total'],$notify_url,'JSAPI',$user_info['openid']);
-                    if($pay_config['code'] != 200) $this->exception($pay_config['msg']);
-                    $ret_data['config'] = $pay_config['config'];
-                    break;
-            }
-
-            Db::commit();
-        }catch (\Exception $e){
-            $this->is_commit = false;
-            $this->ret_msg =  $e->getMessage();
-            Db::rollback();
-        }
-        $this->transReturn($ret_data);
-    }
-
-
-
     /**
      * @title 获取分享的签名
      * @desc 获取分享的签名