|
|
@@ -150,13 +150,6 @@ class UserService extends BaseService
|
|
|
//注册成为普通会员(非VIP),并更新用户相关信息 shish 2019.9.7
|
|
|
public static function becomeMember($user, $merchant, $data)
|
|
|
{
|
|
|
- $userId = $user['id'];
|
|
|
- $merchantId = $merchant['id'];
|
|
|
- UserClass::updateById($userId, $data);
|
|
|
- //注意成为会员和关注公众号时要去检查是否符合发优惠券条件
|
|
|
- $userAsset = UserAssetClass::getByUserId($userId);
|
|
|
- CouponAssetClass::giveCoupon($user, $merchant, $userAsset);
|
|
|
-
|
|
|
//合并店长后台添加的客户
|
|
|
$mobile = isset($data['mobile']) ? $data['mobile'] : '';
|
|
|
if (!empty($mobile)) {
|
|
|
@@ -169,6 +162,14 @@ class UserService extends BaseService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //合并之后再更新信息
|
|
|
+ $userId = $user['id'];
|
|
|
+ $merchantId = $merchant['id'];
|
|
|
+ UserClass::updateById($userId, $data);
|
|
|
+ //注意成为会员和关注公众号时要去检查是否符合发优惠券条件
|
|
|
+ $userAsset = UserAssetClass::getByUserId($userId);
|
|
|
+ CouponAssetClass::giveCoupon($user, $merchant, $userAsset);
|
|
|
+
|
|
|
//增加会员数
|
|
|
MerchantAssetService::addMemberNum($merchantId);
|
|
|
}
|