From 47e2706e266ceb1b93aefd1f39a96599cdd434b8 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 8 Nov 2019 14:17:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Repository/SpendRepository.class.php | 5 +++++ Application/Home/View/default/Promote/children.html | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Application/Base/Repository/SpendRepository.class.php b/Application/Base/Repository/SpendRepository.class.php index c47409034..9f7e41df2 100644 --- a/Application/Base/Repository/SpendRepository.class.php +++ b/Application/Base/Repository/SpendRepository.class.php @@ -337,4 +337,9 @@ class SpendRepository $items = M('spend', 'tab_')->field('count(DISTINCT user_id) as count, game_id')->where($conditions)->group('game_id')->find(); return $this->assembleRecords($items, $gameIds, 'count', 'game_id'); } + + public function getCommonQuery($params, $columns = '*') + { + // return M('spend', 'tab_')->field($columns)->where($map); + } } \ No newline at end of file diff --git a/Application/Home/View/default/Promote/children.html b/Application/Home/View/default/Promote/children.html index f4a597db0..e2d515343 100644 --- a/Application/Home/View/default/Promote/children.html +++ b/Application/Home/View/default/Promote/children.html @@ -376,7 +376,9 @@ $(function(){ $('.cancel-shift-btn').on({ click: function() { - var id = $(this).parents('tr').eq(0).attr('data-id') + var tr = $(this).parents('tr').eq(0) + var id = tr.attr('data-id') + var parentId = tr.attr('data-parent-id') var shiftType = $(this).attr('data-promote-shift-type') var shiftTypeName = getShiftTypeName(shiftType) layer.confirm('是否要取消' + shiftTypeName, {icon: 3, title:'提示'}, function(index){ From c2c8f11d01863b0f12e26a80548e0a689d264488 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 8 Nov 2019 15:47:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/PromoteService.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index a5874251a..59ae9d8d6 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -184,10 +184,10 @@ class PromoteService { $shiftIds = json_decode($task['shift_ids'], true) ?? []; if (count($shiftIds) > 0) { $firstMap['id'] = ['in', $shiftIds]; - $secondMap['id'] = ['in', $shiftIds]; + $secondMap['parent_id'] = ['in', $shiftIds]; } - $status = M('promote', 'tab_')->where($firstMap)->save(['parent_id' => $toPromote['id']]); + $status = M('promote', 'tab_')->where($firstMap)->save(['parent_id' => $toPromote['id'], 'parent_name' => $toPromote['account']]); if (!$status) { $model->rollback(); return ['status' => false, 'msg' => '系统异常,修改推广员上级失败'];