From ab27c53da4700d26c520c5f80d4acc436a97b2e5 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Sat, 21 Dec 2019 17:42:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Spend/lists.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index 7bf71f5e8..881fe2728 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -394,7 +394,11 @@ location.reload(); }, 1500); } else { - var tip_msg = e.msg ? e.msg : "补单失败"; + if (e.msg) { + var tip_msg = e.msg; + } else { + var tip_msg = e.info ? e.info : "补单失败"; + } layer.msg(tip_msg, {icon: 2}); } }, From 2e818c04f8ef6640fc07c55e4abee00bb2dd372e Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Sat, 21 Dec 2019 18:51:52 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 25 ++++++++++++++----- .../Controller/MemberController.class.php | 7 +++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 2b7118037..75804c516 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -1706,12 +1706,25 @@ function get_admin_listOther() * @param $promote_id * @return mixed */ -function getOffspringByPromoteId($promote_id) { - $promote_ids = M('promote', 'tab_') - ->where(['chain' => ['like', "%/{$promote_id}/%"]]) - ->field('group_concat(id) as promote_ids') - ->find(); - return $promote_ids['promote_ids']; +function getOffspringByPromoteId($promote_id = null) { + if (isset($promote_id)) { + if ($promote_id ==0) {//官方渠道 + $promote_ids = '0'; + } else { + $where['chain'] = ['like', "%/{$promote_id}/%"]; + $where['id'] = $promote_id;//会长本身 + $where['_logic'] = 'or'; + $map['_complex'] = $where; + $promote_ids = M('promote', 'tab_') + ->where($map) + ->field('group_concat(id) as promote_ids') + ->find(); + $promote_ids = $promote_ids['promote_ids']; + } + } else { + $promote_ids = getPowerPromoteIds(); + } + return $promote_ids; } diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index fd6c8a73c..8f5695723 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1072,16 +1072,15 @@ class MemberController extends ThinkController if (isset($_REQUEST['promote_id'])) { if (I('promote_level') ==1) { $promote_ids = getOffspringByPromoteId($_REQUEST['promote_id']); - if (empty($promote_ids)) { - $promote_ids = -1; - } $map['promote_id'] = ['exp', "in($promote_ids)"]; } else { $map['promote_id'] = $_REQUEST['promote_id']; } unset($_REQUEST['promote_id']); + } elseif (I('promote_level') ==1) { + $promote_ids = getOffspringByPromoteId(); + $map['promote_id'] = ['exp', "in($promote_ids)"]; } - // $map['type'] = 1; // $map['login_time'] = ['exp', 'login_time<>0']; $extend = array(); From 5b1a4db378348d58dc2b8d4d40a7ccc32b60b053 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Sat, 21 Dec 2019 18:54:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/MemberController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 8f5695723..ec51078c0 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1079,7 +1079,9 @@ class MemberController extends ThinkController unset($_REQUEST['promote_id']); } elseif (I('promote_level') ==1) { $promote_ids = getOffspringByPromoteId(); - $map['promote_id'] = ['exp', "in($promote_ids)"]; + if ($promote_ids != 'all') { + $map['promote_id'] = ['exp', "in($promote_ids)"]; + } } // $map['type'] = 1; // $map['login_time'] = ['exp', 'login_time<>0']; From 0d088037dac1ca6ec86ab2fd2eeb2ba63ab11ab8 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Sat, 21 Dec 2019 19:04:24 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=BC=BA=E5=88=B6=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/MemberController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index ec51078c0..46220b439 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1087,7 +1087,7 @@ class MemberController extends ThinkController // $map['login_time'] = ['exp', 'login_time<>0']; $extend = array(); $extend['map'] = $map; - $count = M('UserLoginRecord','tab_')->field('user_id')->where($extend['map'])->group('user_id')->select(false); + $count = M('UserLoginRecord','tab_')->table('tab_user_login_record FORCE INDEX(user_id_promote_idx)')->field('user_id')->where($extend['map'])->group('user_id')->select(false); $sql = "select count(user_id) as count from ({$count})t"; $count = M('UserLoginRecord','tab_')->query($sql);