فهرست منبع

Merge remote-tracking branch 'origin/dev/one' into dev/one

wangyu 6 سال پیش
والد
کامیت
27d1d8ab11

+ 57 - 0
diagbotman-service/src/main/java/com/diagbot/dto/LantoneProductOrgDTO.java

@@ -0,0 +1,57 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.LantoneProduct;
+import com.diagbot.entity.ServiceInfo;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/10/23 19:11
+ */
+@Getter
+@Setter
+public class LantoneProductOrgDTO extends LantoneProduct {
+    /**
+     * 开通日期
+     */
+    private Date startTime;
+
+    /**
+     * 结束日期
+     */
+    private Date endTime;
+
+    /**
+     * 订单申请时间
+     */
+    private Date time;
+
+    /**
+     * 停用状态
+     */
+    private Integer openedServiceStatus;
+
+    /**
+     * 计费方式
+     */
+    private String[] chargeTypeArray;
+    /**
+     * 接入方式(1:嵌入式,2:接口方式,3:online)
+     */
+    private String[] accessTypeArray;
+
+    /**
+     * 机构名称
+     */
+    private String organizationName;
+
+    /**
+     * 关联的service
+     */
+    private List<ServiceInfo> serviceInfos;
+}

+ 4 - 3
diagbotman-service/src/main/java/com/diagbot/facade/LantoneProductFacade.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.client.UserServiceClient;
 import com.diagbot.dto.LantoneProductDTO;
+import com.diagbot.dto.LantoneProductOrgDTO;
 import com.diagbot.dto.OpendProductDTO;
 import com.diagbot.dto.ProductLineDTO;
 import com.diagbot.dto.RespDTO;
@@ -174,9 +175,9 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
      *
      * @return 查询当前用户已开通产品
      */
