master
elf 1 year ago
parent 0f50dc7627
commit e271dcff3f

@ -216,6 +216,7 @@ class GameApiController extends Think {
$service->sendOnce('I'); $service->sendOnce('I');
$service->sendOnce('J'); $service->sendOnce('J');
$service->sendOnce('K'); $service->sendOnce('K');
$service->sendOnce('L');
$date = date('Y-m-d'); $date = date('Y-m-d');
$service->sendDaily('B', $date); $service->sendDaily('B', $date);

@ -65,6 +65,11 @@ class GameRebateController extends ThinkController
$this->records('K'); $this->records('K');
} }
public function roleLevel()
{
$this->records('L');
}
public function records($awardType) public function records($awardType)
{ {
$params = I('get.'); $params = I('get.');

@ -221,6 +221,9 @@
<th>申请总价值</th> <th>申请总价值</th>
<?php elseif($awardType == 'K'):?> <?php elseif($awardType == 'K'):?>
<th>充值金额</th> <th>充值金额</th>
<?php elseif($awardType == 'L'):?>
<th>奖励等级</th>
<th>当前等级</th>
<?php endif;?> <?php endif;?>
<?php if($awardType == 'J'):?> <?php if($awardType == 'J'):?>
<th>申请道具</th> <th>申请道具</th>
@ -296,6 +299,9 @@
<td>{$data.amount}</td> <td>{$data.amount}</td>
<?php elseif($awardType == 'K'):?> <?php elseif($awardType == 'K'):?>
<td>{$data.pay_amount}</td> <td>{$data.pay_amount}</td>
<?php elseif($awardType == 'L'):?>
<td>{$data.amount}</td>
<td>{$data.pay_amount}</td>
<?php endif;?> <?php endif;?>
<?php if ($awardType != 'I'):?> <?php if ($awardType != 'I'):?>

@ -32,6 +32,7 @@ class GameRebateService
'I' => '充值返利发放', 'I' => '充值返利发放',
'J' => '定制道具申请', 'J' => '定制道具申请',
'K' => '新服七日礼包', 'K' => '新服七日礼包',
'L' => '等级福利发放',
]; ];
public $typeNames = [ public $typeNames = [
@ -46,9 +47,10 @@ class GameRebateService
'I' => 'singleTimes', 'I' => 'singleTimes',
'J' => 'propsApplication', 'J' => 'propsApplication',
'K' => 'openSevenDay', 'K' => 'openSevenDay',
'L' => 'roleLevel',
]; ];
public $rebateBaseGameIds = [11]; public $rebateBaseGameIds = [11, 17];
public function isGiftItemSend($order, $item) public function isGiftItemSend($order, $item)
{ {
@ -63,8 +65,10 @@ class GameRebateService
{ {
$gift = null; $gift = null;
if ($order['gift_key']) { 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; $hasError = false;
$sendResult = ''; $sendResult = '';
if ($gift && $gift['game_currency'] > 0) { if ($gift && $gift['game_currency'] > 0) {
@ -116,7 +120,7 @@ class GameRebateService
case 11: case 11:
$client = new ZzylClient(); $client = new ZzylClient();
break; break;
case 11: case 17:
$client = new JmxyClient(); $client = new JmxyClient();
break; break;
default: default:
@ -385,6 +389,9 @@ class GameRebateService
$fields['amount'] = '申请总价值'; $fields['amount'] = '申请总价值';
} elseif ($awardType == 'K') { } elseif ($awardType == 'K') {
$fields['pay_amount'] = '充值金额'; $fields['pay_amount'] = '充值金额';
} elseif ($awardType == 'L') {
$fields['pay_amount'] = '当前等级';
$fields['mount'] = '奖励等级';
} }
if ($awardType == 'J') { if ($awardType == 'J') {

@ -133,8 +133,8 @@ class JmxyClient
'appId' => 'chengfeng', 'appId' => 'chengfeng',
'userId' => $order['user_id'], 'userId' => $order['user_id'],
'orderNum' => $this->generateOrderNumber($order, $giftItem['index']), 'orderNum' => $this->generateOrderNumber($order, $giftItem['index']),
'title' => '测试邮件', 'title' => $order['type_name'],
'content' => '测试礼包发送', 'content' => $order['gift_content'] ?? $order['type_name'] . '返利礼包,请查收',
'packages' => json_encode([ 'packages' => json_encode([
[ [
'packageId' => $giftItem['id'], 'packageId' => $giftItem['id'],

Loading…
Cancel
Save