Browse Source

[컨텐츠][New] more info 버튼 데이터 추가

hyodong.min 7 years ago
parent
commit
80f14623e9

+ 110 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/bean/api/ContentsButtonInfoBean.java

@@ -0,0 +1,110 @@
+/*
+ * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
+ */
+package kr.co.zumo.app.lifeplus.bean.api;
+
+import com.google.gson.annotations.SerializedName;
+
+import io.reactivex.annotations.Nullable;
+import kr.co.zumo.app.lifeplus.bean.JsonBeanBase;
+import kr.co.zumo.app.lifeplus.util.StringUtil;
+
+/**
+ * ContentsButtonInfoBean
+ * <pre>
+ * </pre>
+ *
+ * @author 민효동
+ * @version 1.0
+ * @history 민효동   [2018. 12. 14.]   [최초 작성]
+ * @since 2018. 12. 14.
+ */
+public class ContentsButtonInfoBean extends JsonBeanBase {
+
+  /*
+  "itemDtalBtnInfo": {
+                    "itemNo": "201810010000010326",
+                    "telArno": "02",
+                    "telTono": "6080",
+                    "telDtal": "1313",
+                    "link": null,
+                    "addr": "http://naver.ME/xaFPM2Vi",
+                    "homePage": "https://goo.GL/i5eNoa",
+                    "instagram": null,
+                    "facebook": null,
+                    "frstRgstDttm": ""
+                },
+   */
+
+  @SerializedName("telArno")
+  private String phoneNumber0;
+  @SerializedName("telTono")
+  private String phoneNumber1;
+  @SerializedName("telDtal")
+  private String phoneNumber2;
+  @SerializedName("link")
+  private String link;
+  @SerializedName("addr")
+  private String address;
+  @SerializedName("homePage")
+  private String homepage;
+  @SerializedName("instagram")
+  private String instagram;
+  @SerializedName("facebook")
+  private String facebook;
+
+  @Nullable
+  public String getPhoneNumber() {
+    if (StringUtil.isFull(phoneNumber0) && StringUtil.isFull(phoneNumber1) && StringUtil.isFull(phoneNumber2)) {
+      return phoneNumber0 + phoneNumber1 + phoneNumber2;
+    }
+    else {
+      return null;
+    }
+  }
+
+  @Nullable
+  public String getLink() {
+    return link;
+  }
+
+  public void setLink(String link) {
+    this.link = link;
+  }
+
+  @Nullable
+  public String getAddress() {
+    return address;
+  }
+
+  public void setAddress(String address) {
+    this.address = address;
+  }
+
+  @Nullable
+  public String getHomepage() {
+    return homepage;
+  }
+
+  public void setHomepage(String homepage) {
+    this.homepage = homepage;
+  }
+
+  @Nullable
+  public String getInstagram() {
+    return instagram;
+  }
+
+  public void setInstagram(String instagram) {
+    this.instagram = instagram;
+  }
+
+  @Nullable
+  public String getFacebook() {
+    return facebook;
+  }
+
+  public void setFacebook(String facebook) {
+    this.facebook = facebook;
+  }
+}

+ 12 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/bean/api/ContentsDetailBean.java

@@ -50,9 +50,13 @@ public class ContentsDetailBean extends LifeplusContentsBean {
   @SerializedName("itemDtalList") // more info
   private List<ContentsMoreInfoBean> moreInfoList;
 
+  @SerializedName("itemDtalBtnInfo") // button info
+  private ContentsButtonInfoBean buttonInfo;
+
   @SerializedName("itemRecuList") // 이미지 아래 1. 2... 내용
   private List<ContentsDescriptionBean> descriptionList;
 
+  @SerializedName("copyRight")
   private String copyRight;
 
   /**
@@ -166,6 +170,14 @@ public class ContentsDetailBean extends LifeplusContentsBean {
     this.copyRight = copyRight;
   }
 
+  public ContentsButtonInfoBean getButtonInfo() {
+    return buttonInfo;
+  }
+
+  public void setButtonInfo(ContentsButtonInfoBean buttonInfo) {
+    this.buttonInfo = buttonInfo;
+  }
+
   public static ContentsDetailBean toBean(LifeplusContentsBean lifeplusContentsBean) {
     ContentsDetailBean bean = new ContentsDetailBean();
     if (null != lifeplusContentsBean) {

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/bean/api/LifeplusContentsBean.java

@@ -34,7 +34,7 @@ public class LifeplusContentsBean extends JsonBeanBase {
   @SerializedName("lpCntsDtlUrl")
   private String contentsUrl;
 
-  private int pageIndex = 0;
+  private transient int pageIndex = 0;
   private transient boolean isLiked;
   private transient boolean isBookmarked;