|
|
@@ -11,16 +11,17 @@ use App\Lib\Settlement\Adapter\ZqRule;
|
|
|
use App\Lib\Settlement\SettlementWinFail;
|
|
|
use Illuminate\Routing\Controller as Controller;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
-
|
|
|
+use App\Lib\Biz\Sport\WagentProxy;
|
|
|
|
|
|
|
|
|
class SettlementController extends Controller
|
|
|
{
|
|
|
use RulePlus;
|
|
|
+
|
|
|
public function index()
|
|
|
{
|
|
|
$dd = new ZqRule();
|
|
|
- dd($dd->bodan(1,2,1));
|
|
|
+ dd($dd->bodan(1, 2, 1));
|
|
|
}
|
|
|
|
|
|
public function dd()
|
|
|
@@ -33,6 +34,33 @@ class SettlementController extends Controller
|
|
|
public function debug()
|
|
|
{
|
|
|
|
|
|
+ ///$config = ['name' => 'test1agent', 'key' => 'abcdefg', 'secret' => 'asdfasdfasd', 'domain' => 'http://sports.bocai108.com', 'cachefile' => ''];
|
|
|
+ $config = ['name' => 'test1agent', 'key' => 'abcdefg', 'secret' => 'asdfasdfasd', 'domain' => 'http://www.kaiyou-dev.com'];
|
|
|
+ $proxy = new WagentProxy();
|
|
|
+ $proxy->Init($config);
|
|
|
+
|
|
|
+
|
|
|
+ $ret1 = $proxy->todaycr();
|
|
|
+ print_r($ret1);
|
|
|
+
|
|
|
+
|
|
|
+ //$ret2 = $proxy->caie('onmygod');
|
|
|
+ //print_r($ret2);
|
|
|
+
|
|
|
+
|
|
|
+ exit;
|
|
|
+
|
|
|
+
|
|
|
+ $ret1 = DB::table('mtest')->get();
|
|
|
+ print_r($ret1);
|
|
|
+
|
|
|
+ $new = DB::table('mtest')->insert(['id' => rand(10000, 20000), 'cont' => json_encode(['name' => rand(100, 200), 'age' => rand(10, 30)])]);
|
|
|
+
|
|
|
+
|
|
|
+ echo "asfa";
|
|
|
+ exit;
|
|
|
+
|
|
|
+
|
|
|
/*
|
|
|
$pdo = DB::getPdo();
|
|
|
$mict = microtime(true);
|
|
|
@@ -49,7 +77,6 @@ class SettlementController extends Controller
|
|
|
*/
|
|
|
|
|
|
|
|
|
-
|
|
|
/*
|
|
|
$id = 3 ;
|
|
|
$obj = new SettlementWinFail();
|
|
|
@@ -60,30 +87,16 @@ class SettlementController extends Controller
|
|
|
*/
|
|
|
|
|
|
|
|
|
- $oida = $this->getIds(1,455,'zq');
|
|
|
- $swf = new SettlementOrder();
|
|
|
- $ret = $swf->reSettlement($oida,1,2,'zq',455);
|
|
|
+ $oida = $this->getIds(1, 455, 'zq');
|
|
|
+ $swf = new SettlementOrder();
|
|
|
+ $ret = $swf->reSettlement($oida, 1, 2, 'zq', 455);
|
|
|
var_dump($ret);
|
|
|
echo "<hr/>";
|
|
|
- echo "cost:" . (microtime(true) - floatval($_SERVER['REQUEST_TIME_FLOAT'])) .' 秒!';
|
|
|
+ echo "cost:" . (microtime(true) - floatval($_SERVER['REQUEST_TIME_FLOAT'])) . ' 秒!';
|
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $cond = '+2.5/3';
|
|
|
- $cond = '+3/3.5';
|
|
|
-
|
|
|
- $ret = $this->zq_letball(3,$cond,'xxx');
|
|
|
- print_r($ret);
|
|
|
- exit ;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/*
|
|
|
$rule = new ZqRule();
|
|
|
$model = DB::table('money_buy_match')->where(['id' => 320])->first();
|
|
|
@@ -96,10 +109,9 @@ class SettlementController extends Controller
|
|
|
*/
|
|
|
|
|
|
|
|
|
-
|
|
|
$noticeid = 3592444;
|
|
|
$matchid = 900;
|
|
|
- $order_ids = $this->getIds(1, $matchid,'zq');
|
|
|
+ $order_ids = $this->getIds(1, $matchid, 'zq');
|
|
|
|
|
|
$winorfalse = new SettlementWinFail();
|
|
|
$ret1 = $winorfalse->doRun($noticeid);
|
|
|
@@ -113,8 +125,6 @@ class SettlementController extends Controller
|
|
|
exit;
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
$model = DB::table('st_zq_result')->where(['id' => 1317823])->first();
|
|
|
echo json_decode($model->corner_ball);
|
|
|
|
|
|
@@ -122,29 +132,28 @@ class SettlementController extends Controller
|
|
|
exit;
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
- private function getIds($type, $match_id, $game_code='')
|
|
|
+ private function getIds($type, $match_id, $game_code = '')
|
|
|
{
|
|
|
- $return = [] ;
|
|
|
+ $return = [];
|
|
|
if ($type == 1) {
|
|
|
$ret = DB::table('money_buy_simplex')->where(['match_id' => $match_id])->get();
|
|
|
- if ($ret){
|
|
|
- foreach ($ret as $val){
|
|
|
+ if ($ret) {
|
|
|
+ foreach ($ret as $val) {
|
|
|
$return[] = $val->order_id;
|
|
|
}
|
|
|
}
|
|
|
return $return;
|
|
|
- }else{
|
|
|
- $ret = DB::table('money_buy_str')->leftJoin('money_buy_match','money_buy_match.batch_id','=','money_buy_str.batch_id')->where(['money_buy_match.match_id'=>$match_id,'money_buy_match.game_code'=>$game_code])->get();
|
|
|
- if ($ret){
|
|
|
- foreach ($ret as $val){
|
|
|
+ } else {
|
|
|
+ $ret = DB::table('money_buy_str')->leftJoin('money_buy_match', 'money_buy_match.batch_id', '=', 'money_buy_str.batch_id')->where(['money_buy_match.match_id' => $match_id, 'money_buy_match.game_code' => $game_code])->get();
|
|
|
+ if ($ret) {
|
|
|
+ foreach ($ret as $val) {
|
|
|
$return[] = $val->order_id;
|
|
|
}
|
|
|
}
|
|
|
- return $return ;
|
|
|
+ return $return;
|
|
|
}
|
|
|
}
|
|
|
|