-    public List<LantoneProductWrapper> opendedProductByCurrentUser() {
+    public List<LantoneProductOrgDTO> opendedProductByCurrentUser() {
         Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-        List<LantoneProductWrapper> list = this.opendedProductByUserId(userId);
+        List<LantoneProductOrgDTO> list = this.opendedProductByUserId(userId);
         List<Long> userIdList = new ArrayList<>();
         userIdList.add(userId);
         RespDTO<Map<Long, UserOrgDTO>> mapRespDTO = userServiceClient.getUserAndOrg(userIdList);
@@ -194,7 +195,7 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
                 eq("is_deleted", IsDeleteEnum.N.getKey());
         List<ServiceInfo> serviceInfoList = serviceInfoFacade.list(qwServiceInfo);
 
-        for (LantoneProductWrapper product : list) {
+        for (LantoneProductOrgDTO product : list) {
             product.setOrganizationName(mapRespDTO.data.get(userId).getOrgName());
             String[] accessType = product.getAccessType().split(",|,");
             String[] chargeType = product.getChargeType().split(",|,");

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

@@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.dto.LantoneProductDTO;
+import com.diagbot.dto.LantoneProductOrgDTO;
 import com.diagbot.dto.ProductLineDTO;
 import com.diagbot.entity.LantoneProduct;
-import com.diagbot.entity.wrapper.LantoneProductWrapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -48,7 +48,7 @@ public interface LantoneProductMapper extends BaseMapper<LantoneProduct> {
      * @Author: zhaops
      * @Date: 10:10 2018/9/20
      */
-    List<LantoneProductWrapper> opendedProductByUserId(Long userId);
+    List<LantoneProductOrgDTO> opendedProductByUserId(Long userId);
 
     /**
      * 根据产品名称查询产品

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

@@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.diagbot.dto.LantoneProductDTO;
+import com.diagbot.dto.LantoneProductOrgDTO;
 import com.diagbot.dto.ProductLineDTO;
 import com.diagbot.entity.LantoneProduct;
-import com.diagbot.entity.wrapper.LantoneProductWrapper;
 
 import java.util.List;
 import java.util.Map;
@@ -46,7 +46,7 @@ public interface LantoneProductService extends IService<LantoneProduct> {
      * @Author: zhaops
      * @Date: 10:10 2018/9/20
      */
-    List<LantoneProductWrapper> opendedProductByUserId(Long userId);
+    List<LantoneProductOrgDTO> opendedProductByUserId(Long userId);
 
     /**
      * 根据产品名称查询产品

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

@@ -5,9 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.client.UserServiceClient;
 import com.diagbot.dto.LantoneProductDTO;
+import com.diagbot.dto.LantoneProductOrgDTO;
 import com.diagbot.dto.ProductLineDTO;
 import com.diagbot.entity.LantoneProduct;
-import com.diagbot.entity.wrapper.LantoneProductWrapper;
 import com.diagbot.mapper.LantoneProductMapper;
 import com.diagbot.service.LantoneProductService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -55,7 +55,7 @@ public class LantoneProductServiceImpl extends ServiceImpl<LantoneProductMapper,
     }
 
     @Override
-    public List<LantoneProductWrapper> opendedProductByUserId(Long userId) {
+    public List<LantoneProductOrgDTO> opendedProductByUserId(Long userId) {
         return baseMapper.opendedProductByUserId(userId);
     }
 

+ 3 - 2
diagbotman-service/src/main/java/com/diagbot/web/DiagLantoneProductController.java

@@ -4,6 +4,7 @@ package com.diagbot.web;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.LantoneProductDTO;
+import com.diagbot.dto.LantoneProductOrgDTO;
 import com.diagbot.dto.OpendProductDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.wrapper.LantoneProductWrapper;
@@ -109,8 +110,8 @@ public class DiagLantoneProductController {
     @ApiOperation(value = "查询当前用户已开通产品[by:zhaops]")
     @PostMapping("/opendedProductByCurrentUser")
     @SysLogger("opendedProductByCurrentUser")
-    public RespDTO<List<LantoneProductWrapper>> opendedProductByCurrentUser() {
-        List<LantoneProductWrapper> list = lantoneProductFacade.opendedProductByCurrentUser();
+    public RespDTO<List<LantoneProductOrgDTO>> opendedProductByCurrentUser() {
+        List<LantoneProductOrgDTO> list = lantoneProductFacade.opendedProductByCurrentUser();
         return RespDTO.onSuc(list);
     }
 }

+ 3 - 1
diagbotman-service/src/main/java/com/diagbot/web/ProductServiceController.java

@@ -80,7 +80,9 @@ public class ProductServiceController {
      * @param page
      * @return
      */
-    @ApiOperation(value = "获取当前登录用户产品服务分页列表[by:zhaops]", notes = "获取当前登录用户产品服务分页列表")
+    @ApiOperation(value = "获取当前登录用户产品服务分页列表[by:zhaops]",
+            notes = "current:页码,必填<br>" +
+                    "size:每页显示条数,必填<br>" )
     @PostMapping("/getProductServiceByCurrentUser")
     @SysLogger("getProductServiceByCurrentUser")
     public RespDTO getProductServiceByCurrentUser(@RequestBody Page page) {

+ 3 - 1
diagbotman-service/src/main/java/com/diagbot/web/ServiceInfoController.java

@@ -115,7 +115,9 @@ public class ServiceInfoController {
      * @param page
      * @return
      */
-    @ApiOperation(value = "获取当前登录用户的服务分页列表[by:zhaops]")
+    @ApiOperation(value = "获取当前登录用户的服务分页列表[by:zhaops]",
+            notes = "current:页码,必填<br>" +
+                    "size:每页显示条数,必填<br>" )
     @PostMapping("/getServiceListPageByCurrentUser")
     @SysLogger("getServiceListPageByCurrentUser")
     @Transactional

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

@@ -21,7 +21,7 @@
         <result column="access_type" property="accessType"/>
     </resultMap>
     <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultWrapperMap" type="com.diagbot.entity.wrapper.LantoneProductWrapper">
+    <resultMap id="BaseResultDTOMap" type="com.diagbot.dto.LantoneProductOrgDTO">
         <id column="id" property="id"/>
         <result column="is_deleted" property="isDeleted"/>
         <result column="gmt_create" property="gmtCreate"/>
@@ -90,7 +90,7 @@
     </select>
 
     <!--根据用户查询已开通产品-->
-    <select id="opendedProductByUserId" resultMap="BaseResultWrapperMap" parameterType="java.lang.Long">
+    <select id="opendedProductByUserId" resultMap="BaseResultDTOMap" parameterType="java.lang.Long">
         select a.*,b.start_time,b.end_time,b.service_status as opened_service_status,c.time
         from diag_lantone_product a,diag_opened_products b,diag_product_order c,diag_order_details d
         where a.id=b.product_id and a.id=d.product_id