From e271dcff3f73e886bdaf3d3b8bd138de038944cf Mon Sep 17 00:00:00 2001
From: elf <360197197@qq.com>
Date: Wed, 14 Jun 2023 01:21:20 +0800
Subject: [PATCH] yh
---
.../Admin/Controller/GameApiController.class.php | 1 +
.../Admin/Controller/GameRebateController.class.php | 5 +++++
Application/Admin/View/GameRebate/records.html | 6 ++++++
.../Base/Service/GameRebateService.class.php | 13 ++++++++++---
.../Base/Tool/GameResource/JmxyClient.class.php | 4 ++--
5 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/Application/Admin/Controller/GameApiController.class.php b/Application/Admin/Controller/GameApiController.class.php
index 4c60d1ea2..6613e972f 100644
--- a/Application/Admin/Controller/GameApiController.class.php
+++ b/Application/Admin/Controller/GameApiController.class.php
@@ -216,6 +216,7 @@ class GameApiController extends Think {
$service->sendOnce('I');
$service->sendOnce('J');
$service->sendOnce('K');
+ $service->sendOnce('L');
$date = date('Y-m-d');
$service->sendDaily('B', $date);
diff --git a/Application/Admin/Controller/GameRebateController.class.php b/Application/Admin/Controller/GameRebateController.class.php
index 7384ed221..11d4831d3 100644
--- a/Application/Admin/Controller/GameRebateController.class.php
+++ b/Application/Admin/Controller/GameRebateController.class.php
@@ -65,6 +65,11 @@ class GameRebateController extends ThinkController
$this->records('K');
}
+ public function roleLevel()
+ {
+ $this->records('L');
+ }
+
public function records($awardType)
{
$params = I('get.');
diff --git a/Application/Admin/View/GameRebate/records.html b/Application/Admin/View/GameRebate/records.html
index 26493c5a0..03f274f21 100644
--- a/Application/Admin/View/GameRebate/records.html
+++ b/Application/Admin/View/GameRebate/records.html
@@ -221,6 +221,9 @@
申请总价值 |
充值金额 |
+
+ 奖励等级 |
+ 当前等级 |
申请道具 |
@@ -296,6 +299,9 @@
{$data.amount} |
{$data.pay_amount} |
+
+ {$data.amount} |
+ {$data.pay_amount} |
diff --git a/Application/Base/Service/GameRebateService.class.php b/Application/Base/Service/GameRebateService.class.php
index fad7d843f..2272eb377 100644
--- a/Application/Base/Service/GameRebateService.class.php
+++ b/Application/Base/Service/GameRebateService.class.php
@@ -32,6 +32,7 @@ class GameRebateService
'I' => '充值返利发放',
'J' => '定制道具申请',
'K' => '新服七日礼包',
+ 'L' => '等级福利发放',
];
public $typeNames = [
@@ -46,9 +47,10 @@ class GameRebateService
'I' => 'singleTimes',
'J' => 'propsApplication',
'K' => 'openSevenDay',
+ 'L' => 'roleLevel',
];
- public $rebateBaseGameIds = [11];
+ public $rebateBaseGameIds = [11, 17];
public function isGiftItemSend($order, $item)
{
@@ -63,8 +65,10 @@ class GameRebateService
{
$gift = null;
if ($order['gift_key']) {
- $gift = M('rebate_gifts', 'tab_')->where(['base_game_id' => $order['base_game_id'], 'type' => $order['type'], 'gift_key' => $order['gift_key']])->find();
+ $gift = M('rebate_gifts', 'tab_')
+ ->where(['base_game_id' => $order['base_game_id'], 'type' => $order['type'], 'gift_key' => $order['gift_key'], 'group' => $order['gift_group']])->find();
}
+ $order['type_name'] = $this->typeDisplayNames[$order['type']] ?: '返利福利';
$hasError = false;
$sendResult = '';
if ($gift && $gift['game_currency'] > 0) {
@@ -116,7 +120,7 @@ class GameRebateService
case 11:
$client = new ZzylClient();
break;
- case 11:
+ case 17:
$client = new JmxyClient();
break;
default:
@@ -385,6 +389,9 @@ class GameRebateService
$fields['amount'] = '申请总价值';
} elseif ($awardType == 'K') {
$fields['pay_amount'] = '充值金额';
+ } elseif ($awardType == 'L') {
+ $fields['pay_amount'] = '当前等级';
+ $fields['mount'] = '奖励等级';
}
if ($awardType == 'J') {
diff --git a/Application/Base/Tool/GameResource/JmxyClient.class.php b/Application/Base/Tool/GameResource/JmxyClient.class.php
index 7a7288074..17c09a76d 100644
--- a/Application/Base/Tool/GameResource/JmxyClient.class.php
+++ b/Application/Base/Tool/GameResource/JmxyClient.class.php
@@ -133,8 +133,8 @@ class JmxyClient
'appId' => 'chengfeng',
'userId' => $order['user_id'],
'orderNum' => $this->generateOrderNumber($order, $giftItem['index']),
- 'title' => '测试邮件',
- 'content' => '测试礼包发送',
+ 'title' => $order['type_name'],
+ 'content' => $order['gift_content'] ?? $order['type_name'] . '返利礼包,请查收',
'packages' => json_encode([
[
'packageId' => $giftItem['id'],