You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.4 KiB
PHTML

4 years ago
<?php
/**
* 定时自动完成
*/
namespace Admin\Controller;
use Admin\Model\SpendModel;
use Think\Think;
use Base\Tool\Printer;
use Base\Tool\TaskClient;
4 years ago
use Base\Service\TestingResourceService;
4 years ago
use GuzzleHttp\Client;
use think\Db;
use Base\Tool\GameCatClient;
class GameApiController extends Think {
protected function _initialize()
{
C(api('Config/lists'));
}
public function verify()
{
$service = new TestingResourceService();
4 years ago
$batches = M('testing_resource_batch', 'tab_')->where(['verify_status' => 0])->select();
foreach ($batches as $batch) {
$service->verify($batch);
}
}
4 years ago
public function provide()
{
$service = new TestingResourceService();
$batches = M('testing_resource_batch', 'tab_')->where(['verify_status' => 1, 'provide_status' => 0])->select();
foreach ($batches as $batch) {
$service->provide($batch);
}
}
public function send()
{
4 years ago
$role = [
4 years ago
'role_id' => '6819493',
'user_account' => 'qh11102',
4 years ago
'sdk_version' => 1,
];
$order = [
4 years ago
'ref_amount' => '10.00',
'ref_id' => '8',
'remark' => '测试',
4 years ago
'order_no' => date('YmdHis') . rand(1000, 9999) . '_1',
];
$service = new TestingResourceService();
$result = $service->provideFromGameCat($order, $role);
4 years ago
var_dump($result);
4 years ago
}
}