Merge branch 'feature/group_type' of 47.111.118.107:wmtx/platform into dev

master
chenzhi 5 years ago
commit bb7e1c269c

@ -63,11 +63,18 @@ class FinancePromoteController extends AdminController
//判断公司
$gfidlag = true;
$gfgs = true;
$nwtflag = true;
if (isset($_REQUEST['company_id'])) {
if($_REQUEST['company_id']!=0){
$gfgs = false;
}
}
//判断是否是内团 内团才有官方
if(isset($_REQUEST['company_belong'])){
if($_REQUEST['company_belong']!=0){
$nwtflag = false;
}
}
if (isset($_REQUEST['promote_id'])) {
if($_REQUEST['promote_id'] == 0){
$gfidlag = true;
@ -75,28 +82,26 @@ class FinancePromoteController extends AdminController
$gfidlag =false;
}
}
if($gfidlag && $gfgs){
// dd($gfidlag && $gfgs && $nwtflag);
if($gfidlag && $gfgs && $nwtflag){
//计算官方渠道
unset($_REQUEST['company_id']);
unset($_REQUEST['company_belong']);
$_REQUEST['promote_id'] = 0;
$gfcash = self::getJoinPromoteData([],$istimeselect);
$senddata[0] = $gfcash[0];
}
if(!empty($senddata)){
if(array_key_exists(0,$senddata) || $_REQUEST['promote_id']==0){
if (empty($_REQUEST['company_id'])) {
$pmap['status']=1;
if($istimeselect){
$pmap['create_time'] = $istimeselect;
}
$admininside = M("provide_user p","tab_")->field("sum(amount) amount")->where($pmap)->find();
if($admininside['amount'] >0){
$senddata[0]['inside_cash_count']= $admininside['amount'];
}
}
$pmap['status']=1;
if($istimeselect){
$pmap['create_time'] = $istimeselect;
}
$admininside = M("provide_user p","tab_")->field("sum(amount) amount")->where($pmap)->find();
if($admininside['amount'] >0){
$senddata[0]['inside_cash_count']= $admininside['amount'];
}
}
$data = [];
$count =array(
"cash_count"=>0,
@ -174,6 +179,7 @@ class FinancePromoteController extends AdminController
private function getJoinPromoteData($map,$istimeselect,$type="spend")
{
// setPowerPromoteIds($map,"s.promote_id");
//推广员相关检索
if (isset($_REQUEST['promote_id'])) {
if ($_REQUEST['promote_id'] == 0) {
$map['s.promote_id'] = 0;
@ -188,6 +194,11 @@ class FinancePromoteController extends AdminController
$map['promote.company_id'] = $_REQUEST['company_id'];
}
if (isset($_REQUEST['company_belong'])) {
$map['promote.company_belong'] = $_REQUEST['company_belong'];
}
if($type == "spend"){
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {

@ -109,6 +109,15 @@
<option value="UC" <?php if ($_POST['promote_id'] == 'UC'):?>selected<?php endif;?>>UC用户</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="company_belong" name="company_belong" class="select_gallery">
<option value="">请选择团体类型</option>
<option value="0" <?php echo I('company_belong') === 0 ? "selected" : ''?>>内团</option>
<option value="1" <?php echo I('company_belong') == 1 ? "selected" : ''?>>外团</option>
</select>
</div>
<div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}"
placeholder="开始时间" />

Loading…
Cancel
Save