Browse Source

产品订单认证进度修改

rgb 6 years ago
parent
commit
5fcab0818a

+ 12 - 3
diagbotman-service/src/main/java/com/diagbot/dto/AuthDetailDTO.java

@@ -7,11 +7,20 @@ import lombok.Setter;
 @Setter
 public class AuthDetailDTO {
 	
-	private String productName;
+	/**
+     * 产品名称
+     */
+    private String name;
 	
-	private Integer auditStatus;
+    /**
+     * 是否通过审核,N:未通过,Y:已通过
+     */
+    private String auditStatus;
 	
-	private String auditStatusMessage;
+    /**
+     * 不通过原因
+     */
+    private String rejectReason;
 	
 
 }

+ 8 - 2
diagbotman-service/src/main/java/com/diagbot/dto/ProductAuthProgressDTO.java

@@ -14,8 +14,14 @@ import lombok.Setter;
 @Setter
 public class ProductAuthProgressDTO {
 
+    /**
+     * 订单编号
+     */
 	private String num;
-	
-	List<AuthDetailDTO> products;
+
+	/**
+	 * 订单详情
+	 */
+	private List<AuthDetailDTO> products;
 	
 }

+ 0 - 194
diagbotman-service/src/main/java/com/diagbot/entity/DiagOrderDetails.java

@@ -1,194 +0,0 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * @Description: 订单明细实体类
- * @Author: wangyu
- * @Date: 15:40 2018/9/17
- */
-public class DiagOrderDetails implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 订单明细id
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 订单编号
-     */
-    private String orderNum;
-
-    /**
-     * 产品id
-     */
-    private Integer productId;
-
-    /**
-     * 用户id
-     */
-    private Integer userId;
-
-    /**
-     * 是否通过审核,N:未通过,Y:已通过
-     */
-    private String auditStatus;
-
-    /**
-     * 单个服务的价钱
-     */
-    private BigDecimal unitPrice;
-
-    /**
-     * 订单状态 Y:已付款,N未付款
-     */
-    private String status;
-
-
-    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 Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date 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 String getAuditStatus() {
-        return auditStatus;
-    }
-
-    public void setAuditStatus(String auditStatus) {
-        this.auditStatus = auditStatus;
-    }
-
-    public BigDecimal getUnitPrice() {
-        return unitPrice;
-    }
-
-    public void setUnitPrice(BigDecimal unitPrice) {
-        this.unitPrice = unitPrice;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    @Override
-    public String toString() {
-        return "DiagOrderDetails{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", orderNum=" + orderNum +
-        ", productId=" + productId +
-        ", userId=" + userId +
-        ", auditStatus=" + auditStatus +
-        ", unitPrice=" + unitPrice +
-                ", status=" + status +
-        "}";
-    }
-}

+ 0 - 166
diagbotman-service/src/main/java/com/diagbot/entity/DiagProductOrder.java

@@ -1,166 +0,0 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * @Description: 订单实体类
- * @Author: wangyu
- * @Date: 15:41 2018/9/17
- */
-public class DiagProductOrder implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 订单id
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 订单编号
-     */
-    private String num;
-
-    /**
-     * 用户id
-     */
-    private Integer userId;
-
-    /**
-     * 下单时间(申请时间)
-     */
-    private Date 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 Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date 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 Date getTime() {
-        return time;
-    }
-
-    public void setTime(Date time) {
-        this.time = time;
-    }
-
-    public BigDecimal getTotalPrices() {
-        return totalPrices;
-    }
-
-    public void setTotalPrices(BigDecimal totalPrices) {
-        this.totalPrices = totalPrices;
-    }
-
-    @Override
-    public String toString() {
-        return "DiagProductOrder{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", num=" + num +
-        ", userId=" + userId +
-        ", time=" + time +
-        ", totalPrices=" + totalPrices +
-        "}";
-    }
-}

+ 3 - 4
diagbotman-service/src/main/java/com/diagbot/web/ProductOrderController.java

@@ -3,7 +3,6 @@ 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;
@@ -13,14 +12,15 @@ import com.diagbot.dto.ProductAuthProgressDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.ProductOrderFacade;
 
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
 /**
- * 订单操作
  * 
  * @author rgb
  *
  */
+@Api(value="控制台-产品操作", tags={"控制台-产品操作"})
 @RestController
 @RequestMapping("/productOrder")
 public class ProductOrderController {
@@ -28,10 +28,9 @@ public class ProductOrderController {
 	@Autowired
 	private ProductOrderFacade productOrderFacade;
 
-	@ApiOperation(value = "产品认证进度")
+	@ApiOperation(value = "控制台-产品认证进度",notes="控制台-产品认证进度")
 	@PostMapping("/productAuthProgress")
 	@SysLogger("productAuthProgress")
-	@Transactional
 	public RespDTO<List<ProductAuthProgressDTO>> productAuthProgress() {
 		return RespDTO.onSuc(productOrderFacade.productAuthProgress());
 	}

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

@@ -1,21 +0,0 @@
-<?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.DiagOrderDetailsMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.diagbot.entity.DiagOrderDetails">
-        <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" />
-    </resultMap>
-
-</mapper>

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

@@ -25,8 +25,8 @@
 	<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
+			c.name as name,
+			b.reject_reason as rejectReason
 		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'

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

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