|
@@ -19,6 +19,7 @@ package org.springblade.modules.system.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -85,6 +86,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
private UserAppService userAppService;
|
|
|
@Resource
|
|
|
private IUserMerchantService iUserMerchantService;
|
|
|
+ @Resource
|
|
|
+ private IUserWeChatService userWeChatService;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -696,4 +699,12 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
.eq(User::getUserType, category));
|
|
|
return user;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean isUser(String code) {
|
|
|
+ JSONObject jsonObject = userWeChatService.getopenId(code);
|
|
|
+ String openId = jsonObject.getString("openid");
|
|
|
+ UserWeChat userWeChat = userWeChatService.lambdaQuery().eq(UserWeChat::getOpenId, openId).one();
|
|
|
+ return userWeChat != null;
|
|
|
+ }
|
|
|
}
|