|
@@ -267,7 +267,7 @@ class User extends BaseModel
|
|
|
$routineInfo['routine_openid'] = $routine['openId'];//openid
|
|
|
$routineInfo['session_key'] = $routine['session_key'];//会话密匙
|
|
|
$routineInfo['unionid'] = $routine['unionId'];//用户在开放平台的唯一标识符
|
|
|
- $routineInfo['user_type'] = 2;//用户类型
|
|
|
+ $routineInfo['login_type'] = 2;//用户类型
|
|
|
$spid = 0;//绑定关系uid
|
|
|
$isCOde = false;
|
|
|
//获取是否有扫码进小程序
|
|
@@ -277,13 +277,13 @@ class User extends BaseModel
|
|
|
$spid = $routine['spid'];
|
|
|
|
|
|
// 判断unionid 存在根据unionid判断
|
|
|
- if ($routineInfo['unionid'] != '' && ($uid = UserRelation::where(['unionid' => $routineInfo['unionid']])->where('user_type', '<>', '0')->value('user_id'))) {
|
|
|
+ if ($routineInfo['unionid'] != '' && ($uid = UserRelation::where(['unionid' => $routineInfo['unionid']])->where('login_type', '<>', '0')->value('user_id'))) {
|
|
|
UserRelation::where('user_id',$uid)->update($routineInfo);
|
|
|
$routineInfo['code'] = $spid;
|
|
|
$routineInfo['isPromoter'] = $isCOde;
|
|
|
if ($routine['login_type']) $routineInfo['login_type'] = 3;
|
|
|
self::updateWechatUser($routineInfo,0);
|
|
|
- } else if ($uid = UserRelation::where(['routine_openid' => $routineInfo['routine_openid']])->where('user_type', '<>', 0)->value('user_id')) { //根据小程序openid判断
|
|
|
+ } else if ($uid = UserRelation::where(['routine_openid' => $routineInfo['routine_openid']])->where('login_type', '<>', 0)->value('user_id')) { //根据小程序openid判断
|
|
|
UserRelation::where('user_id',$uid)->update($routineInfo);
|
|
|
$routineInfo['code'] = $spid;
|
|
|
$routineInfo['isPromoter'] = $isCOde;
|