|
@@ -14,7 +14,7 @@ class InviteService extends BaseService
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
public static $baseFile = '\biz\invite\classes\InviteClass';
|
|
public static $baseFile = '\biz\invite\classes\InviteClass';
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//取详情 shish 2019.12.18
|
|
//取详情 shish 2019.12.18
|
|
|
public static function getDetail($id)
|
|
public static function getDetail($id)
|
|
|
{
|
|
{
|
|
@@ -110,7 +110,7 @@ class InviteService extends BaseService
|
|
|
$couponId = $coupon['id'];
|
|
$couponId = $coupon['id'];
|
|
|
InviteClass::updateById($id, ['couponId' => $couponId]);
|
|
InviteClass::updateById($id, ['couponId' => $couponId]);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//检查邀请有礼的权限 shish 2019.12.18
|
|
//检查邀请有礼的权限 shish 2019.12.18
|
|
|
public static function valid($invite, $merchantId)
|
|
public static function valid($invite, $merchantId)
|
|
|
{
|
|
{
|
|
@@ -121,7 +121,7 @@ class InviteService extends BaseService
|
|
|
util::fail('您没有权限操作');
|
|
util::fail('您没有权限操作');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//兑奖
|
|
//兑奖
|
|
|
public static function give($invite)
|
|
public static function give($invite)
|
|
|
{
|
|
{
|
|
@@ -129,6 +129,7 @@ class InviteService extends BaseService
|
|
|
util::fail('请确认是否可以兑奖');
|
|
util::fail('请确认是否可以兑奖');
|
|
|
}
|
|
}
|
|
|
$time = time();
|
|
$time = time();
|
|
|
|
|
+ $id = $invite['id'];
|
|
|
InviteClass::updateById($id, ['status' => 2, 'giveTime' => $time]);
|
|
InviteClass::updateById($id, ['status' => 2, 'giveTime' => $time]);
|
|
|
}
|
|
}
|
|
|
|
|
|