|
@@ -48,19 +48,20 @@ class WechatCommonService extends BaseService
|
|
|
|
|
|
self::updateUserActivityTime($app, $appid, $message['FromUserName']);
|
|
|
return self::handleTextMessage($wechatInfoId, $message);
|
|
|
- case 'image':
|
|
|
- return '收到图片消息';
|
|
|
- case 'voice':
|
|
|
- return '收到语音消息';
|
|
|
- case 'video':
|
|
|
- return '收到视频消息';
|
|
|
- case 'location':
|
|
|
- return '收到坐标消息';
|
|
|
- case 'link':
|
|
|
- return '收到链接消息';
|
|
|
- case 'file':
|
|
|
- return '收到文件消息';
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
default:
|
|
|
+ self::updateUserActivityTime($app, $appid, $message['FromUserName']);
|
|
|
return '收到其它消息';
|
|
|
}
|
|
|
return "";
|
|
@@ -102,6 +103,7 @@ class WechatCommonService extends BaseService
|
|
|
];
|
|
|
if (is_empty($info)) {
|
|
|
$data = self::getUserInfo($app,$appid,$openId);
|
|
|
+ $data['active_at'] = time();
|
|
|
}else{
|
|
|
if ($info->uid == 0){
|
|
|
$data['uid'] = intval(DB::table('wechat_miniprogram_users')->where('unionid', $info->unionid)->value('id'));
|
|
@@ -145,7 +147,6 @@ class WechatCommonService extends BaseService
|
|
|
$data = self::getUserInfo($app,$appid,$openId);
|
|
|
WechatOfficialUserInfo::updateOrCreate(['mp_openid' => $data['mp_openid'], 'gzh_appid' => $data['gzh_appid']], $data);
|
|
|
}else{
|
|
|
-
|
|
|
if (!is_empty($info)){
|
|
|
if ($info->uid == 0){
|
|
|
$data['uid'] = intval(DB::table('wechat_miniprogram_users')->where('unionid', $info->unionid)->value('id'));
|
|
@@ -172,7 +173,6 @@ class WechatCommonService extends BaseService
|
|
|
'is_subscribe' => $user['subscribe'],
|
|
|
'subscribe_time' => $user['subscribe_time'],
|
|
|
'subscribe_time_str' => get_date($user['subscribe_time']),
|
|
|
- 'active_at' => time(),
|
|
|
'uid' => intval(DB::table('wechat_miniprogram_users')->where('unionid', $user['unionid'])->value('id')),
|
|
|
];
|
|
|
}
|