Merge remote-tracking branch 'origin/release' into release

master
liuweiwen 5 years ago
commit 446e6f8176

@ -567,71 +567,100 @@ class AdminController extends Controller {
}
public function addShortcutIcon() {
$Kuaijieicon = M('Kuaijieicon');
$result = $Kuaijieicon->where(['url'=>$_REQUEST['url']])->find();
if ($result) {
if ($result['status'] == 0) {
$data = array('status'=>1,'id'=>$result['id']);
$id = $Kuaijieicon->save($data);
if($id){
//记录行为
action_log('Kuaijie/edit', 'Kuaijieicon', $result['id'], UID);
$this->success('添加成功');
} else {
$this->error('添加失败');
}
} else {
$this->error('已添加过常用设置');
}
} else {
public function addShortcutIcon() {
$Kuaijieicon = M('Kuaijieicon');
$result = $Kuaijieicon->where(['url'=>$_REQUEST['url']])->find();
if ($result) {
if ($result['status'] == 0) {
$data = array('status'=>1,'id'=>$result['id']);
$id = $Kuaijieicon->save($data);
if($id){
//记录行为
action_log('Kuaijie/edit', 'Kuaijieicon', $result['id'], UID);
$this->success('添加成功');
} else {
$this->error('添加失败');
}
} else {
$this->error('已添加过常用设置');
}
} else {
$data = array('title'=>$_REQUEST['title'],'status'=>1,'url'=>$_REQUEST['url'],'value'=>0);
$id = $Kuaijieicon->add($data);
if($id){
//记录行为
action_log('Kuaijie/add', 'Kuaijieicon', $id, UID);
$this->success('添加成功');
} else {
$this->error('添加失败');
}
}
}
public function delShortcutIcon($id=0) {
if (!is_numeric($id) || $id<1) {$this->error('参数错误');}
$Kuaijieicon = M('Kuaijieicon');
$data = array('title'=>$_REQUEST['title'],'status'=>1,'url'=>$_REQUEST['url'],'value'=>0);
$id = $Kuaijieicon->add($data);
if($id){
//记录行为
action_log('Kuaijie/add', 'Kuaijieicon', $id, UID);
$this->success('添加成功');
} else {
$this->error('添加失败');
}
}
}
public function delShortcutIcon($id=0) {
if (!is_numeric($id) || $id<1) {$this->error('参数错误');}
$Kuaijieicon = M('Kuaijieicon');
$data = array('status'=>0,'id'=>$id);
$res = $Kuaijieicon->save($data);
if($res){
//记录行为
action_log('Kuaijie/del', 'Kuaijieicon', $id, UID);
$this->success('删除成功');
} else {
$this->error('删除失败');
}
}
$data = array('status'=>0,'id'=>$id);
$res = $Kuaijieicon->save($data);
if($res){
//记录行为
action_log('Kuaijie/del', 'Kuaijieicon', $id, UID);
$this->success('删除成功');
} else {
$this->error('删除失败');
}
}
/**
* 验证列表的展示或者统计权限
* @param [type] $type 0:"_list_check",1:"_count_check"
* @return void
*/
public function checkListOrCountAuthRestMap(&$map,$checkarr = false,$countfield = "rule_count_check"){
//验证count
if(IS_ROOT){
$this->assign($countfield,true);
}else{
$countRule = strtolower(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME."_count_check");
$this->assign($countfield,$this->checkRule($countRule,array('in','1,2')));
//验证list
$listrule = strtolower(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME."_list_check");
$listflag = $this->checkRule($listrule,array('in','1,2'));
if(!$listflag && $checkarr){
foreach ($checkarr as $v) {
if(isset($map[$v])){
//如果有模糊查询改精准查询
if($map[$v][0] == "like"){
$map[$v] = trim($map[$v][1],"%");
}
$listflag = true;
};
}
}
if(!$listflag){
$map["_string"] = "1=0";
}
}
}
}

