Merge branch 'dev_zyx' into dev

master
zhengchanglong 5 years ago
commit 2c80186025

@ -17,11 +17,13 @@ class SpendCountSetController extends \Think\Controller
public function _initialize(){ public function _initialize(){
//初始化 //初始化
$this->beginThismonth = mktime(0,0,0,date('m')-1,1,date('Y')); $this->beginThismonth = mktime(0,0,0,date('m')-1,1,date('Y'));
$this->endThismonth = mktime(0,0,0,date('m')-1,date('t'),date('Y'))-1; $this->endThismonth = mktime(0,0,0,date('m'),1,date('Y'))-1;
$this->date = date('Y')."-".((date('m')-1) > 9 ? (date('m')-1) : "0".(date('m')-1)); $this->date = date('Y')."-".((date('m')-1) > 9 ? (date('m')-1) : "0".(date('m')-1));
$this->nowdata =time(); $this->nowdata =time();
$this->model =M("spend_count",'tab_'); $this->model =M("spend_count",'tab_');
$this->usermodel =M("spend_user_count",'tab_'); $this->usermodel =M("spend_user_count",'tab_');
$this->monthmodel =M("spend_month_count",'tab_');
} }
/** /**
* TODO:仅供测试,测试结束后删除 * TODO:仅供测试,测试结束后删除
@ -36,9 +38,28 @@ class SpendCountSetController extends \Think\Controller
$tarry = explode('-',$month); $tarry = explode('-',$month);
$this->beginThismonth=mktime(0,0,0,$tarry[1],1,$tarry[0]); $this->beginThismonth=mktime(0,0,0,$tarry[1],1,$tarry[0]);
$this->endThismonth=mktime(0,0,0,$tarry[1]-0+1,1,$tarry[0])-1; $this->endThismonth=mktime(0,0,0,$tarry[1]-0+1,1,$tarry[0])-1;
$this->reCount();
$this->setSpendCount(); $this->setSpendCount();
} }
/**
* 强制重新聚合
*/
public function reCount()
{
$recount = I("recount");
if(empty($recount) || $recount != 1){return ;}
# code...
//清理之前的聚合
$temp =array(
"count_date"=>$this->date
);
$this->model->where($temp)->delete();
$this->usermodel->where($temp)->delete();
$this->monthmodel->where($temp)->delete();
echo "重置成功执行重新生成:";
}
/** /**
* 每个月的统计接口 * 每个月的统计接口
@ -609,6 +630,7 @@ class SpendCountSetController extends \Think\Controller
$add = M("provide","tab_")->field("sum(amount) amount")->where($map)->find()['amount']; $add = M("provide","tab_")->field("sum(amount) amount")->where($map)->find()['amount'];
$add || $add=0; $add || $add=0;
$jq = M("deduct_bind_record","tab_")->field("sum(quantity) quantity")->where(array( $jq = M("deduct_bind_record","tab_")->field("sum(quantity) quantity")->where(array(
"create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)) "create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth))
))->find()['quantity']; ))->find()['quantity'];

@ -131,7 +131,7 @@
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th> <th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充消耗<span class="tooltiptext"><span style="margin-left: -10px">绑币消费所产生的流水(游戏订单-游戏充值-绑定币充值)</span></span></div></th> <th ><div class="tooltip">内充消耗<span class="tooltiptext"><span style="margin-left: -10px">绑币消费所产生的流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th> <th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>

@ -25,6 +25,47 @@
height:26px;line-height:26px;font-size:12px; height:26px;line-height:26px;font-size:12px;
} }
.select2-results__option[aria-selected] {font-size:12px;} .select2-results__option[aria-selected] {font-size:12px;}
.tooltip {
position: relative;
display: inline-block;
color: #056dae;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250%;
background-color: #fff;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 80%;
left: 0;
margin-left: -70%;
border: #000 solid 1px;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: black transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
color: #000;
visibility: visible;
line-height: 20px;
}
</style> </style>
@ -69,13 +110,13 @@
<tr> <tr>
<th >组长渠道</th> <th >组长渠道</th>
<th>游戏现金流水</th> <th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th >平台币流水</th> <th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th >内充发放</th> <th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th >总流水</th> <th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th >操作</th> <th >操作</th>

@ -25,6 +25,46 @@
height:26px;line-height:26px;font-size:12px; height:26px;line-height:26px;font-size:12px;
} }
.select2-results__option[aria-selected] {font-size:12px;} .select2-results__option[aria-selected] {font-size:12px;}
.tooltip {
position: relative;
display: inline-block;
color: #056dae;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250%;
background-color: #fff;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 80%;
left: 0;
margin-left: -70%;
border: #000 solid 1px;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: black transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
color: #000;
visibility: visible;
line-height: 20px;
}
</style> </style>
@ -61,13 +101,13 @@
<tr> <tr>
<th >推广员渠道</th> <th >推广员渠道</th>
<th>游戏现金流水</th> <th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th >平台币流水</th> <th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th >内充发放</th> <th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th >总流水</th> <th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>
<th >操作</th> <th >操作</th>

@ -115,7 +115,7 @@
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th> <th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会(平台币订单-后台发放(推广员))的平台币</span></span></th> <th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th> <th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>

@ -135,7 +135,7 @@
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th> <th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充流水<span class="tooltiptext"><span style="margin-left: -10px">管理后台下发的所有平台币,绑定币流水(平台币订单-后台发放(玩家/推广员),绑币订单-后台发放(玩家),平台币回收与绑币回收需要进行扣除</span></span></div></th> <th ><div class="tooltip">内充流水<span class="tooltiptext"><span style="margin-left: -10px">管理后台下发的所有平台币,绑定币流水(平台币订单-后台发放(玩家/推广员),绑币订单-后台发放(玩家),平台币回收与绑币回收需要进行扣除</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th> <th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">现金流水+平台币流水+内充流水</span></span></div></th>

Loading…
Cancel
Save