Explorar o código

服务端代码生成

zhaops %!s(int64=6) %!d(string=hai) anos
pai
achega
24020841ce

+ 15 - 1
diagbotman-service/src/main/java/com/diagbot/entity/ServiceInfo.java

@@ -12,7 +12,7 @@ import java.io.Serializable;
  * </p>
  *
  * @author zhaops
- * @since 2018-09-17
+ * @since 2018-09-18
  */
 @TableName("diag_service_info")
 public class ServiceInfo implements Serializable {
@@ -51,6 +51,11 @@ public class ServiceInfo implements Serializable {
 
     private String description;
 
+    /**
+     * 用户id
+     */
+    private Long userId;
+
 
     public Long getId() {
         return id;
@@ -116,6 +121,14 @@ public class ServiceInfo implements Serializable {
         this.description = description;
     }
 
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
     @Override
     public String toString() {
         return "ServiceInfo{" +
@@ -127,6 +140,7 @@ public class ServiceInfo implements Serializable {
         ", modifier=" + modifier +
         ", name=" + name +
         ", description=" + description +
+        ", userId=" + userId +
         "}";
     }
 }

+ 30 - 2
diagbotman-service/src/main/java/com/diagbot/entity/ServiceToken.java

@@ -12,7 +12,7 @@ import java.io.Serializable;
  * </p>
  *
  * @author zhaops
- * @since 2018-09-17
+ * @since 2018-09-18
  */
 @TableName("diag_service_token")
 public class ServiceToken implements Serializable {
@@ -63,7 +63,7 @@ public class ServiceToken implements Serializable {
     private String appKeySecret;
 
     /**
-     * 令牌类型
+     * 令牌类型(1:online,2:手动,3:试用)
      */
     private Integer type;
 
@@ -72,6 +72,16 @@ public class ServiceToken implements Serializable {
      */
     private String status;
 
+    /**
+     * 开通日期
+     */
+    private LocalDateTime startingDate;
+
+    /**
+     * 到期时间
+     */
+    private LocalDateTime expiringDate;
+
     /**
      * 备注
      */
@@ -166,6 +176,22 @@ public class ServiceToken implements Serializable {
         this.status = status;
     }
 
+    public LocalDateTime getStartingDate() {
+        return startingDate;
+    }
+
+    public void setStartingDate(LocalDateTime startingDate) {
+        this.startingDate = startingDate;
+    }
+
+    public LocalDateTime getExpiringDate() {
+        return expiringDate;
+    }
+
+    public void setExpiringDate(LocalDateTime expiringDate) {
+        this.expiringDate = expiringDate;
+    }
+
     public String getRemark() {
         return remark;
     }
@@ -188,6 +214,8 @@ public class ServiceToken implements Serializable {
         ", appKeySecret=" + appKeySecret +
         ", type=" + type +
         ", status=" + status +
+        ", startingDate=" + startingDate +
+        ", expiringDate=" + expiringDate +
         ", remark=" + remark +
         "}";
     }

+ 13 - 0
diagbotman-service/src/main/java/com/diagbot/facade/ProductServiceFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.ProductServiceServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:产品与用户端关联业务层
+ * @author: zhaops
+ * @time: 2018/9/18 16:33
+ */
+@Component
+public class ProductServiceFacade extends ProductServiceServiceImpl {
+}

+ 13 - 0
diagbotman-service/src/main/java/com/diagbot/facade/ServiceInfoFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.ServiceInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 用户服务业务层
+ * @author: zhaops
+ * @time: 2018/9/18 16:31
+ */
+@Component
+public class ServiceInfoFacade extends ServiceInfoServiceImpl{
+}

+ 13 - 0
diagbotman-service/src/main/java/com/diagbot/facade/ServiceTokenFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.ServiceTokenServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 用户端token业务层
+ * @author: zhaops
+ * @time: 2018/9/18 16:31
+ */
+@Component
+public class ServiceTokenFacade extends ServiceTokenServiceImpl {
+}

+ 1 - 0
diagbotman-service/src/main/resources/mapper/ServiceInfoMapper.xml

@@ -12,6 +12,7 @@
         <result column="modifier" property="modifier" />
         <result column="name" property="name" />
         <result column="description" property="description" />
+        <result column="user_id" property="userId" />
     </resultMap>
 
 </mapper>

+ 2 - 0
diagbotman-service/src/main/resources/mapper/ServiceTokenMapper.xml

@@ -15,6 +15,8 @@
         <result column="app_key_secret" property="appKeySecret" />
         <result column="type" property="type" />
         <result column="status" property="status" />
+        <result column="starting_date" property="startingDate" />
+        <result column="expiring_date" property="expiringDate" />
         <result column="remark" property="remark" />
     </resultMap>