记录专栏的阅读位置信息
This commit is contained in:
@ -8,6 +8,7 @@ import android.text.TextUtils;
|
||||
|
||||
import com.gh.gamecenter.BuildConfig;
|
||||
import com.gh.gamecenter.entity.CommunityEntity;
|
||||
import com.gh.gamecenter.entity.SpecialColumn;
|
||||
import com.gh.gamecenter.manager.UserManager;
|
||||
import com.gh.gamecenter.qa.entity.Questions;
|
||||
import com.gh.loghub.LogHubUtils;
|
||||
@ -23,8 +24,12 @@ import org.json.JSONObject;
|
||||
*/
|
||||
public class LogUtils {
|
||||
|
||||
public static void uploadCommunityArticle(String tracers, String articleId, String articleTitle,
|
||||
int readTime, CommunityEntity community) {
|
||||
public static void uploadCommunityArticle(String tracers,
|
||||
String articleId,
|
||||
String articleTitle,
|
||||
int readTime,
|
||||
CommunityEntity community,
|
||||
SpecialColumn specialColumn) {
|
||||
JSONObject object = new JSONObject();
|
||||
try {
|
||||
object.put("subject", "community_article");
|
||||
@ -34,6 +39,13 @@ public class LogUtils {
|
||||
object.put("article_name", articleTitle);
|
||||
object.put("tracers", tracers);
|
||||
object.put("read", readTime);
|
||||
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);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -61,7 +73,8 @@ public class LogUtils {
|
||||
String answerId,
|
||||
Questions questions,
|
||||
String communityId,
|
||||
String CommunityName) {
|
||||
String CommunityName,
|
||||
SpecialColumn specialColumn) {
|
||||
JSONObject object = new JSONObject();
|
||||
try {
|
||||
object.put("subject", "answer");
|
||||
@ -72,6 +85,13 @@ public class LogUtils {
|
||||
object.put("tracers", tracers);
|
||||
object.put("answer_id", answerId);
|
||||
object.put("read", readTime);
|
||||
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);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -83,7 +103,8 @@ public class LogUtils {
|
||||
int readTime,
|
||||
Questions questions,
|
||||
String communityId,
|
||||
String communityName) {
|
||||
String communityName,
|
||||
SpecialColumn specialColumn) {
|
||||
JSONObject object = new JSONObject();
|
||||
try {
|
||||
object.put("subject", "question");
|
||||
@ -93,6 +114,13 @@ public class LogUtils {
|
||||
object.put("question_name", questions.getTitle());
|
||||
object.put("tracers", tracers);
|
||||
object.put("read", readTime);
|
||||
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);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user