Merge branch 'feature/IOSdata' of wmtx/platform into release

IOS数据量增加自己优化
master
廖金灵 5 years ago committed by Gogs
commit 3effc7d9b6

@ -373,8 +373,7 @@ class ConsoleController extends Think {
$deposit = M('deposit', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,create_time as pay_time,2 as record_type')->where(['pay_status'=>1])->select(false); $deposit = M('deposit', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,create_time as pay_time,2 as record_type')->where(['pay_status'=>1])->select(false);
// $agent = M('agent', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,real_amount as pay_amount,create_time as pay_time,3 as record_type')->where(['pay_status'=>1])->select(false); // $agent = M('agent', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,real_amount as pay_amount,create_time as pay_time,3 as record_type')->where(['pay_status'=>1])->select(false);
// $spend = M('spend', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,pay_time,1 as record_type')->where(['pay_status' => 1,'pay_way'=>0])->select(false); // $spend = M('spend', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,pay_time,1 as record_type')->where(['pay_status' => 1,'pay_way'=>0])->select(false);
$query = M('spend', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,pay_time,record_type')->where(['pay_status' => 1,'pay_way'=>0])->union($deposit,'pay_time')->select(false); $query = M('spend', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,pay_time,1 as record_type')->where(['pay_status' => 1,'pay_way'=>0])->union($deposit,'pay_time')->select(false);
$model = new \Think\Model(); $model = new \Think\Model();
$datas = $model->table('(' . $query . ') a ')->order('pay_time asc')->select(); $datas = $model->table('(' . $query . ') a ')->order('pay_time asc')->select();
foreach ($datas as $key => $data) { foreach ($datas as $key => $data) {

@ -249,7 +249,11 @@ class DownloadController extends BaseController {
$levelPromote = $this->getLevelPromote(); $levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote); $queryPromote = $this->getQueryPromote($levelPromote);
$map = []; $map = [];
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%']; if ($queryPromote['level'] == 4) {
$map['id'] = $queryPromote['id'];
}else {
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
}
$createTime = I('create_time', ''); $createTime = I('create_time', '');
if ($createTime != '') { if ($createTime != '') {
$createTimeRow = explode(' 至 ', $createTime); $createTimeRow = explode(' 至 ', $createTime);
@ -2349,13 +2353,21 @@ public function iosDetailExcelInfo($id,$map) {
); );
$pid = $map['pid']; $pid = $map['pid'];
unset($map['pid']); unset($map['pid']);
$map1['chain'] = $map['chain']; if (!empty($map['chain'])) {
$map1['chain'] = $map['chain'];
}
if (!empty($map['create_time'])) { if (!empty($map['create_time'])) {
$map2['create_time'] = $map['create_time']; $map1['create_time'] = $map['create_time'];
$tfMap['create_time'] = $map['create_time']; $tfMap['create_time'] = $map['create_time'];
$companyMap['create_time'] = $map['create_time']; $companyMap['create_time'] = $map['create_time'];
$superMap['create_time'] = $map['create_time']; $superMap['create_time'] = $map['create_time'];
} }
if (!empty($map['id'])) {
$map1['id'] = $map['id'];
$tfMap['create_time'] = $map['craete_time'];
$superMap['create_time'] = $map['craete_time'];
$companyMap['create_time'] = $map['craete_time'];
}
$rs = M('promote', 'tab_')->field(['id'])->where($map1)->select(); $rs = M('promote', 'tab_')->field(['id'])->where($map1)->select();
$allids = array_column($rs, 'id'); $allids = array_column($rs, 'id');
array_push($allids, PID); array_push($allids, PID);

@ -2499,7 +2499,11 @@ class QueryController extends BaseController
$queryPromote = $this->getQueryPromote($levelPromote); $queryPromote = $this->getQueryPromote($levelPromote);
$loginPromote = $this->getLoginPromote(); $loginPromote = $this->getLoginPromote();
$map = []; $map = [];
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%']; if ($queryPromote['level'] == 4) {
$map['id'] = $queryPromote['id'];
}else {
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
}
$createTime = I('create_time', ''); $createTime = I('create_time', '');
if ($createTime != '') { if ($createTime != '') {
$createTimeRow = explode(' 至 ', $createTime); $createTimeRow = explode(' 至 ', $createTime);

Loading…
Cancel
Save