fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-922
This commit is contained in:
@ -48,6 +48,7 @@ public class LogUtils {
|
||||
private static final String KEY_PAY_LOAD = "payload";
|
||||
private static final String KEY_GAME_NAME = "game_name";
|
||||
private static final String KEY_GAME_ID = "game_id";
|
||||
private static final String LOG_STORE_EVENT = "event";
|
||||
|
||||
public static void logVideoStreamingUpload(String action, String entrance, String entranceDetail, String videoId) {
|
||||
JSONObject object = new JSONObject();
|
||||
@ -426,7 +427,7 @@ public class LogUtils {
|
||||
entity.setPayload(payload);
|
||||
entity.setTimestamp(System.currentTimeMillis() / 1000);
|
||||
|
||||
LoghubUtils.log(GsonUtils.toJsonIgnoreNull(entity), "event", false);
|
||||
LoghubUtils.log(GsonUtils.toJsonIgnoreNull(entity), LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void uploadLikeFromWelcomeDialog() {
|
||||
@ -443,7 +444,7 @@ public class LogUtils {
|
||||
entity.setPayload(payload);
|
||||
entity.setTimestamp(System.currentTimeMillis() / 1000);
|
||||
|
||||
LoghubUtils.log(GsonUtils.toJsonIgnoreNull(entity), "event", false);
|
||||
LoghubUtils.log(GsonUtils.toJsonIgnoreNull(entity), LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void uploadCommentFromWelcomeDialog() {
|
||||
@ -460,7 +461,7 @@ public class LogUtils {
|
||||
entity.setPayload(payload);
|
||||
entity.setTimestamp(System.currentTimeMillis() / 1000);
|
||||
|
||||
LoghubUtils.log(GsonUtils.toJsonIgnoreNull(entity), "event", false);
|
||||
LoghubUtils.log(GsonUtils.toJsonIgnoreNull(entity), LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -557,7 +558,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void uploadSearchGame(String event, String location, String key, String searchType) {
|
||||
@ -594,7 +595,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void logGameDetailStrategyButtonEvent(String gameId,
|
||||
@ -614,7 +615,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void logServerTestAccessEvent(String entrance,
|
||||
@ -708,7 +709,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void logNewCatalogAppearanceEvent(String entrance, String key) {
|
||||
@ -747,7 +748,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
private static void logCatalogEvent(String event, String entrance, String key, int seq1, int seq2, int seqContent, int seqContentList) {
|
||||
@ -772,7 +773,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void uploadPackageSkip(String event, String action, String gameId, String gameName) {
|
||||
@ -791,7 +792,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void logStartAd(String event, StartupAdEntity adEntity) {
|
||||
@ -815,7 +816,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void logRecommendClick(String entrance, String recommendName, String linkType, String linkTitle, String linkId, int sequence) {
|
||||
@ -836,7 +837,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void uploadPackageCheck(String event, String action, GameEntity gameEntity, String linkTitle, String linkDesc, String downloadGameId, String downloadGameName) {
|
||||
@ -874,7 +875,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void logCategoryV2AppearanceEvent(String entrance, String classification) {
|
||||
@ -949,7 +950,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void logGameDetailFixedTopArticleClick(String gameId, String gameName, String url) {
|
||||
@ -967,7 +968,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void logHomeTopTabClick(String tabName, String linkType, String linkTitle, String linkId, int sequence) {
|
||||
@ -987,7 +988,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void uploadRecommendPopup(String event, String popupId, String gameId, String gameName,
|
||||
@ -1020,7 +1021,7 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
|
||||
public static void uploadReceiveGift(String event, String giftId, String giftName, String location, String gameId, String gameName) {
|
||||
@ -1042,6 +1043,6 @@ public class LogUtils {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
LoghubUtils.log(object, LOG_STORE_EVENT, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user