Procházet zdrojové kódy

返回结果优化

Zhaops před 6 roky
rodič
revize
27b9c8aa87

+ 25 - 0
diagbotman-service/src/main/java/com/diagbot/entity/wrapper/LantoneProductWrapper.java

@@ -30,6 +30,31 @@ public class LantoneProductWrapper extends LantoneProduct {
      */
     private Integer openedServiceStatus;
 
+    /**
+     * 计费方式
+     */
+    private String [] chargeTypeArray;
+    /**
+     * 接入方式(1:嵌入式,2:接口方式,3:online)
+     */
+    private String [] accessTypeArray;
+
+    public String[] getChargeTypeArray() {
+        return chargeTypeArray;
+    }
+
+    public void setChargeTypeArray(String[] chargeTypeArray) {
+        this.chargeTypeArray = chargeTypeArray;
+    }
+
+    public String[] getAccessTypeArray() {
+        return accessTypeArray;
+    }
+
+    public void setAccessTypeArray(String[] accessTypeArray) {
+        this.accessTypeArray = accessTypeArray;
+    }
+
     public Date getStartTime() {
         return startTime;
     }

+ 7 - 1
diagbotman-service/src/main/java/com/diagbot/facade/LantoneProductFacade.java

@@ -22,6 +22,7 @@ import com.diagbot.util.UserUtils;
 import com.diagbot.vo.AddProductsVO;
 import com.diagbot.vo.OppendedProductVO;
 import com.diagbot.vo.UpdateProductVO;
+import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -110,7 +111,12 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
      */
     public List<LantoneProductWrapper> opendedProductByCurrentUser() {
         Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-        return this.opendedProductByUserId(userId);
+        List<LantoneProductWrapper> list = this.opendedProductByUserId(userId);
+        for (LantoneProductWrapper product : list) {
+            product.setAccessTypeArray(product.getAccessType().split(",|,"));
+            product.setChargeTypeArray(product.getChargeType().split(",|,"));
+        }
+        return list;
     }
 
     /**