增加易宝支付

master
liuweiwen 5 years ago
parent c6e1493035
commit 3b415976eb

@ -314,9 +314,9 @@ function get_pay_way($id=null)
break;
case 15:
return "双乾支付-快捷";
break;
case 17:
return "易宝支付";
break;
}
}

@ -22,7 +22,8 @@ class FinancialSummaryController extends AdminController
"sqkj_count"=>"双乾-快捷",
"wx_count"=>"微信",
"zfb_count"=>"支付宝",
"kj_count"=>"快捷"
"kj_count"=>"快捷",
"ybzf_count"=>"易宝支付",
);
public function _initialize()
{
@ -31,6 +32,9 @@ class FinancialSummaryController extends AdminController
}
public function index($p=1)
{
$this->beginThismonth = mktime(0,0,0,date('m'),1,date('Y'));
$this->endThismonth = mktime(0,0,0,date('m')+1,1,date('Y'))-1;
dd($this->beginThismonth, $this->endThismonth);
if(!array_key_exists("year",$_REQUEST) || !array_key_exists("type",$_REQUEST)){
$this->redirect(ACTION_NAME, array('year' => date('Y',time()),"type"=>2));
}

@ -334,7 +334,8 @@ class FinancialSummarySetController extends \Think\Controller
"zfb"=>0,
"gfzfb"=>0,
"sqzfb"=>0,
"sqkj"=>0
"sqkj"=>0,
"ybzf"=>0,
];
$this->getSpendPayWay($moneyarry);
$this->getGameSupersignPayWay($moneyarry);
@ -377,13 +378,24 @@ class FinancialSummarySetController extends \Think\Controller
"type"=>5,"sort"=>3,
"sum_money"=>number_format($moneyarry['sqkj']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'ybzf_count',
"type"=>4,"sort"=>5,
"sum_money"=>number_format($moneyarry['ybzf']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'ybzf_count',
"type"=>5,"sort"=>4,
"sum_money"=>number_format($moneyarry['ybzf']/100, 2, '.', '')
);
echo 'success';
}
//获取spend表
protected function getSpendPayWay(&$moneyarry){
$map = array(
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"pay_status"=>1,
"pay_way"=>array("IN","1,2,3,9,15")
"pay_way"=>array("IN","1,2,3,9,15,17")
);
$dbres=$this->SpendModel
->field("
@ -391,7 +403,8 @@ class FinancialSummarySetController extends \Think\Controller
IFNULL(SUM(CASE WHEN pay_way = 3 THEN pay_amount ELSE 0 END),0) as wxapp_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfbgf_count,
IFNULL(SUM(CASE WHEN pay_way = 9 THEN pay_amount ELSE 0 END),0) as zfbsq_count,
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count,
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
")
->where($map)
->find();
@ -399,6 +412,7 @@ class FinancialSummarySetController extends \Think\Controller
$moneyarry['gfzfb'] += $dbres['zfbgf_count']*100;
$moneyarry['sqzfb'] += $dbres['zfbsq_count']*100;
$moneyarry['sqkj'] += $dbres['kjsq_count']*100;
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
}
//获取超级签购买
protected function getGameSupersignPayWay(&$moneyarry)
@ -410,12 +424,14 @@ class FinancialSummarySetController extends \Think\Controller
$dbres=$this->GameSupersignModel
->field("
IFNULL(SUM(CASE WHEN pay_way = 2 THEN pay_price ELSE 0 END),0) as wx_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_price ELSE 0 END),0) as zfb_count
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_price ELSE 0 END),0) as zfb_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_price ELSE 0 END),0) as ybzf_count
")
->where($map)
->find();
$moneyarry['wx'] += $dbres['wx_count']*100;
$moneyarry['gfzfb'] += $dbres['zfb_count']*100;
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
}
//玩家购买平台币
protected function getDepositPayWay(&$moneyarry)
@ -423,7 +439,7 @@ class FinancialSummarySetController extends \Think\Controller
$map = array(
"create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"pay_status"=>1,
"pay_way"=>array("IN","1,2,3,9,15")
"pay_way"=>array("IN","1,2,3,9,15,17")
);
$dbres=$this->DepositModel
->field("
@ -431,7 +447,8 @@ class FinancialSummarySetController extends \Think\Controller
IFNULL(SUM(CASE WHEN pay_way = 3 THEN pay_amount ELSE 0 END),0) as wxapp_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfbgf_count,
IFNULL(SUM(CASE WHEN pay_way = 9 THEN pay_amount ELSE 0 END),0) as zfbsq_count,
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count,
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
")
->where($map)
->find();
@ -439,6 +456,7 @@ class FinancialSummarySetController extends \Think\Controller
$moneyarry['gfzfb'] += $dbres['zfbgf_count']*100;
$moneyarry['sqzfb'] += $dbres['zfbsq_count']*100;
$moneyarry['sqkj'] += $dbres['kjsq_count']*100;
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
}
//会长充值平台币
protected function getCoinPayOrderPayWay(&$moneyarry)
@ -450,12 +468,14 @@ class FinancialSummarySetController extends \Think\Controller
$dbres= $this->CoinPayOrderModel
->field("
IFNULL(SUM(CASE WHEN pay_way = 2 THEN pay_amount ELSE 0 END),0) as wx_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfb_count
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfb_count,
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
")
->where($map)
->find();
$moneyarry['wx'] += $dbres['wx_count']*100;
$moneyarry['gfzfb'] += $dbres['zfb_count']*100;
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
}
public function addDb()
{

@ -1,5 +1,6 @@
<?php
use Admin\FinancialSummarySetController;
//use Admin\FinancialSummarySetController;
namespace Admin\Controller;
/**

@ -124,7 +124,7 @@
<div class="input-list input-list-spend search_label_rehab">
<select id="pay_way_id" name="pay_way" class="select_gallery" style="width:120px;">
<option value="">充值方式</option>
<volist name=":all_pay_way(1)" id="vo">
<volist name=":all_pay_way_other(1)" id="vo">
<option value="{$vo.key}">{$vo.value}</option>
</volist>
</select>

@ -147,6 +147,7 @@
<option value="15">双乾支付-快捷</option>
<option value="0">平台币</option>
<option value="-1">绑币</option>
<option value="17">易宝支付</option>
</select>
</td>
</tr>

@ -86,6 +86,7 @@
<option value="15" <if condition="$_GET['pay_way'] eq '15'">selected</if>>双乾支付-快捷</option>
<option value="0" <if condition="$_GET['pay_way'] eq '0'">selected</if>>平台币</option>
<option value="-1" <if condition="$_GET['pay_way'] eq '-1'">selected</if>>绑币</option>
<option value="-1" <if condition="$_GET['pay_way'] eq '17'">selected</if>>易宝支付</option>
</select>
</div>

Loading…
Cancel
Save