master
elf 1 year ago
parent 0f50dc7627
commit e271dcff3f

@ -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);

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

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

@ -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') {

@ -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'],

Loading…
Cancel
Save