master
elf 4 months ago
commit 5a846a4ad7

@ -0,0 +1,104 @@
[ 2024-07-07T22:41:01+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000005s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000702s ]
INFO: [ app_init ] --END-- [ RunTime:0.000753s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:42:01+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000006s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000694s ]
INFO: [ app_init ] --END-- [ RunTime:0.000749s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:43:02+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000006s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000738s ]
INFO: [ app_init ] --END-- [ RunTime:0.000794s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:44:01+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000005s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000721s ]
INFO: [ app_init ] --END-- [ RunTime:0.000779s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:45:02+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000005s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.001133s ]
INFO: [ app_init ] --END-- [ RunTime:0.001184s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:45:02+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000004s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000694s ]
INFO: [ app_init ] --END-- [ RunTime:0.000744s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:46:01+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000004s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000698s ]
INFO: [ app_init ] --END-- [ RunTime:0.000748s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:47:02+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000004s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000696s ]
INFO: [ app_init ] --END-- [ RunTime:0.000749s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:48:01+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000004s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000638s ]
INFO: [ app_init ] --END-- [ RunTime:0.000684s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:49:02+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000005s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000707s ]
INFO: [ app_init ] --END-- [ RunTime:0.000759s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:50:01+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000005s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000679s ]
INFO: [ app_init ] --END-- [ RunTime:0.000729s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:50:01+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000004s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000471s ]
INFO: [ app_init ] --END-- [ RunTime:0.000507s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file
[ 2024-07-07T22:51:01+08:00 ]
INFO: [ app_init ] --START--
INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000005s ]
NOTIC: [8192] Array and string offset access syntax with curly braces is deprecated /var/www/platform_qy/platform/ThinkPHP/Library/Think/Cache/Driver/File.class.php 第 59 行.
INFO: Run Common\Behavior\InitHookBehavior [ RunTime:0.000703s ]
INFO: [ app_init ] --END-- [ RunTime:0.000752s ]
ERR: syntax error, unexpected '<<' (T_SL), expecting end of file

@ -20,6 +20,8 @@ use BaiduBce\Auth\SignOptions;
use BaiduBce\Log\LogFactory;
use Think\Think;
use Base\Service\GameSourceService;
use Base\Tool\CosClient;
use Base\Tool\OssClient as ToolOssClient;
use Base\Tool\Printer;
use Base\Tool\Redis;
@ -1077,4 +1079,8 @@ class AutoPackController extends Think
return '';
}
}
public function clearPkg() {
$client = new ToolOssClient();
}
}

