调整专栏阅读日志的默认值

This commit is contained in:
chenjuntao
2019-02-26 14:49:42 +08:00
parent 7dc17d09c1
commit 272e5fb6cc

View File

@ -39,13 +39,17 @@ public class LogUtils {
object.put("article_name", articleTitle);
object.put("tracers", tracers);
object.put("read", readTime);
JSONObject columnObject = new JSONObject();
if (specialColumn != null) {
JSONObject columnObject = new JSONObject();
columnObject.put("type", specialColumn.getType());
columnObject.put("name", specialColumn.getName());
columnObject.put("tab", specialColumn.getTab());
object.put("special_column", columnObject);
} else {
columnObject.put("type", "");
columnObject.put("name", "");
columnObject.put("tab", "");
}
object.put("special_column", columnObject);
} catch (JSONException e) {
e.printStackTrace();
}
@ -85,13 +89,17 @@ public class LogUtils {
object.put("tracers", tracers);
object.put("answer_id", answerId);
object.put("read", readTime);
JSONObject columnObject = new JSONObject();
if (specialColumn != null) {
JSONObject columnObject = new JSONObject();
columnObject.put("type", specialColumn.getType());
columnObject.put("name", specialColumn.getName());
columnObject.put("tab", specialColumn.getTab());
object.put("special_column", columnObject);
} else {
columnObject.put("type", "");
columnObject.put("name", "");
columnObject.put("tab", "");
}
object.put("special_column", columnObject);
} catch (JSONException e) {
e.printStackTrace();
}
@ -114,13 +122,17 @@ public class LogUtils {
object.put("question_name", questions.getTitle());
object.put("tracers", tracers);
object.put("read", readTime);
JSONObject columnObject = new JSONObject();
if (specialColumn != null) {
JSONObject columnObject = new JSONObject();
columnObject.put("type", specialColumn.getType());
columnObject.put("name", specialColumn.getName());
columnObject.put("tab", specialColumn.getTab());
object.put("special_column", columnObject);
} else {
columnObject.put("type", "");
columnObject.put("name", "");
columnObject.put("tab", "");
}
object.put("special_column", columnObject);
} catch (JSONException e) {
e.printStackTrace();
}