Commit 352f4d9b by 杨树贤

泰添加邀请限制

parent b520c97f
......@@ -24,6 +24,9 @@ class Controller extends BaseController
//不能助力了(助力人数已满或者用户已经助力过)
const CAN_NOT_ASSIST = 109009;
//不能助力了(助力人数已满或者用户已经助力过)
const CAN_NOT_INVITE_MYSELF = 109010;
const EXCHANGED_TODAY = 109100;
......
......@@ -24,8 +24,8 @@ class InvitesController extends Controller
public function index(Request $request)
{
$map = [
'user_id' => $request->user->user_id,
'page' => $request->get('page'),
'user_id' => $request->user->user_id,
'page' => $request->get('page'),
'page_size' => $request->get('page_size'),
];
$result = $this->service->getInviteList($map);
......@@ -37,6 +37,9 @@ class InvitesController extends Controller
{
$invitedUserId = $request->user->user_id;
$userId = $request->get('user_id');
if ($userId == $invitedUserId) {
return $this->Export(self::CAN_NOT_INVITE_MYSELF);
}
if (!$invitedUserId) {
return $this->Export(self::INVALID_PARAMETER);
}
......
......@@ -17,6 +17,7 @@ return [
109007 => '已经兑换过红包码,不能再兑换',
109008 => '自己不能助力自己',
109009 => '助力人数已满或者您已经助力过',
109010 => '自己不能邀请自己',
109100 => '今天已经兑换过了,请明天再来吧',
109101 => '兑换名额被抢光了',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment