|
@@ -162,6 +162,23 @@ public class UserController {
|
|
System.out.println("返回User jsonData===>"+jsonData);
|
|
System.out.println("返回User jsonData===>"+jsonData);
|
|
user.setNickName(EmojiHttpServletRequestWraper.filterEmoji(jsonData.getString("name")));
|
|
user.setNickName(EmojiHttpServletRequestWraper.filterEmoji(jsonData.getString("name")));
|
|
user.setHeaderPic(jsonData.getString("profile_image_url"));
|
|
user.setHeaderPic(jsonData.getString("profile_image_url"));
|
|
|
|
+ String location = jsonData.getString("location");
|
|
|
|
+ String city = null;
|
|
|
|
+ if (location != null) {
|
|
|
|
+ if (location.contains(" ")) {
|
|
|
|
+ String prov = location.split(" ")[0];
|
|
|
|
+ String c = location.split(" ")[1];
|
|
|
|
+ //直辖市取第一个
|
|
|
|
+ if (prov.equals("上海") || prov.equals("天津") || prov.equals("北京") || prov.equals("重庆")) {
|
|
|
|
+ city = prov;
|
|
|
|
+ } else {
|
|
|
|
+ city = c;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ city = location;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ user.setCity(city);
|
|
example.createCriteria().andVoucherIdEqualTo(uid).andTypeEqualTo(type);
|
|
example.createCriteria().andVoucherIdEqualTo(uid).andTypeEqualTo(type);
|
|
if (usermapper.countByExample(example) == 0) {
|
|
if (usermapper.countByExample(example) == 0) {
|
|
user.setId(Snowflake.getSnowflakeId());
|
|
user.setId(Snowflake.getSnowflakeId());
|
|
@@ -278,7 +295,7 @@ public class UserController {
|
|
@RequestParam String url,
|
|
@RequestParam String url,
|
|
HttpServletResponse response) throws Exception {
|
|
HttpServletResponse response) throws Exception {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
- System.out.println("微博接收到url=="+url);
|
|
|
|
|
|
+ log.info("微博接收到url=="+url);
|
|
WeiboParamExample example = new WeiboParamExample();
|
|
WeiboParamExample example = new WeiboParamExample();
|
|
Date d = new Date();
|
|
Date d = new Date();
|
|
example.createCriteria().andExpireTimeGreaterThan(d);
|
|
example.createCriteria().andExpireTimeGreaterThan(d);
|