From 9e2bb1e809076ddacb2973b9c99cd39f8ac2da00 Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Sat, 9 Nov 2019 15:12:42 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=AE=89=E5=85=A8=E7=AE=A1=E7=90=86admin?=
=?UTF-8?q?=E5=90=8E=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controller/PromoteController.class.php | 58 +++++++++++++++++++
Application/Admin/View/Promote/edit.html | 37 ++++++++++++
Application/Admin/View/Promote/lists.html | 1 +
3 files changed, 96 insertions(+)
diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php
index 7d63f35f0..ecf159a88 100644
--- a/Application/Admin/Controller/PromoteController.class.php
+++ b/Application/Admin/Controller/PromoteController.class.php
@@ -193,6 +193,31 @@ unset($_REQUEST['parent_id']);
$model = D('Promote');
$data = $model->find($id);
$data['bank_area']=explode(',',$data['bank_area']);
+ $idcardpic = $data["idcarpic"];
+ $businesspic = $data['businesspic'];
+ $agreementpic = $data["agreementpic"];
+
+ if(!empty($idcardpic)) {
+ $idcardpicArr = explode(',', $idcardpic);
+ foreach ($idcardpicArr as $key => $value) {
+ $idcardImg[$key] = get_cover($value, 'path');
+ }
+ }
+ if(!empty($businesspic)) {
+ $businesspicArr = explode(',', $businesspic);
+ foreach ($businesspicArr as $key => $value1) {
+ $businesspicImg[$key] = get_cover($value1, 'path');
+ }
+ }
+ if(!empty($agreementpic)) {
+ $agreementpicArr = explode(',', $agreementpic);
+ foreach ($agreementpicArr as $key => $value2) {
+ $agreementpicImg[$key] = get_cover($value2, 'path');
+ }
+ }
+ $this->assign("agreementpicimg",$agreementpicImg);
+ $this->assign('businesspicImg',$businesspicImg);
+ $this->assign('idcardimg',$idcardImg);
$this->assign('data',$data);
$this->meta_title ='编辑渠道信息';
@@ -233,6 +258,39 @@ unset($_REQUEST['parent_id']);
$this->success('操作失败');
}
}
+
+ /**
+ *资质审核
+ */
+ public function idcar_status($model='Promote') {
+ if(empty($_REQUEST['ids'])){
+ $this->error('请选择要操作的数据');
+ }
+ if(isset($_REQUEST['model'])){
+ $model=$_REQUEST['model'];
+ unset($_REQUEST['model']);
+ }
+ $a=0;
+ $map['id']=array('in',$_REQUEST['ids']);
+ $set = M('promote','tab_')->where($map)->setField('ver_status',$_REQUEST['status']);
+ if($set){
+ if($_REQUEST['status']==1){
+ $select=M('promote','tab_')->where($map)->select();
+ foreach ($select as $key => $value) {
+ if($count=="000000"){
+ $a++;
+ }
+ }
+ $this->success('操作成功');/**,已通知'.$a.'人'*/
+ }else{
+ $this->success('操作成功');
+ }
+
+ }else{
+ $set=M('promote','tab_')->where($map)->setField('ver_status',2);
+ $this->success('操作失败');
+ }
+ }
/**
*短信发送
diff --git a/Application/Admin/View/Promote/edit.html b/Application/Admin/View/Promote/edit.html
index 1cafd2b15..64bac02d2 100644
--- a/Application/Admin/View/Promote/edit.html
+++ b/Application/Admin/View/Promote/edit.html
@@ -92,6 +92,43 @@
|
+
+
+ 身份证照: |
+
+
+
+ $info):?>
+
+
+
+
+
+ |
+
+
+ 营业执照: |
+
+
+
+ $info1):?>
+
+
+
+
+
+ |
+
+ 合作合同: |
+
+
+
+ $info2):?>
+
+
+
+
+ |
邮箱: |
diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html
index 5473d271c..12265cc67 100644
--- a/Application/Admin/View/Promote/lists.html
+++ b/Application/Admin/View/Promote/lists.html
@@ -52,6 +52,7 @@
新增
审核
+ 资质审核
开启自动审核
From e75907ed07859dcdfc601dcfc5b75b3bcf1f6c5c Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Sat, 9 Nov 2019 15:14:21 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Home/View/default/Public/promote_base.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html
index 1ea544a54..47a40a8c0 100644
--- a/Application/Home/View/default/Public/promote_base.html
+++ b/Application/Home/View/default/Public/promote_base.html
@@ -38,7 +38,7 @@
后台首页
管理中心
- 账户信息
+
部门长管理
From 8a513767ddf7fff40447487c15e62f6fea032105 Mon Sep 17 00:00:00 2001
From: jbrazz <2436953959@qq.com>
Date: Sat, 9 Nov 2019 15:35:19 +0800
Subject: [PATCH 3/3] upt
---
Application/Admin/Common/function.php | 5 +-
.../Controller/ExportController.class.php | 39 ++++++++---
.../Controller/FinanceController.class.php | 11 +--
.../Admin/Controller/GameController.class.php | 2 +-
.../Controller/ProvideController.class.php | 11 ++-
.../RechargeSumController.class.php | 4 +-
.../Controller/ServerController.class.php | 2 +-
.../Admin/Controller/UserController.class.php | 2 +-
.../Admin/View/Finance/gameFinance.html | 54 +++++++--------
Application/Admin/View/Game/lists.html | 43 +++++++++++-
Application/Admin/View/Promote/lists.html | 10 +--
Application/Admin/View/Provide/lists.html | 43 ++++++++++--
Application/Admin/View/Server/lists.html | 49 +++++++++----
Application/Admin/View/User/rolelist.html | 68 ++++++++++++++++---
14 files changed, 253 insertions(+), 90 deletions(-)
diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php
index dfb6b2a4c..ca3b96255 100644
--- a/Application/Admin/Common/function.php
+++ b/Application/Admin/Common/function.php
@@ -550,9 +550,10 @@ function getGameByName($game_name=null, $sdk_version=null)
$map['relation_game_name'] = $game_name;
}
if ($sdk_version) {
- $map['server_version'] = $sdk_version;
+ $map['sdk_version'] = $sdk_version;
}
- return D("Game")->where($map)->select();
+ $result = D("Game")->where($map)->select();
+ return $result;
}
function getTopPromote($promote_id)
diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php
index 337e43bd6..8c016e316 100644
--- a/Application/Admin/Controller/ExportController.class.php
+++ b/Application/Admin/Controller/ExportController.class.php
@@ -38,7 +38,7 @@ class ExportController extends Controller
//导出Excel
function expUser($id)
{
- $xlsName = $_REQUEST['xlsname'];
+ $xlsName = $_REQUEST['xlsname'];
switch ($id) {
case 1:
@@ -52,7 +52,7 @@ class ExportController extends Controller
array('play_ip', "最后登录ip"),
);
if (isset($_REQUEST['game_name'])) {
- $map['game_name'] = trim($_REQUEST['game_name']);
+ $map['game_name'] = ['like', trim($_REQUEST['game_name'])."%"];
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['user_account'])) {
@@ -599,14 +599,18 @@ class ExportController extends Controller
unset($_REQUEST['start']);
unset($_REQUEST['end']);
}
- if (isset($_REQUEST['game_name'])) {
- if ($_REQUEST['game_name'] == L('All')) {
+ if(isset($_REQUEST['game_name'])){
+ if($_REQUEST['game_name']=='全部'){
unset($_REQUEST['game_name']);
- } else {
- $map['game_name'] = $_REQUEST['game_name'];
+ }else{
+ $map['tab_spend.game_id']= ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')];
unset($_REQUEST['game_name']);
}
}
+ if(isset($_REQUEST['server_name'])){
+ $map['tab_spend.server_name']=$_REQUEST['server_name'];
+ unset($_REQUEST['server_name']);
+ }
if (isset($_REQUEST['pay_order_number'])) {
$map['pay_order_number'] = array('like', '%' . trim($_REQUEST['pay_order_number']) . '%');
unset($_REQUEST['pay_order_number']);
@@ -623,6 +627,17 @@ class ExportController extends Controller
$map['pay_game_status'] = $_REQUEST['pay_game_status'];
unset($_REQUEST['pay_game_status']);
}
+ if(isset($_REQUEST['promote_id'])) {
+ if ($_REQUEST['promote_id'] == 0) {
+ $map['promote_id'] = 0;
+ } else {
+ $map['_complex'] = ['tp.chain'=>['like', "%/{$_REQUEST['promote_id']}/%"], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or'];
+ }
+ $tab_promote_join = "left join tab_promote as tp on tp.id = tab_spend.promote_id";
+ //unset($_REQUEST['promote_id']);
+ } else {
+ $tab_promote_join = false;
+ }
$map1 = $map;
$map1['pay_status'] = 1;
$total = D('Spend')->where($map1)->sum('pay_amount');
@@ -634,6 +649,7 @@ class ExportController extends Controller
$xlsData = D('Spend')
->field('pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,pay_amount,pay_amount,pay_status,pay_game_status,pay_way,server_name,game_player_name,cost')
->where($map)
+ ->join($tab_promote_join)
->order('pay_time DESC')
->select();
$xlsCell = array(
@@ -3801,7 +3817,7 @@ if ($key == 'model'){
$model = M('game','tab_');
if(isset($_REQUEST['game_name'])){
- $map['game_name'] = $_REQUEST['game_name'];
+ $extend['game_name'] = ['like', "{$_REQUEST['game_name']}%"];
}
if(isset($_REQUEST['sdk_version1'])){
$map['sdk_version']=$_REQUEST['sdk_version1'];
@@ -4185,8 +4201,10 @@ if ($key == 'model'){
if(isset($_REQUEST['game_name'])){
if($_REQUEST['game_name']=='全部'){
+ unset($_REQUEST['game_name']);
}else{
- $map['game_name']=$_REQUEST['game_name'];
+ $extend['game_name']=['like', "{$_REQUEST['game_name']}%"];
+ unset($_REQUEST['game_name']);
}
}
@@ -5393,8 +5411,9 @@ if ($key == 'model'){
$map['promote_account'] = array('like','%'.I("root_name").'%');
}
- if (!empty(I("game_id"))) {
- $map['game_id'] = I("game_id");
+ $game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id');
+ if ($game_ids) {
+ $map['game_id'] = ['in', $game_ids];
}
if (!empty(I('partner_id'))) {
diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php
index c4dcc6a47..90d95c622 100644
--- a/Application/Admin/Controller/FinanceController.class.php
+++ b/Application/Admin/Controller/FinanceController.class.php
@@ -139,9 +139,9 @@ class FinanceController extends ThinkController
if (!empty(I('root_name'))) {
$map['promote_account'] = array('like','%'.I("root_name").'%');
}
-
- if (!empty(I("game_id"))) {
- $map['game_id'] = I("game_id");
+ $game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id');
+ if ($game_ids) {
+ $map['game_id'] = ['in', $game_ids];
}
if(!empty(I('root_id'))||I('root_id')=='0') {
@@ -614,7 +614,10 @@ class FinanceController extends ThinkController
if (I('partner_id')) {
$map['partner_id'] = I('partner_id');
}
- $data = M('game','tab_')->field("id,game_name")->where($map)->select();
+ if (I('sdk_type')) {
+ $map['sdk_version'] = I('sdk_type');
+ }
+ $data = M('game','tab_')->field("relation_game_name as game_name")->where($map)->group("relation_game_name")->select();
$this->ajaxReturn($data,'json');
}
diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php
index bc58973ab..330d8ccf8 100644
--- a/Application/Admin/Controller/GameController.class.php
+++ b/Application/Admin/Controller/GameController.class.php
@@ -33,7 +33,7 @@ class GameController extends ThinkController
public function lists()
{
if (isset($_REQUEST['game_name'])) {
- $extend['game_name'] = $_REQUEST['game_name'];
+ $extend['game_name'] = ['like', "{$_REQUEST['game_name']}%"];
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['sdk_version1'])) {
diff --git a/Application/Admin/Controller/ProvideController.class.php b/Application/Admin/Controller/ProvideController.class.php
index 707d2be66..9a2088c03 100644
--- a/Application/Admin/Controller/ProvideController.class.php
+++ b/Application/Admin/Controller/ProvideController.class.php
@@ -35,13 +35,10 @@ class ProvideController extends ThinkController {
$map['create_time'] = ['LT',strtotime(I('end'))+86399];
unset($_REQUEST['end']);
}
- if(isset($_REQUEST['game_name'])){
- if($_REQUEST['game_name']=='请选择'){
- unset($_REQUEST['game_name']);
- }else{
- $map['game_name']=$_REQUEST['game_name'];
- unset($_REQUEST['game_name']);
- }
+ $game_ids = array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['sdk_version1']), 'id');
+ if ($game_ids) {
+ $map['game_id'] = ['in', $game_ids];
+ unset($_REQUEST['game_name'], $_REQUEST['sdk_version1']);
}
if(isset($_REQUEST['op_account'])){
if($_REQUEST['op_account']=='请选择'){
diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php
index 1686fa3f7..4a6055766 100644
--- a/Application/Admin/Controller/RechargeSumController.class.php
+++ b/Application/Admin/Controller/RechargeSumController.class.php
@@ -31,9 +31,9 @@ class RechargeSumController extends ThinkController{
if(isset($_REQUEST['promote_id'])){
if ($_REQUEST['promote_id'] > 0) {
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
- $promoter_ids ? $rmap['promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
+ $promoter_ids ? $rmap['tab_user.promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
} else {
- $rmap['promote_id'] = $map['promote_id'] = 0;
+ $rmap['tab_user.promote_id'] = $map['promote_id'] = 0;
}
}
diff --git a/Application/Admin/Controller/ServerController.class.php b/Application/Admin/Controller/ServerController.class.php
index ea6a9dcbb..62c198fbc 100644
--- a/Application/Admin/Controller/ServerController.class.php
+++ b/Application/Admin/Controller/ServerController.class.php
@@ -35,7 +35,7 @@ class ServerController extends ThinkController {
if($_REQUEST['game_name']=='全部'){
unset($_REQUEST['game_name']);
}else{
- $extend['game_name']=$_REQUEST['game_name'];
+ $extend['game_name']=['like', "{$_REQUEST['game_name']}%"];
unset($_REQUEST['game_name']);
}
}
diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php
index c4124f626..ed47e784a 100644
--- a/Application/Admin/Controller/UserController.class.php
+++ b/Application/Admin/Controller/UserController.class.php
@@ -558,7 +558,7 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
{
$map = [];
if (isset($_REQUEST['game_name'])) {
- $map['game_name'] = trim($_REQUEST['game_name']);
+ $map['game_name'] = ['like', trim($_REQUEST['game_name'])."%"];
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['server_id'])) {
diff --git a/Application/Admin/View/Finance/gameFinance.html b/Application/Admin/View/Finance/gameFinance.html
index 9d1d4f65c..5b6291597 100644
--- a/Application/Admin/View/Finance/gameFinance.html
+++ b/Application/Admin/View/Finance/gameFinance.html
@@ -89,12 +89,19 @@
-
+
+
+
+
@@ -259,45 +266,32 @@
});
});
- $("#partner_id").change(function(){
+ function get_game_list()
+ {
+ var game_name = "{:I('game_name')}";
$.ajax({
url:"{:U('Finance/getGameList')}",
type:"post",
- data:{partner_id:$("#partner_id option:selected").attr('partner-id')},
+ data:{partner_id:$("#partner_id option:selected").attr('partner-id'), sdk_type:$("#sdk_version1 option:selected").val()},
dataType:'json',
success:function(data){
var str = "";
for (var i in data){
- str += ""
+ str += ""
}
// console.log(str);
- $("#game_id").empty();
- $("#game_id").append(str);
+ $("#game_name").empty();
+ $("#game_name").append(str);
// $("#server_id").select2();
}
})
+ }
+ $("#partner_id, #sdk_type").change(function(){
+ get_game_list();
});
- var game_id = "{:I('game_name')}";
- var game_server = "{:I('server_id')}";
- if(game_id){
- $.ajax({
- url:"{:U('Ajax/getSpendServer')}",
- type:"post",
- data:{game_id:game_id,type:2},
- dataType:'json',
- success:function(data){
- str = "";
- for (var i in data){
- str += ""
- }
- $("#server_id").empty();
- $("#server_id").append(str);
- $("#server_id").select2();
- }
- })
- }
+ $("#partner_id").change();
})
diff --git a/Application/Admin/View/Game/lists.html b/Application/Admin/View/Game/lists.html
index 56fac7fac..5991d6528 100644
--- a/Application/Admin/View/Game/lists.html
+++ b/Application/Admin/View/Game/lists.html
@@ -69,7 +69,7 @@ text-indent:0;
- |