rgb 6 vuotta sitten
vanhempi
commit
133e917edd
25 muutettua tiedostoa jossa 1251 lisäystä ja 2 poistoa
  1. 17 0
      diagbotman-service/src/main/java/com/diagbot/dto/AuthDetailDTO.java
  2. 21 0
      diagbotman-service/src/main/java/com/diagbot/dto/ProductAuthProgressDTO.java
  3. 225 0
      diagbotman-service/src/main/java/com/diagbot/entity/LantoneProduct.java
  4. 197 0
      diagbotman-service/src/main/java/com/diagbot/entity/OpenedProducts.java
  5. 226 0
      diagbotman-service/src/main/java/com/diagbot/entity/OrderDetails.java
  6. 170 0
      diagbotman-service/src/main/java/com/diagbot/entity/ProductOrder.java
  7. 36 0
      diagbotman-service/src/main/java/com/diagbot/facade/ProductOrderFacade.java
  8. 16 0
      diagbotman-service/src/main/java/com/diagbot/mapper/LantoneProductMapper.java
  9. 16 0
      diagbotman-service/src/main/java/com/diagbot/mapper/OpenedProductsMapper.java
  10. 16 0
      diagbotman-service/src/main/java/com/diagbot/mapper/OrderDetailsMapper.java
  11. 23 0
      diagbotman-service/src/main/java/com/diagbot/mapper/ProductOrderMapper.java
  12. 16 0
      diagbotman-service/src/main/java/com/diagbot/service/LantoneProductService.java
  13. 16 0
      diagbotman-service/src/main/java/com/diagbot/service/OpenedProductsService.java
  14. 16 0
      diagbotman-service/src/main/java/com/diagbot/service/OrderDetailsService.java
  15. 16 0
      diagbotman-service/src/main/java/com/diagbot/service/ProductOrderService.java
  16. 20 0
      diagbotman-service/src/main/java/com/diagbot/service/impl/LantoneProductServiceImpl.java
  17. 20 0
      diagbotman-service/src/main/java/com/diagbot/service/impl/OpenedProductsServiceImpl.java
  18. 20 0
      diagbotman-service/src/main/java/com/diagbot/service/impl/OrderDetailsServiceImpl.java
  19. 20 0
      diagbotman-service/src/main/java/com/diagbot/service/impl/ProductOrderServiceImpl.java
  20. 39 0
      diagbotman-service/src/main/java/com/diagbot/web/ProductOrderController.java
  21. 23 0
      diagbotman-service/src/main/resources/mapper/LantoneProductMapper.xml
  22. 21 0
      diagbotman-service/src/main/resources/mapper/OpenedProductsMapper.xml
  23. 23 0
      diagbotman-service/src/main/resources/mapper/OrderDetailsMapper.xml
  24. 36 0
      diagbotman-service/src/main/resources/mapper/ProductOrderMapper.xml
  25. 2 2
      diagbotman-service/src/test/java/com/diagbot/CodeGeneration.java

+ 17 - 0
diagbotman-service/src/main/java/com/diagbot/dto/AuthDetailDTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class AuthDetailDTO {
+	
+	private String productName;
+	
+	private Integer auditStatus;
+	
+	private String auditStatusMessage;
+	
+
+}

+ 21 - 0
diagbotman-service/src/main/java/com/diagbot/dto/ProductAuthProgressDTO.java

@@ -0,0 +1,21 @@
+package com.diagbot.dto;
+
+import java.util.List;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 产品认证进度输出类
+ * @author: gaodm
+ * @time: 2018/8/2 14:22
+ */
+@Getter
+@Setter
+public class ProductAuthProgressDTO {
+
+	private String num;
+	
+	List<AuthDetailDTO> products;
+	
+}

+ 225 - 0
diagbotman-service/src/main/java/com/diagbot/entity/LantoneProduct.java

