未收押金会长禁用落地页/下载页

master
ELF 5 years ago
parent ed25d54dc8
commit bbb31890f6

@ -53,6 +53,8 @@ class PresidentDepositController extends ThinkController
$promotes = $this->mergeOneReletions('company', $promotes, $relationQuery, 'company_id', 'id');
$relationQuery = M('president_deposit', 'tab_');
$promotes = $this->mergeOneReletions('presidentDeposit', $promotes, $relationQuery, 'id', 'promote_id');
$relationQuery = M('promote_belong', 'tab_')->field(['verify_time', 'promote_id']);
$promotes = $this->mergeOneReletions('promoteBelong', $promotes, $relationQuery, 'id', 'promote_id');
/*echo '<pre>';
var_dump($promotes);
echo '</pre>';

@ -155,7 +155,7 @@
<td><?=$payTypes[$data['presidentDeposit']['pay_type']] ?? '--'?></td>
<td><?=date('Y-m-d H:i:s', $data['presidentDeposit']['create_time'])?></td>
<td><?=$data['presidentDeposit']['amount']?></td>
<td><?=date('Y-m-d H:i:s', $data['presidentDeposit']['verify_time'])?></td>
<td><?=date('Y-m-d H:i:s', $data['promoteBelong']['verify_time'])?></td>
<td><?=$statusList[$data['presidentDeposit']['status']]?></td>
<td><?=date('Y-m-d H:i:s', $data['presidentDeposit']['pay_confirm_time'])?></td>
<td>

@ -1004,4 +1004,19 @@ class PromoteService {
}
return null;
}
public function canPresidentApplyGame($promote)
{
$topPromote = $this->getTopPromote($promote);
if (in_array($topPromote['company_belong'], [1, 2])) {
$record = M('president_deposit', 'tab_')->where(['promote_id' => $topPromote['id']])->find();
if (!$record) {
return false;
}
if ($record['status'] != 1) {
return false;
}
}
return true;
}
}

@ -7,6 +7,7 @@ use Admin\Model\ApplyModel;
use Think\Model;
use Base\Facade\Request;
use Base\Service\ApplyService;
use Base\Service\PromoteService;
/**
@ -1781,6 +1782,16 @@ class ApplyController extends BaseController
]);
}
$promoteService = new PromoteService();
if (!$promoteService->canPresidentApplyGame($promote)) {
$this->ajaxReturn([
'status' => 0,
'message' => '请联系市场专员开启',
'data' => [
]
]);
}
$icon = Request::getHost() . '/' . get_cover($game['icon'], 'path');
$applyService = new ApplyService();
@ -1811,6 +1822,7 @@ class ApplyController extends BaseController
if ($promoteId == 0) {
$promoteId = $promote['id'];
}
$apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find();
$game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find();
if ($apply == null) {
@ -1822,6 +1834,16 @@ class ApplyController extends BaseController
]);
}
$promoteService = new PromoteService();
if (!$promoteService->canPresidentApplyGame($promote)) {
$this->ajaxReturn([
'status' => 0,
'message' => '请联系市场专员开启',
'data' => [
]
]);
}
$icon = Request::getHost() . '/' . get_cover($game['icon'], 'path');
$applyService = new ApplyService();

@ -1175,7 +1175,6 @@ CREATE TABLE `tab_president_deposit` (
`pay_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '押金付款方式',
`pay_way` tinyint(1) NOT NULL DEFAULT '0' COMMENT '付款方式',
`pay_account` varchar(60) NOT NULL DEFAULT '' COMMENT '付款账号',
`verify_time` int(10) NOT NULL DEFAULT '0' COMMENT '审核时间',
`pay_confirm_time` int(10) NOT NULL DEFAULT '0' COMMENT '押金确认时间',
`refund_time` int(10) NOT NULL DEFAULT '0' COMMENT '退款时间',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',

Loading…
Cancel
Save