|
@@ -27,6 +27,7 @@ import com.ssj.service.weixin.user.util.UserHandlerUtil;
|
|
import com.ssj.sys.util.j2se.RandomUtils;
|
|
import com.ssj.sys.util.j2se.RandomUtils;
|
|
import com.ssj.taskthread.Task;
|
|
import com.ssj.taskthread.Task;
|
|
import com.ssj.taskthread.ThreadPool;
|
|
import com.ssj.taskthread.ThreadPool;
|
|
|
|
+import com.ssj.utils.RequestOpenApiUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -206,6 +207,7 @@ public class UserServiceImpl extends BaseServiceImpl<User, String> implements Us
|
|
map.put("unionid", user.getUnionid());
|
|
map.put("unionid", user.getUnionid());
|
|
map.put("photo", StringUtil.isNotEmpty(user.getPhoto())?user.getPhoto():"");
|
|
map.put("photo", StringUtil.isNotEmpty(user.getPhoto())?user.getPhoto():"");
|
|
tokenManager.hset(key,map);
|
|
tokenManager.hset(key,map);
|
|
|
|
+ toOther(user);
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -223,6 +225,7 @@ public class UserServiceImpl extends BaseServiceImpl<User, String> implements Us
|
|
map.put("openId", user.getAccount());
|
|
map.put("openId", user.getAccount());
|
|
map.put("unionid", user.getUnionid());
|
|
map.put("unionid", user.getUnionid());
|
|
map.put("photo", StringUtil.isNotEmpty(user.getPhoto())?user.getPhoto():"");
|
|
map.put("photo", StringUtil.isNotEmpty(user.getPhoto())?user.getPhoto():"");
|
|
|
|
+ toOther(user);
|
|
}else{
|
|
}else{
|
|
|
|
|
|
User weiXinUser=UserHandlerUtil.getUserInfo(tokenManager.getSSJAccessToken(), openId);
|
|
User weiXinUser=UserHandlerUtil.getUserInfo(tokenManager.getSSJAccessToken(), openId);
|
|
@@ -257,6 +260,26 @@ public class UserServiceImpl extends BaseServiceImpl<User, String> implements Us
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void toOther(User user){
|
|
|
|
+ try {
|
|
|
|
+ Map<String,Object> requestMap = new HashMap<>();
|
|
|
|
+ requestMap.put("unionId",user.getUnionid());
|
|
|
|
+ requestMap.put("wxOpenId",user.getAccount());
|
|
|
|
+ requestMap.put("subscribe",user.getSubscribe());
|
|
|
|
+ requestMap.put("nickname",user.getName());
|
|
|
|
+ requestMap.put("sex",user.getSex());
|
|
|
|
+ requestMap.put("city",user.getCity());
|
|
|
|
+ requestMap.put("country",user.getCountry());
|
|
|
|
+ requestMap.put("province",user.getProvince());
|
|
|
|
+ requestMap.put("language",user.getLanguage());
|
|
|
|
+ requestMap.put("headImgUrl",user.getPhoto());
|
|
|
|
+ requestMap.put("subscribeTime",System.currentTimeMillis());
|
|
|
|
+ RequestOpenApiUtils.openApiServiceWx(requestMap);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ logger.error("调用远程接口出错",e);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public String getSubscribe(String userId) {
|
|
public String getSubscribe(String userId) {
|