@@ -0,0 +1,225 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 朗通产品表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+@TableName("diag_lantone_product")
+public class LantoneProduct implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 产品id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 是否删除 N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 产品名称
+     */
+    private String name;
+
+    /**
+     * 产品介绍
+     */
+    private String decription;
+
+    /**
+     * 计费方式(1.流程计费2.机构计费3.用户计费)
+     */
+    private Integer chargeType;
+
+    /**
+     * 产品路径
+     */
+    private String url;
+
+    /**
+     * 机构开通数量
+     */
+    private Integer openNum;
+
+    /**
+     * 停用状态
+     */
+    private Integer serviceStatus;
+
+    /**
+     * 试用状态
+     */
+    private Integer trialStatus;
+
+    /**
+     * 试用地址
+     */
+    private String trialUrl;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDecription() {
+        return decription;
+    }
+
+    public void setDecription(String decription) {
+        this.decription = decription;
+    }
+
+    public Integer getChargeType() {
+        return chargeType;
+    }
+
+    public void setChargeType(Integer chargeType) {
+        this.chargeType = chargeType;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public Integer getOpenNum() {
+        return openNum;
+    }
+
+    public void setOpenNum(Integer openNum) {
+        this.openNum = openNum;
+    }
+
+    public Integer getServiceStatus() {
+        return serviceStatus;
+    }
+
+    public void setServiceStatus(Integer serviceStatus) {
+        this.serviceStatus = serviceStatus;
+    }
+
+    public Integer getTrialStatus() {
+        return trialStatus;
+    }
+
+    public void setTrialStatus(Integer trialStatus) {
+        this.trialStatus = trialStatus;
+    }
+
+    public String getTrialUrl() {
+        return trialUrl;
+    }
+
+    public void setTrialUrl(String trialUrl) {
+        this.trialUrl = trialUrl;
+    }
+
+    @Override
+    public String toString() {
+        return "LantoneProduct{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", name=" + name +
+        ", decription=" + decription +
+        ", chargeType=" + chargeType +
+        ", url=" + url +
+        ", openNum=" + openNum +
+        ", serviceStatus=" + serviceStatus +
+        ", trialStatus=" + trialStatus +
+        ", trialUrl=" + trialUrl +
+        "}";
+    }
+}

+ 197 - 0
diagbotman-service/src/main/java/com/diagbot/entity/OpenedProducts.java

@@ -0,0 +1,197 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 已开通产品
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+@TableName("diag_opened_products")
+public class OpenedProducts implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 已开通产品id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 产品id
+     */
+    private Integer productId;
+
+    /**
+     * 用户id
+     */
+    private Integer userId;
+
+    /**
+     * 开通日期
+     */
+    private LocalDateTime startTime;
+
+    /**
+     * 结束日期
+     */
+    private LocalDateTime endTime;
+
+    /**
+     * 停用状态
+     */
+    private Integer serviceStatus;
+
+    /**
+     * 计费方式(1.流程计费2.机构计费3.用户计费)
+     */
+    private Integer chargeType;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Integer getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Integer productId) {
+        this.productId = productId;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getServiceStatus() {
+        return serviceStatus;
+    }
+
+    public void setServiceStatus(Integer serviceStatus) {
+        this.serviceStatus = serviceStatus;
+    }
+
+    public Integer getChargeType() {
+        return chargeType;
+    }
+
+    public void setChargeType(Integer chargeType) {
+        this.chargeType = chargeType;
+    }
+
+    @Override
+    public String toString() {
+        return "OpenedProducts{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", productId=" + productId +
+        ", userId=" + userId +
+        ", startTime=" + startTime +
+        ", endTime=" + endTime +
+        ", serviceStatus=" + serviceStatus +
+        ", chargeType=" + chargeType +
+        "}";
+    }
+}

+ 226 - 0
diagbotman-service/src/main/java/com/diagbot/entity/OrderDetails.java

