作者 anyv
1 个管道 的构建 通过 耗费 0 秒

5

@@ -6,6 +6,7 @@ use cmf\controller\HomeBaseController; @@ -6,6 +6,7 @@ use cmf\controller\HomeBaseController;
6 use EasyWeChat\Foundation\Application; 6 use EasyWeChat\Foundation\Application;
7 use EasyWeChat\Payment\Order; 7 use EasyWeChat\Payment\Order;
8 use think\Db; 8 use think\Db;
  9 +use app\portal\controller\BirdController;
9 10
10 /** 11 /**
11 * 微信支付,退款,提现DEMO 12 * 微信支付,退款,提现DEMO
@@ -87,6 +88,11 @@ class PayController extends HomeBaseController @@ -87,6 +88,11 @@ class PayController extends HomeBaseController
87 //查询订单信息 88 //查询订单信息
88 $order = Db::name('indent')->where('order_number',$out_trade_no)->find(); 89 $order = Db::name('indent')->where('order_number',$out_trade_no)->find();
89 if($successful){ 90 if($successful){
  91 + $bird = new BirdController;
  92 + $takeOrder = $bird -> takeOrder($order['id']);
  93 + $createOrder = $bird -> createOrder($order['id']);
  94 + cache('dingyue',$takeOrder);
  95 + cache('yuyue',$createOrder);
90 $update['state'] = 2; 96 $update['state'] = 2;
91 //更新订单状态为待发货 97 //更新订单状态为待发货
92 Db::name('indent')->where('order_number',$out_trade_no)->update($update); 98 Db::name('indent')->where('order_number',$out_trade_no)->update($update);
@@ -407,6 +407,17 @@ class PersonalcenterController extends WeChatBaseController{ @@ -407,6 +407,17 @@ class PersonalcenterController extends WeChatBaseController{
407 */ 407 */
408 public function invitation_list(){ 408 public function invitation_list(){
409 409
  410 + $uid = cmf_get_current_user_id();
  411 + $my_user = Db::name('my_user') -> where('uid',$uid) -> find();
  412 + if($my_user['status'] == 3){
  413 + $student_user = Db::name('my_user') -> where('pid',$my_user['id']) -> select();
  414 + foreach ($student_user as $key => $val){
  415 + $indent[] = Db::name('') -> where('') -> select();
  416 + }
  417 +
  418 + }elseif ($my_user['status'] == 2){
  419 +
  420 + }
410 return $this -> fetch(); 421 return $this -> fetch();
411 422
412 } 423 }