|
@@ -1,6 +1,11 @@
|
|
|
package com.diagbot.dto;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import com.diagbot.enums.AccessTypeEnum;
|
|
|
+import com.diagbot.enums.ChargeTypeEnum;
|
|
|
|
|
|
import lombok.Getter;
|
|
|
import lombok.Setter;
|
|
@@ -21,8 +26,42 @@ public class UserAndProdutDTO {
|
|
|
private Date startTime;//开通时间
|
|
|
private Date endTime;//结束时间
|
|
|
private Integer serviceStatus;//启用状态
|
|
|
- private Integer accessType;//接入方式
|
|
|
- private Integer chargeType;//结算方式
|
|
|
+ private String accessType;//接入方式
|
|
|
+ private String chargeType;//结算方式
|
|
|
private String productName;//产品名称
|
|
|
|
|
|
+ /**
|
|
|
+ * list格式返回给前台
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String[] getAccessType() {
|
|
|
+ String[] strs =accessType.split(",");
|
|
|
+ List<String> list =new ArrayList();
|
|
|
+ for (int i =0;i<strs.length;i++){
|
|
|
+ list.add(AccessTypeEnum.getName(Integer.valueOf(strs[i])));
|
|
|
+ }
|
|
|
+ String[] strs1 =new String[list.size()];
|
|
|
+ return list.toArray(strs1);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Map格式返回给前台
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public void setAccessType(String accessType) {
|
|
|
+ this.accessType = accessType;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * list格式返回给前台
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String[] getChargeType() {
|
|
|
+ String[] strs =chargeType.split(",");
|
|
|
+ List<String> list =new ArrayList();
|
|
|
+ for (int i =0;i<strs.length;i++){
|
|
|
+ list.add(ChargeTypeEnum.getName(Integer.valueOf(strs[i])));
|
|
|
+ }
|
|
|
+ String[] strs1 =new String[list.size()];
|
|
|
+ return list.toArray(strs1);
|
|
|
+ }
|
|
|
}
|