From 4aef6712523279bfa824473e643b3f1634988cdd Mon Sep 17 00:00:00 2001 From: Rico Date: Fri, 7 Jun 2019 17:35:24 +1000 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA0=20=E6=88=96=E8=80=85=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=20=E4=B8=8D=E5=88=87443?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Utils/Tools.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Utils/Tools.php b/app/Utils/Tools.php index 6f4fbb26..3167bde5 100644 --- a/app/Utils/Tools.php +++ b/app/Utils/Tools.php @@ -447,10 +447,11 @@ class Tools 'tls' => '' ]; $item['add'] = $server[0]; - if ($server[1] == '0' && $server[1] == '') { + if ($server[1] == '0' || $server[1] == '') { $item['port'] = 443; } else { $item['port'] = (int)$server[1]; + } $item['aid'] = (int)$server[2]; $item['net'] = 'tcp'; @@ -502,7 +503,7 @@ class Tools 'tls' => '' ]; $item['add'] = $server[0]; - if ($server[1] == '0' && $server[1] == '') { + if ($server[1] == '0' || $server[1] == '') { $item['port'] = 443; } else { $item['port'] = (int)$server[1]; From 4bd67f021838c5afe73dfd08581d8067098d851d Mon Sep 17 00:00:00 2001 From: Rico Date: Fri, 7 Jun 2019 21:54:35 +1000 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E4=BB=A3=E7=90=86=E8=A2=ABAuto=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/conf/clash.tpl | 57 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/resources/conf/clash.tpl b/resources/conf/clash.tpl index b16ce55b..7ecbfcf1 100644 --- a/resources/conf/clash.tpl +++ b/resources/conf/clash.tpl @@ -5,13 +5,13 @@ #---------------------------------------------------# # HTTP 代理端口 -port: {if array_key_exists("port",$opts)}{$opts['port']}{else}8234{/if} +port: {if array_key_exists("port",$opts)}{$opts['port']}{else}8234{/if} # SOCKS5 代理端口 -socks-port: {if array_key_exists("socks-port",$opts)}{$opts['socks-port']}{else}8235{/if} +socks-port: {if array_key_exists("socks-port",$opts)}{$opts['socks-port']}{else}8235{/if} # Linux 和 macOS 的 redir 代理端口 -redir-port: {if array_key_exists("redir-port",$opts)}{$opts['redir-port']}{else}8236{/if} +redir-port: {if array_key_exists("redir-port",$opts)}{$opts['redir-port']}{else}8236{/if} # 允许局域网的连接 allow-lan: true @@ -21,41 +21,41 @@ mode: Rule # 设置日志输出级别 (默认级别:silent,即不输出任何内容,以避免因日志内容过大而导致程序内存溢出)。 # 5 个级别:silent / info / warning / error / debug。级别越高日志输出量越大,越倾向于调试,若需要请自行开启。 -log-level: {if array_key_exists("log-level",$opts)}{$opts['log-level']}{else}silent{/if} +log-level: {if array_key_exists("log-level",$opts)}{$opts['log-level']}{else}silent{/if} # Clash 的 RESTful API external-controller: '0.0.0.0:8233' # RESTful API 的口令 -secret: '{if array_key_exists("secret",$opts)}{$opts['secret']}{else}MixsChina{/if}' +secret: '{if array_key_exists("secret",$opts)}{$opts['secret']}{else}MixsChina{/if}' # 您可以将静态网页资源(如 clash-dashboard)放置在一个目录中,clash 将会服务于 `RESTful API/ui` # 参数应填写配置目录的相对路径或绝对路径。 # external-ui: folder {if array_key_exists("dns",$opts) && $opts['dns']==1} -dns: + dns: enable: true ipv6: false # listen: 0.0.0.0:53 # enhanced-mode: redir-host nameserver: - - 1.2.4.8 - - 223.5.5.5 - - 114.114.114.114 - - tls://dns.rubyfish.cn:853 + - 1.2.4.8 + - 223.5.5.5 + - 114.114.114.114 + - tls://dns.rubyfish.cn:853 fallback: - - tls://dns.rubyfish.cn:853 - - tls://dns.google + - tls://dns.rubyfish.cn:853 + - tls://dns.google -# Clash DNS 请求逻辑: -# (1) 当访问一个域名时, nameserver 与 fallback 列表内的所有服务器并发请求,得到域名对应的 IP 地址。 -# (2) clash 将选取 nameserver 列表内,解析最快的结果。 -# (3) 若解析结果中,IP 地址属于 国外,那么 Clash 将选择 fallback 列表内,解析最快的结果。 + # Clash DNS 请求逻辑: + # (1) 当访问一个域名时, nameserver 与 fallback 列表内的所有服务器并发请求,得到域名对应的 IP 地址。 + # (2) clash 将选取 nameserver 列表内,解析最快的结果。 + # (3) 若解析结果中,IP 地址属于 国外,那么 Clash 将选择 fallback 列表内,解析最快的结果。 -# 注意: -# (1) 如果您为了确保 DNS 解析结果无污染,请仅保留列表内以 tls:// 开头的 DNS 服务器,但是通常对于国内没有太大必要。 -# (2) 如果您不在乎可能解析到污染的结果,更加追求速度。请将 nameserver 列表的服务器插入至 fallback 列表内,并移除重复项。 + # 注意: + # (1) 如果您为了确保 DNS 解析结果无污染,请仅保留列表内以 tls:// 开头的 DNS 服务器,但是通常对于国内没有太大必要。 + # (2) 如果您不在乎可能解析到污染的结果,更加追求速度。请将 nameserver 列表的服务器插入至 fallback 列表内,并移除重复项。 {/if} Proxy: @@ -64,19 +64,20 @@ Proxy: {/foreach} Proxy Group: - - { name: "Auto", type: fallback, proxies: {json_encode($proxies,320)}, url: "http://www.gstatic.com/generate_204", interval: 300 } -{append var='proxies' value='Auto' index=0} +- { name: "Auto", type: fallback, proxies: {json_encode($proxies,320)}, url: "http://www.gstatic.com/generate_204", interval: 300 } +{$tmp[] = "Auto"} +{assign 'proxies' $tmp|array_merge:$proxies} {if count($back_china_proxies)!=0} - { name: "Back_China_Auto", type: fallback, proxies: {json_encode($back_china_proxies,320)}, url: "http://www.gstatic.com/generate_204", interval: 300 } -{append var='back_china_proxies' value='Back_China_Auto'} + {append var='back_china_proxies' value='Back_China_Auto'} - { name: "Back_China_Proxy", type: select, proxies: {json_encode($back_china_proxies,320)} } {/if} - - { name: "Proxy", type: select, proxies: {json_encode($proxies,320)} } - - { name: "Domestic", type: select, proxies: ["DIRECT","Proxy"] } +- { name: "Proxy", type: select, proxies: {json_encode($proxies,320)} } +- { name: "Domestic", type: select, proxies: ["DIRECT","Proxy"] } {$China_media=["Domestic","Proxy"]} {if count($back_china_proxies)!=0}{append var='China_media' value='Back_China_Proxy'}{/if} - - { name: "China_media", type: select, proxies: {json_encode($China_media,320)} } - - { name: "Global_media", type: select, proxies: ["Proxy"]} - - { name: "Others", type: select, proxies: ["Proxy","Domestic"]} +- { name: "China_media", type: select, proxies: {json_encode($China_media,320)} } +- { name: "Global_media", type: select, proxies: ["Proxy"]} +- { name: "Others", type: select, proxies: ["Proxy","Domestic"]} -{include file='rule/Rule.yml'} +{include file='rule/Rule.yml'} \ No newline at end of file From f872f414ab47e68990ca041da67a0580e755716d Mon Sep 17 00:00:00 2001 From: Rico Date: Fri, 7 Jun 2019 22:05:09 +1000 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/conf/clash.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/conf/clash.tpl b/resources/conf/clash.tpl index 7ecbfcf1..2c85c892 100644 --- a/resources/conf/clash.tpl +++ b/resources/conf/clash.tpl @@ -68,9 +68,9 @@ Proxy Group: {$tmp[] = "Auto"} {assign 'proxies' $tmp|array_merge:$proxies} {if count($back_china_proxies)!=0} - - { name: "Back_China_Auto", type: fallback, proxies: {json_encode($back_china_proxies,320)}, url: "http://www.gstatic.com/generate_204", interval: 300 } - {append var='back_china_proxies' value='Back_China_Auto'} - - { name: "Back_China_Proxy", type: select, proxies: {json_encode($back_china_proxies,320)} } +- { name: "Back_China_Auto", type: fallback, proxies: {json_encode($back_china_proxies,320)}, url: "http://www.gstatic.com/generate_204", interval: 300 } +{append var='back_china_proxies' value='Back_China_Auto'} +- { name: "Back_China_Proxy", type: select, proxies: {json_encode($back_china_proxies,320)} } {/if} - { name: "Proxy", type: select, proxies: {json_encode($proxies,320)} } - { name: "Domestic", type: select, proxies: ["DIRECT","Proxy"] } From c82b4ddd4348b7298d681c1f28f78555fb02c28a Mon Sep 17 00:00:00 2001 From: Rico Date: Sat, 15 Jun 2019 18:43:18 +1000 Subject: [PATCH 4/9] =?UTF-8?q?=E8=AE=BE=E5=AE=9Aclash=20skip-cert-verify?= =?UTF-8?q?=3Dtrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controllers/LinkController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Controllers/LinkController.php b/app/Controllers/LinkController.php index c4f8b99d..0f24f33e 100644 --- a/app/Controllers/LinkController.php +++ b/app/Controllers/LinkController.php @@ -376,6 +376,7 @@ class LinkController extends BaseController } $sss['plugin-opts']['host'] = $user->getMuMd5(); $sss['plugin-opts']['path'] = $item['path']; + $sss['plugin-opts']['skip-cert-verify'] = true; break; } if ($item['obfs'] != 'v2ray') { From ccba1508e4af22d28e5b249f87d181cc9b314c7c Mon Sep 17 00:00:00 2001 From: rico93 Date: Sun, 16 Jun 2019 12:35:32 +0800 Subject: [PATCH 5/9] add bitpayx --- resources/views/material/user/bitpayx.tpl | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 resources/views/material/user/bitpayx.tpl diff --git a/resources/views/material/user/bitpayx.tpl b/resources/views/material/user/bitpayx.tpl new file mode 100644 index 00000000..5c2773bf --- /dev/null +++ b/resources/views/material/user/bitpayx.tpl @@ -0,0 +1,83 @@ +
+

输入充值金额后,点击下方的图标进行充值

+
+ + +
+
+
+ +
+ From b70b06919e67517bc7d5e5e8d9f7d194b9c390fc Mon Sep 17 00:00:00 2001 From: rico93 Date: Sun, 16 Jun 2019 12:35:48 +0800 Subject: [PATCH 6/9] add bitpayx --- app/Services/Gateway/BitPayX.php | 200 ++++++++++++++++++++++++++++++ app/Services/Gateway/TrimePay.php | 2 +- app/Services/Payment.php | 4 +- 3 files changed, 204 insertions(+), 2 deletions(-) create mode 100644 app/Services/Gateway/BitPayX.php diff --git a/app/Services/Gateway/BitPayX.php b/app/Services/Gateway/BitPayX.php new file mode 100644 index 00000000..88f746b6 --- /dev/null +++ b/app/Services/Gateway/BitPayX.php @@ -0,0 +1,200 @@ +bitpayAppSecret = $bitpayAppSecret; + $this->bitpayGatewayUri = 'https://api.mugglepay.com/v1/'; + } + + public function prepareSignId($tradeno) + { + $data_sign = array(); + $data_sign['merchant_order_id'] = $tradeno; + $data_sign['secret'] = $this->bitpayAppSecret; + $data_sign['type'] = 'FIAT'; + ksort($data_sign); + return http_build_query($data_sign); + } + + public function sign($data) + { + return strtolower(md5(md5($data) . $this->bitpayAppSecret)); + } + + public function verify($data, $signature) + { + $mySign = $this->sign($data); + return $mySign === $signature; + } + + public function mprequest($data, $type = 'pay') + { + $headers = array('content-type: application/json', 'token: ' . $this->bitpayAppSecret); + $curl = curl_init(); + if ($type === 'pay') { + $this->bitpayGatewayUri .= 'orders'; + curl_setopt($curl, CURLOPT_URL, $this->bitpayGatewayUri); + curl_setopt($curl, CURLOPT_POST, 1); + $data_string = json_encode($data); + curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string); + } elseif ($type === 'query') { + $this->bitpayGatewayUri .= 'orders/merchant_order_id/status?id=' . $data['merchant_order_id']; + curl_setopt($curl, CURLOPT_URL, $this->bitpayGatewayUri); + curl_setopt($curl, CURLOPT_HTTPGET, 1); + } + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); + $data = curl_exec($curl); + curl_close($curl); + return $data; + } + + public function query($tradeNo) + { + $data['merchant_order_id'] = $tradeNo; + return json_decode($this->mprequest($data, 'query'), true); + } + + /***************************************************************** + * Abstract Payment Implentation + ******************************************************************/ + public function purchase($request, $response, $args) + { + $price = $request->getParam('price'); + $type = $request->getParam('type'); + // file_put_contents(BASE_PATH.'/bitpay_purchase.log', $price . " " . $type . "\r\n", FILE_APPEND); + if ($price <= 0) { + return json_encode(['errcode' => -1, 'errmsg' => '请输入合理的金额。']); + } + $user = Auth::getUser(); + $pl = new Paylist(); + $pl->userid = $user->id; + $pl->total = $price; + $pl->tradeno = self::generateGuid(); + $pl->save(); + $data['merchant_order_id'] = $pl->tradeno; + $data['price_amount'] = (float)$price; + $data['price_currency'] = 'CNY'; + $data['pay_currency'] = $type; + $data['title'] = '支付单号:' . $pl->tradeno; + $data['description'] = '充值:' . $price . ' 元'; + $data['callback_url'] = Config::get('baseUrl') . '/payment/notify'; + + // 如果不想暴露域名,建议屏蔽下面3行 + $data['success_url'] = Config::get('baseUrl') . '/user/payment/return?merchantTradeNo='; + $data['success_url'] .= $pl->tradeno; + $data['cancel_url'] = $data['success_url']; + + $str_to_sign = $this->prepareSignId($pl->tradeno); + $data['token'] = $this->sign($str_to_sign); + $result = json_decode($this->mprequest($data), true); + $result['pid'] = $pl->tradeno; + // file_put_contents(BASE_PATH.'/bitpay_purchase.log', json_encode($data)."\r\n", FILE_APPEND); + // file_put_contents(BASE_PATH.'/bitpay_purchase.log', json_encode($result)."\r\n", FILE_APPEND); + if ($result['status'] == 200 || $result['status'] == 201) { + $result['payment_url'] .= '&lang=zh'; + return json_encode(array('url' => $result['payment_url'], 'errcode' => 0, 'pid' => $pl->id)); + } + return json_encode(['errcode' => -1, 'errmsg' => $result . error]); + } + + public function notify($request, $response, $args) + { + if (!$this->bitpayAppSecret || $this->bitpayAppSecret === '') { + $return = []; + $return['status'] = 400; + echo json_encode($return); + return; + } + $inputString = file_get_contents('php://input', 'r'); + $inputStripped = str_replace(array("\r", "\n", "\t", "\v"), '', $inputString); + $inputJSON = json_decode($inputStripped, true); //convert JSON into array + $data = array(); + if ($inputJSON !== null) { + $data['status'] = $inputJSON['status']; + $data['order_id'] = $inputJSON['order_id']; + $data['merchant_order_id'] = $inputJSON['merchant_order_id']; + $data['price_amount'] = $inputJSON['price_amount']; + $data['price_currency'] = $inputJSON['price_currency']; + $data['created_at_t'] = $inputJSON['created_at_t']; + } + // file_put_contents(BASE_PATH.'/bitpay_notify.log', json_encode($data)."\r\n", FILE_APPEND); + // 准备待签名数据 + $str_to_sign = $this->prepareSignId($inputJSON['merchant_order_id']); + $resultVerify = $this->verify($str_to_sign, $inputJSON['token']); + $isPaid = $data !== null && $data['status'] !== null && $data['status'] === 'PAID'; + // file_put_contents(BASE_PATH.'/bitpay_notify.log', $resultVerify."\r\n".$isPaid."\r\n", FILE_APPEND); + if ($resultVerify && $isPaid) { + $this->postPayment($data['merchant_order_id'], 'BitPayX'); + // echo 'SUCCESS'; + $return = []; + $return['status'] = 200; + echo json_encode($return); + } else { + // echo 'FAIL'; + $return = []; + $return['status'] = 400; + echo json_encode($return); + } + } + + public function getPurchaseHTML() + { + return View::getSmarty()->fetch('user/bitpayx.tpl'); + } + + public function getReturnHTML($request, $response, $args) + { + $pid = $_GET['merchantTradeNo']; + $p = Paylist::where('tradeno', '=', $pid)->first(); + $money = $p->total; + if ($p->status == 1) { + $success = 1; + } else { + $data = $this->query($pid); + $isPaid = $data !== null && $data['order'] !== null && $data['order']['status'] !== null && $data['order']['status'] === 'PAID'; + // file_put_contents(BASE_PATH.'/bitpay_return.log', $pid . " " . $data ."\r\n". $isPaid . "\r\n", FILE_APPEND); + if ($isPaid) { + $this->postPayment($pid, 'BitPayX'); + $success = 1; + } else { + $success = 0; + } + } + return View::getSmarty()->assign('money', $money)->assign('success', $success)->fetch('user/pay_success.tpl'); + } + + public function getStatus($request, $response, $args) + { + $return = []; + $p = Paylist::where('tradeno', $_POST['pid'])->first(); + $return['ret'] = 1; + $return['result'] = $p->status; + // file_put_contents(BASE_PATH.'/bitpay_status_success.log', json_encode($return)."\r\n", FILE_APPEND); + return json_encode($return); + } +} diff --git a/app/Services/Gateway/TrimePay.php b/app/Services/Gateway/TrimePay.php index 4814a1b6..b4876ffb 100644 --- a/app/Services/Gateway/TrimePay.php +++ b/app/Services/Gateway/TrimePay.php @@ -27,7 +27,7 @@ class TrimePay extends AbstractPayment public function __construct($appSecret) { $this->appSecret = $appSecret; - $this->gatewayUri = 'https://api.Trimepay.com/gateway/'; + $this->gatewayUri = 'https://api.payease.io/gateway/'; } diff --git a/app/Services/Payment.php b/app/Services/Payment.php index 197a3d23..1f66d293 100644 --- a/app/Services/Payment.php +++ b/app/Services/Payment.php @@ -9,7 +9,7 @@ namespace App\Services; use App\Services\Gateway\{ - AopF2F, Codepay, DoiAMPay, PaymentWall, ChenPay, SPay, TrimePay + AopF2F, Codepay, DoiAMPay, PaymentWall, ChenPay, SPay, TrimePay,BitPayX }; class Payment @@ -32,6 +32,8 @@ class Payment return new ChenPay(); case ('trimepay'): return new TrimePay(Config::get('trimepay_secret')); + case ('bitpayx'): + return new BitPayX(Config::get('bitpay_secret')); default: return null; } From 7041de630b5ab5c94dc1785662e27f1aa0c12b5b Mon Sep 17 00:00:00 2001 From: Rico Date: Sun, 23 Jun 2019 22:54:01 +1000 Subject: [PATCH 7/9] add bitpayx wechat --- app/Services/Gateway/BitPayX.php | 11 ++++++----- resources/views/material/user/bitpayx.tpl | 20 +++++++++++++------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/app/Services/Gateway/BitPayX.php b/app/Services/Gateway/BitPayX.php index 88f746b6..cc118d88 100644 --- a/app/Services/Gateway/BitPayX.php +++ b/app/Services/Gateway/BitPayX.php @@ -99,12 +99,13 @@ class BitPayX extends AbstractPayment $data['merchant_order_id'] = $pl->tradeno; $data['price_amount'] = (float)$price; $data['price_currency'] = 'CNY'; - $data['pay_currency'] = $type; + if ($type === 'WECHAT' || $type === 'ALIPAY') { + $data['pay_currency'] = $type; + } $data['title'] = '支付单号:' . $pl->tradeno; $data['description'] = '充值:' . $price . ' 元'; $data['callback_url'] = Config::get('baseUrl') . '/payment/notify'; - // 如果不想暴露域名,建议屏蔽下面3行 $data['success_url'] = Config::get('baseUrl') . '/user/payment/return?merchantTradeNo='; $data['success_url'] .= $pl->tradeno; $data['cancel_url'] = $data['success_url']; @@ -115,7 +116,7 @@ class BitPayX extends AbstractPayment $result['pid'] = $pl->tradeno; // file_put_contents(BASE_PATH.'/bitpay_purchase.log', json_encode($data)."\r\n", FILE_APPEND); // file_put_contents(BASE_PATH.'/bitpay_purchase.log', json_encode($result)."\r\n", FILE_APPEND); - if ($result['status'] == 200 || $result['status'] == 201) { + if ($result['status'] === 200 || $result['status'] === 201) { $result['payment_url'] .= '&lang=zh'; return json_encode(array('url' => $result['payment_url'], 'errcode' => 0, 'pid' => $pl->id)); } @@ -172,7 +173,7 @@ class BitPayX extends AbstractPayment $pid = $_GET['merchantTradeNo']; $p = Paylist::where('tradeno', '=', $pid)->first(); $money = $p->total; - if ($p->status == 1) { + if ($p->status === 1) { $success = 1; } else { $data = $this->query($pid); @@ -197,4 +198,4 @@ class BitPayX extends AbstractPayment // file_put_contents(BASE_PATH.'/bitpay_status_success.log', json_encode($return)."\r\n", FILE_APPEND); return json_encode($return); } -} +} \ No newline at end of file diff --git a/resources/views/material/user/bitpayx.tpl b/resources/views/material/user/bitpayx.tpl index 5c2773bf..3944bb6a 100644 --- a/resources/views/material/user/bitpayx.tpl +++ b/resources/views/material/user/bitpayx.tpl @@ -6,9 +6,15 @@
- + +
+ \ No newline at end of file From ea9e0fcc5771d721d93eb64f680f705d72d426fe Mon Sep 17 00:00:00 2001 From: Rico Date: Tue, 9 Jul 2019 21:56:50 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E6=8E=92=E9=99=A4=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E4=B8=AD=E6=AD=A2=E7=9A=84=E5=A5=97=E9=A4=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Command/Job.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Command/Job.php b/app/Command/Job.php index 1a2ce9d1..50c49560 100644 --- a/app/Command/Job.php +++ b/app/Command/Job.php @@ -158,7 +158,7 @@ class Job Telegram::Send('姐姐姐姐,数据库被清理了,感觉身体被掏空了呢~'); //auto reset - $boughts = Bought::all(); + $boughts = Bought::where('renew', '<>', 0)->get(); $boughted_users = array(); foreach ($boughts as $bought) { $user = User::where('id', $bought->userid)->first(); From b5689528fa34639da12eb1126ef5899397d1bf5e Mon Sep 17 00:00:00 2001 From: Rico Date: Thu, 11 Jul 2019 02:17:13 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E4=B8=AD=E6=AD=A2=E5=A5=97=E9=A4=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Command/Job.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Command/Job.php b/app/Command/Job.php index 50c49560..1a2ce9d1 100644 --- a/app/Command/Job.php +++ b/app/Command/Job.php @@ -158,7 +158,7 @@ class Job Telegram::Send('姐姐姐姐,数据库被清理了,感觉身体被掏空了呢~'); //auto reset - $boughts = Bought::where('renew', '<>', 0)->get(); + $boughts = Bought::all(); $boughted_users = array(); foreach ($boughts as $bought) { $user = User::where('id', $bought->userid)->first();