|
@@ -25,7 +25,9 @@ import cn.newfeifan.mall.module.system.api.sms.SmsCodeApi;
|
|
import cn.newfeifan.mall.module.system.api.sms.dto.code.SmsCodeUseReqDTO;
|
|
import cn.newfeifan.mall.module.system.api.sms.dto.code.SmsCodeUseReqDTO;
|
|
import cn.newfeifan.mall.module.system.api.social.SocialClientApi;
|
|
import cn.newfeifan.mall.module.system.api.social.SocialClientApi;
|
|
import cn.newfeifan.mall.module.system.api.social.dto.SocialWxPhoneNumberInfoRespDTO;
|
|
import cn.newfeifan.mall.module.system.api.social.dto.SocialWxPhoneNumberInfoRespDTO;
|
|
|
|
+import cn.newfeifan.mall.module.system.dal.dataobject.social.SocialUserBindDO;
|
|
import cn.newfeifan.mall.module.system.dal.dataobject.social.SocialUserDO;
|
|
import cn.newfeifan.mall.module.system.dal.dataobject.social.SocialUserDO;
|
|
|
|
+import cn.newfeifan.mall.module.system.dal.mysql.social.SocialUserBindMapper;
|
|
import cn.newfeifan.mall.module.system.dal.mysql.social.SocialUserMapper;
|
|
import cn.newfeifan.mall.module.system.dal.mysql.social.SocialUserMapper;
|
|
import cn.newfeifan.mall.module.system.enums.sms.SmsSceneEnum;
|
|
import cn.newfeifan.mall.module.system.enums.sms.SmsSceneEnum;
|
|
import cn.newfeifan.mall.module.system.service.user.AdminUserService;
|
|
import cn.newfeifan.mall.module.system.service.user.AdminUserService;
|
|
@@ -86,6 +88,8 @@ public class MemberUserServiceImpl implements MemberUserService {
|
|
@Resource
|
|
@Resource
|
|
private SocialUserMapper socialUserMapper;
|
|
private SocialUserMapper socialUserMapper;
|
|
@Resource
|
|
@Resource
|
|
|
|
+ private SocialUserBindMapper socialUserBindMapper;
|
|
|
|
+ @Resource
|
|
private StringRedisTemplate stringRedisTemplate;
|
|
private StringRedisTemplate stringRedisTemplate;
|
|
@Value("${wx.mp.app-id}")
|
|
@Value("${wx.mp.app-id}")
|
|
private String appid;
|
|
private String appid;
|
|
@@ -474,7 +478,12 @@ public class MemberUserServiceImpl implements MemberUserService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Boolean getUserIsSubscribe(Long userId) {
|
|
public Boolean getUserIsSubscribe(Long userId) {
|
|
- SocialUserDO socialUserDO = socialUserMapper.selectOne(SocialUserDO::getCreator, getLoginUserId());
|
|
|
|
|
|
+ SocialUserBindDO socialUserBindDO = socialUserBindMapper.selectOne(SocialUserBindDO::getUserId, getLoginUserId());
|
|
|
|
+ // 如果没有存储用户的openid就直接返回false
|
|
|
|
+ if(socialUserBindDO == null){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ SocialUserDO socialUserDO = socialUserMapper.selectOne(SocialUserDO::getId, socialUserBindDO.getSocialUserId());
|
|
// 如果没有存储用户的openid就直接返回false
|
|
// 如果没有存储用户的openid就直接返回false
|
|
if(socialUserDO == null){
|
|
if(socialUserDO == null){
|
|
return false;
|
|
return false;
|