@@ -0,0 +1,226 @@
+package com.diagbot.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 订单明细表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+@TableName("diag_order_details")
+public class OrderDetails implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 订单明细id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 订单编号
+     */
+    private String orderNum;
+
+    /**
+     * 产品id
+     */
+    private Integer productId;
+
+    /**
+     * 用户id
+     */
+    private Integer userId;
+
+    /**
+     * 审核状态(0.不通过1.通过)
+     */
+    private Integer auditStatus;
+
+    /**
+     * 单个服务的价钱
+     */
+    private BigDecimal unitPrice;
+
+    /**
+     * 订单状态(0.未付款1.已付款)
+     */
+    private Integer status;
+
+    /**
+     * 不通过类型
+     */
+    private Integer rejectType;
+
+    /**
+     * 不通过原因
+     */
+    private String rejectReason;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public String getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(String orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public Integer getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Integer productId) {
+        this.productId = productId;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public Integer getAuditStatus() {
+        return auditStatus;
+    }
+
+    public void setAuditStatus(Integer auditStatus) {
+        this.auditStatus = auditStatus;
+    }
+
+    public BigDecimal getUnitPrice() {
+        return unitPrice;
+    }
+
+    public void setUnitPrice(BigDecimal unitPrice) {
+        this.unitPrice = unitPrice;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getRejectType() {
+        return rejectType;
+    }
+
+    public void setRejectType(Integer rejectType) {
+        this.rejectType = rejectType;
+    }
+
+    public String getRejectReason() {
+        return rejectReason;
+    }
+
+    public void setRejectReason(String rejectReason) {
+        this.rejectReason = rejectReason;
+    }
+
+    @Override
+    public String toString() {
+        return "OrderDetails{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", orderNum=" + orderNum +
+        ", productId=" + productId +
+        ", userId=" + userId +
+        ", auditStatus=" + auditStatus +
+        ", unitPrice=" + unitPrice +
+        ", status=" + status +
+        ", rejectType=" + rejectType +
+        ", rejectReason=" + rejectReason +
+        "}";
+    }
+}

+ 170 - 0
diagbotman-service/src/main/java/com/diagbot/entity/ProductOrder.java

@@ -0,0 +1,170 @@
+package com.diagbot.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 订单表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+@TableName("diag_product_order")
+public class ProductOrder implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 订单id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 订单编号
+     */
+    private String num;
+
+    /**
+     * 用户id
+     */
+    private Integer userId;
+
+    /**
+     * 下单时间(申请时间)
+     */
+    private LocalDateTime time;
+
+    /**
+     * 订单总价
+     */
+    private BigDecimal totalPrices;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public String getNum() {
+        return num;
+    }
+
+    public void setNum(String num) {
+        this.num = num;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public LocalDateTime getTime() {
+        return time;
+    }
+
+    public void setTime(LocalDateTime time) {
+        this.time = time;
+    }
+
+    public BigDecimal getTotalPrices() {
+        return totalPrices;
+    }
+
+    public void setTotalPrices(BigDecimal totalPrices) {
+        this.totalPrices = totalPrices;
+    }
+
+    @Override
+    public String toString() {
+        return "ProductOrder{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", num=" + num +
+        ", userId=" + userId +
+        ", time=" + time +
+        ", totalPrices=" + totalPrices +
+        "}";
+    }
+}

+ 36 - 0
diagbotman-service/src/main/java/com/diagbot/facade/ProductOrderFacade.java

@@ -0,0 +1,36 @@
+package com.diagbot.facade;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.springframework.stereotype.Component;
+
+import com.diagbot.dto.ProductAuthProgressDTO;
+import com.diagbot.entity.ProductOrder;
+import com.diagbot.service.impl.ProductOrderServiceImpl;
+import com.diagbot.util.UserUtils;
+
+/**
+ * 订单业务
+ * @author Administrator
+ *
+ */
+@Component
+public class ProductOrderFacade extends ProductOrderServiceImpl {
+	
+	
+	public List<ProductAuthProgressDTO> productAuthProgress(){
+		List<ProductAuthProgressDTO> retList = new ArrayList<ProductAuthProgressDTO>();
+		Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+		List<ProductOrder> orderList = baseMapper.getUserProductOrder(userId);
+		for(ProductOrder i : orderList){
+			ProductAuthProgressDTO productAuthProgressDTO = new ProductAuthProgressDTO();
+			productAuthProgressDTO.setNum(i.getNum());
+			productAuthProgressDTO.setProducts(baseMapper.getOrderDetails(i.getNum()));
+			retList.add(productAuthProgressDTO);
+		}
+
+		return retList;
+	}
+
+}

+ 16 - 0
diagbotman-service/src/main/java/com/diagbot/mapper/LantoneProductMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.LantoneProduct;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 朗通产品表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+public interface LantoneProductMapper extends BaseMapper<LantoneProduct> {
+
+}

+ 16 - 0
diagbotman-service/src/main/java/com/diagbot/mapper/OpenedProductsMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.OpenedProducts;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 已开通产品 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+public interface OpenedProductsMapper extends BaseMapper<OpenedProducts> {
+
+}

+ 16 - 0
diagbotman-service/src/main/java/com/diagbot/mapper/OrderDetailsMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.OrderDetails;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 订单明细表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+public interface OrderDetailsMapper extends BaseMapper<OrderDetails> {
+
+}

+ 23 - 0
diagbotman-service/src/main/java/com/diagbot/mapper/ProductOrderMapper.java

@@ -0,0 +1,23 @@
+package com.diagbot.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.dto.AuthDetailDTO;
+import com.diagbot.entity.ProductOrder;
+
+/**
+ * <p>
+ * 订单表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+public interface ProductOrderMapper extends BaseMapper<ProductOrder> {
+	
+	List<ProductOrder> getUserProductOrder(Long userId);
+	
+	List<AuthDetailDTO> getOrderDetails(String orderNum);
+
+}

+ 16 - 0
diagbotman-service/src/main/java/com/diagbot/service/LantoneProductService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.LantoneProduct;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 朗通产品表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+public interface LantoneProductService extends IService<LantoneProduct> {
+
+}

+ 16 - 0
diagbotman-service/src/main/java/com/diagbot/service/OpenedProductsService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.OpenedProducts;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 已开通产品 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+public interface OpenedProductsService extends IService<OpenedProducts> {
+
+}

+ 16 - 0
diagbotman-service/src/main/java/com/diagbot/service/OrderDetailsService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.OrderDetails;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 订单明细表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+public interface OrderDetailsService extends IService<OrderDetails> {
+
+}

+ 16 - 0
diagbotman-service/src/main/java/com/diagbot/service/ProductOrderService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.ProductOrder;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 订单表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+public interface ProductOrderService extends IService<ProductOrder> {
+
+}

+ 20 - 0
diagbotman-service/src/main/java/com/diagbot/service/impl/LantoneProductServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.LantoneProduct;
+import com.diagbot.mapper.LantoneProductMapper;
+import com.diagbot.service.LantoneProductService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 朗通产品表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+@Service
+public class LantoneProductServiceImpl extends ServiceImpl<LantoneProductMapper, LantoneProduct> implements LantoneProductService {
+
+}

+ 20 - 0
diagbotman-service/src/main/java/com/diagbot/service/impl/OpenedProductsServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.OpenedProducts;
+import com.diagbot.mapper.OpenedProductsMapper;
+import com.diagbot.service.OpenedProductsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 已开通产品 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+@Service
+public class OpenedProductsServiceImpl extends ServiceImpl<OpenedProductsMapper, OpenedProducts> implements OpenedProductsService {
+
+}

+ 20 - 0
diagbotman-service/src/main/java/com/diagbot/service/impl/OrderDetailsServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.OrderDetails;
+import com.diagbot.mapper.OrderDetailsMapper;
+import com.diagbot.service.OrderDetailsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 订单明细表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+@Service
+public class OrderDetailsServiceImpl extends ServiceImpl<OrderDetailsMapper, OrderDetails> implements OrderDetailsService {
+
+}

+ 20 - 0
diagbotman-service/src/main/java/com/diagbot/service/impl/ProductOrderServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.ProductOrder;
+import com.diagbot.mapper.ProductOrderMapper;
+import com.diagbot.service.ProductOrderService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 订单表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-18
+ */
+@Service
+public class ProductOrderServiceImpl extends ServiceImpl<ProductOrderMapper, ProductOrder> implements ProductOrderService {
+
+}

+ 39 - 0
diagbotman-service/src/main/java/com/diagbot/web/ProductOrderController.java

@@ -0,0 +1,39 @@
+package com.diagbot.web;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.ProductAuthProgressDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.ProductOrderFacade;
+
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 订单操作
+ * 
+ * @author rgb
+ *
+ */
+@RestController
+@RequestMapping("/productOrder")
+public class ProductOrderController {
+
+	@Autowired
+	private ProductOrderFacade productOrderFacade;
+
+	@ApiOperation(value = "产品认证进度")
+	@PostMapping("/productAuthProgress")
+	@SysLogger("productAuthProgress")
+	@Transactional
+	public RespDTO<List<ProductAuthProgressDTO>> productAuthProgress() {
+		return RespDTO.onSuc(productOrderFacade.productAuthProgress());
+	}
+
+}

+ 23 - 0
diagbotman-service/src/main/resources/mapper/LantoneProductMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.LantoneProductMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.LantoneProduct">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="name" property="name" />
+        <result column="decription" property="decription" />
+        <result column="charge_type" property="chargeType" />
+        <result column="url" property="url" />
+        <result column="open_num" property="openNum" />
+        <result column="service_status" property="serviceStatus" />
+        <result column="trial_status" property="trialStatus" />
+        <result column="trial_url" property="trialUrl" />
+    </resultMap>
+
+</mapper>

+ 21 - 0
diagbotman-service/src/main/resources/mapper/OpenedProductsMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.OpenedProductsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.OpenedProducts">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="product_id" property="productId" />
+        <result column="user_id" property="userId" />
+        <result column="start_time" property="startTime" />
+        <result column="end_time" property="endTime" />
+        <result column="service_status" property="serviceStatus" />
+        <result column="charge_type" property="chargeType" />
+    </resultMap>
+
+</mapper>

+ 23 - 0
diagbotman-service/src/main/resources/mapper/OrderDetailsMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.OrderDetailsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.OrderDetails">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="order_num" property="orderNum" />
+        <result column="product_id" property="productId" />
+        <result column="user_id" property="userId" />
+        <result column="audit_status" property="auditStatus" />
+        <result column="unit_price" property="unitPrice" />
+        <result column="status" property="status" />
+        <result column="reject_type" property="rejectType" />
+        <result column="reject_reason" property="rejectReason" />
+    </resultMap>
+
+</mapper>

+ 36 - 0
diagbotman-service/src/main/resources/mapper/ProductOrderMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.ProductOrderMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.ProductOrder">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="num" property="num" />
+        <result column="user_id" property="userId" />
+        <result column="time" property="time" />
+        <result column="total_prices" property="totalPrices" />
+    </resultMap>
+    
+    <select id="getUserProductOrder" parameterType="Long" resultMap="BaseResultMap">
+    	select *
+    	from diag_product_order
+    	where is_deleted = 'N' and user_id=#{userId}
+    </select>
+
+	<select id="getOrderDetails" parameterType="string" resultType="com.diagbot.dto.AuthDetailDTO">
+		select
+			b.audit_status as auditStatus,
+			c.name as productName,
+			case when b.audit_status is null then '未开通' when b.audit_status=='0' then '不通过' when when b.audit_status=='1' then "通过" end as auditStatusMessage
+		from diag_product_order a join diag_order_details b on a.num=b.order_num
+		join diag_lantone_product c on b.product_id=c.id
+		where a.is_deleted = 'N' and  b.is_deleted = 'N' and  c.is_deleted = 'N'
+		and a.num=#{orderNum}
+	</select>
+
+</mapper>

+ 2 - 2
diagbotman-service/src/test/java/com/diagbot/CodeGeneration.java

@@ -53,9 +53,9 @@ public class CodeGeneration {
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
-//        strategy.setTablePrefix(new String[] { "sys_" });// 此处可以修改为您的表前缀
+        strategy.setTablePrefix(new String[] { "diag_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "sys_log" }); // 需要生成的表
+        strategy.setInclude(new String[] { "diag_product_order","diag_order_details","diag_opened_products" ,"diag_lantone_product"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);