提交代码

dev-discount
胡锐 2 years ago
parent 50f8c1942e
commit 28e5a386ba
  1. 5
      hai-service/src/main/java/com/hai/common/utils/BaiduUtils.java
  2. 2
      hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java
  3. 1
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java

@ -21,9 +21,14 @@ public class BaiduUtils {
* @return * @return
*/ */
public static JSONObject ipLocation(String ip) { public static JSONObject ipLocation(String ip) {
if (ip != null) {
JSONObject response = HttpsUtils.doGet("https://api.map.baidu.com/location/ip?ak=X4sSdXsohVOMb1tNiLZloD9ows5FaNjq&ip=" + ip); JSONObject response = HttpsUtils.doGet("https://api.map.baidu.com/location/ip?ak=X4sSdXsohVOMb1tNiLZloD9ows5FaNjq&ip=" + ip);
log.info(response.toJSONString()); log.info(response.toJSONString());
return response; return response;
} else {
return null;
}
} }

@ -267,7 +267,7 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe
useDiscount(discountAgentCodeId); useDiscount(discountAgentCodeId);
} }
} catch (Exception e) { } catch (Exception e) {
throw e;
} finally { } finally {
// 删除key,释放锁 // 删除key,释放锁
redisTemplate.delete(key); redisTemplate.delete(key);

@ -84,6 +84,7 @@ public class HighUserServiceImpl implements HighUserService {
public SessionObject loginAndRegister(LoginPlatform platform,String phone, Long popularizeUserId, Map<String, Object> other,HttpServletRequest request, HttpServletResponse response) throws Exception { public SessionObject loginAndRegister(LoginPlatform platform,String phone, Long popularizeUserId, Map<String, Object> other,HttpServletRequest request, HttpServletResponse response) throws Exception {
// 记录登录信息 // 记录登录信息
String requestIp = RequestUtils.getRequestIp(); String requestIp = RequestUtils.getRequestIp();
System.out.println(requestIp);
HighUserLoginLog loginLog = new HighUserLoginLog(); HighUserLoginLog loginLog = new HighUserLoginLog();
loginLog.setUserPhone(phone); loginLog.setUserPhone(phone);
loginLog.setPlatformCode(platform.getCode()); loginLog.setPlatformCode(platform.getCode());

Loading…
Cancel
Save