|
|
@ -15,9 +15,9 @@ class PayMerchantController extends ThinkController
|
|
|
|
const WAY_EXPRESS = 4;
|
|
|
|
const WAY_EXPRESS = 4;
|
|
|
|
|
|
|
|
|
|
|
|
public function index($p = 0) {
|
|
|
|
public function index($p = 0) {
|
|
|
|
// if(!array_key_exists("timestart",$_REQUEST)){
|
|
|
|
if(!array_key_exists("timestart",$_REQUEST)){
|
|
|
|
// $this->redirect(ACTION_NAME, array('timestart' => date('Y-m-d',strtotime('-30 day')),"timeend"=>date('Y-m-d')));
|
|
|
|
$this->redirect(ACTION_NAME, array('timestart' => date('Y-m-d',strtotime('-30 day')),"timeend"=>date('Y-m-d')));
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
$page = intval($p);
|
|
|
|
$page = intval($p);
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
$arraypage = $page;
|
|
|
|
$arraypage = $page;
|
|
|
@ -156,7 +156,7 @@ class PayMerchantController extends ThinkController
|
|
|
|
->group("merchant_id,merchant_way")
|
|
|
|
->group("merchant_id,merchant_way")
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// dump($data);die();
|
|
|
|
$count = M()->table("({$sql})a")
|
|
|
|
$count = M()->table("({$sql})a")
|
|
|
|
->field("merchant_id")
|
|
|
|
->field("merchant_id")
|
|
|
|
->where("name is not null and merchant_way !=0")
|
|
|
|
->where("name is not null and merchant_way !=0")
|
|
|
@ -187,7 +187,7 @@ class PayMerchantController extends ThinkController
|
|
|
|
$sum['offcial_amount'] = round ($sum['offcial_amount'],2);
|
|
|
|
$sum['offcial_amount'] = round ($sum['offcial_amount'],2);
|
|
|
|
$sum['spread_amount'] = round ($sum['spread_amount'],2);
|
|
|
|
$sum['spread_amount'] = round ($sum['spread_amount'],2);
|
|
|
|
$sum['offcial_amount'] = round ($sum['supersign_amount'],2);
|
|
|
|
$sum['offcial_amount'] = round ($sum['supersign_amount'],2);
|
|
|
|
$sum['spread_amount'] = round ($sum['test_order_amount'],2);
|
|
|
|
$sum['test_order_amount'] = round ($sum['test_order_amount'],2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$sum['sum'] = $sum['cash_amount']+$sum['test_amount']+$sum['coin_amount']+$sum['offcial_amount']
|
|
|
|
$sum['sum'] = $sum['cash_amount']+$sum['test_amount']+$sum['coin_amount']+$sum['offcial_amount']
|
|
|
@ -207,6 +207,14 @@ class PayMerchantController extends ThinkController
|
|
|
|
$value['offcial_amount']+$value['spread_amount']+$value['supersign_amount']+$value['test_order_amount'];
|
|
|
|
$value['offcial_amount']+$value['spread_amount']+$value['supersign_amount']+$value['test_order_amount'];
|
|
|
|
$data[$key]['ratio'] = round (($data[$key]['sum']/array_sum(array_column($sum_merchant,'sum_amount')))*100,2);
|
|
|
|
$data[$key]['ratio'] = round (($data[$key]['sum']/array_sum(array_column($sum_merchant,'sum_amount')))*100,2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$data[$key]['cash_amount'] = number_format($value['cash_amount'],2,'.','');
|
|
|
|
|
|
|
|
$data[$key]['test_amount'] = number_format ($value['test_amount'],2,'.','');
|
|
|
|
|
|
|
|
$data[$key]['coin_amount'] = number_format ($value['coin_amount'],2,'.','');
|
|
|
|
|
|
|
|
$data[$key]['offcial_amount'] = number_format ($value['offcial_amount'],2,'.','');
|
|
|
|
|
|
|
|
$data[$key]['spread_amount'] = number_format ($value['spread_amount'],2,'.','');
|
|
|
|
|
|
|
|
$data[$key]['offcial_amount'] = number_format ($value['supersign_amount'],2,'.','');
|
|
|
|
|
|
|
|
$data[$key]['test_order_amount'] = number_format ($value['test_order_amount'],2,'.','');
|
|
|
|
|
|
|
|
|
|
|
|
if ($value['merchant_way'] == self::WAY_ALIPAY) {
|
|
|
|
if ($value['merchant_way'] == self::WAY_ALIPAY) {
|
|
|
|
$data[$key]['merchant_way'] = "支付宝";
|
|
|
|
$data[$key]['merchant_way'] = "支付宝";
|
|
|
|
} else if ($value['merchant_way'] == self::WAY_WEIXIN) {
|
|
|
|
} else if ($value['merchant_way'] == self::WAY_WEIXIN) {
|
|
|
|