WIN-2308041133\Administrator 1 month ago
parent
commit
ac3e529c74
1 changed files with 22 additions and 22 deletions
  1. 22 22
      application/api/controller/Lave.php

+ 22 - 22
application/api/controller/Lave.php

@@ -274,35 +274,35 @@ class Lave extends Api
 
                 if ($today == $day - 1 || $tf) { //再确定是不是今天是不是签约日期的前一天
 //                 var_dump(789456132);die();
-                    if ($v['uid'] == 8318) {
-                        $cid = $v['cid'];
-                        $mch_id = Company::where('id', $cid)->value('pay_weixin_mchid');
-                        $where1['cid'] = $cid;
-                        $where1['user_id'] = $v['uid'];
-                        $where1['order_name'] = $v['order_name'];
-                        $where1['order_id'] = LaveMonthModel::getNewOrderId();;
+                    @file_put_contents("quanju.txt", json_encode($v)."-月捐数据\r\n", 8);
+                    $cid = $v['cid'];
+                    $mch_id = Company::where('id', $cid)->value('pay_weixin_mchid');
+                    $where1['cid'] = $cid;
+                    $where1['user_id'] = $v['uid'];
+                    $where1['order_name'] = $v['order_name'];
+                    $where1['order_id'] = LaveMonthModel::getNewOrderId();;
 
 //                $where1['category_id']=$v['category_id'];
-                        $where1['amount'] = $v['price'];
-                        $where1['name'] = $v['contract_display_account'];
-                        $where1['contact'] = '';
-                        $where1['tel'] = $v['tel'];
-                        $where1['address'] = '用户未填写联系地址';
-                        $where1['is_open'] = $v['is_open'];
-                        $where1['is_ticket'] = '0';
-                        $where1['type'] = '0';
-                        $where1['record_id'] = $v['id'];
-                        $where1['contract_code'] = $v['contract_code'];
-                        $where1['plan_id'] = $v['plan_id'];
+                    $where1['amount'] = $v['price'];
+                    $where1['name'] = $v['contract_display_account'];
+                    $where1['contact'] = '';
+                    $where1['tel'] = $v['tel'];
+                    $where1['address'] = '用户未填写联系地址';
+                    $where1['is_open'] = $v['is_open'];
+                    $where1['is_ticket'] = '0';
+                    $where1['type'] = '0';
+                    $where1['record_id'] = $v['id'];
+                    $where1['contract_code'] = $v['contract_code'];
+                    $where1['plan_id'] = $v['plan_id'];
 
-                        $where1['nonce_str'] = uniqid();
+                    $where1['nonce_str'] = uniqid();
 //                $where1['help_id']='0';
 //                    @file_put_contents("quanju.txt", json_encode($where1)."测试申请扣款-\r\n", 8);
-                        $order = LaveMonthModel::create($where1);
+                    $order = LaveMonthModel::create($where1);
 //            }
 //                    var_dump(988745613);die();
-                        $rs = WechatService::papPayApply($mch_id, $where1['order_id'], $where1['amount'], "lave", '月捐款', 'PAP', [], $cid, $v['contract_id'], $where1['order_name'], $where1['nonce_str']);
-                    }
+                    $rs = WechatService::papPayApply($mch_id, $where1['order_id'], $where1['amount'], "lave", '月捐款', 'PAP', [], $cid, $v['contract_id'], $where1['order_name'], $where1['nonce_str']);
+                    @file_put_contents("quanju.txt", json_encode($rs)."-月捐汇报\r\n", 8);
                 }
             }
         }