@ -12,11 +12,12 @@ class MemberController extends ThinkController
/**
*玩家列表信息
*/
public function user_info($p=0){
//设定默认时间
if(!array_key_exists("time_start",$_REQUEST) && I('type') != 2){
$this->redirect(ACTION_NAME, array('time_start' => date('Y-m-d',strtotime('-30 day')),"time_end"=>date('Y-m-d')));
}
// if(!array_key_exists("time_start",$_REQUEST) && I('type') != 2){
// $this->redirect(ACTION_NAME, array('time_start' => date('Y-m-d',strtotime('-30 day')),"time_end"=>date('Y-m-d')));
// }
//基础信息
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
@ -98,15 +99,6 @@ class MemberController extends ThinkController
$map['tab_user.device_number'] = $_REQUEST['device_number'];
}
$promoteRoot = getPowerPromoteIds();
// $data_empower_type = session('user_auth')['data_empower_type'];
//// var_dump($promoteRoot);die();
//
// if ($promoteRoot) {
// $map['tab_user.promote_id'] =array('in',$promoteRoot);
// } else if(!$promoteRoot&&$data_empower_type!=1){
// $map['tab_user.id'] = array('lt',1);
// }
setPowerPromoteIds($map,'tab_user.promote_id');
//1.3 与推广员相关
@ -135,6 +127,8 @@ class MemberController extends ThinkController
}
}
}
//判断是否有列表和统计的权限
$this->checkListOrCountAuthRestMap($map,["tab_user.id","tab_user.account","tab_user.device_number"]);
//计算用户列表
$data = M("user","tab_")
@ -304,8 +298,6 @@ class MemberController extends ThinkController
$history_count = $history_count->find()['recharge_total'];
$this->assign('history_count', $history_count?:0);
}
$this->assign('user_count',$user_count);
$this->assign('now_count', $now_count?:0);
@ -1175,6 +1167,9 @@ class MemberController extends ThinkController
}
// $map['type'] = 1;
// $map['login_time'] = ['exp', 'login_time<>0'];
//判断是否有列表和统计的权限
$this->checkListOrCountAuthRestMap($map,["user_account"]);
$extend = array();
$extend['map'] = $map;
$count = M('UserLoginRecord','tab_')

@ -111,6 +111,7 @@ class SpendController extends ThinkController
// $map = '1 = 2';
// $map1 = $map;
// }
$this->checkListOrCountAuthRestMap($map,["extend", "pay_order_number", "user_account"]);
$map1 = $map;
$map1['pay_status'] = 1;
$total = null_to_0(D(self::model_name)->where($map1)->sum('pay_amount'));

@ -22,6 +22,10 @@ class StatementMangementController extends ThinkController
$map['create_time'] = ['LT', strtotime(I('time_end')) + 86399];
}
if ($_REQUEST['verify_status']||$_REQUEST['verify_status']=='0') {
$map['verify_status'] = $_REQUEST['verify_status'];
}
if ($_REQUEST['statement_type']||$_REQUEST['statement_type']=='0') {
if($_REQUEST['statement_type']=='2') {
$map['second_party_info'] = ['like','%"order_type":1%'];
@ -836,4 +840,42 @@ class StatementMangementController extends ThinkController
$this->display();
}
public function verifyStatementStatus() {
$order = $_REQUEST['order'];
if ($order) {
$isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>1]);
if ($isVerify) {
$this->ajaxReturn(['status'=>1]);
} else {
$this->ajaxReturn(['status'=>0]);
}
} else {
$this->ajaxReturn(['status'=>0]);
}
}
public function rejectStatementStatus() {
$order = $_REQUEST['order'];
if ($order) {
$isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>2]);
if ($isVerify) {
$this->ajaxReturn(['status'=>1]);
} else {
$this->ajaxReturn(['status'=>0]);
}
} else {
$this->ajaxReturn(['status'=>0]);
}
}
}

