Merge pull request 'feature/more_payment' (#548) from feature/more_payment into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/548
master
廖金灵 3 years ago
commit 332ed09a5a

@ -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']:'无';
}

@ -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;
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);
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 ? "安卓" : "苹果";

@ -894,7 +894,8 @@ class FinancePromoteController extends AdminController
$marketAdmins = getAdminUsernameList($marketAdminIds);
$adminDepartments = getAdminDepartmentList($marketAdminIds);
}
$isMarketAdmin = A('Market','Event')->getConfig('isMarket');
if(!$isMarketAdmin){
$merchant_data = M("payment_merchant","tab_")
->field("id,name")
->where("1=1")
@ -904,9 +905,10 @@ class FinancePromoteController extends AdminController
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']);

@ -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();
//将商户插入到默认数组中

@ -0,0 +1,26 @@
<?php
namespace Admin\Controller;
use Think\Model;
/**
* 推广后台公告
*/
class PromoteNoticeController extends ThinkController
{
public function edit()
{
$data = M("promote_notice","tab_")->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"=>"修改并保存成功"]);
}
}

@ -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;
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);
if ($payStatus > 0) {
$map1 = $map;
$map1['pay_status'] = 1;
$total = null_to_0(M(self::model_name,"tab_")->where($map1)->sum('pay_amount'));
$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']);

@ -0,0 +1,87 @@
<extend name="Public/base" />
<block name="body">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js" type="text/javascript"></script>
<link rel="stylesheet" href="__STATIC__/kindeditor/default/default.css" />
<script charset="utf-8" src="__STATIC__/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__STATIC__/kindeditor/zh_CN.js"></script>
<!-- 标签页导航 -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">推广后台公告</h3>
<p class="description_text">说明:设置推广后台公告。</p>
</div>
<div class="tab-content tabcon1711">
<!-- 表单 -->
<!-- 基础 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tr >
<td class="l noticeinfo">是否开启:</td>
<td class="r table_radio table_radio2">
<span class="table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="is_open" <if condition="$data['is_open'] eq 1"> checked</if>> 是
</label>
<label style="margin-left: 50px;">
<input type="radio" class="inp_radio" value="0" name="is_open" <if condition="$data['is_open'] eq 0"> checked</if> > 否
</label></span>
</td>
</tr>
<tr style="height: 50px;"></tr>
<tr>
<td class="l">公告内容:</td>
<td class="r">
<textarea name="content" id="content" class="txt_area">{$data['content']}</textarea>
</td>
</tr>
</table>
</div>
<div class="form-item cf">
<input type="hidden" name="id" value="{$data['id']}" />
<button class="submit_btn" style="margin-left:210px;">
保存
</button>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript">
highlight_subnav("{:U('edit')}");
KindEditor.ready(function(K) {
var options = {
filterMode : true,
width : '700px',
height:'600px'
};
var editor = K.create('textarea[name="content"]', options);
$('.submit_btn').on("click",function(){
editor.sync();
var senddata = {
id:$("input[name='id']").val(),
is_open:$("input[type='radio']:checked").val(),
content:$("#content").val()
}
$.ajax({
type: "POST",
url: "{:U('doEdit')}",
dataType: 'json',
data: senddata,
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.msg + "</font>");
return false;
}
}
});
})
})
</script>
</block>

@ -124,9 +124,9 @@
</div>
<div class="input-list search_item input-list-orderstatus">
<select name="pay_status" style="color:#444" class="select_gallery" id="sel_order">
<option value="">订单状态</option>
<option value="1">充值成功</option>
<option value="0">下单未付款</option>
<!-- <option value="">订单状态</option> -->
<option value="1" <?php echo $payStatus == 1 ? "selected" : ''?>>充值成功</option>
<option value="0" <?php echo $payStatus == 0 ? "selected" : ''?>>下单未付款</option>
</select>
</div>
<div class="input-list">

@ -298,9 +298,17 @@ class PromoteController extends BaseController
$this->assign("tips",$tips);
$this->assign("message",$message);
$this->meta_title = "首页";
//首页公告
$this->getIndexTip();
$this->display();
}
public function getIndexTip()
{
$data = M("promote_notice","tab_")->where("is_open = 1")->getField('content');
if($data){
$this->assign('index_tip',$data);
}
}
public function popRuleDetail($id=0, $p=1, $row=1, $force=false, $pop = false)
{
$promoteBelong = M('promote', 'tab_')->where(['id'=>get_pid()])->getField('company_belong');

@ -3,6 +3,10 @@
<link href="__CSS__/index/index.new.css" rel="stylesheet" >
</block>
<block name="body">
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script type="text/javascript" src="__JS__/index/jquery.fxTab.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script src="__STATIC__/js.cookie.min.js" type="text/javascript"></script>
<div class="page-overview promote-index-overview index-overview clearfix poll">
<?php if($canViewUserRecharge):?>
<ul>
@ -209,12 +213,51 @@
{$_page}
</div>
</div>
</div>.
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script type="text/javascript" src="__JS__/index/jquery.fxTab.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
</div>
<notempty name="index_tip">
<div id="TestingTipShow" style="display: none;">
<div style="width: 100vw;height:100%;padding: 0;position: absolute;top: 0;z-index: 9999;background-color:rgba(0,0,0,.6);margin: -1.9%;">
<div class="layui-layer layui-layer-hui" style="width:800px;height:auto;z-index: 19891015; top:18%; left:50%;margin-left: -400px;border-radius: 2%;background-color:white;color: #0a001f;">
<div style="padding: 15px 30px 15px 20px;font-size: 18px;text-align: center;border-bottom: 1px dashed #999;">系统公告</div>
<div style="padding: 5px 25px;height: auto;max-height: 500px;overflow-x:hidden;overflow-y:auto">
{$index_tip}
</div>
<div style="text-align: right;margin-top: 20px;margin-right: 30px;padding-bottom: 55px;">
<div class="form-group normal_space fr">
<input type="button" id="closeTip" class="submit" value="关闭">
</div>
<div class="form-group normal_space fr">
<input type="button" id="ignoreTip" class="submit" value="今日不再提醒" style="background-color: #fff;border: 1px solid #333;color: #333;">
</div>
</div>
</div>
</div>
</div>
<script>
var d = new Date();
var cookieKey = 'promote-notice-ignore-'+d.getFullYear()+"-"+(d.getMonth()-0+1)+"-"+d.getDate();
var isIgnore = Cookies.get(cookieKey);
if(!isIgnore){
$("#TestingTipShow").show();
}
$("#closeTip").on("click",function(){
$("#TestingTipShow").hide();
})
$("#ignoreTip").on("click",function(){
Cookies.set(cookieKey, 1, { expires: 2 });
$("#TestingTipShow").hide();
})
</script>
</notempty>
<script>
var pop_ids = {$match_rules_id};
var match_rules_route ={$match_rules_route};
var pop_time = {$pop_time1};

@ -293,6 +293,22 @@ background-color:#3F97C9;
background-color:#F0F9FD;
max-height: 400px;
overflow: auto;
}
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-corner {
background-color: transparent;
}
::-webkit-scrollbar-thumb {
height: 6px;
border-radius: 7px;
border: 3px solid transparent;
background-color: #ddd;
background-clip: padding-box;
}
.side-sub-menu > li {
position: relative;

Loading…
Cancel
Save