@ -6,6 +6,7 @@ use Base\Model\PromoteModel;
use Base\Model\ApplyModel;
use Base\Tool\Base62;
use Base\Tool\PlistDemo;
use Base\Tool\Storage;
use GuzzleHttp\Client;
class GameSourceService {
@ -88,8 +89,8 @@ class GameSourceService {
'source_version' => $gameSource['source_version'],
];
$zip = new ZipArchive();
if (!$zip->open($localPath, ZipArchive::CREATE)) {
$zip = new \ZipArchive();
if (!$zip->open($localPath, \ZipArchive::CREATE)) {
return false;
}
@ -368,7 +369,7 @@ class GameSourceService {
public function uploadPackage($localFilePath, $distFilePath, $isDeleteLocal = false)
{
$isChunk = C('PACKAGE_CHUNK_ENABLED') ? true : false;
if (C('OSS_STATUS')) {
if (C('STORAGE_TYPE')) {
if ($isChunk) {
return $this->uploadPackageChunk($localFilePath, $distFilePath, $isDeleteLocal);
} else {
@ -450,8 +451,7 @@ class GameSourceService {
public function uploadPackageOnce($localFilePath, $distFilePath, $isDeleteLocal = false)
{
$ossService = new OssService();
$result = $ossService->upload($localFilePath, $distFilePath);
$result = Storage::upload($localFilePath, $distFilePath);
if ($isDeleteLocal && file_exists($localFilePath)) {
@unlink($localFilePath);
}

@ -0,0 +1,94 @@
<?php
namespace Base\Tool;
use Base\Tool\StorageClient;
use Exception;
use Qcloud\Cos\Client as BaseCosClient;
/**
* 腾讯云OBS
*/
class CosClient implements StorageClient
{
private $secretId;
private $secretKey;
private $region;
private $domain;
private $bucket;
private $client;
public function __construct()
{
$this->domain = C('COS_DOMAIN');
$this->region = C('COS_REGION');
$this->bucket = C('COS_BUCKET');
$this->secretId = C('COS_SECRET_ID');
$this->secretKey = C('COS_SECRET_KEY');
$this->client = new BaseCosClient(
[
'region' => $this->region,
'scheme' => 'https', //协议头部默认为http
'credentials'=> [
'secretId' => $this->secretId,
'secretKey' => $this->secretKey,
]
]
);
}
public function upload($localFilePath, $saveFileName)
{
try {
$file = fopen($localFilePath, 'rb');
if (!$file) {
throw new Exception('读取文件失败');
}
$result = $this->client->Upload(
$this->bucket,
$saveFileName,
$file
);
return [
'status' => true,
'message' => '上传成功',
'data' => [
'url' => $this->getUrl($saveFileName)
]
];
} catch (\Exception $e) {
return [
'status' => false,
'message' => $e->getMessage()
];
}
}
public function delete($deleteFile)
{
try {
$result = $this->client->deleteObject(array(
'Bucket' => $this->bucket,
'Key' => $deleteFile
));
return [
'status' => true,
'message' => '删除成功',
];
} catch (\Exception $e) {
return [
'status' => false,
'message' => $e->getMessage()
];
}
}
public function getUrl($saveFileName)
{
return $this->domain . '/' . $saveFileName;
}
public function __destruct()
{
}
}

@ -0,0 +1,113 @@
<?php
namespace Base\Tool;
use Base\Tool\StorageClient;
use Obs\ObsClient as BaseObsClient;
/**
* 华为云OBS
*/
class ObsClient implements StorageClient
{
const MAX_PART_SIZE = 5368709120;
const MID_PART_SIZE = 10485760;
const MIN_PART_SIZE = 102400;
private $accessKey;
private $secretKey;
private $endpoint;
private $bucket;
private $domain;
private $client;
public function __construct()
{
$this->accessKey = C('OBS_ACCESS_KEY');
$this->secretKey = C('OBS_SECRET_KEY');
$this->endpoint = C('OBS_ENDPOINT');
$this->domain = C('OBS_DOMAIN');
$this->bucket = C('OBS_BUCKET');
$this->client = new BaseObsClient([
'key' => $this->accessKey,
'secret' => $this->secretKey,
'endpoint' => $this->endpoint
]);
}
public function upload($localFilePath, $saveFileName)
{
/* $resp = $this->client->putObject([
'Bucket' => $this->bucket,
'Key' => $saveFileName,
'SourceFile' => $localFilePath,
]); */
try {
$this->multiuploadFile($localFilePath, $saveFileName);
return [
'status' => true,
'message' => '上传OSS成功',
'data' => [
'url' => $this->getUrl($saveFileName)
]
];
} catch (\Obs\ObsException $e) {
return [
'status' => false,
'message' => $e->getExceptionMessage()
];
}
}
private function multiuploadFile($file, $saveFileName)
{
$resp = $this->client->initiateMultipartUpload([
'Bucket' => $this->bucket,
'Key' => $saveFileName,
'ContentType' => 'text/plain'
]);
$uploadId = $resp['UploadId'];
$packetSize = 1048576;
$byteTotal = filesize($file);
$packetTotal = ceil($byteTotal / $packetSize);
$fileContent = fopen($file, 'r');
$parts = [];
for ($i=0; $i<$packetTotal; $i++) {
$packetFileContent = fread($fileContent, $packetSize);
$resp = $this->client->uploadPart([
'Bucket' => $this->bucket,
'Key' => $saveFileName,
'UploadId' => $uploadId,
'PartNumber' => $i+1,
'Body' => $packetFileContent
]);
$parts[] = ['PartNumber' => $i+1, 'ETag' => $resp['ETag']];
}
fclose($fileContent);
$resp = $this->client->completeMultipartUpload([
'Bucket' => $this->bucket,
'Key' => $saveFileName,
'UploadId' => $uploadId,
'Parts' => $parts
]);
}
public function delete($deleteFile)
{
$resp = $this->client->deleteObject([
'Bucket' => $this->bucket,
'Key' => $deleteFile,
]);
}
public function getUrl($saveFileName)
{
return $this->domain . '/' . $saveFileName;
}
public function __destruct()
{
$this->client->close();
}
}

@ -0,0 +1,127 @@
<?php
namespace Base\Tool;
use OSS\Core\OssUtil;
use OSS\OssClient as BaseOssClient;
use OSS\Core\OSsException;
/**
* 阿里云OSS
*/
class OssClient implements StorageClient {
private $accessKeyId = '';
private $accessKeySecret = '';
private $endpoint = '';
private $isCName = false;
private $bucket = '';
private $domain = '';
private $client;
private $errorMessage = '';
public function __construct()
{
Vendor('OSS.autoload');
$this->accessKeyId = C('OSS_ACCESS_KEY_ID');
$this->accessKeySecret = C('OSS_ACCESS_KEY_SECRET');
$this->endpoint = C('OSS_ENDPOINT');
$this->domain = C('OSS_DOMAIN');
$this->isCName = C('OSS_IS_CNAME');
$this->bucket = C('OSS_BUCKET');
$this->client = new BaseOssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint, $this->isCName);
}
public function upload($localFilePath, $saveFileName)
{
try {
$this->multiuploadFile($localFilePath, $saveFileName);
return [
'status' => true,
'message' => '上传OSS成功',
'data' => [
'url' => $this->getUrl($saveFileName)
]
];
} catch (OssException $e) {
return [
'status' => false,
'message' => $e->getMessage()
];
}
}
private function multiuploadFile($file, $saveFileName)
{
$uploadId = $this->client->initiateMultipartUpload($this->bucket, $saveFileName);
/*
* step 2. 上传分片
*/
$partSize = 5 * 1000 * 1024;
$uploadFile = $file;
$uploadFileSize = filesize($uploadFile);
$pieces = $this->client->generateMultiuploadParts($uploadFileSize, $partSize);
$responseUploadPart = [];
$uploadPosition = 0;
$isCheckMd5 = true;
foreach ($pieces as $i => $piece) {
$fromPos = $uploadPosition + (integer) $piece[BaseOssClient::OSS_SEEK_TO];
$toPos = (integer) $piece[BaseOssClient::OSS_LENGTH] + $fromPos - 1;
$upOptions = [
BaseOssClient::OSS_FILE_UPLOAD => $uploadFile,
BaseOssClient::OSS_PART_NUM => ($i + 1),
BaseOssClient::OSS_SEEK_TO => $fromPos,
BaseOssClient::OSS_LENGTH => $toPos - $fromPos + 1,
BaseOssClient::OSS_CHECK_MD5 => $isCheckMd5,
];
if ($isCheckMd5) {
$contentMd5 = OssUtil::getMd5SumForFile($uploadFile, $fromPos, $toPos);
$upOptions[BaseOssClient::OSS_CONTENT_MD5] = $contentMd5;
}
// 2. 将每一分片上传到OSS
$responseUploadPart[] = $this->client->uploadPart($this->bucket, $saveFileName, $uploadId, $upOptions);
}
$uploadParts = [];
foreach ($responseUploadPart as $i => $eTag) {
$uploadParts[] = [
'PartNumber' => ($i + 1),
'ETag' => $eTag,
];
}
/**
* step 3. 完成上传
*/
$this->client->completeMultipartUpload($this->bucket, $saveFileName, $uploadId, $uploadParts);
}
/**
*删除文件
*/
public function delete($deleteFile)
{
$this->client->deleteObject($this->bucket, $deleteFile);
}
public function getUrl($saveFileName)
{
$url = '';
/* if ($this->isCName) {
$url = 'http://' . $this->endpoint . '/' . $saveFileName;
} else {
$url = 'https://' . $this->bucket . '.' . $this->endpoint . '/' . $saveFileName;
$url = str_replace('-internal', '', $url);
} */
$url = $this->domain . '/' . $saveFileName;
return $url;
}
/**
* 删除文件
*/
public function listObjects($deleteFile)
{
$listObject = $this->client->listObjects($this->bucket);
var_dump($listObject);
}
}

@ -0,0 +1,42 @@
<?php
namespace Base\Tool;
use Exception;
class Storage {
/**
* @var StorageClient
*/
private static $client;
private static function getClient(): StorageClient {
if (empty(self::$client)) {
if (C('STORAGE_TYPE') == 'oss') {
self::$client = new OssClient();
} elseif (C('STORAGE_TYPE') == 'obs') {
self::$client = new ObsClient();
} elseif (C('STORAGE_TYPE') == 'cos') {
self::$client = new CosClient();
} else {
throw new Exception("Storage type undefined!");
}
}
return self::$client;
}
public static function upload($localFilePath, $saveFileName) {
return self::getClient()->upload($localFilePath, $saveFileName);
}
public static function delete($deleteFile)
{
return self::getClient()->delete($deleteFile);
}
public static function getUrl($saveFileName)
{
return self::getClient()->getUrl($saveFileName);
}
}

@ -0,0 +1,12 @@
<?php
namespace Base\Tool;
interface StorageClient {
public function upload($localFilePath, $saveFileName);
public function delete($deleteFile);
public function getUrl($saveFileName);
}

@ -2997,8 +2997,7 @@ function getIsTask($user_id){
}
}
function encryption($string)
{
function encryption($string) {
//订单隐藏算法
$orderLen = strlen($string);
$strLen = 3;

File diff suppressed because it is too large Load Diff

@ -208,10 +208,13 @@ class HomeController extends Controller
$this->error('该链接已失效');
}
<<<<<<< HEAD
if (in_array($gameId, [277, 278])) {
$this->error('该游戏链接已失效');
}
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$promoteService = new PromoteService();
if (!$promoteService->checkPromoteLimitRule($promote)) {
$this->error('链接已失效');
@ -325,9 +328,12 @@ class HomeController extends Controller
if(in_array($game['id'], [191, 192])) {
$game['relation_game_name'] = '九灵神域';
}
<<<<<<< HEAD
if(in_array($game['id'], [282, 283])) {
$game['relation_game_name'] = '逍遥官老爷';
}
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$this->assign("serviceQQ", $serviceQQ);
$this->assign('isNewIos', $isNewIos);

@ -54,16 +54,28 @@ class QueryController extends BaseController
$userAccount = trim(I('user_account', ''));
$payOrderNumber = trim(I('pay_order_number', ''));
$nowTime = date('Y-m-d');
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
<<<<<<< HEAD
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
=======
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$payedBegTime = I("payed_begtime", '');
if ($payedBegTime) $payedBegTime = strtotime($payedBegTime);
$payedEndTime = I("payed_endtime", '');
@ -78,7 +90,11 @@ class QueryController extends BaseController
$endTime = 0;
}
}
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
$loginPromote = $this->getLoginPromote();
@ -136,16 +152,25 @@ class QueryController extends BaseController
if ($payedBegTime && $payedEndTime) {
$map['tab_spend.payed_time'] = ['between', [$payedBegTime, $payedEndTime - 1]];
}
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$map = $this->spendRepository->withIsCheck($map, 'tab_spend.is_check');
$data = [];
$count = 0;
$income = '0.00';
<<<<<<< HEAD
if (
intval($endTime - $begTime) / (24 * 3600) <= 31
|| intval($payedEndTime - $payedBegTime) / (24 * 3600) <= 31
) {
=======
if (intval($endTime - $begTime) / (24 * 3600) <= 31
|| intval($payedEndTime - $payedBegTime) / (24 * 3600) <= 31) {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$data = M('Spend', 'tab_')
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.chain as chain,tab_promote.level,tab_promote.parent_id')
->join('tab_game on tab_spend.game_id = tab_game.id')
@ -186,7 +211,11 @@ class QueryController extends BaseController
$promoteData = [];
if (!empty($promoteIdData)) {
$promoteIdData = array_unique($promoteIdData);
<<<<<<< HEAD
$promoteData = M('promote', 'tab_')->where(array('id' => ['in', $promoteIdData]))->getField('id,account,real_name,group_remark');
=======
$promoteData = M('promote', 'tab_')->where(array('id' => ['in',$promoteIdData]))->getField('id,account,real_name,group_remark');
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
foreach ($data as &$list) {
switch ($list['level']) {
@ -215,12 +244,34 @@ class QueryController extends BaseController
$list['p_pro_group_remark'] = $promoteData[$list['parent_id']]['group_remark'];
break;
}
<<<<<<< HEAD
$list['user_account'] = getUserAccountOfPromote($list['user_account'], $loginPromote);
=======
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$list['spend_time'] = date('Y-m-d H:i:s', $list['spend_time']);
$list['pay_time'] = ($list['pay_status'] == 1) ? date('Y-m-d H:i:s', $list['pay_time']) : '--';
$list['pay_status'] = isset(QueryController::$payStatus[$list['pay_status']]) ? QueryController::$payStatus[$list['pay_status']] : '未知状态';
$list['sdk_version'] = getSDKTypeName($list['sdk_version']);
<<<<<<< HEAD
$list['pay_order_number'] = hideOrderNumber($list['pay_order_number']);
=======
//订单隐藏算法
$orderLen = strlen($list['pay_order_number']);
$strLen = 4;
$hideChar = '';
if ($orderLen <= 8) {
$strLen = 2;
}
for ($i = 0; $i < $orderLen - $strLen * 2; $i++) {
$hideChar .= '*';
}
$list['pay_order_number'] = substr($list['pay_order_number'], 0, $strLen) . $hideChar . substr($list['pay_order_number'], $orderLen - $strLen);
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
}
@ -269,7 +320,11 @@ class QueryController extends BaseController
{
$page = intval(I('p', 1));
$row = intval(I('row', 10));
<<<<<<< HEAD
$ownId = intval(I('own_id'), 0); //本账号
=======
$ownId = intval(I('own_id'), 0);//本账号
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$account = trim(I('account', ''));
$id = intval(I('id', 0));
$nowTime = date('Y-m-d');
@ -326,6 +381,7 @@ class QueryController extends BaseController
->where($loginMap)
->order('login_time desc')
->find();
<<<<<<< HEAD
$list['new_login_time'] = date('Y-m-d H:i:s', $newLoginData['login_time']);
$list['new_login_ip'] = $newLoginData['login_ip'];
@ -333,6 +389,16 @@ class QueryController extends BaseController
if (!empty($list['device_number'])) {
$list['device_number'] = encryption($list['device_number']);
}
=======
$list['new_login_time'] = date('Y-m-d H:i:s', $newLoginData['login_time']);
$list['new_login_ip'] = $newLoginData['login_ip'];
$list['account'] = substr($list['account'], 0, 2) . '******' . substr($list['account'], 8);
if(!empty($list['device_number'])) {
$list['device_number'] = encryption($list['device_number']);
}
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
}
@ -582,6 +648,10 @@ class QueryController extends BaseController
$promote_child = get_sub_channel_id($chid, PRO_GRADE + 1);
$map['s.promote_id'] = $mapp['u.promote_id'] = array('in', $promote_child);
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
} else {
$promote_child = get_zi_promote_id(PID);
if (empty($promote_child)) {
@ -601,10 +671,18 @@ class QueryController extends BaseController
$mmap = array($mapp, $map);
$user = A('User', 'Event');
$user->check_child_bill($model, $p, $mmap);
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
} else {
$this->meta_title = '子渠道结算';
$this->display();
}
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
public function generatesub()
@ -700,6 +778,10 @@ class QueryController extends BaseController
public function son_apply_withdraw($settlement_number = '')
{
$map['settlement_number'] = $settlement_number;
<<<<<<< HEAD
=======
$with_map['settlement_number'] = $totalSett['settlement_number'];
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$result = M("SonSettlement", "tab_")->where($map)->save(array('ti_status' => 0));
if ($result !== false) {
echo json_encode(array("status" => 1));
@ -711,6 +793,10 @@ class QueryController extends BaseController
public function audit_withdraw($settlement_number = '')
{
$map['settlement_number'] = $settlement_number;
<<<<<<< HEAD
=======
$with_map['settlement_number'] = $totalSett['settlement_number'];
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$result = M("SonSettlement", "tab_")->where($map)->save(array('ti_status' => 1));
if ($result !== false) {
$this->success('审核成功');
@ -945,6 +1031,10 @@ class QueryController extends BaseController
$map_list['promote_id'] = array('in', $pro_arr);
$promote_id = implode(',', $pro_arr);
$join .= " AND u.promote_id in ({$promote_id})";
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
$spend2 = D('Spend');
$data = M('Apply', 'tab_')->field('game_id, game_name')->where(['promote_id' => $promote_id])->order('game_id desc')->select();
@ -1062,6 +1152,10 @@ class QueryController extends BaseController
{
$this->meta_title = '留存统计';
A('User', 'Event')->retention_analysis();
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
public function details()
@ -1108,7 +1202,11 @@ class QueryController extends BaseController
$loginPromote = $this->getLoginPromote();
<<<<<<< HEAD
$ownId = intval(I('own_id'), 0); //本账号
=======
$ownId = intval(I('own_id'), 0);//本账号
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
if ($ownId) {
$params['promote_id'] = $queryPromote['id'];
} else {
@ -1150,6 +1248,7 @@ class QueryController extends BaseController
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$userRepository = new UserRepository();
$spendRepository = new SpendRepository();
<<<<<<< HEAD
$roleNumList = $userRepository->getCreateRoleCountByDay($params); //创角数
$userNumList = $userRepository->getCreateRoleUserCountByDay($params); //创角用户
$newUserNumList = $userRepository->getNewCreateRoleUserCountByDay($params); //新创角用户
@ -1166,6 +1265,24 @@ class QueryController extends BaseController
$spendGenericList = $spendRepository->getPayAmountGroupByDayAndType($params); //通用币充值
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByDayAndType($params); //绑定币充值
=======
$roleNumList = $userRepository->getCreateRoleCountByDay($params);//创角数
$userNumList = $userRepository->getCreateRoleUserCountByDay($params);//创角用户
$newUserNumList = $userRepository->getNewCreateRoleUserCountByDay($params);//新创角用户
$newDeviceNumList = $userRepository->getNewCreateRoleDeviceCountByDay($params);//新创角设备
$newIpNumList = $userRepository->getNewCreateRoleIpCountByDay($params);//新创角IP
$loginUserNumList = $userRepository->getLoginCountGroupByDayNew($params);//登录用户数
if ($this->canViewUserRecharge) {
$spendUserNumList = $spendRepository->getPayUserCountGroupByDayNew($params);//充值人数
$spendNumList = $spendRepository->getPayCountGroupByDay($params);//充值次数
$spendAllAmountList = $spendRepository->getPayAmountGroupByDayAndType($params);//充值总额
$params['pay_way'] = ['in', '1,2,3,4,5,6'];
$spendCashList = $spendRepository->getPayAmountGroupByDayAndType($params);//现金充值
$params['pay_way'] = 0;
$spendGenericList = $spendRepository->getPayAmountGroupByDayAndType($params);//通用币充值
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByDayAndType($params);//绑定币充值
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
$allData['role_num'] = 0;
@ -1258,7 +1375,11 @@ class QueryController extends BaseController
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
$row = intval(I('get.row', 10));
<<<<<<< HEAD
$ownId = intval(I('own_id'), 0); //本账号
=======
$ownId = intval(I('own_id'), 0);//本账号
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$relationGameId = intval(I('relation_game_id', 0));
$sdkVersion = intval(I('sdk_version', 0));
$serverId = I('server_id', '');
@ -1284,9 +1405,15 @@ class QueryController extends BaseController
$parameter['own_id'] = $ownId;
$parameter['p'] = $page;
$parameter['row'] = $row;
<<<<<<< HEAD
$loginPromote = $this->getLoginPromote();
=======
$loginPromote = $this->getLoginPromote();
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$map = [];
$map = ['_string' => '1=1'];
if ($ownId) {
@ -1309,16 +1436,27 @@ class QueryController extends BaseController
$params['begin_time'] = $begTime;
$params['end_time'] = $endTime - 1;
<<<<<<< HEAD
$promoteService = new PromoteService();
$allGameIs = $promoteService->getHistoryGameIds($loginPromote);
=======
$promoteService = new PromoteService();
$allGameIs = $promoteService->getHistoryGameIds($loginPromote);
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
if ($allGameIs && count($allGameIs) > 0) {
$map['_string'] .= ' and id in(' . implode(',', $allGameIs) . ')';
} else {
$map['_string'] .= '1=0';
}
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$data = M('game', 'tab_')->where($map)->order('sort desc,id desc')->page($page, $row)->select();
$count = M('game', 'tab_')->where($map)->count();
$records = [];
@ -1330,6 +1468,7 @@ class QueryController extends BaseController
$userRepository = new UserRepository();
$spendRepository = new SpendRepository();
<<<<<<< HEAD
$roleNumList = $userRepository->getCreateRoleCountByGame($params); //创角数
$userNumList = $userRepository->getCreateRoleUserCountByGame($params); //创角用户
$newUserNumList = $userRepository->getNewCreateRoleUserCountByGame($params); //新创角用户
@ -1346,6 +1485,24 @@ class QueryController extends BaseController
$spendGenericList = $spendRepository->getPayAmountGroupByGameAndType($params); //通用币充值
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByGameAndType($params); //绑定币充值
=======
$roleNumList = $userRepository->getCreateRoleCountByGame($params);//创角数
$userNumList = $userRepository->getCreateRoleUserCountByGame($params);//创角用户
$newUserNumList = $userRepository->getNewCreateRoleUserCountByGame($params);//新创角用户
$newDeviceNumList = $userRepository->getNewCreateRoleDeviceCountByGame($params);//新创角设备
$newIpNumList = $userRepository->getNewCreateRoleIpCountByGame($params);//新创角IP
$loginUserNumList = $userRepository->getLoginCountGroupByGame($params);//登录用户数
if ($this->canViewUserRecharge) {
$spendUserNumList = $spendRepository->getPayUserCountGroupByGame($params);//充值人数
$spendNumList = $spendRepository->getPayCountGroupByGame($params);//充值次数
$spendAllAmountList = $spendRepository->getPayAmountGroupByGameAndType($params);//充值总额
$params['pay_way'] = ['in', '1,2,3,4,5,6'];
$spendCashList = $spendRepository->getPayAmountGroupByGameAndType($params);//现金充值
$params['pay_way'] = 0;
$spendGenericList = $spendRepository->getPayAmountGroupByGameAndType($params);//通用币充值
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByGameAndType($params);//绑定币充值
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
foreach ($data as $list) {
$gameId = $list['id'];
@ -1375,6 +1532,7 @@ class QueryController extends BaseController
}
$params['all_data'] = 1;
$params['game_ids'] = $allGameIs;
<<<<<<< HEAD
$allData['role_num'] = $userRepository->getCreateRoleCountByGame($params); //创角数
$allData['user_num'] = $userRepository->getCreateRoleUserCountByGame($params); //创角用户
$allData['new_user_num'] = $userRepository->getNewCreateRoleUserCountByGame($params); //新创角用户
@ -1392,6 +1550,25 @@ class QueryController extends BaseController
$allData['spend_generic'] = null_to_0($spendRepository->getPayAmountByGameAndType($params)); //通用币充值
$params['pay_way'] = -1;
$allData['spend_binding'] = null_to_0($spendRepository->getPayAmountByGameAndType($params)); //绑定币充值
=======
$allData['role_num'] = $userRepository->getCreateRoleCountByGame($params);//创角数
$allData['user_num'] = $userRepository->getCreateRoleUserCountByGame($params);//创角用户
$allData['new_user_num'] = $userRepository->getNewCreateRoleUserCountByGame($params);//新创角用户
$allData['new_device_num'] = $userRepository->getNewCreateRoleDeviceCountByGame($params);//新创角设备
$allData['new_ip_num'] = $userRepository->getNewCreateRoleIpCountByGame($params);//新创角IP
$allData['login_user_num'] = $userRepository->getLoginCountGroupByGame($params);//登录用户数
if ($this->canViewUserRecharge) {
$allData['spend_user_num'] = $spendRepository->getPayUserCountByGame($params);//充值人数
$allData['spend_num'] = $spendRepository->getPayCountByGame($params);//充值次数
unset($params['pay_way']);
$allData['spend_all_amount'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//充值总额
$params['pay_way'] = ['in', '1,2,3,4,5,6'];
$allData['spend_cash'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//现金充值
$params['pay_way'] = 0;
$allData['spend_generic'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//通用币充值
$params['pay_way'] = -1;
$allData['spend_binding'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//绑定币充值
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$allData['spend_discount'] = '0.00';
$allData['spend_voucher'] = '0.00';
}
@ -1463,12 +1640,20 @@ class QueryController extends BaseController
$promote = $_REQUEST['promote_id'];
if (PID == $promote) {
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
} else {
$pids = get_prmoote_chlid_account($promote);
$pro_arr = array_column($pids, 'id');
$pro_arr[] = $promote;
$promote = implode(',', $pro_arr);
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
$game = M('apply', 'tab_')
@ -1575,8 +1760,12 @@ class QueryController extends BaseController
public function viewRole($p = 0)
{
$promoteId = D('User')->where('id = %d', I('get.id'))->getField('promote_id');
<<<<<<< HEAD
$permission = hasPromotePermission(PID, $promoteId); //是否有该推广员权限
$loginPromote = $this->getLoginPromote();
=======
$permission = hasPromotePermission(PID, $promoteId);//是否有该推广员权限
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
if ($permission === false) {
$this->error('无推广员权限');
@ -1621,7 +1810,11 @@ class QueryController extends BaseController
if (!empty($data)) {
foreach ($data as &$list) {
<<<<<<< HEAD
$list['user_account'] = getUserAccountOfPromote($list['user_account'], $loginPromote);
=======
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
}
@ -1696,11 +1889,16 @@ class QueryController extends BaseController
$roleLevelBegin = intval(I('role_level_begin', 0));
$roleLevelEnd = intval(I('role_level_end', 0));
$headmanPromoteId = I('headman_promote_id', 0);
<<<<<<< HEAD
$createTime = I('create_time', date('Y-m-d') . ' 至 ' . date('Y-m-d', time() - 7 * 24 * 3600));
=======
$createTime = I('create_time', date('Y-m-d') . ' 至 ' . date('Y-m-d', time()-7*24*3600));
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$lastSortName = trim(I('last_sort_name', ''));
$sortName = trim(I('sort_name', ''));
$sort = intval(I('sort', 1));
<<<<<<< HEAD
$loginPromote = $this->getLoginPromote();
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote, function () use ($loginPromote) {
@ -1709,6 +1907,16 @@ class QueryController extends BaseController
return $promoteService->getTopPromote($loginPromote);
} else {
return $loginPromote;
=======
$promote = $this->getLoginPromote();
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote, function() use ($promote) {
if ($promote['shift_over_apply'] == 1) {
$promoteService = new PromoteService();
return $promoteService->getTopPromote($promote);
} else {
return $promote;
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
});
@ -1728,8 +1936,12 @@ class QueryController extends BaseController
}
if ($roleName != '') {
$map['role_name'] = ['like', '%' . $roleName . '%'];
<<<<<<< HEAD
}
if ($roleId != '') {
=======
}if ($roleId != '') {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$map['role_id'] = $roleId;
}
if ($userAccount != '') {
@ -1826,13 +2038,33 @@ class QueryController extends BaseController
// var_dump($records);die();
foreach ($records as $key => $value) {
<<<<<<< HEAD
if ($records[$key]['create_time'] == 0) {
=======
//隐藏算法
$orderLen = strlen($value['user_account']);
$strLen = 3;
$hideChar = '';
if ($orderLen <= 8) {
$strLen = 2;
}
for ($i = 0; $i < $orderLen - $strLen * 2; $i++) {
$hideChar .= '*';
}
if($records[$key]['create_time'] == 0) {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$records[$key]['create_time'] = date('Y-m-d', $value['play_time']) . '<br>' . date('H:i:s', $value['play_time']);
} else {
$records[$key]['create_time'] = date('Y-m-d', $value['create_time']) . '<br>' . date('H:i:s', $value['create_time']);
}
<<<<<<< HEAD
$records[$key]['user_account'] = getUserAccountOfPromote($value['user_account'], $loginPromote);
=======
$records[$key]['user_account'] = substr($value['user_account'], 0, $strLen) . $hideChar . substr($value['user_account'], $orderLen - $strLen);
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$records[$key]['register_time'] = date('Y-m-d', $value['register_time']) . '<br>' . date('H:i:s', $value['register_time']);
$records[$key]['login_time'] = date('Y-m-d', $value['login_time']) . '<br>' . date('H:i:s', $value['login_time']);
@ -1858,7 +2090,11 @@ class QueryController extends BaseController
$this->assign('unique_user_count', $uniqueCountRow['user_count']);
$this->assign('unique_count', $uniqueCountRow['count']);
$this->assign('sort', $sort);
<<<<<<< HEAD
$this->assign('setdate', date('Y-m-d'));
=======
$this->assign('setdate', date('Y-m-d', $nowTime));
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$this->assign('games', $games);
$this->assign('records', $records);
$this->assign('pagination', $pagination);
@ -1893,7 +2129,11 @@ class QueryController extends BaseController
$nowTime = strtotime($nowTime);
$nowTimeEnd = $nowTime + 3600 * 24 - 1;
<<<<<<< HEAD
$loginPromote = $this->getLoginPromote();
=======
$promote = $this->getLoginPromote();
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
@ -2013,7 +2253,11 @@ class QueryController extends BaseController
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
$promotes = index_by_column('id', $promotes);
foreach ($records as &$list) {
<<<<<<< HEAD
$list['user_account'] = empty($list['user_account']) ? '--' : getUserAccountOfPromote($list['user_account'], $loginPromote);
=======
$list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']);
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name'];
$list['sdk_version'] = empty($list['sdk_version']) ? '--' : getSDKTypeName($list['sdk_version']);
$list['server_name'] = empty($list['server_name']) ? '--' : $list['server_name'];
@ -2097,7 +2341,11 @@ class QueryController extends BaseController
if ($id > 0) {
$promoteId = D('Spend')->where('id = %d', $id)->getField('promote_id');
<<<<<<< HEAD
$permission = hasPromotePermission(PID, $promoteId); //是否有该推广员权限
=======
$permission = hasPromotePermission(PID, $promoteId);//是否有该推广员权限
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
if ($permission) {
$map['id'] = $id;
@ -2223,7 +2471,11 @@ class QueryController extends BaseController
// $newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
$newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
$loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$rechargeCountList = [];
$rechargeUserCountList = [];
$rechargeAmountList = [];
@ -2438,7 +2690,11 @@ class QueryController extends BaseController
$record = [
'id' => $parent['id'],
'account' => $parent['account'],
<<<<<<< HEAD
'real_name' => hideRealName($parent['real_name']),
=======
'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**',
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
'level' => $parent['level'],
'game_name' => $game['game_name'],
'sdk_version_text' => $game['sdk_version_text'],
@ -2453,7 +2709,11 @@ class QueryController extends BaseController
$record = [
'id' => $id,
'account' => $promote['account'],
<<<<<<< HEAD
'real_name' => hideRealName($promote['real_name']),
=======
'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**',
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
'level' => $promote['level'],
'game_name' => $game['game_name'],
'sdk_version_text' => $game['sdk_version_text'],
@ -2490,7 +2750,10 @@ class QueryController extends BaseController
$roleLevelEnd = intval(I('level_end', 0));
$promoteId = I('promote_id', 0);
$isSelf = I('is_self', 0);
<<<<<<< HEAD
$loginPromote = $this->getLoginPromote();
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
if ($relationGameId != 0 || $sdkVersion != 0) {
$gameIds = gameSearch($relationGameId, $sdkVersion);
@ -2525,7 +2788,24 @@ class QueryController extends BaseController
$query = M('user_play_info', 'tab_')->where($map)->order('create_time desc');
list($records, $pagination, $count) = $this->paginate($query);
foreach ($records as $key => $value) {
<<<<<<< HEAD
$records[$key]['user_account'] = getUserAccountOfPromote($value['user_account'], $loginPromote);
=======
//订单隐藏算法
$orderLen = strlen($value['user_account']);
$strLen = 3;
$hideChar = '';
if ($orderLen <= 8) {
$strLen = 2;
}
for ($i = 0; $i < $orderLen - $strLen * 2; $i++) {
$hideChar .= '*';
}
$records[$key]['user_account'] = substr($value['user_account'], 0, $strLen) . $hideChar . substr($value['user_account'], $orderLen - $strLen);
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
$this->assign('records', $records);
@ -2583,8 +2863,12 @@ class QueryController extends BaseController
return M('server', 'tab_')->where($map)->getField('server_name');
}
<<<<<<< HEAD
public function iosDownLoadData()
{
=======
public function iosDownLoadData() {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
$row = intval(I('get.row', 10));
@ -2595,7 +2879,11 @@ class QueryController extends BaseController
$map = [];
if ($queryPromote['level'] == 4) {
$map['id'] = $queryPromote['id'];
<<<<<<< HEAD
} else {
=======
}else {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '%'];
}
$iostime = time();
@ -2636,11 +2924,16 @@ class QueryController extends BaseController
$map = [];
$map['tab_package_download_log.promote_id'] = ['in', $ids];
<<<<<<< HEAD
// $data = M('package_download_log','tab_')->where($map)->select();
=======
// $data = M('package_download_log','tab_')->where($map)->select();
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$listData = [];
$allUserMap['promote_id'] = ['in', $allids];
$allUserMap['device_type'] = 2;
$allUserMap['register_time'] = ['between', [$begTime, $endTime]];
<<<<<<< HEAD
$allTFMap['promote_id'] = ['in', $allids];
$allTFMap['type'] = 2;
$allTFMap['create_time'] = ['between', [$begTime, $endTime]];
@ -2648,6 +2941,15 @@ class QueryController extends BaseController
$allSuperMap['type'] = 3;
$allSuperMap['create_time'] = ['between', [$begTime, $endTime]];
$companyMap['promote_id'] = ['in', $allids];
=======
$allTFMap['promote_id'] = ['in', $allids];
$allTFMap['type'] = 2;
$allTFMap['create_time'] = ['between', [$begTime, $endTime]];
$allSuperMap['promote_id'] = ['in', $allids];
$allSuperMap['type'] = 3;
$allSuperMap['create_time'] = ['between', [$begTime, $endTime]];
$companyMap['promote_id'] = ['in', $allids];
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$companyMap['type'] = 1;
$companyMap['create_time'] = ['between', [$begTime, $endTime]];
$alliosMap['promote_id'] = ['in', $allids];
@ -2655,19 +2957,33 @@ class QueryController extends BaseController
$alliosMap['register_time'] = ['between', [$sunday, $iostime]];
$allUsersCounts = M('user', 'tab_')->where($allUserMap)->count();
$allIosCounts = M('user', 'tab_')->where($alliosMap)->count();
<<<<<<< HEAD
$allTFCounts = M('package_download_log', 'tab_')->where($allTFMap)->count();
$allSuperCounts = M('package_download_log', 'tab_')->where($allSuperMap)->count();
$allCompanyCounts = M('package_download_log', 'tab_')->where($companyMap)->count();
=======
$allTFCounts = M('package_download_log', 'tab_')->where($allTFMap)->count();
$allSuperCounts = M('package_download_log', 'tab_')->where($allSuperMap)->count();
$allCompanyCounts = M('package_download_log', 'tab_')->where($companyMap)->count();
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
foreach ($ids as $key => $id) {
$promote1 = M('promote', 'tab_')->field('account, level, parent_id, chain')->where(['id' => $id])->select();
$promote = $promote1[0];
$chain = $promote['chain'];
$listData[$key]['promote_id'] = $id;
<<<<<<< HEAD
if ($id == PID) {
$listData[$key]['account'] = $promote['account'] . '<span style="color:blue;">' . '[' . '自己' . ']' . '</span>';
} else {
=======
if($id == PID) {
$listData[$key]['account'] = $promote['account'].'<span style="color:blue;">'.'['.'自己'.']'.'</span>';
}else {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$listData[$key]['account'] = $promote['account'];
}
$iosTimeMap['promote_id'] = $id;
@ -2690,23 +3006,37 @@ class QueryController extends BaseController
$usersCounts = M('user', 'tab_')->where($map10)->count();
$listData[$key]['userscounts'] = intval($usersCounts);
$listData[$key]['tfcounts'] = intval($tfCounts);
<<<<<<< HEAD
$listData[$key]['tfpercent'] = number_format((intval($tfCounts) / intval($usersCounts)), 2, '.', '') * 100;
if (intval($usersCounts) == 0) {
$listData[$key]['tfpercent'] = 0;
}
if ($promote['level'] == 1) {
=======
$listData[$key]['tfpercent'] = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100;
if (intval($usersCounts) == 0) {
$listData[$key]['tfpercent'] = 0;
}
if($promote['level'] == 1) {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$listData[$key]['belongs_president'] = $promote['account'];
$listData[$key]['belongs_department'] = "无所属部门长";
$listData[$key]['belongs_group'] = "无所属组长";
}
if ($promote['level'] == 2) {
<<<<<<< HEAD
$parentPromote = M('promote', 'tab_')->field('account')->where(['id' => $promote['parent_id']])->select();
=======
$parentPromote = M('promote', 'tab_')->field('account')->where(['id'=>$promote['parent_id']])->select();
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$listData[$key]['belongs_president'] = $parentPromote[0]['account'];
$listData[$key]['belongs_department'] = $promote['account'];
$listData[$key]['belongs_group'] = "无所属组长";
}
if ($promote['level'] == 3) {
<<<<<<< HEAD
$chainArr = explode('/', $chain);
$presidentAccount = M('promote', 'tab_')->where(['id' => $chainArr[1]])->getField('account');
$departmentAccount = M('promote', 'tab_')->where(['id' => $chainArr[2]])->getField('account');
@ -2726,6 +3056,27 @@ class QueryController extends BaseController
}
}
$totalpercent = number_format($allTFCounts / $allUsersCounts, 2, '.', '') * 100;
=======
$chainArr = explode('/', $chain);
$presidentAccount = M('promote', 'tab_')->where(['id' => $chainArr[1]])->getField('account');
$departmentAccount = M('promote', 'tab_')->where(['id' => $chainArr[2]])->getField('account');
$listData[$key]['belongs_president'] = $presidentAccount;
$listData[$key]['belongs_department'] = $departmentAccount;
$listData[$key]['belongs_group'] = $promote['account'];
}
if ($promote['level'] == 4) {
$chainArr = explode('/', $chain);
$presidentAccount = M('promote', 'tab_')->where(['id' => $chainArr[1]])->getField('account');
$departmentAccount = M('promote', 'tab_')->where(['id' => $chainArr[2]])->getField('account');
$groupAccount = M('promote', 'tab_')->where(['id' => $chainArr[3]])->getField('account');
$listData[$key]['belongs_president'] = $presidentAccount;
$listData[$key]['belongs_department'] = $departmentAccount;
$listData[$key]['belongs_group'] = $groupAccount;
}
}
$totalpercent = number_format($allTFCounts/$allUsersCounts,2,'.','') * 100;
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
if ($allUsersCounts == 0) {
$totalpercent = '0';
}
@ -2739,6 +3090,7 @@ class QueryController extends BaseController
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$this->assign('allIosCounts', $allIosCounts);
<<<<<<< HEAD
$this->display();
}
@ -2779,12 +3131,56 @@ class QueryController extends BaseController
$query = M('package_download_log', 'tab_')->field('id,game_id,user_id,type,create_time')->where($map);
list($packAges, $pagination, $count) = $this->paginate($query);
foreach ($packAges as $key => $package) {
=======
$this->assign('tfpercent', $tfpercent);
$this->display();
}
public function iosDownLoadDetail() {
$promote_id = $_REQUEST['promote_id'];
$belongs_president = $_REQUEST['belongs_president'];
$belongs_department = $_REQUEST['belongs_department'];
$belongs_group = $_REQUEST['belongs_group'];
// $createTime = I('create_time', '');
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
$map['create_time'] = ['between', [$begTime, $endTime]];
$tfMap['create_time'] = ['between', [$begTime, $endTime]];
$superMap['create_time'] = ['between', [$begTime, $endTime]];
$companyMap['create_time'] = ['between', [$begTime, $endTime]];
if(!empty(I('user_account'))) {
$user_id = M('user', 'tab_')->where(['account'=>I('user_account')])->getField('id');
$map['user_id'] = $user_id;
$tfMap['user_id'] = $user_id;
$superMap['user_id'] = $user_id;
$companyMap['user_id'] = $user_id;
}
if(!empty(I('type'))) {
$map['type'] = I('type');
}
$map['promote_id'] = $promote_id;
//$packAges = M('package_download_log', 'tab_')->field('id,game_id,user_id,type,create_time')->where(['promote_id'=>$promote_id])->select();
$query = M('package_download_log', 'tab_')->field('id,game_id,user_id,type,create_time')->where($map);
list($packAges, $pagination, $count) = $this->paginate($query);
foreach ($packAges as $key =>$package) {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$user_id = $package['user_id'];
$usersAccount = M('user', 'tab_')->where(['id' => $user_id])->getField('account');
$packAges[$key]['account'] = $usersAccount;
if ($package['type'] == 1) {
$packAges[$key]['typename'] = "企业签下载";
}
<<<<<<< HEAD
if ($package['type'] == 2) {
$packAges[$key]['typename'] = "TF下载";
}
@ -2793,20 +3189,42 @@ class QueryController extends BaseController
}
$packAges[$key]['create_time'] = date('Y-m-d H:i:s', $package['create_time']);
$promoteInfo = M('promote', 'tab_')->field('account')->where(['id' => $promote_id])->find();
=======
if($package['type'] == 2) {
$packAges[$key]['typename'] = "TF下载";
}
if($package['type'] == 3) {
$packAges[$key]['typename'] = "超级签下载";
}
$packAges[$key]['create_time'] = date('Y-m-d H:i:s', $package['create_time']);
$promoteInfo = M('promote', 'tab_')->field('account')->where(['id'=>$promote_id])->find();
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$packAges[$key]['promote_account'] = $promoteInfo['account'];
$packAges[$key]['belongs_president'] = $belongs_president;
$packAges[$key]['belongs_department'] = $belongs_department;
$packAges[$key]['belongs_group'] = $belongs_group;
<<<<<<< HEAD
$packAges[$key]['account'] = getUserAccountOfPromote($packAges[$key]['account'], $loginPromote);
}
$tfMap['promote_id'] = $promote_id;
$tfMap['type'] = 2;
=======
$packAges[$key]['account'] = encryption($packAges[$key]['account']);
}
$tfMap['promote_id'] = $promote_id;
$tfMap['type'] = 2;
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$TFCounts = M('package_download_log', 'tab_')->where($tfMap)->count();
$superMap['promote_id'] = $promote_id;
$superMap['type'] = 3;
$superCounts = M('package_download_log', 'tab_')->where($superMap)->count();
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$companyMap['promote_id'] = $promote_id;
$companyMap['type'] = 1;
$companyCounts = M('package_download_log', 'tab_')->where($companyMap)->count();
@ -2827,8 +3245,13 @@ class QueryController extends BaseController
public function multisort($records, $column, $type = 'asc')
{
$length = count($records);
<<<<<<< HEAD
for ($i = 0; $i < $length; $i++) {
for ($j = $i + 1; $j < $length; $j++) {
=======
for ($i = 0; $i < $length; $i ++) {
for ($j = $i + 1; $j < $length; $j ++) {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
if ($type == 'asc') {
if ($records[$i][$column] > $records[$j][$column]) {
$temp = $records[$i];
@ -2851,7 +3274,11 @@ class QueryController extends BaseController
{
$baseGameId = I('game_id', 0);
$deviceType = I('device_type', '');
<<<<<<< HEAD
$timeRange = I('time_range', date('Y-m-d', strtotime('-7 day')) . ' 至 ' . date('Y-m-d'));
=======
$timeRange = I('time_range', date('Y-m-d',strtotime('-7 day')) . ' 至 ' . date('Y-m-d'));
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$lastSortName = trim(I('last_sort_name', ''));
$sortName = trim(I('sort_name', ''));
$sort = intval(I('sort', 1));
@ -2877,7 +3304,11 @@ class QueryController extends BaseController
$orderColumn = $sortName;
$orderType = ($sort == 1) ? 'desc' : 'asc';
}
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$status = true;
$data = false;
$error = '';
@ -2887,7 +3318,11 @@ class QueryController extends BaseController
}
$startTime = strtotime($start . ' 00:00:00');
$endTime = strtotime($end . ' 23:59:59') + 1;
<<<<<<< HEAD
if ((($endTime - $startTime) / (24 * 3600)) > 31) {
=======
if ((($endTime - $startTime)/(24*3600)) > 31) {
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$error = '时间间隔不能超过31天';
$status = false;
}
@ -2916,7 +3351,11 @@ class QueryController extends BaseController
'game_ids' => $gameIds,
]
]);
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$result = (string)$response->getBody();
$result = json_decode($result, true);
if (!$result) {
@ -2926,14 +3365,26 @@ class QueryController extends BaseController
$dayList = [1, 2, 3, 4, 5, 6, 7, 15, 30];
$gameName = $deviceType ? get_game_name($searchGameId) : $baseGame['name'];
$promoteName = '全部';
<<<<<<< HEAD
=======
if ($promoteId) {
$promoteName = get_promote_account($promoteId);
}
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
foreach ($data as $key => $item) {
$item['promote_name'] = $promoteName;
$item['game_name'] = $gameName;
foreach ($dayList as $day) {
if ($item['register_count'] > 0) {
<<<<<<< HEAD
$item['retention_day' . $day] = round($item['retention_day' . $day] / $item['register_count'], 4) * 100;
} else {
$item['retention_day' . $day] = '--';
=======
$item['retention_day'. $day] = round($item['retention_day'. $day]/$item['register_count'], 4)*100;
} else {
$item['retention_day'. $day] = '--';
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
}
}
$data[$key] = $item;
@ -2961,7 +3412,11 @@ class QueryController extends BaseController
{
$gameId = I('game_id', 0);
$serverId = I('server_id', '');
<<<<<<< HEAD
$timeRange = I('time_range', date('Y-m-d', strtotime('-7 day')) . ' 至 ' . date('Y-m-d'));
=======
$timeRange = I('time_range', date('Y-m-d',strtotime('-7 day')) . ' 至 ' . date('Y-m-d'));
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$lastSortName = trim(I('last_sort_name', ''));
$sortName = trim(I('sort_name', ''));
$sort = intval(I('sort', 1));
@ -2980,7 +3435,11 @@ class QueryController extends BaseController
$start = $timeRangeRow[0];
$end = $timeRangeRow[0];
}
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$spendMap = ['pay_status' => 1, '_string' => '1=1'];
$roleMap = ['_string' => '1=1'];
$map = [];
@ -2988,7 +3447,11 @@ class QueryController extends BaseController
$betweenTime = [strtotime($start . ' 00:00:00'), strtotime($end . ' 23:59:59')];
$spendMap['pay_time'] = ['between', $betweenTime];
$roleMap['create_time'] = ['between', $betweenTime];
<<<<<<< HEAD
=======
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
$promoteService = new PromoteService();
$subInSql = $promoteService->subInSql($queryPromote);

@ -348,7 +348,11 @@ class IndexController extends BaseController {
//生成二维码图片
//echo $_SERVER['REQUEST_URI'];
ob_clean();
<<<<<<< HEAD
$object = new \QRcode(null);
=======
$object = new \QRcode();
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
echo $object->png($url, false, $errorCorrectionLevel, $matrixPointSize, 2);
}

@ -1,7 +1,12 @@
{
"require": {
"rodneyrehm/plist": "^2.0",
<<<<<<< HEAD
"guzzlehttp/guzzle": "~6.0"
=======
"guzzlehttp/guzzle": "~6.0",
"obs/esdk-obs-php": "3.22.6"
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
},
"repositories": {
"packagist": {

@ -117,9 +117,15 @@
<div class="down-app-inner">
<img src="../Public/Home/images/Poster/poster.png">
<a href="itms-services://?action=download-manifest&url=https://m.wmtxkj.com/manifest.plist" class="down-app-btn jq-dwn-btn">立即下载</a>
<<<<<<< HEAD
<a href="#" class="down-app-index">进入网站<i class="iconfont icongengduo" style="margin-left: -0.3rem;font-size: 0.8rem;"></i></a>
<?php if (stripos($_SERVER['HTTP_HOST'],'dl.wmtxkj.com') !== false) :?>
<!-- <a target="cyxyv" class="down-app-img" href="https://v.yunaq.com/certificate?domain=dl.wmtxkj.com&from=label&code=90030"><img src="https://aqyzmedia.yunaq.com/labels/label_lg_90030.png" style="position: initial;width: 68px;margin-top: 10px;"></a>-->
=======
<a href="http://dl.wmtxkj.com/media.php" class="down-app-index">进入网站<i class="iconfont icongengduo" style="margin-left: -0.3rem;font-size: 0.8rem;"></i></a>
<?php if (stripos($_SERVER['HTTP_HOST'],'dl.wmtxkj.com') !== false) :?>
<a target="cyxyv" class="down-app-img" href="https://v.yunaq.com/certificate?domain=dl.wmtxkj.com&from=label&code=90030"><img src="https://aqyzmedia.yunaq.com/labels/label_lg_90030.png" style="position: initial;width: 68px;margin-top: 10px;"></a>
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a
<?php endif ;?>
</div>
</section>
@ -155,4 +161,8 @@
}
</script>
</body>
<<<<<<< HEAD
</html>
=======
</html>
>>>>>>> a2bb9f000757e13fa3ca589d6763340af1fcf41a

Loading…
Cancel
Save