@ -214,7 +214,7 @@ class ToolController extends ThinkController {
*/
public function payset($value='')
{
$str = "alipay,weixin,wei_xin,wei_xin_app,jubaobar,weixin_gf,jft,jft_wap,goldpig,ptb_pay,bind_pay,sqpay,heepay";
$str = "alipay,weixin,wei_xin,wei_xin_app,jubaobar,weixin_gf,jft,jft_wap,goldpig,ptb_pay,bind_pay,sqpay,heepay,yeepay";
$this->BaseConfig($str);
$this->meta_title = '支付设置';

@ -631,6 +631,10 @@ class UserController extends AdminController
$map['role_name'] = trim($_REQUEST['role_name']);
unset($_REQUEST['role_name']);
}
if (isset($_REQUEST['role_id'])) {
$map['role_id'] = trim($_REQUEST['role_id']);
unset($_REQUEST['role_id']);
}
// $promoteRoot = getPowerPromoteIds();
// $data_empower_type = session('user_auth')['data_empower_type'];
@ -668,6 +672,7 @@ class UserController extends AdminController
empty(I('user_account')) || $map['user_account'] = ['like', "%" . I('user_account') . "%"];
$this->checkListOrCountAuthRestMap($map,["role_id", "role_name", "user_account"]);
$list = $this->lists(M('user_play_info', 'tab_'), $map, 'play_time desc');
$this->assign('list', $list);
$this->meta_title = '角色数据';

@ -38,6 +38,13 @@ class VerifyBillController extends Controller {
->select();
foreach ($list_data as $key => $value) {
$list_data[$key]['statement_type_str'] = $value['statement_type'] ? '工会对账单' : 'cp对账单';
if ($value['verify_status'] == 1) {
$list_data[$key]['verify_status_str'] = '审核通过';
} elseif ($value['verify_status'] == 1) {
$list_data[$key]['verify_status_str'] = '审核拒绝';
} else {
$list_data[$key]['verify_status_str'] = '未审核';
}
}
$this->assign('list_data', $list_data);
$this->assign('meta_title', $m_title);
@ -61,7 +68,11 @@ class VerifyBillController extends Controller {
$this->assign('all_sum_money', $all_sum_money);
$this->assign('all_pay_amount', $all_pay_amount);
$this->assign('data', $data);
$this->assign('from', I('from'));
$from = I('from');
if (empty($from) && $data['verify_status'] != 1) {//未审核通过不可确认
$from = 'not_verify';
}
$this->assign('from', $from);
if ($data['statement_type'] == 1) {//下游
$template = 'company_show';
} else {

@ -160,10 +160,12 @@
</td>
</tr>
</volist>
<tr>
<td colspan="2">合计</td>
<td colspan="4">&#12288;&#12288;登录玩家:{$user_count}人 </td>
</tr>
<if condition="$rule_count_check">
<tr>
<td colspan="2">合计</td>
<td colspan="4">&#12288;&#12288;登录玩家:{$user_count}人 </td>
</tr>
</if>
</empty>
</tbody>
</table>

@ -236,7 +236,7 @@
<!-- 列表 -->
<tbody>
<empty name ="list_data">
<td colspan="15" class="text-center">aOh! 暂时还没有内容!</td>
<td colspan="18" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="list_data" id="data">
<tr>
@ -340,27 +340,30 @@
</tr>
</volist>
</empty>
<tr class="data_summary">
<td colspan="3" style="text-align: center;">汇总:</td>
<if condition="I('promote_id') && I('promote_id') gt 0 ">
<td colspan="8">
当前用户累计充值:{$now_count} &#12288;&#12288;
历史累计充值:{$history_count}&#12288;&#12288;
用户数:{$user_count}
</td>
<td colspan="8" style="font-style: 12px;color: #a9a9a9;text-align: center;">
当前用户累计充值:&#12288;当前属于该推广员的用户的充值累计(不含用户换绑前记录)&#12288;&#12288;/&#12288;&#12288;
历史累计充值:&#12288;历史中属于该推广员的用户的充值累计(含用户换绑前记录)
</td>
<else />
<td colspan="99">
当前用户累计充值:{$now_count}&#12288;&#12288;用户数:{$user_count}
</td>
<if condition="$rule_count_check">
<tr class="data_summary">
<td colspan="3" style="text-align: center;">汇总:</td>
</if>
<if condition="I('promote_id') && I('promote_id') gt 0 ">
<td colspan="8">
当前用户累计充值:{$now_count} &#12288;&#12288;
历史累计充值:{$history_count}&#12288;&#12288;
用户数:{$user_count}
</td>
<td colspan="8" style="font-style: 12px;color: #a9a9a9;text-align: center;">
当前用户累计充值:&#12288;当前属于该推广员的用户的充值累计(不含用户换绑前记录)&#12288;&#12288;/&#12288;&#12288;
历史累计充值:&#12288;历史中属于该推广员的用户的充值累计(含用户换绑前记录)
</td>
<else />
<td colspan="99">
当前用户累计充值:{$now_count}&#12288;&#12288;用户数:{$user_count}
</td>
</if>
</tr>
</if>
</tr>
</tbody>
</table>
</div>

@ -81,6 +81,14 @@
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="verify_status" name="verify_status" class="select_gallery" >
<option value="">请选择审核状态</option>
<option value="0">未审核</option>
<option value="1">审核通过</option>
<option value="2">审核拒绝</option>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<input type="hidden" name="type" value="{$_GET['type']}">
<div class="input-list">
@ -95,6 +103,8 @@
<a class="butn" id="upstream">生成上游对账单</a>
<a class="butn" id="downstream">生成下游对账单</a>
<a class="butn" id="persondownstream" style="width: 150px">生成下游个人结算单</a>
<a class="butn" id="shenhe" >审核通过</a>
<a class="butn" id="reject" >审核拒绝</a>
</div>
</div>
@ -105,11 +115,13 @@
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>对账单类型</th>
<th>生成时间</th>
<th>对账公司</th>
<th>对账日期</th>
<th>对账金额</th>
<th>审核状态</th>
<th>确认状态</th>
<th>操作</th>
</tr>
@ -125,11 +137,14 @@
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]" >
</td>
<td><if condition="$data['statement_type'] eq 0">上游对账单<elseif condition="$data['statement_type'] eq 1 and $data['order'] eq 0"/>下游对账单<elseif condition="$data['statement_type'] eq 1 and $data['order'] eq 1"/>下游补点对账单<elseif condition="$data['statement_type'] eq 2"/>下游个人结算单</if></td>
<td>{$data.create_time}</td>
<td>{$data.company_name}</td>
<td>{$data.statement_begin_time}-{$data.statement_end_time}</td>
<td>{$data.statement_money}</td>
<td><if condition="$data['verify_status'] eq 0">未审核<elseif condition="$data['verify_status'] eq 1"/>审核通过<elseif condition="$data['verify_status'] eq 2"/>审核拒绝</if></td>
<td><if condition="$data['is_confirm'] eq 0">未确认<elseif condition="$data['is_confirm'] eq 1"/>确认</if></td>
<td>
<a class="confirm statement_view" data-id="{$data.id}" data-type="{$data.statement_type}">查看</a>
@ -189,7 +204,81 @@
function reload() {
window.location.reload();
}
$(function(){
$("#shenhe").click(function () {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get().join(",");
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(index) {
if (!text) {
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
return;
}
$.ajax({
url: "{:U('statementMangement/verifyStatementStatus')}",
type: "get",
data: {order: text},
dataType: 'json',
success: function (data) {
if (data.status == 0) {
layer.msg("<em style='color:white'>" + '审核通过失败' + "</em>");
} else {
layer.msg("<em style='color:white'>" + '审核通过成功' + "</em>")
setTimeout(function(){
window.parent.reload();
},1500);
}
}
});
})
})
$("#reject").click(function () {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get().join(",");
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(index) {
if (!text) {
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
return;
}
$.ajax({
url: "{:U('statementMangement/rejectStatementStatus')}",
type: "get",
data: {order: text},
dataType: 'json',
success: function (data) {
if (data.status == 0) {
layer.msg("<em style='color:white'>" + '审核拒绝失败' + "</em>");
} else {
layer.msg("<em style='color:white'>" + '审核拒绝成功' + "</em>")
setTimeout(function(){
window.parent.reload();
},1500);
}
}
});
})
})
//搜索功能
var start = $("#time_start").val();
var end = $("#time_end").val();

@ -29,6 +29,7 @@
<li data-tab="tab10"><a href="javascript:void(0);" >平台币支付</a></li>
<li data-tab="tab11"><a href="javascript:void(0);" >绑币支付</a></li>
<li data-tab="tab14"><a href="javascript:void(0);" >易宝支付</a></li>
<li data-tab="tab12"><a href="javascript:void(0);" >双乾支付</a></li>
<li data-tab="tab13"><a href="javascript:void(0);" >威富通支付</a></li>
</ul>
@ -1355,6 +1356,130 @@
</div>
<div class="tab-content tabcon1711 tabcon17112">
<div id="tab14" class="tab-pane tab14">
<form action="{:U('saveTool')}" method="post" class="form-horizontal yeepay form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l noticeinfo">商户号</td>
<td class="r table_radio">
<input name="config[partner]" type="text" value="{$yeepay['partner']}" class="">
<span class="notice-text">双乾商户号</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">双乾密钥key</td>
<td class="r table_radio">
<input name="config[key]" type="text" value="{$yeepay['key']}" class="">
<span class="notice-text">双乾秘钥</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">支付方式:</td>
<td class="r table_radio">
<span class="form_checkbox">
<label>
<input name="config[shortcut]" type="checkbox" value="1" <eq name="yeepay['shortcut']" value="1">checked="checked"</eq> class="">
</label>
</span>
<span class="notice-text" style="margin-left:5px;margin-right: 15px;width: 70px;">快捷支付</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">日支付限量</td>
<td class="r table_radio">
<input name="config[day_pay_limit]" type="text" value="{$yeepay['day_pay_limit']}" class="" placeholder='请输入额度' oninput="this.value=this.value.replace(/[^0-9]+|^0|\d{9}/,'');">
<span class="notice-text">当额度达到限制额度时,隐藏支付方式</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">月支付限量</td>
<td class="r table_radio">
<input name="config[month_pay_limit]" type="text" value="{$yeepay['month_pay_limit']}" class="" placeholder='请输入额度' oninput="this.value=this.value.replace(/[^0-9]+|^0|\d{9}/,'');">
<span class="notice-text">当额度达到限制额度时,隐藏支付方式</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">启用状态</td>
<td class="r table_radio">
<span class="form_radio">
<label><input type="radio" name="status" value="0" <eq name="yeepay['status']" value="0">checked="checked"</eq>> 禁用</label>
<label><input type="radio" name="status" value="1" <eq name="yeepay['status']" value="1">checked="checked"</eq>> 启用
</label></span>
<span class="notice-text">开启状态</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">渠道费率</td>
<td class="r">
<input name="config[channel_rate]" type="text" value="{$yeepay['channel_rate']}" class="" placeholder="设置支付渠道的的费用比例">
<span class="notice-text">%</span>
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="name" value="yeepay">
<input type="submit" id="submit" value="确认保存" target-form="yeepay" class="submit_btn form_btn ajax-post mlspacing">
</form>
</div>
</div>
<div class="tab-content tabcon1711 tabcon17112">

@ -59,6 +59,9 @@
<div class="input-list">
<input type="text" name="role_name" class="" value="{:I('role_name')}" placeholder="角色名称">&nbsp;&nbsp;&nbsp;
</div>
<div class="input-list">
<input type="text" name="role_id" class="" value="{:I('role_id')}" placeholder="角色ID">&nbsp;&nbsp;&nbsp;
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>

@ -48,6 +48,7 @@
<th>生成时间</th>
<th>对账单日期</th>
<th>对账金额</th>
<th>审核状态</th>
<th>确认状态</th>
<th>操作</th>
</tr>
@ -67,6 +68,7 @@
<td>{:set_show_time($data['create_time'])}</td>
<td>{:set_show_time($data['statement_begin_time'])}-{:set_show_time($data['statement_end_time'])}</td>
<td>{$data.statement_money}</td>
<td>{$data.verify_status_str}</td>
<td>
<?php if($data['is_confirm'] == 0) {?>

@ -1350,4 +1350,10 @@ CREATE TABLE `tab_financial_summary` (
-- 推广员部门/小组 liaojinling
ALTER TABLE tab_promote
ADD COLUMN `group_remark` varchar(50) NOT NULL DEFAULT '' COMMENT '部门/小组';
ADD COLUMN `group_remark` varchar(50) NOT NULL DEFAULT '' COMMENT '部门/小组';
--2020-02-20 --
ALTER TABLE `tab_statement`
ADD COLUMN `verify_status` tinyint(2) NULL DEFAULT 0 COMMENT '审核状态 0:未审核 1:审核通过 2:审核拒绝' AFTER `statement_info`;
-- 支付类型添加易宝支付
INSERT INTO `platform`.`tab_tool`( `name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('yeepay', '易宝支付', '', '', 1, 1, 0);

Loading…
Cancel
Save