|
@@ -6,6 +6,7 @@ import com.caimei365.user.model.dto.BehaviorRecordDto;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.servlet.http.Cookie;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
|
@@ -22,6 +23,7 @@ public class CmBehaviorRecordApi {
|
|
|
|
|
|
/**
|
|
|
* 用户行为记录
|
|
|
+ *
|
|
|
* @param request
|
|
|
* @param userId
|
|
|
* @param pagePath
|
|
@@ -31,12 +33,18 @@ public class CmBehaviorRecordApi {
|
|
|
* @param accessDuration
|
|
|
* @return
|
|
|
*/
|
|
|
- @IpSave(saveName="用户行为记录",saveParams = true)
|
|
|
+ @IpSave(saveName = "用户行为记录", saveParams = true)
|
|
|
@GetMapping("/Statistics")
|
|
|
- public ResponseJson<String> behaviorRecordApp(HttpServletRequest request, Integer userId,String pagePath,String pageType,String pageLabel,String behaviorType,Integer productId,String accessDuration,Integer accessClient,Integer shopId){
|
|
|
+ public ResponseJson<String> behaviorRecordApp(HttpServletRequest request, Integer userId, String pagePath, String pageType, String pageLabel, String behaviorType, Integer productId, String accessDuration, Integer accessClient, Integer shopId) {
|
|
|
HttpSession session = request.getSession();
|
|
|
+ Cookie[] cookies = request.getCookies();
|
|
|
+ for (Cookie cookie : cookies) {
|
|
|
+ if ("tid".equals(cookie.getName())) {
|
|
|
+ log.info("tid------------>" + cookie.getValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
String touristId = (String) session.getAttribute("touristId");
|
|
|
- log.info("用户行为记录=======userId==》"+userId+"==pagePath=="+pagePath+"==pageType=="+pageType+"==pageLabel=="+pageLabel+"==behaviorType=="+behaviorType+"==productId=="+productId+"==accessDuration=="+accessDuration+"==accessClient=="+accessClient+"==shopId=="+shopId);
|
|
|
+ log.info("用户行为记录=======userId==》" + userId + "==pagePath==" + pagePath + "==pageType==" + pageType + "==pageLabel==" + pageLabel + "==behaviorType==" + behaviorType + "==productId==" + productId + "==accessDuration==" + accessDuration + "==accessClient==" + accessClient + "==shopId==" + shopId);
|
|
|
return ResponseJson.success("用户行为记录完成");
|
|
|
}
|
|
|
|