|
@@ -1,11 +1,12 @@
|
|
|
package com.mooctest.crowd.site.util;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.mooctest.crowd.site.anticorruption.impl.data.UserInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.http.*;
|
|
|
+import org.springframework.http.HttpEntity;
|
|
|
+import org.springframework.http.HttpHeaders;
|
|
|
+import org.springframework.http.MediaType;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
@@ -45,7 +46,7 @@ public class OperationRecordUtil {
|
|
|
params.put("operation", operation);
|
|
|
params.put("resource", "crowd-service");
|
|
|
HttpEntity<String> entity = new HttpEntity<>(params.toString() , httpHeaders);
|
|
|
- restTemplate.exchange(userServiceUrl + "/api/operation_record", HttpMethod.POST, entity, Object.class);
|
|
|
+
|
|
|
Timestamp current = new Timestamp(System.currentTimeMillis());
|
|
|
log.info(String.format("IP:[%s] - User[%d] logout at [%s]", ip, userId, current.toString()));
|
|
|
}
|