diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php
index be718fc64..7b6de2193 100644
--- a/Application/Admin/Common/extend.php
+++ b/Application/Admin/Common/extend.php
@@ -3286,9 +3286,9 @@ function getCpCompanySelect($type = 1){
* @return mixed
*/
function getMerchantList($type = 1){
+ if(A('Market','Event')->getConfig('isMarket')) return [];
$data = M("payment_merchant","tab_")->field("id,name,ways")->select();
-
return $data;
}
@@ -3299,9 +3299,9 @@ function getMerchantList($type = 1){
* @return mixed
*/
function getMerchantName($id = 1){
+ if(A('Market','Event')->getConfig('isMarket')) return '--';
$data = M("payment_merchant","tab_")->field("name")->where(['id'=>$id])->find();
-
return $data['name']?$data['name']:'无';
}
diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php
index 68fe07c75..0a375e21c 100644
--- a/Application/Admin/Controller/ExportController.class.php
+++ b/Application/Admin/Controller/ExportController.class.php
@@ -1084,10 +1084,18 @@ class ExportController extends Controller
case 7:
$startDate = empty($_REQUEST['timestart']) ? date('Y-m-d', strtotime('-6 day', time())) : $_REQUEST['timestart'];
$endDate = empty($_REQUEST['timeend']) ? date('Y-m-d') : $_REQUEST['timeend'];
+ $payStatus = isset($_REQUEST['pay_status']) ? $_REQUEST['pay_status'] : 1;
$startTime = strtotime($startDate);
$endTime = strtotime($endDate) + 86399;
- $map['pay_time'] = array('BETWEEN', array($startTime, $endTime));
+
+ if($payStatus > 0){
+ $map['pay_time'] = array('BETWEEN', array($startTime, $endTime));
+ }else{
+ $map['spend_time'] = array('BETWEEN', array($startTime, $endTime));
+ }
+ $map['pay_status'] = $payStatus;
+
$is_sub_data = I("issubdata",0);
if($is_sub_data == 1){
$SpendModel = M("spend","tab_",SUBSITE_DB);
@@ -1129,10 +1137,7 @@ class ExportController extends Controller
$map['extend'] = array('like', trim($_REQUEST['extend']));
unset($_REQUEST['extend']);
}
- if (isset($_REQUEST['pay_status'])) {
- $map['pay_status'] = $_REQUEST['pay_status'];
- unset($_REQUEST['pay_status']);
- }
+
if (isset($_REQUEST['pay_way'])) {
if ($_REQUEST['pay_way'] == 2) {
$map['pay_way'] = ['in', '2,3,4'];
@@ -1205,9 +1210,11 @@ class ExportController extends Controller
// $map1 = $map;
// }
D("Spend")->addSubsiteWhere($map);
- $map1 = $map;
- $map1['pay_status'] = 1;
- $total = $SpendModel->where($map1)->sum('pay_amount');
+ if($payStatus > 0){
+ $map1 = $map;
+ $map1['pay_status'] = 1;
+ $total = $SpendModel->where($map1)->sum('pay_amount');
+ }
// var_dump($total);die();
$total=$total?$total:0;
@@ -1253,6 +1260,7 @@ class ExportController extends Controller
$xlsCell = array_values($headers);
$fields = array_keys($headers);
+ $fields[] = "spend_time";
// ----获取游戏的基本信息begin
//获取游戏公司
$cpCompanyDb = M("partner","tab_")->field("id,partner")->order("id asc")->select();
@@ -1313,6 +1321,9 @@ class ExportController extends Controller
foreach($xlsData as $value) {
//游戏信息匹配
+ if(!$value['pay_time']) $value['pay_time'] = $value['spend_time'];
+ unset($value['spend_time']);
+
$thisGameInfo = $gameInfo[$value["game_id"]];
$value['game_name'] =$thisGameInfo['relation_game_name'];
$value['sdk_version'] = $value['sdk_version'] == 1 ? "安卓" : "苹果";
diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php
index 07f2b68e3..a9078a5d7 100644
--- a/Application/Admin/Controller/FinancePromoteController.class.php
+++ b/Application/Admin/Controller/FinancePromoteController.class.php
@@ -894,19 +894,21 @@ class FinancePromoteController extends AdminController
$marketAdmins = getAdminUsernameList($marketAdminIds);
$adminDepartments = getAdminDepartmentList($marketAdminIds);
}
-
- $merchant_data = M("payment_merchant","tab_")
- ->field("id,name")
- ->where("1=1")
- ->select();
- $handle_merchant = [];
-
- foreach ($merchant_data as $key => $value) {
- $handle_merchant[$value['id']] = $value['name'];
+ $isMarketAdmin = A('Market','Event')->getConfig('isMarket');
+ if(!$isMarketAdmin){
+ $merchant_data = M("payment_merchant","tab_")
+ ->field("id,name")
+ ->where("1=1")
+ ->select();
+ $handle_merchant = [];
+
+ foreach ($merchant_data as $key => $value) {
+ $handle_merchant[$value['id']] = $value['name'];
+ }
}
foreach($data as $key => $value) {
- $data[$key]['merchant_name'] = $handle_merchant[$value['merchant_id']];
+ $data[$key]['merchant_name'] = $isMarketAdmin ? "--" : $handle_merchant[$value['merchant_id']];
$data[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php
index 0998a121f..68c8dfdeb 100644
--- a/Application/Admin/Controller/FinancialSummaryController.class.php
+++ b/Application/Admin/Controller/FinancialSummaryController.class.php
@@ -71,7 +71,7 @@ class FinancialSummaryController extends AdminController
$merchant_data = M("payment_merchant","tab_")
->field("identifier,name")
- ->where(['status'=>1,'type'=>1])
+ ->where(['type'=>1])
->select();
//将商户插入到默认数组中
diff --git a/Application/Admin/Controller/PromoteNoticeController.class.php b/Application/Admin/Controller/PromoteNoticeController.class.php
new file mode 100644
index 000000000..8fa3c526d
--- /dev/null
+++ b/Application/Admin/Controller/PromoteNoticeController.class.php
@@ -0,0 +1,26 @@
+find();
+ $this->assign('data',$data);
+ $this->display();
+ }
+
+ public function doEdit()
+ {
+ $res = M("promote_notice","tab_")->save($_REQUEST);
+ if(!$res){
+ $this->ajaxReturn(["status"=>0,"msg"=>"保存失败"]);
+ }
+ $this->ajaxReturn(["status"=>1,"msg"=>"修改并保存成功"]);
+ }
+}
diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php
index 6992f84ac..48daf740b 100644
--- a/Application/Admin/Controller/SpendController.class.php
+++ b/Application/Admin/Controller/SpendController.class.php
@@ -17,10 +17,18 @@ class SpendController extends ThinkController
{
$startDate = empty($_REQUEST['timestart']) ? date('Y-m-d', strtotime('-6 day', time())) : $_REQUEST['timestart'];
$endDate = empty($_REQUEST['timeend']) ? date('Y-m-d') : $_REQUEST['timeend'];
+ $payStatus = isset($_REQUEST['pay_status']) ? $_REQUEST['pay_status'] : 1;
$startTime = strtotime($startDate);
$endTime = strtotime($endDate) + 86399;
- $map['pay_time'] = array('BETWEEN', array($startTime, $endTime));
+
+ if($payStatus > 0){
+ $map['pay_time'] = array('BETWEEN', array($startTime, $endTime));
+ }else{
+ $map['spend_time'] = array('BETWEEN', array($startTime, $endTime));
+ }
+
+ $map['pay_status'] = $payStatus;
unset($_REQUEST['timestart']);
unset($_REQUEST['timeend']);
@@ -64,10 +72,7 @@ class SpendController extends ThinkController
$map['extend'] = array('like', trim($_REQUEST['extend']));
unset($_REQUEST['extend']);
}
- if (isset($_REQUEST['pay_status'])) {
- $map['pay_status'] = $_REQUEST['pay_status'];
- unset($_REQUEST['pay_status']);
- }
+
if (isset($_REQUEST['pay_way'])) {
if ($_REQUEST['pay_way'] == 2) {
$map['pay_way'] = ['in', '2,3,4'];
@@ -132,15 +137,19 @@ class SpendController extends ThinkController
// }
$this->checkListOrCountAuthRestMap($map,["extend", "pay_order_number", "user_account"]);
D("Spend")->addSubsiteWhere($map);
-
- $map1 = $map;
- $map1['pay_status'] = 1;
- $total = null_to_0(M(self::model_name,"tab_")->where($map1)->sum('pay_amount'));
+ if ($payStatus > 0) {
+ $map1 = $map;
+ $map1['pay_status'] = 1;
+ $total = null_to_0(M(self::model_name, "tab_")->where($map1)->sum('pay_amount'));
+ }
+ $total=$total?$total:0;
$this->assign('total', $total);
+
$this->meta_title = $this->m_title = '游戏充值';
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find());
$data = D(self::model_name)->lists($_GET["p"], $map, $order);
+ // dd($data);
if (!empty($data['data'])) {
$adminIds = array_column($data['data'], 'market_admin_id');
$adminUsernameList = getAdminUsernameList($adminIds);
@@ -155,6 +164,7 @@ class SpendController extends ThinkController
$game_arr = explode("(", rtrim($value['game_name'], ")"));
$value['game_name'] = $game_arr[0];
$value['sdk_version_name'] = $game_arr[1];
+ if(!$value['pay_time']) $value['pay_time'] = $value['spend_time'];
}
}
@@ -168,6 +178,7 @@ class SpendController extends ThinkController
$this->assign('marketAdmins', getMarketAdmins());
$this->assign('startDate', $startDate);
$this->assign('endDate', $endDate);
+ $this->assign('payStatus', $payStatus);
$this->assign('list_data', $data['data']);
$this->assign('_page', $data['page']);
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
diff --git a/Application/Admin/View/PromoteNotice/edit.html b/Application/Admin/View/PromoteNotice/edit.html
new file mode 100644
index 000000000..a4d663dcf
--- /dev/null
+++ b/Application/Admin/View/PromoteNotice/edit.html
@@ -0,0 +1,87 @@
+ 说明:设置推广后台公告。推广后台公告
+
+
+
+
+ 是否开启:
+
+
+
+
+
+
+
+
+ 公告内容:
+
+
+
+