Skip to content

Commit

Permalink
hotfix : user Log에 userID 필드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
great-park committed Oct 3, 2023
1 parent f0bc900 commit 7cf7cc7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ public class UserLogController {

@PostMapping
public ApiDataResponse<?> userlog(
@RequestBody LogMessage logMessage,
@AuthenticationPrincipal CustomUserDetails customUserDetails
@RequestBody LogMessage logMessage
) {

Long memberId = customUserDetails.getMemberId();
String topic = logProducer.sendMessage(logMessage);

return ApiDataResponse.of(topic);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class LogMessage {
private String eventLogName;
private String screenName;
private Integer logVersion;
private Integer userID;

private Map<String, Object> logData;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class UserLog {

private Integer logVersion;

private Integer userID;

@Type(JsonType.class)
@Column(columnDefinition = "json")
private Map<String, Object> logData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class LogMessage {
private String eventLogName;
private String screenName;
private Integer logVersion;
private Integer userID;

private Map<String, Object> logData;

Expand All @@ -22,6 +23,7 @@ public UserDataLog toUserDataLog(String topic, int partition, long receivedTimeS
.eventLogName(eventLogName)
.screenName(screenName)
.logVersion(logVersion)
.userID(userID)
.logData(logData)
.topic(topic)
.partition(partition)
Expand All @@ -34,6 +36,7 @@ public UserLog toUserLog(String topic, int partition, long receivedTimeStamp) {
.eventLogName(eventLogName)
.screenName(screenName)
.logVersion(logVersion)
.userID(userID)
.logData(logData)
.topic(topic)
.partitionNumber(partition)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class UserDataLog {

private Integer logVersion;

private Integer userID;

private Map<String, Object> logData;

private String topic;
Expand Down

0 comments on commit 7cf7cc7

Please sign in to comment.