Browse Source

格式化代码

gaodm 6 years ago
parent
commit
7f191fd656
78 changed files with 1226 additions and 1118 deletions
  1. 3 3
      diagbotman-service/src/main/java/com/diagbot/DiagbotmanServiceApplication.java
  2. 6 6
      diagbotman-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  3. 1 1
      diagbotman-service/src/main/java/com/diagbot/client/UserServiceClient.java
  4. 2 2
      diagbotman-service/src/main/java/com/diagbot/client/hystrix/UserServiceHystrix.java
  5. 5 4
      diagbotman-service/src/main/java/com/diagbot/config/IdcConfigurer.java
  6. 2 2
      diagbotman-service/src/main/java/com/diagbot/config/JwtConfigurer.java
  7. 3 3
      diagbotman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  8. 3 3
      diagbotman-service/src/main/java/com/diagbot/config/SwaggerConfigurer.java
  9. 2 2
      diagbotman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  10. 16 16
      diagbotman-service/src/main/java/com/diagbot/dto/AuthDetailDTO.java
  11. 15 15
      diagbotman-service/src/main/java/com/diagbot/dto/EnShowOptionDTO.java
  12. 24 24
      diagbotman-service/src/main/java/com/diagbot/dto/GetConsoleOnTrialDTO.java
  13. 13 13
      diagbotman-service/src/main/java/com/diagbot/dto/GetConsoleOpenedDTO.java
  14. 10 10
      diagbotman-service/src/main/java/com/diagbot/dto/OpenUpOnTrialDTO.java
  15. 11 11
      diagbotman-service/src/main/java/com/diagbot/dto/ProductAuthProgressDTO.java
  16. 12 12
      diagbotman-service/src/main/java/com/diagbot/dto/UserAndProdutDTO.java
  17. 12 12
      diagbotman-service/src/main/java/com/diagbot/dto/UserOrgDTO.java
  18. 9 9
      diagbotman-service/src/main/java/com/diagbot/dto/WaitExamOrderCouDTO.java
  19. 2 2
      diagbotman-service/src/main/java/com/diagbot/entity/OpenedProductsIndex.java
  20. 15 15
      diagbotman-service/src/main/java/com/diagbot/entity/OrderDetails.java
  21. 2 2
      diagbotman-service/src/main/java/com/diagbot/entity/OrderDetailsIndex.java
  22. 11 12
      diagbotman-service/src/main/java/com/diagbot/entity/ProductOrder.java
  23. 2 3
      diagbotman-service/src/main/java/com/diagbot/entity/ProductOrderIndex.java
  24. 11 10
      diagbotman-service/src/main/java/com/diagbot/entity/ProductService.java
  25. 1 2
      diagbotman-service/src/main/java/com/diagbot/entity/ServiceFilter.java
  26. 12 11
      diagbotman-service/src/main/java/com/diagbot/entity/ServiceInfo.java
  27. 15 15
      diagbotman-service/src/main/java/com/diagbot/entity/ServiceToken.java
  28. 13 13
      diagbotman-service/src/main/java/com/diagbot/entity/SysLog.java
  29. 9 9
      diagbotman-service/src/main/java/com/diagbot/entity/User.java
  30. 1 1
      diagbotman-service/src/main/java/com/diagbot/entity/wrapper/OpendProductWrapper.java
  31. 4 4
      diagbotman-service/src/main/java/com/diagbot/exception/CommonExceptionHandler.java
  32. 3 3
      diagbotman-service/src/main/java/com/diagbot/exception/ServiceErrorCode.java
  33. 2 1
      diagbotman-service/src/main/java/com/diagbot/facade/EnumsDataFacade.java
  34. 31 24
      diagbotman-service/src/main/java/com/diagbot/facade/LantoneProductFacade.java
  35. 95 91
      diagbotman-service/src/main/java/com/diagbot/facade/OpenedProductsFacade.java
  36. 27 25
      diagbotman-service/src/main/java/com/diagbot/facade/OrderDetailsFacade.java
  37. 147 142
      diagbotman-service/src/main/java/com/diagbot/facade/ProductOrderFacade.java
  38. 1 0
      diagbotman-service/src/main/java/com/diagbot/facade/ServiceFilterFacade.java
  39. 2 0
      diagbotman-service/src/main/java/com/diagbot/idc/IdCreater.java
  40. 16 6
      diagbotman-service/src/main/java/com/diagbot/mapper/OpenedProductsMapper.java
  41. 43 40
      diagbotman-service/src/main/java/com/diagbot/mapper/ProductOrderMapper.java
  42. 1 0
      diagbotman-service/src/main/java/com/diagbot/mapper/ProductServiceMapper.java
  43. 2 2
      diagbotman-service/src/main/java/com/diagbot/rabbit/MySender.java
  44. 1 0
      diagbotman-service/src/main/java/com/diagbot/service/EnumsDataService.java
  45. 1 1
      diagbotman-service/src/main/java/com/diagbot/service/LantoneProductService.java
  46. 10 5
      diagbotman-service/src/main/java/com/diagbot/service/OpenedProductsService.java
  47. 1 0
      diagbotman-service/src/main/java/com/diagbot/service/ProductServiceService.java
  48. 2 1
      diagbotman-service/src/main/java/com/diagbot/service/impl/EnumsDataServiceImpl.java
  49. 4 3
      diagbotman-service/src/main/java/com/diagbot/service/impl/LantoneProductServiceImpl.java
  50. 23 22
      diagbotman-service/src/main/java/com/diagbot/service/impl/OpenedProductsServiceImpl.java
  51. 1 0
      diagbotman-service/src/main/java/com/diagbot/service/impl/ProductServiceServiceImpl.java
  52. 2 1
      diagbotman-service/src/main/java/com/diagbot/service/impl/ServiceFilterServiceImpl.java
  53. 11 6
      diagbotman-service/src/main/java/com/diagbot/util/GuidUtil.java
  54. 40 28
      diagbotman-service/src/main/java/com/diagbot/util/MD5Util.java
  55. 1 1
      diagbotman-service/src/main/java/com/diagbot/vo/AddOrderVO.java
  56. 8 9
      diagbotman-service/src/main/java/com/diagbot/vo/ModifyOpeningTimeVO.java
  57. 3 3
      diagbotman-service/src/main/java/com/diagbot/vo/OpenUpOnTrialVO.java
  58. 3 3
      diagbotman-service/src/main/java/com/diagbot/vo/ServiceTokenVo.java
  59. 7 8
      diagbotman-service/src/main/java/com/diagbot/vo/StartAndendByUserIdVO.java
  60. 11 11
      diagbotman-service/src/main/java/com/diagbot/web/DiagLantoneProductController.java
  61. 3 3
      diagbotman-service/src/main/java/com/diagbot/web/DiagOrderDetailsController.java
  62. 2 2
      diagbotman-service/src/main/java/com/diagbot/web/EnumsController.java
  63. 4 4
      diagbotman-service/src/main/java/com/diagbot/web/MoreServiceController.java
  64. 97 97
      diagbotman-service/src/main/java/com/diagbot/web/ProductOrderController.java
  65. 4 1
      diagbotman-service/src/main/java/com/diagbot/web/ProductServiceController.java
  66. 0 2
      diagbotman-service/src/main/java/com/diagbot/web/ServiceFilterController.java
  67. 5 1
      diagbotman-service/src/main/java/com/diagbot/web/ServiceInfoController.java
  68. 5 1
      diagbotman-service/src/main/java/com/diagbot/web/ServiceTokenController.java
  69. 2 2
      diagbotman-service/src/main/resources/bootstrap.yml
  70. 70 53
      diagbotman-service/src/main/resources/logback-spring.xml
  71. 40 36
      diagbotman-service/src/main/resources/mapper/LantoneProductMapper.xml
  72. 104 99
      diagbotman-service/src/main/resources/mapper/OpenedProductsMapper.xml
  73. 35 33
      diagbotman-service/src/main/resources/mapper/OrderDetailsMapper.xml
  74. 50 46
      diagbotman-service/src/main/resources/mapper/ProductOrderMapper.xml
  75. 20 19
      diagbotman-service/src/main/resources/mapper/ProductServiceMapper.xml
  76. 11 10
      diagbotman-service/src/main/resources/mapper/ServiceFilterMapper.xml
  77. 12 11
      diagbotman-service/src/main/resources/mapper/ServiceInfoMapper.xml
  78. 16 15
      diagbotman-service/src/main/resources/mapper/ServiceTokenMapper.xml

+ 3 - 3
diagbotman-service/src/main/java/com/diagbot/DiagbotmanServiceApplication.java

@@ -18,10 +18,10 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
  * @author: gaodm
  * @time: 2018/8/7 9:24
  */
-@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
-        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class})
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
+        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
 @EnableEurekaClient
-@EnableFeignClients({"com.diagbot.client"})
+@EnableFeignClients({ "com.diagbot.client" })
 @EnableHystrixDashboard
 @EnableHystrix
 @EnableCircuitBreaker

+ 6 - 6
diagbotman-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -42,7 +42,7 @@ public class SysLoggerAspect {
 
         SysLog sysLog = new SysLog();
         SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-        if(sysLogger != null){
+        if (sysLogger != null) {
             //注解上的描述
             sysLog.setOperation(sysLogger.value());
         }
@@ -52,18 +52,18 @@ public class SysLoggerAspect {
         sysLog.setMethod(className + "." + methodName + "()");
         //请求的参数
         Object[] args = joinPoint.getArgs();
-        String params="";
-        for(Object o:args){
-            params+=GsonUtil.toJson(o);
+        String params = "";
+        for (Object o : args) {
+            params += GsonUtil.toJson(o);
         }
-        if(!StringUtil.isEmpty(params)) {
+        if (!StringUtil.isEmpty(params)) {
             sysLog.setParams(params);
         }
         //设置IP地址
         sysLog.setIp(HttpUtils.getIpAddress());
         //用户名
         String username = UserUtils.getCurrentPrinciple();
-        if(!StringUtil.isEmpty(username)) {
+        if (!StringUtil.isEmpty(username)) {
             sysLog.setUsername(username);
         }
         sysLog.setGmtCreate(new Date());

+ 1 - 1
diagbotman-service/src/main/java/com/diagbot/client/UserServiceClient.java

@@ -19,7 +19,7 @@ import java.util.Map;
  * @author: gaodm
  * @time: 2018/8/6 9:52
  */
-@FeignClient(value = "user-service",fallback = UserServiceHystrix.class )
+@FeignClient(value = "user-service", fallback = UserServiceHystrix.class)
 public interface UserServiceClient {
 
     @PostMapping(value = "/user/{username}")

+ 2 - 2
diagbotman-service/src/main/java/com/diagbot/client/hystrix/UserServiceHystrix.java

@@ -29,13 +29,13 @@ public class UserServiceHystrix implements UserServiceClient {
 
     @Override
     public RespDTO<Map<Long, UserOrgDTO>> getUserAndOrg(List<Long> userIds) {
-        log.error("【hystrix】调用{}异常","getUserAndOrg");
+        log.error("【hystrix】调用{}异常", "getUserAndOrg");
         return null;
     }
 
     @Override
     public RespDTO<List<Long>> getUserByOrgName(String orgName) {
-        log.error("【hystrix】调用{}异常","getUserByOrgName");
+        log.error("【hystrix】调用{}异常", "getUserByOrgName");
         return null;
     }
 }

+ 5 - 4
diagbotman-service/src/main/java/com/diagbot/config/IdcConfigurer.java

@@ -1,6 +1,7 @@
 package com.diagbot.config;
 
 //import com.diagbot.idc.InvisibleIdCreater;
+
 import com.diagbot.idc.VisibleIdCreater;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -18,8 +19,8 @@ public class IdcConfigurer {
         return new VisibleIdCreater(0, 0);
     }
 
-//    @Bean
-//    public InvisibleIdCreater invisibleIdCreater() {
-//        return new InvisibleIdCreater(0, 0);
-//    }
+    //    @Bean
+    //    public InvisibleIdCreater invisibleIdCreater() {
+    //        return new InvisibleIdCreater(0, 0);
+    //    }
 }

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

@@ -33,9 +33,9 @@ public class JwtConfigurer {
 
     @Bean
     protected JwtAccessTokenConverter jwtTokenEnhancer() {
-        JwtAccessTokenConverter converter =  new JwtAccessTokenConverter();
+        JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
         Resource resource = new ClassPathResource("public.cert");
-        String publicKey ;
+        String publicKey;
         try {
             publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream()));
         } catch (IOException e) {

+ 3 - 3
diagbotman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -25,14 +25,14 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
         http
                 .csrf().disable()
                 .authorizeRequests()
-                .regexMatchers(".*swagger.*",".*v2.*",".*webjars.*","/druid.*","/actuator.*","/hystrix.*"
-                        ,"/service_filter/getAll", "/serviceToken/hasPermission").permitAll()
+                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*"
+                        , "/service_filter/getAll", "/serviceToken/hasPermission").permitAll()
                 .antMatchers("/getDiagbotManEnumsData").permitAll()
                 .antMatchers("/diagLantoneProduct/selectProduct").permitAll()
                 .antMatchers("/morServices/addOrder").permitAll()
                 .antMatchers("/diagLantoneProduct/opendedProduct").permitAll()
                 .antMatchers("/**").authenticated();
-//        .antMatchers("/**").permitAll();
+        //        .antMatchers("/**").permitAll();
     }
 
 

+ 3 - 3
diagbotman-service/src/main/java/com/diagbot/config/SwaggerConfigurer.java

@@ -25,7 +25,7 @@ import java.util.List;
  * @time: 2018/8/2 14:21
  */
 @Configuration
-@ConditionalOnProperty(prefix = "swagger", value = {"enable"}, havingValue = "true")
+@ConditionalOnProperty(prefix = "swagger", value = { "enable" }, havingValue = "true")
 @EnableSwagger2
 public class SwaggerConfigurer {
     /**
@@ -52,8 +52,8 @@ public class SwaggerConfigurer {
                 .apis(RequestHandlerSelectors.basePackage("com.diagbot.web"))
                 .paths(PathSelectors.any())
                 .build().globalOperationParameters(parameter());
-                //.securitySchemes(newArrayList(oauth()))
-               // .securityContexts(newArrayList(securityContext()));
+        //.securitySchemes(newArrayList(oauth()))
+        // .securityContexts(newArrayList(securityContext()));
     }
 
     private ApiInfo apiInfo() {

+ 2 - 2
diagbotman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -25,7 +25,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
     public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException, InsufficientAuthenticationException {
         HttpServletRequest request = ((FilterInvocation) object).getHttpRequest();
         String url, method;
-        if ("anonymousUser".equals(authentication.getPrincipal())){
+        if ("anonymousUser".equals(authentication.getPrincipal())) {
             if (matchers("/swagger/**", request)
                     || matchers("/v2/**", request)
                     || matchers("/swagger-ui.html/**", request)
@@ -40,7 +40,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                     || matchers("/diagLantoneProduct/selectProduct", request)
                     || matchers("/morServices/addOrder", request)
                     || matchers("/diagLantoneProduct/opendedProduct", request)
-                    || matchers("/", request)){
+                    || matchers("/", request)) {
                 return;
             } else {
                 throw new AccessDeniedException("no right");

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

@@ -7,32 +7,32 @@ import lombok.Setter;
 
 @Getter
 @Setter
-public class AuthDetailDTO implements Serializable{
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	
-	/**
-	 * 订单号
-	 */
-	private String num;
-
-	/**
+public class AuthDetailDTO implements Serializable {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 订单号
+     */
+    private String num;
+
+    /**
      * 产品名称
      */
     private String name;
-	
+
     /**
      * 是否通过审核,N:未通过,Y:已通过
      */
     private String auditStatus;
-	
+
     /**
      * 不通过原因
      */
     private String rejectReason;
-	
+
 
 }

+ 15 - 15
diagbotman-service/src/main/java/com/diagbot/dto/EnShowOptionDTO.java

@@ -7,21 +7,21 @@ import lombok.Setter;
 
 @Getter
 @Setter
-public class EnShowOptionDTO implements Serializable{
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
+public class EnShowOptionDTO implements Serializable {
 
-	/**
-	 * 可开通产品数量
-	 */
-	private Integer openedCount;
-	
-	/**
-	 * 可试用产品数量
-	 */
-	private Integer onTrialCount;
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 可开通产品数量
+     */
+    private Integer openedCount;
+
+    /**
+     * 可试用产品数量
+     */
+    private Integer onTrialCount;
 
 }

+ 24 - 24
diagbotman-service/src/main/java/com/diagbot/dto/GetConsoleOnTrialDTO.java

@@ -7,38 +7,38 @@ import lombok.Setter;
 
 @Getter
 @Setter
-public class GetConsoleOnTrialDTO implements Serializable{
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * 产品id
-	 */
-	private Long id;
-	
-	/**
-	 * 产品名
-	 */
-	private String name;
-	
-	/**
-	 * 接入模式
-	 */
-	private String accessType;
-	
+public class GetConsoleOnTrialDTO implements Serializable {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 产品id
+     */
+    private Long id;
+
+    /**
+     * 产品名
+     */
+    private String name;
+
+    /**
+     * 接入模式
+     */
+    private String accessType;
+
     /**
      * 是否已试用
      */
     private String isUsed;
-	
+
     /**
      * 试用地址
      */
     private String trialUrl;
-    
+
     /**
      * 开通日期
      */

+ 13 - 13
diagbotman-service/src/main/java/com/diagbot/dto/GetConsoleOpenedDTO.java

@@ -7,23 +7,23 @@ import lombok.Setter;
 
 @Getter
 @Setter
-public class GetConsoleOpenedDTO implements Serializable{
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
+public class GetConsoleOpenedDTO implements Serializable {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
      * 已开通产品id
      */
     private Integer openId;
-	
-	 /**
+
+    /**
      * 产品id
      */
     private Integer productId;
-    
+
     /**
      * 产品名称
      */
@@ -38,11 +38,11 @@ public class GetConsoleOpenedDTO implements Serializable{
      * 结束日期
      */
     private String endTime;
-    
+
     /**
      * 当前用户的产品停用状态
      */
     private Integer serviceStatus;
-    
+
 
 }

+ 10 - 10
diagbotman-service/src/main/java/com/diagbot/dto/OpenUpOnTrialDTO.java

@@ -9,14 +9,14 @@ import lombok.Setter;
 
 @Getter
 @Setter
-public class OpenUpOnTrialDTO implements Serializable{
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	
-	
-	private ServiceToken serviceToken;
-	
+public class OpenUpOnTrialDTO implements Serializable {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+
+    private ServiceToken serviceToken;
+
 }

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

@@ -13,21 +13,21 @@ import lombok.Setter;
  */
 @Getter
 @Setter
-public class ProductAuthProgressDTO implements Serializable{
+public class ProductAuthProgressDTO implements Serializable {
 
     /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
+     *
+     */
+    private static final long serialVersionUID = 1L;
 
-	/**
+    /**
      * 订单编号
      */
-	private String num;
+    private String num;
+
+    /**
+     * 订单详情
+     */
+    private List<AuthDetailDTO> products;
 
-	/**
-	 * 订单详情
-	 */
-	private List<AuthDetailDTO> products;
-	
 }

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

@@ -1,28 +1,28 @@
 package com.diagbot.dto;
 
 import java.util.Date;
+
 import lombok.Getter;
 import lombok.Setter;
 
 /**
- * 
- * @Description: 用户已开通产品出参
  * @author wangfeng
+ * @Description: 用户已开通产品出参
  * @date 2018年9月21日 上午10:32:52
  */
 
 @Getter
 @Setter
 public class UserAndProdutDTO {
-	
-	private Long  Id;//开通的id
-	private Long  productId;//产品Id
-	private Long userId;//用户Id
-	private Date startTime;//开通时间
-	private Date endTime;//结束时间
-	private Integer serviceStatus;//启用状态
-	private Integer accessType;//接入方式
-	private Integer chargeType;//结算方式
-	private String  productName;//产品名称
+
+    private Long Id;//开通的id
+    private Long productId;//产品Id
+    private Long userId;//用户Id
+    private Date startTime;//开通时间
+    private Date endTime;//结束时间
+    private Integer serviceStatus;//启用状态
+    private Integer accessType;//接入方式
+    private Integer chargeType;//结算方式
+    private String productName;//产品名称
 
 }

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

@@ -13,18 +13,18 @@ import java.io.Serializable;
 
 @Getter
 @Setter
-public class UserOrgDTO implements Serializable{
-	
-	 private static final long serialVersionUID = 1L;
+public class UserOrgDTO implements Serializable {
 
-	    private Long userId;//用户ID
-	    private String username;// 用户名
-	    private String linkman;//联系人
-	    private String email;// 邮箱
-	    private Long orgId;//机构ID
-	    private String orgName;//机构名称
-		private Integer isReject; //是否通过认证
-		private Integer subNum;//机构数量
-		private Integer auStatus;  //认证状态(0:未认证,1:已认证,2:认证中)
+    private static final long serialVersionUID = 1L;
+
+    private Long userId;//用户ID
+    private String username;// 用户名
+    private String linkman;//联系人
+    private String email;// 邮箱
+    private Long orgId;//机构ID
+    private String orgName;//机构名称
+    private Integer isReject; //是否通过认证
+    private Integer subNum;//机构数量
+    private Integer auStatus;  //认证状态(0:未认证,1:已认证,2:认证中)
 
 }

+ 9 - 9
diagbotman-service/src/main/java/com/diagbot/dto/WaitExamOrderCouDTO.java

@@ -7,14 +7,14 @@ import lombok.Setter;
 
 @Getter
 @Setter
-public class WaitExamOrderCouDTO implements Serializable{
-	
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	
-	private Integer count;
+public class WaitExamOrderCouDTO implements Serializable {
+
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    private Integer count;
 
 }

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

@@ -41,12 +41,12 @@ public class OpenedProductsIndex implements Serializable {
     private Integer orderId;
 
     /**
-        每页显示条数
+     * 每页显示条数
      */
     private Long size;
 
     /**
-        页数
+     * 页数
      */
     private Long current;
 

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

@@ -208,20 +208,20 @@ public class OrderDetails implements Serializable {
     @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 +
-        "}";
+                "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 +
+                "}";
     }
 }

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

@@ -50,12 +50,12 @@ public class OrderDetailsIndex implements Serializable {
     private Integer status;
 
     /**
-     每页显示条数
+     * 每页显示条数
      */
     private Long size;
 
     /**
-     页数
+     * 页数
      */
     private Long current;
 

+ 11 - 12
diagbotman-service/src/main/java/com/diagbot/entity/ProductOrder.java

@@ -74,7 +74,6 @@ public class ProductOrder implements Serializable {
 
     /**
      * 审核状态
-
      */
     private Integer auditStatus;
 
@@ -169,16 +168,16 @@ public class ProductOrder implements Serializable {
     @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 +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", num=" + num +
+                ", userId=" + userId +
+                ", time=" + time +
+                ", totalPrices=" + totalPrices +
+                "}";
     }
 }

+ 2 - 3
diagbotman-service/src/main/java/com/diagbot/entity/ProductOrderIndex.java

@@ -27,17 +27,16 @@ public class ProductOrderIndex implements Serializable {
 
     /**
      * 审核状态
-
      */
     private Integer auditStatus;
 
     /**
-     每页显示条数
+     * 每页显示条数
      */
     private Long size;
 
     /**
-     页数
+     * 页数
      */
     private Long current;
 

+ 11 - 10
diagbotman-service/src/main/java/com/diagbot/entity/ProductService.java

@@ -3,6 +3,7 @@ package com.diagbot.entity;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+
 import java.util.Date;
 import java.io.Serializable;
 
@@ -138,15 +139,15 @@ public class ProductService implements Serializable {
     @Override
     public String toString() {
         return "ProductService{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", productId=" + productId +
-        ", serviceId=" + serviceId +
-        ", remark=" + remark +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", productId=" + productId +
+                ", serviceId=" + serviceId +
+                ", remark=" + remark +
+                "}";
     }
 }

+ 1 - 2
diagbotman-service/src/main/java/com/diagbot/entity/ServiceFilter.java

@@ -55,7 +55,7 @@ public class ServiceFilter implements Serializable {
     private String name;
 
     /**
-     *  产品id
+     * 产品id
      */
     private Long productId;
 
@@ -65,5 +65,4 @@ public class ServiceFilter implements Serializable {
     private String remark;
 
 
-
 }

+ 12 - 11
diagbotman-service/src/main/java/com/diagbot/entity/ServiceInfo.java

@@ -3,6 +3,7 @@ package com.diagbot.entity;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+
 import java.util.Date;
 import java.io.Serializable;
 
@@ -144,16 +145,16 @@ public class ServiceInfo implements Serializable {
     @Override
     public String toString() {
         return "ServiceInfo{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", name=" + name +
-        ", description=" + description +
-        ", userId=" + userId +
-        ", type=" + type +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", name=" + name +
+                ", description=" + description +
+                ", userId=" + userId +
+                ", type=" + type +
+                "}";
     }
 }

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

@@ -205,20 +205,20 @@ public class ServiceToken implements Serializable {
     @Override
     public String toString() {
         return "ServiceToken{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", productServiceId=" + productServiceId +
-        ", appKeyId=" + appKeyId +
-        ", appKeySecret=" + appKeySecret +
-        ", type=" + type +
-        ", status=" + status +
-        ", startingDate=" + startingDate +
-        ", expiringDate=" + expiringDate +
-        ", remark=" + remark +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", productServiceId=" + productServiceId +
+                ", appKeyId=" + appKeyId +
+                ", appKeySecret=" + appKeySecret +
+                ", type=" + type +
+                ", status=" + status +
+                ", startingDate=" + startingDate +
+                ", expiringDate=" + expiringDate +
+                ", remark=" + remark +
+                "}";
     }
 }

+ 13 - 13
diagbotman-service/src/main/java/com/diagbot/entity/SysLog.java

@@ -179,18 +179,18 @@ public class SysLog implements Serializable {
     @Override
     public String toString() {
         return "SysLog{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", ip=" + ip +
-        ", sysType=" + sysType +
-        ", method=" + method +
-        ", operation=" + operation +
-        ", params=" + params +
-        ", username=" + username +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", ip=" + ip +
+                ", sysType=" + sysType +
+                ", method=" + method +
+                ", operation=" + operation +
+                ", params=" + params +
+                ", username=" + username +
+                "}";
     }
 }

+ 9 - 9
diagbotman-service/src/main/java/com/diagbot/entity/User.java

@@ -129,14 +129,14 @@ public class User implements Serializable {
     @Override
     public String toString() {
         return "User{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", password=" + password +
-        ", username=" + username +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", password=" + password +
+                ", username=" + username +
+                "}";
     }
 }

+ 1 - 1
diagbotman-service/src/main/java/com/diagbot/entity/wrapper/OpendProductWrapper.java

@@ -13,7 +13,7 @@ import java.util.Date;
  */
 @Getter
 @Setter
-public class OpendProductWrapper extends OpenedProducts{
+public class OpendProductWrapper extends OpenedProducts {
     private Date orderTime;
     private String username;// 用户名
     private String linkman;//联系人

+ 4 - 4
diagbotman-service/src/main/java/com/diagbot/exception/CommonExceptionHandler.java

@@ -30,7 +30,7 @@ public class CommonExceptionHandler {
     @ExceptionHandler(Exception.class)
     public ResponseEntity<RespDTO> handleException(Exception e) {
         RespDTO resp = new RespDTO();
-        if(e instanceof BindException) {
+        if (e instanceof BindException) {
             BindException ex = (BindException) e;
             Map<String, String> stringMap = new HashMap<>();
             for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
@@ -42,7 +42,7 @@ public class CommonExceptionHandler {
             resp.msg = msg;
             return new ResponseEntity(resp, HttpStatus.OK);
         }
-        if(e instanceof MethodArgumentNotValidException) {
+        if (e instanceof MethodArgumentNotValidException) {
             MethodArgumentNotValidException ex = (MethodArgumentNotValidException) e;
             Map<String, String> stringMap = new HashMap<>();
             for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
@@ -54,7 +54,7 @@ public class CommonExceptionHandler {
             resp.msg = msg;
             return new ResponseEntity(resp, HttpStatus.OK);
         }
-        if(e instanceof MissingServletRequestParameterException) {
+        if (e instanceof MissingServletRequestParameterException) {
             MissingServletRequestParameterException ex = (MissingServletRequestParameterException) e;
             Map<String, String> stringMap = new HashMap<>();
             stringMap.put(ex.getParameterName(), "不能为null");
@@ -64,7 +64,7 @@ public class CommonExceptionHandler {
             resp.msg = msg;
             return new ResponseEntity(resp, HttpStatus.OK);
         }
-        if(e instanceof CommonException) {
+        if (e instanceof CommonException) {
             CommonException taiChiException = (CommonException) e;
             resp.code = taiChiException.getCode();
             resp.msg = e.getMessage();

+ 3 - 3
diagbotman-service/src/main/java/com/diagbot/exception/ServiceErrorCode.java

@@ -2,13 +2,13 @@ package com.diagbot.exception;
 
 /**
  * @Description: 本服务错误码
- *      系统码(3位) + 等级码(1位) + 4位顺序号
- *      系统码 通用码 000;用户中心 100; 管理中心 200;
+ * 系统码(3位) + 等级码(1位) + 4位顺序号
+ * 系统码 通用码 000;用户中心 100; 管理中心 200;
  * @author: gaodm
  * @time: 2018/9/10 11:11
  */
 public enum ServiceErrorCode implements ErrorCode {
-    LOG_IS_NOT_EXIST("90020001","该日志不存在");
+    LOG_IS_NOT_EXIST("90020001", "该日志不存在");
 
     private String code;
     private String msg;

+ 2 - 1
diagbotman-service/src/main/java/com/diagbot/facade/EnumsDataFacade.java

@@ -20,9 +20,10 @@ public class EnumsDataFacade {
 
     /**
      * 用户枚举数据获取
+     *
      * @return 用户枚举类map
      */
-    public Map<String, List<EnumEntriesBuilder.Entry>> getEnumsData(){
+    public Map<String, List<EnumEntriesBuilder.Entry>> getEnumsData() {
         return enumsDataService.getEnumsData();
     }
 

+ 31 - 24
diagbotman-service/src/main/java/com/diagbot/facade/LantoneProductFacade.java

@@ -43,12 +43,13 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
 
     /**
      * 产品线管理添加产品
+     *
      * @param addProductsVO 需要提供的参数(产品名称,产品介绍,产品url,产品计费方式)
      * @return Boolean true
      */
     public Boolean addProducts(AddProductsVO addProductsVO) {
-        LantoneProduct lantoneProduct =new LantoneProduct();
-        BeanUtil.copyProperties(addProductsVO,lantoneProduct);
+        LantoneProduct lantoneProduct = new LantoneProduct();
+        BeanUtil.copyProperties(addProductsVO, lantoneProduct);
         lantoneProduct.setGmtCreate(DateUtil.now());
         lantoneProduct.setCreator(UserUtils.getCurrentPrincipleID());
         if (!save(lantoneProduct)) {
@@ -61,12 +62,13 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
 
     /**
      * 朗通产品线管理修改产品
+     *
      * @param updateProductVO 所需参数(产品名称,url,产品描述,接入模式,收费模式,是否试用)
      * @return Boolean true
      */
     public Boolean updateProduct(UpdateProductVO updateProductVO) {
-        LantoneProduct lantoneProduct =this.getById(updateProductVO.getId());
-        BeanUtil.copyProperties(updateProductVO,lantoneProduct);
+        LantoneProduct lantoneProduct = this.getById(updateProductVO.getId());
+        BeanUtil.copyProperties(updateProductVO, lantoneProduct);
         lantoneProduct.setModifier(UserUtils.getCurrentPrincipleID());
         lantoneProduct.setGmtModified(DateUtil.now());
         if (!updateById(lantoneProduct)) {
@@ -78,17 +80,18 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
 
     /**
      * 删除产品业务逻辑
+     *
      * @param updateProductVO 所需参数(产品id)
      * @return Boolean true
      */
     public Boolean deleteProduct(UpdateProductVO updateProductVO) {
         LantoneProduct lantoneProduct = getById(updateProductVO.getId());
-        OpenedProducts openedProducts= new OpenedProducts();
+        OpenedProducts openedProducts = new OpenedProducts();
         openedProducts.setId(updateProductVO.getId());
         openedProducts.setServiceStatus(StatusEnum.Enable.getKey());
-        if(openedProductsFacade.getOpendById(openedProducts).size()!=0){
-                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
-                        "本产品还有用户使用,删除失败");
+        if (openedProductsFacade.getOpendById(openedProducts).size() != 0) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                    "本产品还有用户使用,删除失败");
         }
         lantoneProduct.setModifier(UserUtils.getCurrentPrincipleID());
         lantoneProduct.setGmtModified(DateUtil.now());
@@ -100,7 +103,7 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
         return true;
     }
 
-   /* *//**
+    /* *//**
      * 更改产品状态业务逻辑
      * @param lantoneProduct
      * @return Boolean true
@@ -117,66 +120,70 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
 
     /**
      * 查询当前用户已开通产品
+     *
      * @return 查询当前用户已开通产品
      */
     public List<LantoneProductWrapper> opendedProductByCurrentUser() {
-        Long userId=Long.parseLong(UserUtils.getCurrentPrincipleID());
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
         return this.opendedProductByUserId(userId);
     }
 
     /**
      * 根据用户id查询是否有开通产品
+     *
      * @param page 页数和每页显示的条数默认显示10条
      * @return 根据用户id查询是否有开通产品
      */
-    public IPage<LantoneProduct> productLine(Page page){
+    public IPage<LantoneProduct> productLine(Page page) {
         Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-        IPage<LantoneProduct> diagLantoneProducts =productLine(page,userId);
+        IPage<LantoneProduct> diagLantoneProducts = productLine(page, userId);
         return diagLantoneProducts;
     }
 
 
     /**
      * 根据产品id查询产品
+     *
      * @param id 产品id
      * @return 产品信息
      */
-    public LantoneProduct selectLanProduct(Long id){
+    public LantoneProduct selectLanProduct(Long id) {
         return getById(id);
     }
 
     /**
      * 根据产品id查询当条产品线下所有订单信息
+     *
      * @param oppendedProductVO 所需参数(产品id,页数,和每页条数,默认显示10条)
      * @return 当条产品线下所有订单信息
      */
-    public List<OpendProductWrapper> opendedProduct(OppendedProductVO oppendedProductVO){
-        OpenedProductsIndex openedProductsIndex =new OpenedProductsIndex();
+    public List<OpendProductWrapper> opendedProduct(OppendedProductVO oppendedProductVO) {
+        OpenedProductsIndex openedProductsIndex = new OpenedProductsIndex();
         Long curren = oppendedProductVO.getCurrent();
-        Long size =oppendedProductVO.getSize();
-        if(curren==null){
+        Long size = oppendedProductVO.getSize();
+        if (curren == null) {
             oppendedProductVO.setCurrent(1L);
         }
-        if (size==null){
+        if (size == null) {
             oppendedProductVO.setSize(10L);
         }
         BeanUtil.copyProperties(oppendedProductVO, openedProductsIndex);
-        openedProductsIndex.setIndex((oppendedProductVO.getCurrent().longValue()-1)*oppendedProductVO.getSize().longValue());
+        openedProductsIndex.setIndex((oppendedProductVO.getCurrent().longValue() - 1) * oppendedProductVO.getSize().longValue());
         List<OpendProductWrapper> list = openedProductsFacade.getByProductId(openedProductsIndex);
-        List<Long> list1 =new ArrayList<>();
-        for (OpendProductWrapper opendProducts:list) {
+        List<Long> list1 = new ArrayList<>();
+        for (OpendProductWrapper opendProducts : list) {
             Long longs = opendProducts.getUserId();
             list1.add(longs);
         }
         RespDTO<Map<Long, UserOrgDTO>> mapRespDTO = userServiceClient.getUserAndOrg(list1);
-        if(mapRespDTO == null || !"0".equals(mapRespDTO.code) ) {
+        if (mapRespDTO == null || !"0".equals(mapRespDTO.code)) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "获取用户和机构信息失败");
         }
         Map<Long, UserOrgDTO> dataMap = mapRespDTO.data;
-        for(OpendProductWrapper bean : list) {
+        for (OpendProductWrapper bean : list) {
             UserOrgDTO uo = dataMap.get(bean.getUserId());
-            if(uo != null) {
+            if (uo != null) {
                 bean.setUsername(uo.getUsername());
                 bean.setLinkman(uo.getLinkman());
                 bean.setEmail(uo.getEmail());

+ 95 - 91
diagbotman-service/src/main/java/com/diagbot/facade/OpenedProductsFacade.java

@@ -37,10 +37,10 @@ import com.diagbot.vo.StartAndendByUserIdVO;
  */
 @Component
 public class OpenedProductsFacade extends OpenedProductsServiceImpl {
-	@Autowired
-	private ServiceInfoFacade serviceInfoFacade;
-	@Autowired
-	private ProductServiceFacade productServiceFacade;
+    @Autowired
+    private ServiceInfoFacade serviceInfoFacade;
+    @Autowired
+    private ProductServiceFacade productServiceFacade;
 
     public List<OpenedProducts> getByAppkeyAndSecretFac(Map map) {
         return this.getByAppkeyAndSecret(map);
@@ -48,129 +48,133 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
 
     /**
      * 得到所有已开通的产品
+     *
      * @return 所有已经开通的产品
      */
-    public List<GetConsoleOpenedDTO> getConsoleOpened(){
-    	Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+    public List<GetConsoleOpenedDTO> getConsoleOpened() {
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
         return baseMapper.getConsoleOpened(userId);
     }
 
     /**
      * 得到所有可试用的产品
+     *
      * @return 所有可试用的产品
      */
-    public List<GetConsoleOnTrialDTO> getConsoleOnTrial(){
-    	Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+    public List<GetConsoleOnTrialDTO> getConsoleOnTrial() {
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
         return baseMapper.getConsoleOnTrial(userId);
     }
-    
+
     /**
      * 产品立即试用接口,返回所需要的token
+     *
      * @param openUpOnTrialVO 产品立即试用接口请求参数
      * @return 包含token
      */
-    public OpenUpOnTrialDTO openUpOnTrial(OpenUpOnTrialVO openUpOnTrialVO){
-    	Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-    	String userName = UserUtils.getCurrentPrinciple();
-    	Date now = new Date();
-    	ServiceInfo serviceInfo = new ServiceInfo();
-    	serviceInfo.setType(2);
-    	serviceInfo.setUserId(userId);
-    	serviceInfo.setDescription("用户试用产品-虚拟服务");
-    	serviceInfo.setName("虚拟服务");
-    	serviceInfo.setCreator(userName);
-    	serviceInfo.setGmtCreate(now);
-    	serviceInfo.setIsDeleted("N");
-    	serviceInfoFacade.save(serviceInfo);
-    	
-    	ProductService productService = new ProductService();
-    	productService.setServiceId(serviceInfo.getId());
-    	productService.setProductId(openUpOnTrialVO.getProductId());
-    	productService.setCreator(userName);
-    	productService.setGmtCreate(now);
-    	productService.setIsDeleted("N");
-    	productServiceFacade.save(productService);
-    	
-    	ProductServiceSaveVO productServiceSaveVO = new ProductServiceSaveVO();
-    	productServiceSaveVO.setProductId(openUpOnTrialVO.getProductId());
-    	productServiceSaveVO.setServiceId(serviceInfo.getId());
-    	productServiceSaveVO.setType(3);
-    	ProductServiceDTO poroductServiceDTO = productServiceFacade.genProductService(productServiceSaveVO);
-    	
-    	OpenUpOnTrialDTO openUpOnTrialDTO = new OpenUpOnTrialDTO();
-    	openUpOnTrialDTO.setServiceToken(poroductServiceDTO.getServiceToken());
-    	
-    	return openUpOnTrialDTO;	
+    public OpenUpOnTrialDTO openUpOnTrial(OpenUpOnTrialVO openUpOnTrialVO) {
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+        String userName = UserUtils.getCurrentPrinciple();
+        Date now = new Date();
+        ServiceInfo serviceInfo = new ServiceInfo();
+        serviceInfo.setType(2);
+        serviceInfo.setUserId(userId);
+        serviceInfo.setDescription("用户试用产品-虚拟服务");
+        serviceInfo.setName("虚拟服务");
+        serviceInfo.setCreator(userName);
+        serviceInfo.setGmtCreate(now);
+        serviceInfo.setIsDeleted("N");
+        serviceInfoFacade.save(serviceInfo);
+
+        ProductService productService = new ProductService();
+        productService.setServiceId(serviceInfo.getId());
+        productService.setProductId(openUpOnTrialVO.getProductId());
+        productService.setCreator(userName);
+        productService.setGmtCreate(now);
+        productService.setIsDeleted("N");
+        productServiceFacade.save(productService);
+
+        ProductServiceSaveVO productServiceSaveVO = new ProductServiceSaveVO();
+        productServiceSaveVO.setProductId(openUpOnTrialVO.getProductId());
+        productServiceSaveVO.setServiceId(serviceInfo.getId());
+        productServiceSaveVO.setType(3);
+        ProductServiceDTO poroductServiceDTO = productServiceFacade.genProductService(productServiceSaveVO);
+
+        OpenUpOnTrialDTO openUpOnTrialDTO = new OpenUpOnTrialDTO();
+        openUpOnTrialDTO.setServiceToken(poroductServiceDTO.getServiceToken());
+
+        return openUpOnTrialDTO;
     }
-    
+
     /**
      * 计算可展示的选项卡
+     *
      * @return 可展是的选项卡
      */
-    public EnShowOptionDTO enShowOption(){
-    	Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-    	int openedCount = baseMapper.getConsoleOpenedCount(userId);
-    	int onTrialCount = baseMapper.getConsoleOnTrialCount(userId);
-    	
-    	EnShowOptionDTO enShowOptionDTO = new EnShowOptionDTO();
-    	enShowOptionDTO.setOpenedCount(openedCount);
-    	enShowOptionDTO.setOnTrialCount(onTrialCount);
-    	
-    	return enShowOptionDTO;
+    public EnShowOptionDTO enShowOption() {
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+        int openedCount = baseMapper.getConsoleOpenedCount(userId);
+        int onTrialCount = baseMapper.getConsoleOnTrialCount(userId);
+
+        EnShowOptionDTO enShowOptionDTO = new EnShowOptionDTO();
+        enShowOptionDTO.setOpenedCount(openedCount);
+        enShowOptionDTO.setOnTrialCount(onTrialCount);
+
+        return enShowOptionDTO;
     }
+
     /**
-     * 
      * @param startAndendByUserIdVO
      * @return 根据用户id和产品id,删除开通信息
      */
     public RespDTO<StartAndendByUserIdVO> startAndendByuserIds(StartAndendByUserIdVO startAndendByUserIdVO) {
-		OpenedProducts openedProducts = new OpenedProducts();
-		openedProducts.setUserId(startAndendByUserIdVO.getUserId());
-		openedProducts.setProductId(startAndendByUserIdVO.getProductId());
-		openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
-		openedProducts.setGmtCreate(DateUtil.now());
-		openedProducts.setServiceStatus(startAndendByUserIdVO.getServiceStatus());
-		boolean res =startAndendByuserId(openedProducts);
-		if (!res){
-			throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
-		}
-		return RespDTO.onSuc(res);
-	}
+        OpenedProducts openedProducts = new OpenedProducts();
+        openedProducts.setUserId(startAndendByUserIdVO.getUserId());
+        openedProducts.setProductId(startAndendByUserIdVO.getProductId());
+        openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
+        openedProducts.setGmtCreate(DateUtil.now());
+        openedProducts.setServiceStatus(startAndendByUserIdVO.getServiceStatus());
+        boolean res = startAndendByuserId(openedProducts);
+        if (!res) {
+            throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
+        }
+        return RespDTO.onSuc(res);
+    }
+
     /**
-     * 
      * @param userId
      * @param productId
      * @return 根据用户id和产品id,删除开通信息
      */
     public RespDTO delInformationAvailables(Long userId, Long productId) {
-		OpenedProducts openedProducts = new OpenedProducts();
-		openedProducts.setUserId(userId);
-		openedProducts.setProductId(productId);
-		openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
-		openedProducts.setGmtCreate(DateUtil.now());
-		boolean res =delInformationAvailable(openedProducts);
-		if (!res){
-			throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
-		}
-		return RespDTO.onSuc(res);
-	}
+        OpenedProducts openedProducts = new OpenedProducts();
+        openedProducts.setUserId(userId);
+        openedProducts.setProductId(productId);
+        openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
+        openedProducts.setGmtCreate(DateUtil.now());
+        boolean res = delInformationAvailable(openedProducts);
+        if (!res) {
+            throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
+        }
+        return RespDTO.onSuc(res);
+    }
+
     /**
-     * 
      * @param modifyOpeningTimeVO
      * @return 根据用户id和产品id,修改开通时间
      */
     public RespDTO<ModifyOpeningTimeVO> modifyOpeningTimes(ModifyOpeningTimeVO modifyOpeningTimeVO) {
-		OpenedProducts openedProducts = new OpenedProducts();
-		openedProducts.setUserId(modifyOpeningTimeVO.getUserId());
-		openedProducts.setProductId(modifyOpeningTimeVO.getProductId());
-		openedProducts.setStartTime(DateUtil.parseDate(modifyOpeningTimeVO.getStartTime()));
-		openedProducts.setEndTime(DateUtil.parseDate(modifyOpeningTimeVO.getEndTime()));
-		openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
-		openedProducts.setGmtCreate(DateUtil.now());
-		boolean res = modifyOpeningTime(openedProducts);
-		if (!res){
-			throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
-		}
-		return RespDTO.onSuc(res);
-	}
+        OpenedProducts openedProducts = new OpenedProducts();
+        openedProducts.setUserId(modifyOpeningTimeVO.getUserId());
+        openedProducts.setProductId(modifyOpeningTimeVO.getProductId());
+        openedProducts.setStartTime(DateUtil.parseDate(modifyOpeningTimeVO.getStartTime()));
+        openedProducts.setEndTime(DateUtil.parseDate(modifyOpeningTimeVO.getEndTime()));
+        openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
+        openedProducts.setGmtCreate(DateUtil.now());
+        boolean res = modifyOpeningTime(openedProducts);
+        if (!res) {
+            throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
+        }
+        return RespDTO.onSuc(res);
+    }
 }

+ 27 - 25
diagbotman-service/src/main/java/com/diagbot/facade/OrderDetailsFacade.java

@@ -35,7 +35,7 @@ import java.util.Map;
  * @time: 2018/9/19 20:22
  */
 @Component
-public class OrderDetailsFacade extends OrderDetailsServiceImpl{
+public class OrderDetailsFacade extends OrderDetailsServiceImpl {
     @Autowired
     private OpenedProductsFacade openedProductsFacade;
     @Autowired
@@ -50,32 +50,33 @@ public class OrderDetailsFacade extends OrderDetailsServiceImpl{
 
     /**
      * 产品申请审核接口
+     *
      * @param auditStatusVO 需要提供参数(订单明细id,审核状态,开始时间,结束时间)
      * @return Boolean true
      */
     @Transactional
-    public Boolean updateAuditStatus(AuditStatusVO auditStatusVO){
-        OrderDetails orderDetails =this.getById(auditStatusVO.getId());
-        if(orderDetails==null){
+    public Boolean updateAuditStatus(AuditStatusVO auditStatusVO) {
+        OrderDetails orderDetails = this.getById(auditStatusVO.getId());
+        if (orderDetails == null) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "订单明细不存在");
         }
         orderDetails.setGmtModified(DateUtil.now());
         orderDetails.setModifier(UserUtils.getCurrentPrincipleID());
         orderDetails.setAuditStatus(auditStatusVO.getAuditStatus());
-        if(auditStatusVO.getAuditStatus()== AuditStatusEnum.Veto.getKey()){
-            if(!this.updateById(orderDetails)){
+        if (auditStatusVO.getAuditStatus() == AuditStatusEnum.Veto.getKey()) {
+            if (!this.updateById(orderDetails)) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                         "审核状态修改失败");
             }
             return true;
         }
-        if(!this.updateById(orderDetails)){
+        if (!this.updateById(orderDetails)) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "审核状态修改失败");
         }
-        Long userId =Long.parseLong(UserUtils.getCurrentPrincipleID());
-        OpenedProducts openedProducts =new OpenedProducts();
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+        OpenedProducts openedProducts = new OpenedProducts();
         openedProducts.setGmtCreate(DateUtil.now());
         openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
         openedProducts.setProductId(1L);
@@ -84,17 +85,17 @@ public class OrderDetailsFacade extends OrderDetailsServiceImpl{
         openedProducts.setEndTime(auditStatusVO.getEndTime());
         openedProducts.setOrderId(1L);
         openedProductsFacade.save(openedProducts);
-        LantoneProduct lantoneProduct =new LantoneProduct();
-        if(lantoneProductFacade.getById(lantoneProduct).getAccessType().indexOf(TokenTypeEnum.Online.getKey())==-1){
+        LantoneProduct lantoneProduct = new LantoneProduct();
+        if (lantoneProductFacade.getById(lantoneProduct).getAccessType().indexOf(TokenTypeEnum.Online.getKey()) == -1) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "该产品没有线上模式");
         }
-        ServiceSaveVO serviceSaveVO =new ServiceSaveVO();
+        ServiceSaveVO serviceSaveVO = new ServiceSaveVO();
         serviceSaveVO.setDescription(lantoneProduct.getDecription());
         serviceSaveVO.setName(lantoneProduct.getName());
         serviceSaveVO.setType(TokenTypeEnum.Online.getKey());
         ServiceInfo serviceInfo = serviceInfoFacade.createService(serviceSaveVO);
-        ProductServiceSaveVO productServiceSaveVO =new ProductServiceSaveVO();
+        ProductServiceSaveVO productServiceSaveVO = new ProductServiceSaveVO();
         productServiceSaveVO.setProductId(auditStatusVO.getId());
         productServiceSaveVO.setServiceId(serviceInfo.getId());
         productServiceSaveVO.setType(TokenTypeEnum.Online.getKey());
@@ -105,38 +106,39 @@ public class OrderDetailsFacade extends OrderDetailsServiceImpl{
 
     /**
      * 产品申请查询所有订单明细
+     *
      * @param orderDetialsVO 需要提供参数(付款状态,页数,每页条数默认显示10条)
      * @return 所有订单明细
      */
-    public List<OrderDetailsWapper> getAllOrderDetials(OrderDetialsVO orderDetialsVO){
-        OrderDetailsIndex orderDetailsIndex =new OrderDetailsIndex();
+    public List<OrderDetailsWapper> getAllOrderDetials(OrderDetialsVO orderDetialsVO) {
+        OrderDetailsIndex orderDetailsIndex = new OrderDetailsIndex();
         Long curren = orderDetialsVO.getCurrent();
-        Long size =orderDetialsVO.getSize();
-        if(curren==null){
+        Long size = orderDetialsVO.getSize();
+        if (curren == null) {
             orderDetialsVO.setCurrent(1L);
         }
-        if (size==null){
+        if (size == null) {
             orderDetialsVO.setSize(10L);
         }
         BeanUtil.copyProperties(orderDetialsVO, orderDetailsIndex);
-        orderDetailsIndex.setIndex((orderDetialsVO.getCurrent().longValue()-1)*orderDetialsVO.getSize().longValue());
+        orderDetailsIndex.setIndex((orderDetialsVO.getCurrent().longValue() - 1) * orderDetialsVO.getSize().longValue());
 
         orderDetailsIndex.setUserId(1L);
-        List<OrderDetailsWapper> list =this.seleAllOrderDetials(orderDetailsIndex);
-        List<Long> list1 =new ArrayList<>();
-        for (OrderDetails orderDetails:list) {
+        List<OrderDetailsWapper> list = this.seleAllOrderDetials(orderDetailsIndex);
+        List<Long> list1 = new ArrayList<>();
+        for (OrderDetails orderDetails : list) {
             Long longs = orderDetails.getUserId();
             list1.add(longs);
         }
         RespDTO<Map<Long, UserOrgDTO>> mapRespDTO = userServiceClient.getUserAndOrg(list1);
-        if(mapRespDTO == null || !"0".equals(mapRespDTO.code) ) {
+        if (mapRespDTO == null || !"0".equals(mapRespDTO.code)) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "获取用户和机构信息失败");
         }
         Map<Long, UserOrgDTO> dataMap = mapRespDTO.data;
-        for(OrderDetailsWapper bean : list) {
+        for (OrderDetailsWapper bean : list) {
             UserOrgDTO uo = dataMap.get(bean.getUserId());
-            if(uo != null) {
+            if (uo != null) {
                 bean.setUsername(uo.getUsername());
                 bean.setLinkman(uo.getLinkman());
                 bean.setEmail(uo.getEmail());

+ 147 - 142
diagbotman-service/src/main/java/com/diagbot/facade/ProductOrderFacade.java

@@ -32,156 +32,161 @@ import java.util.stream.Collectors;
 
 /**
  * 订单业务
- * @author Administrator
  *
+ * @author Administrator
  */
 @Component
 public class ProductOrderFacade extends ProductOrderServiceImpl {
-	@Autowired
-	private VisibleIdCreater visibleIdCreater;
-	@Autowired
-	private OrderDetailsFacade orderDetailsFacade;
-	@Autowired
-	private ServiceInfoFacade serviceInfoFacade;
-	@Autowired
-	private LantoneProductFacade lantoneProductFacade;
-	@Autowired
-	private ProductServiceFacade productServiceFacade;
-	@Autowired
-	private UserServiceClient userServiceClient;
-	@Autowired
-	private ProductOrderFacade productOrderFacade;
-	@Autowired
-	private OpenedProductsFacade openedProductsFacade;
-
-
-	/**
-	 * 获取产品的认证进度
-	 * @return 包含产品当前的认证状态
-	 */
-	public List<ProductAuthProgressDTO> productAuthProgress(){
-		List<ProductAuthProgressDTO> retList = new ArrayList<ProductAuthProgressDTO>();
-		Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-		List<ProductOrder> orderList = baseMapper.getUserProductOrder(userId);
-		List<String> nums = new ArrayList<>();
-		for(ProductOrder i : orderList){
-			nums.add(i.getNum());
-		}
-		List<AuthDetailDTO> detailList = baseMapper.getOrderDetailsByNums(nums);
-		Map<String, List<AuthDetailDTO>> detailMap = detailList.stream().collect(Collectors.groupingBy(AuthDetailDTO::getNum));
-		for(String num:detailMap.keySet()){
-			ProductAuthProgressDTO productAuthProgressDTO = new ProductAuthProgressDTO();
-			productAuthProgressDTO.setNum(num);
-			productAuthProgressDTO.setProducts(detailMap.get(num));
-			retList.add(productAuthProgressDTO);
-		}
-		
-
-		return retList;
-	}
-
-
-	/**
-	 * 根据用户选择的产品生成订单
-	 * @param addOrderVO 需要提供参数(产品id)
-	 * @return Boolean true
-	 */
-	@Transactional
-	public Boolean addOrders(AddOrderVO addOrderVO){
-		Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-		ProductOrder productOrder =new ProductOrder();
-		productOrder.setCreator(UserUtils.getCurrentPrincipleID());
-		productOrder.setGmtCreate(DateUtil.now());
-		String orderNum = visibleIdCreater.getNextId(VisibleIdTypeEnum.IS_ORDER.getKey()).toString();
-		productOrder.setNum(orderNum);
-		productOrder.setUserId(userId);
-		productOrder.setTime(DateUtil.now());
-		if(!save(productOrder)){
-			throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,"添加订单失败");
-		}
-		for (Long o:addOrderVO.getProductId()) {
-			LantoneProduct lantoneProduct = lantoneProductFacade.selectLanProduct(o);
-			if(null==lantoneProduct){
-				throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,"获取产品信息失败:"+o);
-			}
-			OrderDetails orderDetails =new OrderDetails();
-			orderDetails.setUserId(userId);
-			orderDetails.setOrderNum(orderNum);
-			orderDetails.setGmtCreate(DateUtil.now());
-			orderDetails.setCreator(UserUtils.getCurrentPrincipleID());
-			orderDetails.setProductId(o);
-			orderDetailsFacade.save(orderDetails);
-		}
-		return true;
-	}
-
-
-	/**
-	 * 根据订单号查询订单信息
-	 * @param productOrder 参数
-	 * @return 订单信息
-	 */
-	public ProductOrder selectByOrderNum(ProductOrder productOrder){
-		return selctOrderTimeByOrderNum(productOrder);
-	}
-
-
-	/**
-	 * 计算待审核的订单数量
-	 * @return 待审核的订单数量
-	 */
-    public WaitExamOrderCouDTO waitExamOrderCou(){
-    	WaitExamOrderCouDTO waitExamOrderCouDTO = new WaitExamOrderCouDTO();
-    	waitExamOrderCouDTO.setCount(baseMapper.waitExamOrderCou());
-    	return waitExamOrderCouDTO;
+    @Autowired
+    private VisibleIdCreater visibleIdCreater;
+    @Autowired
+    private OrderDetailsFacade orderDetailsFacade;
+    @Autowired
+    private ServiceInfoFacade serviceInfoFacade;
+    @Autowired
+    private LantoneProductFacade lantoneProductFacade;
+    @Autowired
+    private ProductServiceFacade productServiceFacade;
+    @Autowired
+    private UserServiceClient userServiceClient;
+    @Autowired
+    private ProductOrderFacade productOrderFacade;
+    @Autowired
+    private OpenedProductsFacade openedProductsFacade;
+
+
+    /**
+     * 获取产品的认证进度
+     *
+     * @return 包含产品当前的认证状态
+     */
+    public List<ProductAuthProgressDTO> productAuthProgress() {
+        List<ProductAuthProgressDTO> retList = new ArrayList<ProductAuthProgressDTO>();
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+        List<ProductOrder> orderList = baseMapper.getUserProductOrder(userId);
+        List<String> nums = new ArrayList<>();
+        for (ProductOrder i : orderList) {
+            nums.add(i.getNum());
+        }
+        List<AuthDetailDTO> detailList = baseMapper.getOrderDetailsByNums(nums);
+        Map<String, List<AuthDetailDTO>> detailMap = detailList.stream().collect(Collectors.groupingBy(AuthDetailDTO::getNum));
+        for (String num : detailMap.keySet()) {
+            ProductAuthProgressDTO productAuthProgressDTO = new ProductAuthProgressDTO();
+            productAuthProgressDTO.setNum(num);
+            productAuthProgressDTO.setProducts(detailMap.get(num));
+            retList.add(productAuthProgressDTO);
+        }
+
+
+        return retList;
+    }
+
+
+    /**
+     * 根据用户选择的产品生成订单
+     *
+     * @param addOrderVO 需要提供参数(产品id)
+     * @return Boolean true
+     */
+    @Transactional
+    public Boolean addOrders(AddOrderVO addOrderVO) {
+        Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+        ProductOrder productOrder = new ProductOrder();
+        productOrder.setCreator(UserUtils.getCurrentPrincipleID());
+        productOrder.setGmtCreate(DateUtil.now());
+        String orderNum = visibleIdCreater.getNextId(VisibleIdTypeEnum.IS_ORDER.getKey()).toString();
+        productOrder.setNum(orderNum);
+        productOrder.setUserId(userId);
+        productOrder.setTime(DateUtil.now());
+        if (!save(productOrder)) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "添加订单失败");
+        }
+        for (Long o : addOrderVO.getProductId()) {
+            LantoneProduct lantoneProduct = lantoneProductFacade.selectLanProduct(o);
+            if (null == lantoneProduct) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "获取产品信息失败:" + o);
+            }
+            OrderDetails orderDetails = new OrderDetails();
+            orderDetails.setUserId(userId);
+            orderDetails.setOrderNum(orderNum);
+            orderDetails.setGmtCreate(DateUtil.now());
+            orderDetails.setCreator(UserUtils.getCurrentPrincipleID());
+            orderDetails.setProductId(o);
+            orderDetailsFacade.save(orderDetails);
+        }
+        return true;
+    }
+
+
+    /**
+     * 根据订单号查询订单信息
+     *
+     * @param productOrder 参数
+     * @return 订单信息
+     */
+    public ProductOrder selectByOrderNum(ProductOrder productOrder) {
+        return selctOrderTimeByOrderNum(productOrder);
+    }
+
+
+    /**
+     * 计算待审核的订单数量
+     *
+     * @return 待审核的订单数量
+     */
+    public WaitExamOrderCouDTO waitExamOrderCou() {
+        WaitExamOrderCouDTO waitExamOrderCouDTO = new WaitExamOrderCouDTO();
+        waitExamOrderCouDTO.setCount(baseMapper.waitExamOrderCou());
+        return waitExamOrderCouDTO;
     }
 
 
-	/**
-	 * 产品申请查询所有订单信息
-	 * @param productOrderVO (订单编号,机构名称,申请状态)
-	 * @return 所有订单信息
-	 */
-	public List<ProductOrderWrapper> selectAllProductOrder(ProductOrderVO productOrderVO){
-		ProductOrderIndex productOrderIndex =new ProductOrderIndex();
-		Long curren = productOrderVO.getCurrent();
-		Long size =productOrderVO.getSize();
-		if(curren==null){
-			productOrderVO.setCurrent(1L);
-		}
-		if (size==null){
-			productOrderVO.setSize(10L);
-		}
-		BeanUtil.copyProperties(productOrderVO, productOrderIndex);
-		productOrderIndex.setIndex((productOrderVO.getCurrent().longValue()-1)*productOrderVO.getSize().longValue());
-		//TODO
+    /**
+     * 产品申请查询所有订单信息
+     *
+     * @param productOrderVO (订单编号,机构名称,申请状态)
+     * @return 所有订单信息
+     */
+    public List<ProductOrderWrapper> selectAllProductOrder(ProductOrderVO productOrderVO) {
+        ProductOrderIndex productOrderIndex = new ProductOrderIndex();
+        Long curren = productOrderVO.getCurrent();
+        Long size = productOrderVO.getSize();
+        if (curren == null) {
+            productOrderVO.setCurrent(1L);
+        }
+        if (size == null) {
+            productOrderVO.setSize(10L);
+        }
+        BeanUtil.copyProperties(productOrderVO, productOrderIndex);
+        productOrderIndex.setIndex((productOrderVO.getCurrent().longValue() - 1) * productOrderVO.getSize().longValue());
+        //TODO
         userServiceClient.getUserByOrgName(productOrderVO.getOrgName());
-		List<ProductOrderWrapper> list =productOrderFacade.selectAllProductOrder(productOrderIndex);
-		List<Long> list1 =new ArrayList<>();
-		for (ProductOrderWrapper productOrderWrapper:list) {
-			Long longs = productOrderWrapper.getUserId();
-			list1.add(longs);
-		}
-		RespDTO<Map<Long, UserOrgDTO>> mapRespDTO = userServiceClient.getUserAndOrg(list1);
-		if(mapRespDTO == null || !"0".equals(mapRespDTO.code) ) {
-			throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
-					"获取用户和机构信息失败");
-		}
-		Map<Long, UserOrgDTO> dataMap = mapRespDTO.data;
-		for(ProductOrderWrapper bean : list) {
-			UserOrgDTO uo = dataMap.get(bean.getUserId());
-			if(uo != null) {
-				bean.setUsername(uo.getUsername());
-				bean.setLinkman(uo.getLinkman());
-				bean.setEmail(uo.getEmail());
-				bean.setOrgId(uo.getOrgId());
-				bean.setOrgName(uo.getOrgName());
-				bean.setIsReject(uo.getIsReject());
-				bean.setAuStatus(uo.getAuStatus());
-			}
-		}
-		return list;
-	}
+        List<ProductOrderWrapper> list = productOrderFacade.selectAllProductOrder(productOrderIndex);
+        List<Long> list1 = new ArrayList<>();
+        for (ProductOrderWrapper productOrderWrapper : list) {
+            Long longs = productOrderWrapper.getUserId();
+            list1.add(longs);
+        }
+        RespDTO<Map<Long, UserOrgDTO>> mapRespDTO = userServiceClient.getUserAndOrg(list1);
+        if (mapRespDTO == null || !"0".equals(mapRespDTO.code)) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                    "获取用户和机构信息失败");
+        }
+        Map<Long, UserOrgDTO> dataMap = mapRespDTO.data;
+        for (ProductOrderWrapper bean : list) {
+            UserOrgDTO uo = dataMap.get(bean.getUserId());
+            if (uo != null) {
+                bean.setUsername(uo.getUsername());
+                bean.setLinkman(uo.getLinkman());
+                bean.setEmail(uo.getEmail());
+                bean.setOrgId(uo.getOrgId());
+                bean.setOrgName(uo.getOrgName());
+                bean.setIsReject(uo.getIsReject());
+                bean.setAuStatus(uo.getAuStatus());
+            }
+        }
+        return list;
+    }
 }
 
 

+ 1 - 0
diagbotman-service/src/main/java/com/diagbot/facade/ServiceFilterFacade.java

@@ -17,6 +17,7 @@ public class ServiceFilterFacade extends ServiceFilterServiceImpl {
 
     /**
      * 获取需要appkey和secret的服务,未用
+     *
      * @return 服务列表
      */
     public RespDTO<List<ServiceFilter>> getServiceFilter() {

+ 2 - 0
diagbotman-service/src/main/java/com/diagbot/idc/IdCreater.java

@@ -11,12 +11,14 @@ public interface IdCreater<T> {
 
     /**
      * 生成一个id
+     *
      * @return 生成的id
      */
     Long getNextId(T param);
 
     /**
      * 批量生成id
+     *
      * @param size 生成数量
      * @return 生成的id列表
      */

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

@@ -25,6 +25,7 @@ import java.util.Map;
 public interface OpenedProductsMapper extends BaseMapper<OpenedProducts> {
     /**
      * 根据用户id查询已开通的产品
+     *
      * @param userId 用户id
      * @return
      */
@@ -32,29 +33,33 @@ public interface OpenedProductsMapper extends BaseMapper<OpenedProducts> {
 
     /**
      * 查询已开通产品
+     *
      * @param map 查询条件
      * @return
      */
-    List<OpenedProducts> selectOpenedProducts(Map<String,Object>map);
+    List<OpenedProducts> selectOpenedProducts(Map<String, Object> map);
 
 
     /**
      * 查询已开通产品
+     *
      * @param map 查询条件
      * @return
      */
-    List<OpenedProducts> getByAppkeyAndSecret(Map<String,Object> map);
+    List<OpenedProducts> getByAppkeyAndSecret(Map<String, Object> map);
 
 
     /**
      * 控制台已开通产品查询
+     *
      * @param userId
      * @return
      */
     List<GetConsoleOpenedDTO> getConsoleOpened(Long userId);
-    
+
     /**
      * 控制台已开通产品数量查询
+     *
      * @param userId
      * @return
      */
@@ -62,13 +67,15 @@ public interface OpenedProductsMapper extends BaseMapper<OpenedProducts> {
 
     /**
      * 控制台可试用产品查询
+     *
      * @param userId
      * @return
      */
     List<GetConsoleOnTrialDTO> getConsoleOnTrial(Long userId);
-    
+
     /**
      * 控制台可试用产品数量查询
+     *
      * @param userId
      * @return
      */
@@ -76,11 +83,14 @@ public interface OpenedProductsMapper extends BaseMapper<OpenedProducts> {
 
     //根据用户id查询已开通的功能
     public List<UserAndProdutDTO> getInformationAvailableByUserId(OpenedProducts openedProducts);
+
     //根据用户id和产品id,启用和停用功能
     public boolean startAndendByuserId(OpenedProducts openedProducts);
-	  //根据用户id和产品id,删除开通信息", notes = "删除开通信息")
+
+    //根据用户id和产品id,删除开通信息", notes = "删除开通信息")
     public boolean delInformationAvailable(OpenedProducts openedProducts);
-     //根据用户id和产品id,修改开通时间", notes = "修改开通时间")
+
+    //根据用户id和产品id,修改开通时间", notes = "修改开通时间")
     public boolean modifyOpeningTime(OpenedProducts openedProducts);
 
 

+ 43 - 40
diagbotman-service/src/main/java/com/diagbot/mapper/ProductOrderMapper.java

@@ -17,44 +17,47 @@ import java.util.List;
  * @since 2018-09-18
  */
 public interface ProductOrderMapper extends BaseMapper<ProductOrder> {
-	/**
-	 * @Description: 根据用户id查询订单信息
-	 * @Author: wangyu
-	 * @Date: 19:39 2018/9/20
-	 */
-	List<ProductOrder> getUserProductOrder(Long userId);
-
-	/**
-	 * 根据订单号查询详情
-	 * @param orderNum
-	 * @return
-	 */
-	List<AuthDetailDTO> getOrderDetails(String orderNum);
-	
-	/**
-	 * 根据订单号集合查询详情
-	 * @param nums
-	 * @return
-	 */
-	List<AuthDetailDTO> getOrderDetailsByNums(List<String> nums);
-
-	/**
-	 * @Description: 根据订单号查询订单信息
-	 * @Author: wangyu
-	 * @Date: 19:39 2018/9/20
-	 */
-	ProductOrder selctOrderTimeByOrderNum(ProductOrder productOrder);
-	
-	/**
-	 * 待审核订单个数
-	 * @return
-	 */
-	int waitExamOrderCou();
-
-	/**
-	 * @Description: 订单申请查询所有订单信息接口
-	 * @Author: wangyu
-	 * @Date: 19:39 2018/9/20
-	 */
-	public List<ProductOrderWrapper> selectAllProductOrder(ProductOrderIndex productOrderIndex);
+    /**
+     * @Description: 根据用户id查询订单信息
+     * @Author: wangyu
+     * @Date: 19:39 2018/9/20
+     */
+    List<ProductOrder> getUserProductOrder(Long userId);
+
+    /**
+     * 根据订单号查询详情
+     *
+     * @param orderNum
+     * @return
+     */
+    List<AuthDetailDTO> getOrderDetails(String orderNum);
+
+    /**
+     * 根据订单号集合查询详情
+     *
+     * @param nums
+     * @return
+     */
+    List<AuthDetailDTO> getOrderDetailsByNums(List<String> nums);
+
+    /**
+     * @Description: 根据订单号查询订单信息
+     * @Author: wangyu
+     * @Date: 19:39 2018/9/20
+     */
+    ProductOrder selctOrderTimeByOrderNum(ProductOrder productOrder);
+
+    /**
+     * 待审核订单个数
+     *
+     * @return
+     */
+    int waitExamOrderCou();
+
+    /**
+     * @Description: 订单申请查询所有订单信息接口
+     * @Author: wangyu
+     * @Date: 19:39 2018/9/20
+     */
+    public List<ProductOrderWrapper> selectAllProductOrder(ProductOrderIndex productOrderIndex);
 }

+ 1 - 0
diagbotman-service/src/main/java/com/diagbot/mapper/ProductServiceMapper.java

@@ -19,6 +19,7 @@ public interface ProductServiceMapper extends BaseMapper<ProductService> {
 
     /**
      * 根据用户id获取产品与服务端的关联列表(分页)
+     *
      * @param page
      * @param productService
      * @return

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

@@ -15,13 +15,13 @@ import org.springframework.stereotype.Component;
  * @time: 2018/8/29 13:41
  */
 @Component
-@EnableBinding({MyProcessor.class})
+@EnableBinding({ MyProcessor.class })
 public class MySender {
     @Autowired
     @Qualifier("outputLog")
     MessageChannel outputLog;
 
-    public void outputLogSend(SysLog sysLog){
+    public void outputLogSend(SysLog sysLog) {
         outputLog.send(MessageBuilder.withPayload(GsonUtil.toJson(sysLog)).build());
     }
 }

+ 1 - 0
diagbotman-service/src/main/java/com/diagbot/service/EnumsDataService.java

@@ -13,6 +13,7 @@ import java.util.Map;
 public interface EnumsDataService {
     /**
      * 用户枚举数据获取
+     *
      * @return 用户枚举类map
      */
     Map<String, List<EnumEntriesBuilder.Entry>> getEnumsData();

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

@@ -23,7 +23,7 @@ public interface LantoneProductService extends IService<LantoneProduct> {
      * @Author: wangyu
      * @Date: 9:49 2018/9/18
      */
-     IPage<LantoneProduct> productLine(Page<LantoneProduct> page,Long userId);
+    IPage<LantoneProduct> productLine(Page<LantoneProduct> page, Long userId);
 
     /**
      * @Description: 朗通查询所有产品线

+ 10 - 5
diagbotman-service/src/main/java/com/diagbot/service/OpenedProductsService.java

@@ -22,6 +22,7 @@ import java.util.Map;
 public interface OpenedProductsService extends IService<OpenedProducts> {
     /**
      * 根据用户id查询已开通的产品
+     *
      * @param userId 用户id
      * @return
      */
@@ -29,10 +30,11 @@ public interface OpenedProductsService extends IService<OpenedProducts> {
 
     /**
      * 查询已开通产品
+     *
      * @param map 查询条件
      * @return
      */
-    List<OpenedProducts> selectOpenedProducts(Map<String,Object> map);
+    List<OpenedProducts> selectOpenedProducts(Map<String, Object> map);
 
 
     /**
@@ -40,15 +42,18 @@ public interface OpenedProductsService extends IService<OpenedProducts> {
      * @Author: ztg
      * @Date: 2018/9/20 15:23
      */
-    List<OpenedProducts> getByAppkeyAndSecret(Map<String,Object> map);
-    
+    List<OpenedProducts> getByAppkeyAndSecret(Map<String, Object> map);
+
     //根据用户id查询已开通的功能
     public List<UserAndProdutDTO> getInformationAvailableByUserId(OpenedProducts openedProducts);
+
     //根据用户id和产品id,启用和停用功能
     public boolean startAndendByuserId(OpenedProducts openedProducts);
-	  //根据用户id和产品id,删除开通信息", notes = "删除开通信息")
+
+    //根据用户id和产品id,删除开通信息", notes = "删除开通信息")
     public boolean delInformationAvailable(OpenedProducts openedProducts);
-     //根据用户id和产品id,修改开通时间", notes = "修改开通时间")
+
+    //根据用户id和产品id,修改开通时间", notes = "修改开通时间")
     public boolean modifyOpeningTime(OpenedProducts openedProducts);
 
     /**

+ 1 - 0
diagbotman-service/src/main/java/com/diagbot/service/ProductServiceService.java

@@ -22,6 +22,7 @@ public interface ProductServiceService extends IService<ProductService> {
 
     /**
      * 根据用户id获取产品与服务端的关联列表(分页)
+     *
      * @param page
      * @param productService
      * @return

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

@@ -18,10 +18,11 @@ import java.util.Map;
 public class EnumsDataServiceImpl implements EnumsDataService {
     /**
      * 用户枚举数据获取
+     *
      * @return 用户枚举类map
      */
     @Override
-    public Map<String, List<EnumEntriesBuilder.Entry>> getEnumsData(){
+    public Map<String, List<EnumEntriesBuilder.Entry>> getEnumsData() {
         Map<String, List<EnumEntriesBuilder.Entry>> enumMap = new EnumEntriesBuilder()
                 .addEnums("statusEnum", StatusEnum.values())
                 .addEnums("tokenTypeEnum", TokenTypeEnum.values())

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

@@ -26,13 +26,14 @@ import java.util.Map;
 public class LantoneProductServiceImpl extends ServiceImpl<LantoneProductMapper, LantoneProduct> implements LantoneProductService {
     @Autowired
     private UserServiceClient userServiceClient;
+
     /**
      * @Description: 显示朗通产品线
      * @Author: wangyu
      * @Date: 13:29 2018/9/18
      */
     @Override
-    public IPage<LantoneProduct> productLine(Page<LantoneProduct> page,Long userId) {
+    public IPage<LantoneProduct> productLine(Page<LantoneProduct> page, Long userId) {
         return baseMapper.productLine(page, userId);
     }
 
@@ -43,12 +44,12 @@ public class LantoneProductServiceImpl extends ServiceImpl<LantoneProductMapper,
      */
     @Override
     public IPage<LantoneProduct> selectProduct(Page<LantoneProduct> page, String name) {
-        return baseMapper.selectProduct(page,name);
+        return baseMapper.selectProduct(page, name);
     }
 
     @Override
     public IPage<LantoneProduct> opendedProduct(Page page, Map map) {
-        return baseMapper.opendedProduct(page,map);
+        return baseMapper.opendedProduct(page, map);
     }
 
     @Override

+ 23 - 22
diagbotman-service/src/main/java/com/diagbot/service/impl/OpenedProductsServiceImpl.java

@@ -31,15 +31,16 @@ public class OpenedProductsServiceImpl extends ServiceImpl<OpenedProductsMapper,
 
     @Override
     public IPage<OpenedProducts> selectOpendInfoByUserId(Page<OpenedProducts> page, int userId) {
-        return baseMapper.selectOpendInfoByUserId(page,userId);
+        return baseMapper.selectOpendInfoByUserId(page, userId);
     }
 
     /**
      * 查询已开通产品
+     *
      * @param map 查询条件
      * @return
      */
-    public List<OpenedProducts> selectOpenedProducts(Map<String,Object> map){
+    public List<OpenedProducts> selectOpenedProducts(Map<String, Object> map) {
         return baseMapper.selectOpenedProducts(map);
     }
 
@@ -48,29 +49,29 @@ public class OpenedProductsServiceImpl extends ServiceImpl<OpenedProductsMapper,
         return openedProductsMapper.getByAppkeyAndSecret(map);
     }
 
-	@Override
-	public List<UserAndProdutDTO> getInformationAvailableByUserId(OpenedProducts openedProducts) {
-		// TODO Auto-generated method stub
-		return openedProductsMapper.getInformationAvailableByUserId(openedProducts);
-	}
+    @Override
+    public List<UserAndProdutDTO> getInformationAvailableByUserId(OpenedProducts openedProducts) {
+        // TODO Auto-generated method stub
+        return openedProductsMapper.getInformationAvailableByUserId(openedProducts);
+    }
 
-	@Override
-	public boolean startAndendByuserId(OpenedProducts openedProducts) {
-		// TODO Auto-generated method stub
-		return openedProductsMapper.startAndendByuserId(openedProducts);
-	}
+    @Override
+    public boolean startAndendByuserId(OpenedProducts openedProducts) {
+        // TODO Auto-generated method stub
+        return openedProductsMapper.startAndendByuserId(openedProducts);
+    }
 
-	@Override
-	public boolean delInformationAvailable(OpenedProducts openedProducts) {
-		// TODO Auto-generated method stub
-		return openedProductsMapper.delInformationAvailable(openedProducts);
-	}
+    @Override
+    public boolean delInformationAvailable(OpenedProducts openedProducts) {
+        // TODO Auto-generated method stub
+        return openedProductsMapper.delInformationAvailable(openedProducts);
+    }
 
-	@Override
-	public boolean modifyOpeningTime(OpenedProducts openedProducts) {
-		// TODO Auto-generated method stub
-		return openedProductsMapper.modifyOpeningTime(openedProducts);
-	}
+    @Override
+    public boolean modifyOpeningTime(OpenedProducts openedProducts) {
+        // TODO Auto-generated method stub
+        return openedProductsMapper.modifyOpeningTime(openedProducts);
+    }
 
     @Override
     public List<OpendProductWrapper> getByProductId(OpenedProductsIndex openedProductsIndex) {

+ 1 - 0
diagbotman-service/src/main/java/com/diagbot/service/impl/ProductServiceServiceImpl.java

@@ -22,6 +22,7 @@ public class ProductServiceServiceImpl extends ServiceImpl<ProductServiceMapper,
 
     /**
      * 根据用户id获取产品与服务端的关联列表(分页)
+     *
      * @param page
      * @param productService
      * @return

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

@@ -25,6 +25,7 @@ public class ServiceFilterServiceImpl extends ServiceImpl<ServiceFilterMapper, S
 
     /**
      * 获取需要appkey和secret的服务信息
+     *
      * @return
      */
     @Override
@@ -37,7 +38,7 @@ public class ServiceFilterServiceImpl extends ServiceImpl<ServiceFilterMapper, S
     public RespDTO<List<String>> getPermissonUrl(String appkey, String secret) {
         List<ServiceFilter> list = serviceFilterMapper.getAll();
         List<String> service = new ArrayList<>();
-        for(ServiceFilter bean : list) {
+        for (ServiceFilter bean : list) {
             service.add(bean.getName());
         }
         return RespDTO.onSuc(service);

+ 11 - 6
diagbotman-service/src/main/java/com/diagbot/util/GuidUtil.java

@@ -9,17 +9,20 @@ import java.util.UUID;
  */
 public class GuidUtil {
     public static String app_key;
+
     /**
-     * @description:随机获取key值
      * @return
+     * @description:随机获取key值
      */
     public String guid() {
         UUID uuid = UUID.randomUUID();
         String key = uuid.toString();
         return key;
     }
+
     /**
      * 这是其中一个url的参数,是GUID的,全球唯一标志符
+     *
      * @return
      */
     public static String App_key() {
@@ -28,21 +31,23 @@ public class GuidUtil {
         app_key = MD5Util.MD5(guid).toUpperCase();
         return app_key;
     }
+
     /**
      * 根据md5加密
+     *
      * @return
      */
     public static String App_screct() {
-        String mw = "key" + app_key ;
+        String mw = "key" + app_key;
         String app_sign = MD5Util.MD5Salt(mw).toUpperCase();// 得到以后还要用MD5加密。
         return app_sign;
     }
 
     public static void main(String[] args) {
         GuidUtil gd = new GuidUtil();
-        String app_key=gd.App_key();
-        System.out.println("app_key: "+app_key);
-        String app_screct=gd.App_screct();
-        System.out.println("app_screct: "+app_screct);
+        String app_key = gd.App_key();
+        System.out.println("app_key: " + app_key);
+        String app_screct = gd.App_screct();
+        System.out.println("app_screct: " + app_screct);
     }
 }

+ 40 - 28
diagbotman-service/src/main/java/com/diagbot/util/MD5Util.java

@@ -13,34 +13,40 @@ import java.util.Random;
  */
 public class MD5Util {
     public static final String CODES = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
     /**
      * 使用系统默认字符源生成验证码
-     * @param verifySize    验证码长度
+     *
+     * @param verifySize 验证码长度
      * @return
      */
-    public static String generateCode(int verifySize){
+    public static String generateCode(int verifySize) {
         return generateCode(verifySize, CODES);
     }
+
     /**
      * 使用指定源生成验证码
-     * @param verifySize    验证码长度
-     * @param sources   验证码字符源
+     *
+     * @param verifySize 验证码长度
+     * @param sources    验证码字符源
      * @return
      */
-    public static String generateCode(int verifySize, String sources){
-        if(sources == null || sources.length() == 0){
+    public static String generateCode(int verifySize, String sources) {
+        if (sources == null || sources.length() == 0) {
             sources = CODES;
         }
         int codesLen = sources.length();
         Random rand = new Random(System.currentTimeMillis());
         StringBuilder code = new StringBuilder(verifySize);
-        for(int i = 0; i < verifySize; i++){
-            code.append(sources.charAt(rand.nextInt(codesLen-1)));
+        for (int i = 0; i < verifySize; i++) {
+            code.append(sources.charAt(rand.nextInt(codesLen - 1)));
         }
         return code.toString();
     }
+
     /**
      * 普通MD5
+     *
      * @param input
      * @return
      */
@@ -57,14 +63,16 @@ public class MD5Util {
         char[] charArray = input.toCharArray();
         byte[] byteArray = new byte[charArray.length];
 
-        for (int i = 0; i < charArray.length; i++)
+        for (int i = 0; i < charArray.length; i++) {
             byteArray[i] = (byte) charArray[i];
+        }
         byte[] md5Bytes = md5.digest(byteArray);
         StringBuffer hexValue = new StringBuffer();
         for (int i = 0; i < md5Bytes.length; i++) {
             int val = ((int) md5Bytes[i]) & 0xff;
-            if (val < 16)
+            if (val < 16) {
                 hexValue.append("0");
+            }
             hexValue.append(Integer.toHexString(val));
         }
         return hexValue.toString();
@@ -72,6 +80,7 @@ public class MD5Util {
 
     /**
      * 加盐MD5
+     *
      * @param password
      * @return
      */
@@ -95,13 +104,15 @@ public class MD5Util {
         }
         return new String(cs);
     }
+
     /**
      * 校验加盐后是否和原文一致
-     * @author daniel
-     * @time 2016-6-11 下午8:45:39
+     *
      * @param password
      * @param md5
      * @return
+     * @author daniel
+     * @time 2016-6-11 下午8:45:39
      */
     public static boolean verify(String password, String md5) {
         char[] cs1 = new char[32];
@@ -114,6 +125,7 @@ public class MD5Util {
         String salt = new String(cs2);
         return md5Hex(password + salt).equals(new String(cs1));
     }
+
     /**
      * 获取十六进制字符串形式的MD5摘要
      */
@@ -130,23 +142,23 @@ public class MD5Util {
 
     // 测试主函数
     public static void main(String args[]) {
-            // 原文
-            String plaintext = "DingSai";
-            //  plaintext = "123456";
-            System.out.println("原始:" + plaintext);
-            System.out.println("普通MD5后:" + MD5Util.MD5(plaintext));
+        // 原文
+        String plaintext = "DingSai";
+        //  plaintext = "123456";
+        System.out.println("原始:" + plaintext);
+        System.out.println("普通MD5后:" + MD5Util.MD5(plaintext));
 
-            // 获取加盐后的MD5值
-            String ciphertext = MD5Util.MD5Salt(plaintext);
-            System.out.println("加盐后MD5:" + ciphertext);
-            System.out.println("是否是同一字符串:" + MD5Util.verify(plaintext, ciphertext));
-            /**
-             * 其中某次DingSai字符串的MD5值
-             */
-            String[] tempSalt = { "c4d980d6905a646d27c0c437b1f046d4207aa2396df6af86", "66db82d9da2e35c95416471a147d12e46925d38e1185c043", "61a718e4c15d914504a41d95230087a51816632183732b5a" };
+        // 获取加盐后的MD5值
+        String ciphertext = MD5Util.MD5Salt(plaintext);
+        System.out.println("加盐后MD5:" + ciphertext);
+        System.out.println("是否是同一字符串:" + MD5Util.verify(plaintext, ciphertext));
+        /**
+         * 其中某次DingSai字符串的MD5值
+         */
+        String[] tempSalt = { "c4d980d6905a646d27c0c437b1f046d4207aa2396df6af86", "66db82d9da2e35c95416471a147d12e46925d38e1185c043", "61a718e4c15d914504a41d95230087a51816632183732b5a" };
 
-            for (String temp : tempSalt) {
-                System.out.println("是否是同一字符串:" + MD5Util.verify(plaintext, temp));
-            }
+        for (String temp : tempSalt) {
+            System.out.println("是否是同一字符串:" + MD5Util.verify(plaintext, temp));
+        }
     }
 }

+ 1 - 1
diagbotman-service/src/main/java/com/diagbot/vo/AddOrderVO.java

@@ -13,7 +13,7 @@ import java.util.List;
  */
 @Getter
 @Setter
-public class AddOrderVO{
+public class AddOrderVO {
     @NotBlank(message = "请输入产品Id!")
     private List<Long> productId;
 }

+ 8 - 9
diagbotman-service/src/main/java/com/diagbot/vo/ModifyOpeningTimeVO.java

@@ -8,20 +8,19 @@ import lombok.Getter;
 import lombok.Setter;
 
 /**
- * 
- * @Description: 据用户id和产品id,修改启用时间入参
  * @author wangfeng
+ * @Description: 据用户id和产品id,修改启用时间入参
  * @date 2018年9月21日 上午10:57:03
  */
 @Getter
 @Setter
 public class ModifyOpeningTimeVO {
-	
-	private String startTime;
-	private String endTime;
-	@NotNull(message = "请输入用户id!")
-	private Long userId;
-	@NotNull(message = "请输入产品id!")
-	private Long productId;
+
+    private String startTime;
+    private String endTime;
+    @NotNull(message = "请输入用户id!")
+    private Long userId;
+    @NotNull(message = "请输入产品id!")
+    private Long productId;
 
 }

+ 3 - 3
diagbotman-service/src/main/java/com/diagbot/vo/OpenUpOnTrialVO.java

@@ -8,8 +8,8 @@ import lombok.Setter;
 @Getter
 @Setter
 public class OpenUpOnTrialVO {
-	
-	@NotNull(message="产品id不能为空")
-	private Long productId;
+
+    @NotNull(message = "产品id不能为空")
+    private Long productId;
 
 }

+ 3 - 3
diagbotman-service/src/main/java/com/diagbot/vo/ServiceTokenVo.java

@@ -16,7 +16,7 @@ public class ServiceTokenVo implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-   private String appkey;
-   private String secret;
-   private Long productId;
+    private String appkey;
+    private String secret;
+    private Long productId;
 }

+ 7 - 8
diagbotman-service/src/main/java/com/diagbot/vo/StartAndendByUserIdVO.java

@@ -6,19 +6,18 @@ import lombok.Getter;
 import lombok.Setter;
 
 /**
- * 
- * @Description: 据用户id和产品id,启用和停用功能入参
  * @author wangfeng
+ * @Description: 据用户id和产品id,启用和停用功能入参
  * @date 2018年9月21日 上午10:57:03
  */
 @Getter
 @Setter
 public class StartAndendByUserIdVO {
-	
-	private Integer serviceStatus;
-	@NotNull(message = "请输入用户id!")
-	private Long userId;
-	@NotNull(message = "请输入产品id!")
-	private Long productId;
+
+    private Integer serviceStatus;
+    @NotNull(message = "请输入用户id!")
+    private Long userId;
+    @NotNull(message = "请输入产品id!")
+    private Long productId;
 
 }

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

@@ -28,7 +28,7 @@ import java.util.List;
  * @Date: 15:46 2018/9/17
  */
 @RestController
-@Api(value="朗通产品API", tags={"朗通产品API"})
+@Api(value = "朗通产品API", tags = { "朗通产品API" })
 @RequestMapping("/diagLantoneProduct")
 @SuppressWarnings("unchecked")
 public class DiagLantoneProductController {
@@ -43,17 +43,17 @@ public class DiagLantoneProductController {
     @PostMapping("/addProducts")
     @SysLogger("addProducts")
     @Transactional
-    public RespDTO<Boolean> addProducts(AddProductsVO addProductsVO){
+    public RespDTO<Boolean> addProducts(AddProductsVO addProductsVO) {
         return RespDTO.onSuc(lantoneProductFacade.addProducts(addProductsVO));
     }
 
     @ApiOperation(value = "产品线管理——查询[by:wangyu]",
-            notes = "name:添加后则根据产品名称查询,选填<br>"+
+            notes = "name:添加后则根据产品名称查询,选填<br>" +
                     "根据每页显示条数,默认 10,和当前页<br>")
     @PostMapping("/selectProduct")
     @SysLogger("selectProduct")
-    public RespDTO<IPage<LantoneProduct>> selectProduct(Page page , String name){
-        IPage<LantoneProduct> pages = lantoneProductFacade.selectProduct(page,name);
+    public RespDTO<IPage<LantoneProduct>> selectProduct(Page page, String name) {
+        IPage<LantoneProduct> pages = lantoneProductFacade.selectProduct(page, name);
         return RespDTO.onSuc(pages);
     }
 
@@ -62,7 +62,7 @@ public class DiagLantoneProductController {
     @PostMapping("/updateProduct")
     @SysLogger("updateProduct")
     @Transactional
-    public RespDTO<Boolean> updateProduct(UpdateProductVO updateProductVO){
+    public RespDTO<Boolean> updateProduct(UpdateProductVO updateProductVO) {
         return RespDTO.onSuc(lantoneProductFacade.updateProduct(updateProductVO));
     }
 
@@ -71,7 +71,7 @@ public class DiagLantoneProductController {
     @PostMapping("/updateServiceStatus")
     @SysLogger("updateServiceStatus")
     @Transactional
-    public RespDTO<Boolean> updateServiceStatus(UpdateProductVO updateProductVO){
+    public RespDTO<Boolean> updateServiceStatus(UpdateProductVO updateProductVO) {
         return RespDTO.onSuc(lantoneProductFacade.updateProduct(updateProductVO));
     }
 
@@ -80,18 +80,18 @@ public class DiagLantoneProductController {
     @PostMapping("/deleteProduct")
     @SysLogger("deleteProduct")
     @Transactional
-    public RespDTO<Boolean> deleteProduct(UpdateProductVO updateProductVO){
+    public RespDTO<Boolean> deleteProduct(UpdateProductVO updateProductVO) {
         return RespDTO.onSuc(lantoneProductFacade.deleteProduct(updateProductVO));
     }
 
     @ApiOperation(value = "产品线管理——详情[by:wangyu]",
-            notes = "id:根据产品id查询所有已开通本产品用户,必填<br>"+
-                    "current:页数<br>"+
+            notes = "id:根据产品id查询所有已开通本产品用户,必填<br>" +
+                    "current:页数<br>" +
                     "size:每页显示条数"
     )
     @PostMapping("/opendedProduct")
     @SysLogger("opendedProduct")
-    public RespDTO<List<OpendProductWrapper>> opendedProduct(OppendedProductVO oppendedProductVO){
+    public RespDTO<List<OpendProductWrapper>> opendedProduct(OppendedProductVO oppendedProductVO) {
 
         return RespDTO.onSuc(lantoneProductFacade.opendedProduct(oppendedProductVO));
     }

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

@@ -23,7 +23,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/diagOrderDetails")
-@Api(value="订单明细API", tags={"订单明细API"})
+@Api(value = "订单明细API", tags = { "订单明细API" })
 @SuppressWarnings("unchecked")
 public class DiagOrderDetailsController {
     @Autowired
@@ -31,8 +31,8 @@ public class DiagOrderDetailsController {
 
     @ApiOperation(value = "查询所有订单明细[by:wangyu]",
             notes =
-                    "current:页数<br>"+
-                            "size:每页显示条数<br>"+
+                    "current:页数<br>" +
+                            "size:每页显示条数<br>" +
                             "status:订单状态(0.未付款1.已付款)")
     @PostMapping("/getAllOrderDetials")
     @SysLogger("getAllOrderDetials")

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

@@ -19,7 +19,7 @@ import java.util.Map;
  * @time: 2018/9/19 14:32
  */
 @RestController
-@Api(value="产品中心枚举数据获取API", tags={"产品中心枚举数据获取API"})
+@Api(value = "产品中心枚举数据获取API", tags = { "产品中心枚举数据获取API" })
 @SuppressWarnings("unchecked")
 public class EnumsController {
     @Autowired
@@ -29,7 +29,7 @@ public class EnumsController {
             notes = "产品中心枚举数据获取")
     @PostMapping("/getDiagbotManEnumsData")
     @SysLogger("getDiagbotManEnumsData")
-    public RespDTO<Map<String, List<EnumEntriesBuilder.Entry>>> getEnumsData(){
+    public RespDTO<Map<String, List<EnumEntriesBuilder.Entry>>> getEnumsData() {
         return RespDTO.onSuc(enumsDataFacade.getEnumsData());
     }
 }

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

@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @time: 2018/9/17 18:28
  */
 @RestController
-@Api(value="用户更多服务API", tags={"用户更多服务API"})
+@Api(value = "用户更多服务API", tags = { "用户更多服务API" })
 @RequestMapping("/morServices")
 @SuppressWarnings("unchecked")
 public class MoreServiceController {
@@ -35,8 +35,8 @@ public class MoreServiceController {
     @ApiOperation(value = "用户更多服务——显示产品[by:wangyu]", notes = "根据用户id查询已开通信息")
     @PostMapping("/showProductInfo")
     @SysLogger("showProductInfo")
-    public RespDTO<IPage<LantoneProduct>> showProductInfo(Page page){
-        IPage<LantoneProduct> diagLantoneProducts =lantoneProductFacade.productLine(page);
+    public RespDTO<IPage<LantoneProduct>> showProductInfo(Page page) {
+        IPage<LantoneProduct> diagLantoneProducts = lantoneProductFacade.productLine(page);
         return RespDTO.onSuc(diagLantoneProducts);
     }
 
@@ -44,7 +44,7 @@ public class MoreServiceController {
     @PostMapping("/addOrder")
     @SysLogger("addOrder")
     @Transactional
-    public RespDTO<Boolean> addOrder( @RequestBody AddOrderVO addOrderVO){
+    public RespDTO<Boolean> addOrder(@RequestBody AddOrderVO addOrderVO) {
         return RespDTO.onSuc(productOrderFacade.addOrders(addOrderVO));
     }
 

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

@@ -36,112 +36,112 @@ import javax.validation.Valid;
 import java.util.List;
 
 /**
- * 
- * @Description 订单产品相关的操作
  * @author rgb
+ * @Description 订单产品相关的操作
  * @time 2018年9月25日下午4:06:16
  */
-@Api(value="控制台-产品操作API", tags={"控制台-产品操作API"})
+@Api(value = "控制台-产品操作API", tags = { "控制台-产品操作API" })
 @RestController
 @RequestMapping("/productOrder")
 @SuppressWarnings("unchecked")
 public class ProductOrderController {
-	@Autowired
-	private LantoneProductFacade lantoneProductFacade;
-
-	@Autowired
-	private ProductOrderFacade productOrderFacade;
-	@Autowired
-	private OpenedProductsFacade openedProductsFacade;
-
-	@ApiOperation(value = "控制台-产品认证进度[by:rengb]",notes="控制台-产品认证进度")
-	@PostMapping("/productAuthProgress")
-	@SysLogger("productAuthProgress")
-	public RespDTO<List<ProductAuthProgressDTO>> productAuthProgress() {
-		return RespDTO.onSuc(productOrderFacade.productAuthProgress());
-	}
-	
-	@ApiOperation(value = "控制台-已开通产品[by:rengb]",notes="控制台-已开通产品")
-	@PostMapping("/getConsoleOpened")
-	@SysLogger("getConsoleOpened")
-	public RespDTO<List<GetConsoleOpenedDTO>> getConsoleOpened() {
-		return RespDTO.onSuc(openedProductsFacade.getConsoleOpened());
-	}
-	
-	@ApiOperation(value = "控制台-可试用产品[by:rengb]",notes="控制台-可试用产品")
-	@PostMapping("/getConsoleOnTrial")
-	@SysLogger("getConsoleOnTrial")
-	public RespDTO<List<GetConsoleOnTrialDTO>> getConsoleOnTrial() {
-		return RespDTO.onSuc(openedProductsFacade.getConsoleOnTrial());
-	}
-	
-	@ApiOperation(value = "控制台-产品立即试用接口[by:rengb]",notes="控制台-产品立即试用接口")
-	@PostMapping("/openUpOnTrial")
-	@SysLogger("openUpOnTrial")
-	public RespDTO<OpenUpOnTrialDTO> openUpOnTrial(OpenUpOnTrialVO openUpOnTrialVO) {
-		return RespDTO.onSuc(openedProductsFacade.openUpOnTrial(openUpOnTrialVO));
-	}
-	
-	@ApiOperation(value = "控制台-可展示的选项卡[by:rengb]",notes="控制台-可展示的选项卡")
-	@PostMapping("/enShowOption")
-	@SysLogger("enShowOption")
-	public RespDTO<EnShowOptionDTO> enShowOption() {
-		return RespDTO.onSuc(openedProductsFacade.enShowOption());
-	}
-	
-	@ApiOperation(value = "控制台-待审核订单个数[by:rengb]",notes="控制台-待审核订单个数")
-	@PostMapping("/waitExamOrderCou")
-	@SysLogger("waitExamOrderCou")
-	public RespDTO<WaitExamOrderCouDTO> waitExamOrderCou() {
-		return RespDTO.onSuc(productOrderFacade.waitExamOrderCou());
-	}
-
-	@ApiOperation(value = "根据用户id查询已开通的功能[by:wangfeng]", notes = "已开通信息")
+    @Autowired
+    private LantoneProductFacade lantoneProductFacade;
+
+    @Autowired
+    private ProductOrderFacade productOrderFacade;
+    @Autowired
+    private OpenedProductsFacade openedProductsFacade;
+
+    @ApiOperation(value = "控制台-产品认证进度[by:rengb]", notes = "控制台-产品认证进度")
+    @PostMapping("/productAuthProgress")
+    @SysLogger("productAuthProgress")
+    public RespDTO<List<ProductAuthProgressDTO>> productAuthProgress() {
+        return RespDTO.onSuc(productOrderFacade.productAuthProgress());
+    }
+
+    @ApiOperation(value = "控制台-已开通产品[by:rengb]", notes = "控制台-已开通产品")
+    @PostMapping("/getConsoleOpened")
+    @SysLogger("getConsoleOpened")
+    public RespDTO<List<GetConsoleOpenedDTO>> getConsoleOpened() {
+        return RespDTO.onSuc(openedProductsFacade.getConsoleOpened());
+    }
+
+    @ApiOperation(value = "控制台-可试用产品[by:rengb]", notes = "控制台-可试用产品")
+    @PostMapping("/getConsoleOnTrial")
+    @SysLogger("getConsoleOnTrial")
+    public RespDTO<List<GetConsoleOnTrialDTO>> getConsoleOnTrial() {
+        return RespDTO.onSuc(openedProductsFacade.getConsoleOnTrial());
+    }
+
+    @ApiOperation(value = "控制台-产品立即试用接口[by:rengb]", notes = "控制台-产品立即试用接口")
+    @PostMapping("/openUpOnTrial")
+    @SysLogger("openUpOnTrial")
+    public RespDTO<OpenUpOnTrialDTO> openUpOnTrial(OpenUpOnTrialVO openUpOnTrialVO) {
+        return RespDTO.onSuc(openedProductsFacade.openUpOnTrial(openUpOnTrialVO));
+    }
+
+    @ApiOperation(value = "控制台-可展示的选项卡[by:rengb]", notes = "控制台-可展示的选项卡")
+    @PostMapping("/enShowOption")
+    @SysLogger("enShowOption")
+    public RespDTO<EnShowOptionDTO> enShowOption() {
+        return RespDTO.onSuc(openedProductsFacade.enShowOption());
+    }
+
+    @ApiOperation(value = "控制台-待审核订单个数[by:rengb]", notes = "控制台-待审核订单个数")
+    @PostMapping("/waitExamOrderCou")
+    @SysLogger("waitExamOrderCou")
+    public RespDTO<WaitExamOrderCouDTO> waitExamOrderCou() {
+        return RespDTO.onSuc(productOrderFacade.waitExamOrderCou());
+    }
+
+    @ApiOperation(value = "根据用户id查询已开通的功能[by:wangfeng]", notes = "已开通信息")
     @PostMapping("/getInformationAvailableByUserId")
     @SysLogger("getInformationAvailableByUserId")
-    public RespDTO  getInformationAvailableByUserId(Long userId){
-		OpenedProducts openedProducts =new OpenedProducts();
-		openedProducts.setUserId(userId);
-    	List<UserAndProdutDTO> UserAndProdutData = openedProductsFacade.getInformationAvailableByUserId(openedProducts);
-    	return RespDTO.onSuc(UserAndProdutData);
+    public RespDTO getInformationAvailableByUserId(Long userId) {
+        OpenedProducts openedProducts = new OpenedProducts();
+        openedProducts.setUserId(userId);
+        List<UserAndProdutDTO> UserAndProdutData = openedProductsFacade.getInformationAvailableByUserId(openedProducts);
+        return RespDTO.onSuc(UserAndProdutData);
     }
 
-	@ApiOperation(value = "根据用户id和产品id,启用和停用功能[by:wangfeng]", notes = "开通信息")
-	@PostMapping("/startAndendByuserId")
-	@SysLogger("startAndendByuserId")
-	@Transactional
-	public RespDTO<StartAndendByUserIdVO> startAndendByuserId(@RequestBody @Valid StartAndendByUserIdVO startAndendByUserIdVO) {
-		
-		return openedProductsFacade.startAndendByuserIds(startAndendByUserIdVO);
-		
-	}
-
-	@ApiOperation(value = "根据用户id和产品id,删除开通信息[by:wangfeng]", notes = "删除开通信息")
-	@PostMapping("/delInformationAvailable")
-	@SysLogger("delInformationAvailable")
-	@Transactional
-	public RespDTO delInformationAvailable(@RequestParam Long userId, Long productId) {
-
-		return openedProductsFacade.delInformationAvailables(userId,productId);
-	}
-
-	@ApiOperation(value = "根据用户id和产品id,修改开通时间[by:wangfeng]", notes = "修改开通时间")
-	@PostMapping("/modifyOpeningTime")
-	@SysLogger("modifyOpeningTime")
-	@Transactional
-	public RespDTO<ModifyOpeningTimeVO> modifyOpeningTime(@RequestBody @Valid ModifyOpeningTimeVO modifyOpeningTimeVO) {
-		 
-		return openedProductsFacade.modifyOpeningTimes(modifyOpeningTimeVO);
-	}
-	@ApiOperation(value = "产品申请——显示所有订单[by:wangyu]",
-			notes =
-					"current:页数<br>"+
-							"size:每页显示条数<br>"+
-							"status:订单状态(0.未付款1.已付款)")
-	@PostMapping("/getAllProductOrder")
-	@SysLogger("getAllProductOrder")
-	public RespDTO<List<ProductOrderWrapper>> getAllProductOrder(ProductOrderVO productOrderVO) {
-		List<ProductOrderWrapper> list = productOrderFacade.selectAllProductOrder(productOrderVO);
-		return RespDTO.onSuc(list);
-	}
+    @ApiOperation(value = "根据用户id和产品id,启用和停用功能[by:wangfeng]", notes = "开通信息")
+    @PostMapping("/startAndendByuserId")
+    @SysLogger("startAndendByuserId")
+    @Transactional
+    public RespDTO<StartAndendByUserIdVO> startAndendByuserId(@RequestBody @Valid StartAndendByUserIdVO startAndendByUserIdVO) {
+
+        return openedProductsFacade.startAndendByuserIds(startAndendByUserIdVO);
+
+    }
+
+    @ApiOperation(value = "根据用户id和产品id,删除开通信息[by:wangfeng]", notes = "删除开通信息")
+    @PostMapping("/delInformationAvailable")
+    @SysLogger("delInformationAvailable")
+    @Transactional
+    public RespDTO delInformationAvailable(@RequestParam Long userId, Long productId) {
+
+        return openedProductsFacade.delInformationAvailables(userId, productId);
+    }
+
+    @ApiOperation(value = "根据用户id和产品id,修改开通时间[by:wangfeng]", notes = "修改开通时间")
+    @PostMapping("/modifyOpeningTime")
+    @SysLogger("modifyOpeningTime")
+    @Transactional
+    public RespDTO<ModifyOpeningTimeVO> modifyOpeningTime(@RequestBody @Valid ModifyOpeningTimeVO modifyOpeningTimeVO) {
+
+        return openedProductsFacade.modifyOpeningTimes(modifyOpeningTimeVO);
+    }
+
+    @ApiOperation(value = "产品申请——显示所有订单[by:wangyu]",
+            notes =
+                    "current:页数<br>" +
+                            "size:每页显示条数<br>" +
+                            "status:订单状态(0.未付款1.已付款)")
+    @PostMapping("/getAllProductOrder")
+    @SysLogger("getAllProductOrder")
+    public RespDTO<List<ProductOrderWrapper>> getAllProductOrder(ProductOrderVO productOrderVO) {
+        List<ProductOrderWrapper> list = productOrderFacade.selectAllProductOrder(productOrderVO);
+        return RespDTO.onSuc(list);
+    }
 }

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

@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2018-09-17
  */
 @RestController
-@Api(value="产品服务端API", tags={"产品服务端API"})
+@Api(value = "产品服务端API", tags = { "产品服务端API" })
 @RequestMapping("/productService")
 @SuppressWarnings("unchecked")
 public class ProductServiceController {
@@ -35,6 +35,7 @@ public class ProductServiceController {
 
     /**
      * 服务端关联到产品接口
+     *
      * @param productServiceSaveVO
      * @return
      */
@@ -52,6 +53,7 @@ public class ProductServiceController {
 
     /**
      * 删除产品服务端
+     *
      * @param productServiceSaveVO
      * @return
      */
@@ -69,6 +71,7 @@ public class ProductServiceController {
 
     /**
      * 根据用户id获取产品服务关联信息
+     *
      * @param page
      * @return
      */

+ 0 - 2
diagbotman-service/src/main/java/com/diagbot/web/ServiceFilterController.java

@@ -35,7 +35,5 @@ public class ServiceFilterController {
     }
 
 
-
-
 }
 

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

@@ -29,7 +29,7 @@ import java.util.List;
  * @since 2018-09-17
  */
 @RestController
-@Api(value="用户服务API", tags={"用户服务API"})
+@Api(value = "用户服务API", tags = { "用户服务API" })
 @RequestMapping("/serviceInfo")
 @SuppressWarnings("unchecked")
 public class ServiceInfoController {
@@ -39,6 +39,7 @@ public class ServiceInfoController {
 
     /**
      * 新增服务
+     *
      * @param serviceSaveVO
      * @return
      */
@@ -55,6 +56,7 @@ public class ServiceInfoController {
 
     /**
      * 修改服务
+     *
      * @param serviceInfo
      * @return
      */
@@ -73,6 +75,7 @@ public class ServiceInfoController {
 
     /**
      * 获取当前登录用户的服务列表
+     *
      * @return
      */
     @ApiOperation(value = "获取当前登录用户的服务列表[by:zhaops]")
@@ -86,6 +89,7 @@ public class ServiceInfoController {
 
     /**
      * 获取当前登录用户的服务分页列表
+     *
      * @param page
      * @return
      */

+ 5 - 1
diagbotman-service/src/main/java/com/diagbot/web/ServiceTokenController.java

@@ -30,7 +30,7 @@ import javax.validation.Valid;
  * @since 2018-09-17
  */
 @RestController
-@Api(value="服务令牌API", tags={"服务令牌API"})
+@Api(value = "服务令牌API", tags = { "服务令牌API" })
 @RequestMapping("/serviceToken")
 @SuppressWarnings("unchecked")
 public class ServiceTokenController {
@@ -50,6 +50,7 @@ public class ServiceTokenController {
 
     /**
      * 生成令牌
+     *
      * @param productServiceSaveVO
      * @return
      */
@@ -66,6 +67,7 @@ public class ServiceTokenController {
 
     /**
      * 令牌禁用
+     *
      * @param productServiceId
      * @return
      */
@@ -81,6 +83,7 @@ public class ServiceTokenController {
 
     /**
      * 令牌启用
+     *
      * @param productServiceId
      * @return
      */
@@ -96,6 +99,7 @@ public class ServiceTokenController {
 
     /**
      * 令牌删除
+     *
      * @param productServiceId
      * @return
      */

+ 2 - 2
diagbotman-service/src/main/resources/bootstrap.yml

@@ -3,13 +3,13 @@ spring:
     name: diagbotman-service
   cloud:
     config:
-#      uri: http://${myuri}:8769
+      #uri: http://${myuri}:8769
       fail-fast: true
       discovery:
         enabled: true
         serviceId: config-server
   profiles:
-      active: local
+    active: local
 
 eureka:
   client:

+ 70 - 53
diagbotman-service/src/main/resources/logback-spring.xml

@@ -1,19 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 项目名称 -->
-    <property name="APPDIR" value="diagbotman-service" />
+    <property name="APPDIR" value="diagbotman-service"/>
     <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
-    <property name="LOG_PATH" value="../logs" />
+    <property name="LOG_PATH" value="../logs"/>
 
     <!-- 彩色日志 -->
     <!-- 彩色日志依赖的渲染类 -->
-    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
-    <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
-    <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
+    <conversionRule conversionWord="clr"
+                    converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
+    <conversionRule conversionWord="wex"
+                    converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
+    <conversionRule conversionWord="wEx"
+                    converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
     <!-- 彩色日志格式 -->
-    <property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
+    <property name="CONSOLE_LOG_PATTERN"
+              value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
     <!--包名输出缩进对齐-->
-    <property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
+    <property name="CONSOLE_LOG_PATTERN"
+              value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
 
     <!--  日志记录器,日期滚动记录
             ERROR 级别
@@ -26,12 +31,14 @@
             <!-- 归档的日志文件的路径,例如今天是1992-11-06日志,当前写的日志文件路径为file节点指定,
             可以将此文件与file指定文件路径设置为不同路径,从而将当前日志文件或归档日志文件置不同的目录。
             而1992-11-06的日志文件在由fileNamePattern指定。%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
-            <fileNamePattern>${LOG_PATH}/${APPDIR}/error/${APPDIR}-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <fileNamePattern>${LOG_PATH}/${APPDIR}/error/${APPDIR}-error-%d{yyyy-MM-dd}.%i.log
+            </fileNamePattern>
             <!--  保留日志天数 -->
             <maxHistory>30</maxHistory>
             <!-- 除按日志记录之外,还配置了日志文件不能超过10MB,若超过10MB,日志文件会以索引0开始,
             命名日志文件,例如log-error-1992-11-06.0.log -->
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+            <timeBasedFileNamingAndTriggeringPolicy
+                    class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                 <maxFileSize>10MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
         </rollingPolicy>
@@ -39,7 +46,8 @@
         <append>true</append>
         <!-- 日志文件的格式 -->
         <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%thread] %logger Line:%-3L - %msg%n</pattern>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%thread] %logger Line:%-3L - %msg%n
+            </pattern>
             <charset>utf-8</charset>
         </encoder>
         <!-- 此日志文件记录error级别的 -->
@@ -62,12 +70,14 @@
             <!-- 归档的日志文件的路径,例如今天1992-11-06日志,当前写的日志文件路径为file节点指定,
             可以将此文件与file指定文件路径设置为不同路径,从而将当前日志文件或归档日志文件置不同的目录。
             而1992-11-06的日志文件在由fileNamePattern指定。%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
-            <fileNamePattern>${LOG_PATH}/${APPDIR}/warn/${APPDIR}-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <fileNamePattern>${LOG_PATH}/${APPDIR}/warn/${APPDIR}-warn-%d{yyyy-MM-dd}.%i.log
+            </fileNamePattern>
             <!--  保留日志天数 -->
             <maxHistory>15</maxHistory>
             <!-- 除按日志记录之外,还配置了日志文件不能超过10MB,若超过10MB,日志文件会以索引0开始,
             命名日志文件,例如log-warn-1992-11-06.0.log -->
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+            <timeBasedFileNamingAndTriggeringPolicy
+                    class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                 <maxFileSize>10MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
         </rollingPolicy>
@@ -75,7 +85,8 @@
         <append>true</append>
         <!-- 日志文件的格式 -->
         <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%thread] %logger Line:%-3L - %msg%n</pattern>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%thread] %logger Line:%-3L - %msg%n
+            </pattern>
             <charset>utf-8</charset>
         </encoder>
         <!-- 此日志文件只记录warn级别的 -->
@@ -98,12 +109,14 @@
             <!-- 归档的日志文件的路径,例如今天是1992-11-06日志,当前写的日志文件路径为file节点指定,
             可以将此文件与file指定文件路径设置为不同路径,从而将当前日志文件或归档日志文件置不同的目录。
             而1992-11-06的日志文件在由fileNamePattern指定。%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
-            <fileNamePattern>${LOG_PATH}/${APPDIR}/info/${APPDIR}-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <fileNamePattern>${LOG_PATH}/${APPDIR}/info/${APPDIR}-info-%d{yyyy-MM-dd}.%i.log
+            </fileNamePattern>
             <!--  保留日志天数 -->
             <maxHistory>15</maxHistory>
             <!-- 除按日志记录之外,还配置了日志文件不能超过10MB,若超过10MB,日志文件会以索引0开始,
             命名日志文件,例如log-info-1992-11-06.0.log -->
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+            <timeBasedFileNamingAndTriggeringPolicy
+                    class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                 <maxFileSize>10MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
         </rollingPolicy>
@@ -111,7 +124,8 @@
         <append>true</append>
         <!-- 日志文件的格式 -->
         <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%thread] %logger Line:%-3L - %msg%n</pattern>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%thread] %logger Line:%-3L - %msg%n
+            </pattern>
             <charset>utf-8</charset>
         </encoder>
         <!-- 此日志文件只记录info级别的 -->
@@ -134,12 +148,14 @@
             <!-- 归档的日志文件的路径,例如今天是1992-11-06日志,当前写的日志文件路径为file节点指定,
             可以将此文件与file指定文件路径设置为不同路径,从而将当前日志文件或归档日志文件置不同的目录。
             而1992-11-06的日志文件在由fileNamePattern指定。%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
-            <fileNamePattern>${LOG_PATH}/${APPDIR}/debug/${APPDIR}-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <fileNamePattern>${LOG_PATH}/${APPDIR}/debug/${APPDIR}-debug-%d{yyyy-MM-dd}.%i.log
+            </fileNamePattern>
             <!--  保留日志天数 -->
             <maxHistory>15</maxHistory>
             <!-- 除按日志记录之外,还配置了日志文件不能超过10MB,若超过10MB,日志文件会以索引0开始,
             命名日志文件,例如log-debug-1992-11-06.0.log -->
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+            <timeBasedFileNamingAndTriggeringPolicy
+                    class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                 <maxFileSize>10MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
         </rollingPolicy>
@@ -147,7 +163,8 @@
         <append>true</append>
         <!-- 日志文件的格式 -->
         <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%thread] %logger Line:%-3L - %msg%n</pattern>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%thread] %logger Line:%-3L - %msg%n
+            </pattern>
             <charset>utf-8</charset>
         </encoder>
         <!-- 此日志文件只记录debug级别的 -->
@@ -175,31 +192,31 @@
 
     <!--&lt;!&ndash;输出到mysql数据库的appender配置     &ndash;&gt;-->
     <!--<appender name="db" class="ch.qos.logback.classic.db.DBAppender">-->
-        <!--<connectionSource-->
-                <!--class="ch.qos.logback.core.db.DriverManagerConnectionSource">-->
-            <!--<driverClass>com.mysql.jdbc.Driver</driverClass>-->
-            <!--<url>jdbc:mysql://120.77.222.42:3306/logback_member?characterEncoding=utf8</url>-->
-            <!--<user>root</user>-->
-            <!--<password>a123456789</password>-->
-        <!--</connectionSource>-->
+    <!--<connectionSource-->
+    <!--class="ch.qos.logback.core.db.DriverManagerConnectionSource">-->
+    <!--<driverClass>com.mysql.jdbc.Driver</driverClass>-->
+    <!--<url>jdbc:mysql://120.77.222.42:3306/logback_member?characterEncoding=utf8</url>-->
+    <!--<user>root</user>-->
+    <!--<password>a123456789</password>-->
+    <!--</connectionSource>-->
     <!--</appender>-->
 
     <!-- FrameworkServlet日志-->
-    <logger name="org.springframework" level="WARN" />
+    <logger name="org.springframework" level="WARN"/>
 
     <!-- mybatis日志打印-->
-    <logger name="org.apache.ibatis" level="DEBUG" />
-    <logger name="java.sql" level="DEBUG" />
+    <logger name="org.apache.ibatis" level="DEBUG"/>
+    <logger name="java.sql" level="DEBUG"/>
 
     <!--  项目 mapper 路径
             console控制台显示sql语句:STDOUT.filter.level -> debug级别
     -->
-    <logger name="com.diagbot.mapper" level="DEBUG" />
+    <logger name="com.diagbot.mapper" level="DEBUG"/>
 
     <appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
         <destination>192.168.2.236:5044</destination>
         <!-- encoder必须配置,有多种可选 -->
-        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder" >
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
             <customFields>{"appname":"diagbotman-service"}</customFields>
         </encoder>
     </appender>
@@ -207,49 +224,49 @@
     <!-- 本地环境下的日志配置 -->
     <springProfile name="local">
         <root level="INFO">
-            <appender-ref ref="ERROR" />
-            <appender-ref ref="WARN" />
-            <appender-ref ref="INFO" />
-            <appender-ref ref="DEBUG" />
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
             <!-- 生产环境将请stdout去掉 -->
-            <appender-ref ref="STDOUT" />
+            <appender-ref ref="STDOUT"/>
         </root>
     </springProfile>
 
     <!-- 开发环境下的日志配置 -->
     <springProfile name="dev">
         <root level="INFO">
-            <appender-ref ref="ERROR" />
-            <appender-ref ref="WARN" />
-            <appender-ref ref="INFO" />
-            <appender-ref ref="DEBUG" />
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
             <!-- 生产环境将请stdout去掉 -->
-            <appender-ref ref="STDOUT" />
-            <appender-ref ref="LOGSTASH" />
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASH"/>
         </root>
     </springProfile>
 
     <!-- 测试环境下的日志配置 -->
     <springProfile name="test">
         <root level="INFO">
-            <appender-ref ref="ERROR" />
-            <appender-ref ref="WARN" />
-            <appender-ref ref="INFO" />
-            <appender-ref ref="DEBUG" />
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
             <!-- 生产环境将请stdout去掉 -->
-            <appender-ref ref="STDOUT" />
-            <appender-ref ref="LOGSTASH" />
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASH"/>
         </root>
     </springProfile>
 
     <!-- 生产环境下的日志配置 -->
     <springProfile name="prod">
         <root level="INFO">
-            <appender-ref ref="ERROR" />
-            <appender-ref ref="WARN" />
-            <appender-ref ref="INFO" />
-            <appender-ref ref="DEBUG" />
-            <appender-ref ref="LOGSTASH" />
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
+            <appender-ref ref="LOGSTASH"/>
         </root>
     </springProfile>
 </configuration>

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

@@ -1,44 +1,45 @@
 <?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">
+<!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="service_status" property="serviceStatus" />
-        <result column="trial_status" property="trialStatus" />
-        <result column="trial_url" property="trialUrl" />
-        <result column="access_type" property="accessType" />
+        <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="service_status" property="serviceStatus"/>
+        <result column="trial_status" property="trialStatus"/>
+        <result column="trial_url" property="trialUrl"/>
+        <result column="access_type" property="accessType"/>
     </resultMap>
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultWrapperMap" type="com.diagbot.entity.wrapper.LantoneProductWrapper">
-        <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" />
-        <result column="access_type" property="accessType" />
-        <result column="start_time" property="startTime" />
-        <result column="end_time" property="endTime" />
-        <result column="service_status" property="serviceStatus" />
+        <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"/>
+        <result column="access_type" property="accessType"/>
+        <result column="start_time" property="startTime"/>
+        <result column="end_time" property="endTime"/>
+        <result column="service_status" property="serviceStatus"/>
     </resultMap>
 
     <!--根据用户id查询用户是否有开通产品-->
@@ -59,15 +60,18 @@
 
     <select id="opendedProduct" resultMap="BaseResultMap" parameterType="java.util.Map">
         SELECT op.id,op.start_time,op.end_time,op.service_status,pod.time,orn.`name`
-        from `sys-diagbotman`.diag_opened_products op,`sys-diagbotman`.diag_product_order pod,`sys-user`.sys_user_organization uor,`sys-user`.sys_organization orn
-        where pod.num = op.order_id AND uor.user_id =op.user_id AND orn.id =uor.organization_id AND op.product_id =#{map.id}
+        from `sys-diagbotman`.diag_opened_products op,`sys-diagbotman`.diag_product_order
+        pod,`sys-user`.sys_user_organization uor,`sys-user`.sys_organization orn
+        where pod.num = op.order_id AND uor.user_id =op.user_id AND orn.id =uor.organization_id AND
+        op.product_id =#{map.id}
         <if test="map.servicdStatus !=null and map.servicdStatus !=''">
             op.service_status =#{map.serviceStatus}
         </if>
     </select>
 
     <!--根据用户查询已开通产品-->
-    <select id="opendedProductByUserId" resultMap="BaseResultWrapperMap" parameterType="java.lang.Long">
+    <select id="opendedProductByUserId" resultMap="BaseResultWrapperMap"
+            parameterType="java.lang.Long">
         select a.*,b.start_time,b.end_time,b.service_status from diag_lantone_product a,diag_opened_products b
         where a.id=b.product_id and a.is_deleted='N' and b.is_deleted='N'
         and b.user_id=#{userId}

+ 104 - 99
diagbotman-service/src/main/resources/mapper/OpenedProductsMapper.xml

@@ -1,42 +1,43 @@
 <?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">
+<!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="order_id" property="orderId" />
-        <result column="access_type" property="accessType" />
-        <result column="charge_type" property="chargeType" />
+        <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="order_id" property="orderId"/>
+        <result column="access_type" property="accessType"/>
+        <result column="charge_type" property="chargeType"/>
     </resultMap>
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultWrapper" type="com.diagbot.entity.wrapper.OpendProductWrapper">
-        <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="order_id" property="orderId" />
-        <result column="access_type" property="accessType" />
-        <result column="charge_type" property="chargeType" />
-        <result column="order_time" property="orderTime" />
+        <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="order_id" property="orderId"/>
+        <result column="access_type" property="accessType"/>
+        <result column="charge_type" property="chargeType"/>
+        <result column="order_time" property="orderTime"/>
     </resultMap>
     <select id="selectOpendInfoByUserId" resultMap="BaseResultMap" parameterType="java.util.List">
         SELECT opend.* FROM diag_opened_products opend WHERE user_id = #{userId}
@@ -45,10 +46,10 @@
     <select id="selectOpenedProducts" resultMap="BaseResultMap" parameterType="java.util.Map">
         SELECT t.* FROM diag_opened_products t WHERE t.is_deleted='N'
         <if test="userId != null and userId != ''">
-        and t.user_id = #{userId}
+            and t.user_id = #{userId}
         </if>
         <if test="productId != null and productId != ''">
-        and t.product_id=#{productId}
+            and t.product_id=#{productId}
         </if>
     </select>
 
@@ -60,7 +61,8 @@
         and st.app_key_id = #{appkey} and st.app_key_secret = #{secret}
     </select>
 
- 	<select id="getConsoleOpened" parameterType="long" resultType="com.diagbot.dto.GetConsoleOpenedDTO">
+    <select id="getConsoleOpened" parameterType="long"
+            resultType="com.diagbot.dto.GetConsoleOpenedDTO">
     	SELECT
 			a.id as openId,
 			b.id as productId,
@@ -71,7 +73,7 @@
 		from diag_opened_products a join diag_lantone_product b on a.product_id=b.id
 		where a.is_deleted='N' and b.is_deleted='N' and a.user_id=#{userId};
     </select>
-    
+
     <select id="getConsoleOpenedCount" parameterType="long" resultType="int">
     	SELECT
 			count(1)
@@ -79,7 +81,8 @@
 		where a.is_deleted='N' and b.is_deleted='N' and a.user_id=#{userId};
     </select>
 
-    <select id="getConsoleOnTrial" parameterType="long" resultType="com.diagbot.dto.GetConsoleOnTrialDTO">
+    <select id="getConsoleOnTrial" parameterType="long"
+            resultType="com.diagbot.dto.GetConsoleOnTrialDTO">
     	SELECT
 			a.id as id,
 			a.name as name,
@@ -97,7 +100,7 @@
 		and c.user_id=#{userId}
 		and a.id not in (SELECT product_id FROM diag_opened_products where user_id=#{userId})
     </select>
-    
+
     <select id="getConsoleOnTrialCount" parameterType="long" resultType="int">
     	SELECT
 			count(1)
@@ -110,78 +113,80 @@
 		and c.user_id=#{userId}
 		and a.id not in (SELECT product_id FROM diag_opened_products where user_id=#{userId})
     </select>
-<select id="getInformationAvailableByUserId"  parameterType="com.diagbot.entity.OpenedProducts" resultType = "com.diagbot.dto.UserAndProdutDTO">
+    <select id="getInformationAvailableByUserId" parameterType="com.diagbot.entity.OpenedProducts"
+            resultType="com.diagbot.dto.UserAndProdutDTO">
 
-	SELECT
-	a.id as Id,
-	a.product_id as productId,
-	a.user_id as userId,
-	a.start_time as startTime,
-	a.end_time as endTime,
-	a.service_status as serviceStatus,
-	a.access_type as accessType,
-	a.charge_type as chargeType,
-	b.name as  productName
-	FROM diag_opened_products a JOIN diag_lantone_product b
-	ON a.product_id=b.id
-	WHERE
-	a.is_deleted = "N"
-	<if test="userId !=null">
-	AND  a.user_id = #{userId}
-	</if>
-</select>
+        SELECT
+        a.id as Id,
+        a.product_id as productId,
+        a.user_id as userId,
+        a.start_time as startTime,
+        a.end_time as endTime,
+        a.service_status as serviceStatus,
+        a.access_type as accessType,
+        a.charge_type as chargeType,
+        b.name as productName
+        FROM diag_opened_products a JOIN diag_lantone_product b
+        ON a.product_id=b.id
+        WHERE
+        a.is_deleted = "N"
+        <if test="userId !=null">
+            AND a.user_id = #{userId}
+        </if>
+    </select>
 
-<update id="startAndendByuserId" parameterType = "com.diagbot.entity.OpenedProducts">
-	UPDATE diag_opened_products a
-	<trim prefix="set" suffixOverrides=",">
-	<if test="gmtModified !=null">a.gmt_modified=#{gmtModified},</if>
-	<if test="modifier != null">a.modifier=#{modifier},</if>
-	<if test="serviceStatus != null">a.service_status =#{serviceStatus}</if>
-	</trim>
-	WHERE
-	a.user_id = #{userId}
-	AND a.product_id = #{productId}
-</update>
+    <update id="startAndendByuserId" parameterType="com.diagbot.entity.OpenedProducts">
+        UPDATE diag_opened_products a
+        <trim prefix="set" suffixOverrides=",">
+            <if test="gmtModified !=null">a.gmt_modified=#{gmtModified},</if>
+            <if test="modifier != null">a.modifier=#{modifier},</if>
+            <if test="serviceStatus != null">a.service_status =#{serviceStatus}</if>
+        </trim>
+        WHERE
+        a.user_id = #{userId}
+        AND a.product_id = #{productId}
+    </update>
 
-<update id="delInformationAvailable" parameterType = "com.diagbot.entity.OpenedProducts" >
-	UPDATE diag_opened_products a
-	<trim prefix="set" suffixOverrides=",">
-	a.is_deleted = "Y",
-	<if test="gmtModified !=null">a.gmt_modified=#{gmtModified},</if>
-	<if test="modifier != null">a.modifier=#{modifier}</if>
-	</trim>
-	WHERE
-	a.user_id = #{userId}
-	AND a.product_id = #{productId}
-</update>
+    <update id="delInformationAvailable" parameterType="com.diagbot.entity.OpenedProducts">
+        UPDATE diag_opened_products a
+        <trim prefix="set" suffixOverrides=",">
+            a.is_deleted = "Y",
+            <if test="gmtModified !=null">a.gmt_modified=#{gmtModified},</if>
+            <if test="modifier != null">a.modifier=#{modifier}</if>
+        </trim>
+        WHERE
+        a.user_id = #{userId}
+        AND a.product_id = #{productId}
+    </update>
 
-<update id="modifyOpeningTime" parameterType="com.diagbot.entity.OpenedProducts">
-	UPDATE diag_opened_products a
-	<trim prefix="set" suffixOverrides=",">
-	<if test="gmtModified !=null">a.gmt_modified=#{gmtModified},</if>
-	<if test="modifier != null">a.modifier=#{modifier}</if>
-	<if test="startTime != null">a.start_time = #{startTime},</if>
-	<if test="endTime != null">a.end_time = #{endTime} </if>
-	</trim>
-	WHERE
-	a.user_id = #{userId}
-	AND a.product_id = #{productId}
-</update>
+    <update id="modifyOpeningTime" parameterType="com.diagbot.entity.OpenedProducts">
+        UPDATE diag_opened_products a
+        <trim prefix="set" suffixOverrides=",">
+            <if test="gmtModified !=null">a.gmt_modified=#{gmtModified},</if>
+            <if test="modifier != null">a.modifier=#{modifier}</if>
+            <if test="startTime != null">a.start_time = #{startTime},</if>
+            <if test="endTime != null">a.end_time = #{endTime}</if>
+        </trim>
+        WHERE
+        a.user_id = #{userId}
+        AND a.product_id = #{productId}
+    </update>
 
-    <select id="getByProductId" parameterType="com.diagbot.entity.OpenedProductsIndex" resultMap="BaseResultWrapper">
-        SELECT a.*,b.time  order_time from diag_opened_products a
-            LEFT JOIN diag_product_order b ON a.order_id =b.id
-         WHERE product_id =#{productId} AND a.is_deleted='N'
+    <select id="getByProductId" parameterType="com.diagbot.entity.OpenedProductsIndex"
+            resultMap="BaseResultWrapper">
+        SELECT a.*,b.time order_time from diag_opened_products a
+        LEFT JOIN diag_product_order b ON a.order_id =b.id
+        WHERE product_id =#{productId} AND a.is_deleted='N'
         <if test="serviceStatus != null and serviceStatus != ''">
             and t.service_status=#{serviceStatus}
         </if>
         LIMIT #{index},#{size}
     </select>
 
-	<select id="getOpendById" resultMap="BaseResultMap" parameterType="java.util.List">
-		SELECT * FROM `diag_opened_products` a where a.service_status ='1'
-		<if test="productId != null and productId != ''">
-			and a.product_id =#{productId} 
-		</if>
-	</select>
+    <select id="getOpendById" resultMap="BaseResultMap" parameterType="java.util.List">
+        SELECT * FROM `diag_opened_products` a where a.service_status ='1'
+        <if test="productId != null and productId != ''">
+            and a.product_id =#{productId}
+        </if>
+    </select>
 </mapper>

+ 35 - 33
diagbotman-service/src/main/resources/mapper/OrderDetailsMapper.xml

@@ -1,52 +1,54 @@
 <?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">
+<!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" />
+        <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>
 
     <resultMap id="BaseResultWrapper" type="com.diagbot.entity.wrapper.OrderDetailsWapper">
-        <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" />
-        <result column="order_time" property="orderTime" />
+        <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"/>
+        <result column="order_time" property="orderTime"/>
     </resultMap>
-    <select id="seleAllOrderDetials" resultMap="BaseResultWrapper" parameterType="com.diagbot.entity.wrapper.OrderDetailsWapper">
+    <select id="seleAllOrderDetials" resultMap="BaseResultWrapper"
+            parameterType="com.diagbot.entity.wrapper.OrderDetailsWapper">
         SELECT
         a.*, b.time order_time,c.`name` product_name
         FROM
         diag_order_details a
         LEFT JOIN diag_product_order b ON a.order_num = b.num
         LEFT JOIN diag_lantone_product c ON a.product_id =c.id
-        WHERE  1=1
+        WHERE 1=1
         <if test="status !=null and status !=''">
-             AND status = #{status}
+            AND status = #{status}
         </if>
         <if test="productId !=null and productId !=''">
             AND product_id = #{productId}

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

@@ -1,42 +1,43 @@
 <?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">
+<!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" />
+        <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>
 
     <resultMap id="BaseResultWrapper" type="com.diagbot.entity.wrapper.ProductOrderWrapper">
-        <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" />
-        <result column="audit_status" property="auditStatus" />
+        <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"/>
+        <result column="audit_status" property="auditStatus"/>
     </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 id="getOrderDetails" parameterType="string" resultType="com.diagbot.dto.AuthDetailDTO">
 		select
 			b.audit_status as auditStatus,
 			c.name as name,
@@ -46,29 +47,31 @@
 		where a.is_deleted = 'N' and  b.is_deleted = 'N' and  c.is_deleted = 'N'
 		and a.num=#{orderNum}
 	</select>
-	
-	<select id="getOrderDetailsByNums" parameterType="list" resultType="com.diagbot.dto.AuthDetailDTO">
-		select
-			a.num as num,
-			b.audit_status as auditStatus,
-			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'
-		and a.num in
-		<foreach collection="list" separator="," open="(" close=")" item="num">
-			#{num}
-		</foreach>
-	</select>
 
-    <select id="selctOrderTimeByOrderNum" resultMap="BaseResultMap" parameterType="com.diagbot.entity.ProductOrder">
+    <select id="getOrderDetailsByNums" parameterType="list"
+            resultType="com.diagbot.dto.AuthDetailDTO">
+        select
+        a.num as num,
+        b.audit_status as auditStatus,
+        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'
+        and a.num in
+        <foreach collection="list" separator="," open="(" close=")" item="num">
+            #{num}
+        </foreach>
+    </select>
+
+    <select id="selctOrderTimeByOrderNum" resultMap="BaseResultMap"
+            parameterType="com.diagbot.entity.ProductOrder">
         SELECT * FROM diag_product_order d WHERE d.is_deleted='N'
-         <if test="num != null and num != ''">
-             AND num=#{num}
-         </if>
+        <if test="num != null and num != ''">
+            AND num=#{num}
+        </if>
     </select>
-    
+
     <select id="waitExamOrderCou" resultType="int">
     	SELECT
 			count(DISTINCT a.num)
@@ -76,7 +79,8 @@
 		where b.audit_status is null
     </select>
 
-    <select id="selectAllProductOrder" resultMap="BaseResultWrapper" parameterType="com.diagbot.entity.ProductOrderIndex">
+    <select id="selectAllProductOrder" resultMap="BaseResultWrapper"
+            parameterType="com.diagbot.entity.ProductOrderIndex">
         SELECT * FROM diag_product_order WHERE is_deleted='N'
         <if test="num != null and num != ''">
             AND num=#{num}
@@ -86,5 +90,5 @@
         </if>
         LIMIT #{index},#{size}
     </select>
-    
+
 </mapper>

+ 20 - 19
diagbotman-service/src/main/resources/mapper/ProductServiceMapper.xml

@@ -1,31 +1,32 @@
 <?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">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.diagbot.mapper.ProductServiceMapper">
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.ProductService">
-        <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="service_id" property="serviceId" />
-        <result column="remark" property="remark" />
+        <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="service_id" property="serviceId"/>
+        <result column="remark" property="remark"/>
     </resultMap>
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultWrapperMap" type="com.diagbot.entity.wrapper.ProductServiceWrapper">
-        <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="service_id" property="serviceId" />
-        <result column="remark" property="remark" />
+        <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="service_id" property="serviceId"/>
+        <result column="remark" property="remark"/>
     </resultMap>
 
     <!-- 根据用户id获取产品与服务端的关联列表(分页) -->

+ 11 - 10
diagbotman-service/src/main/resources/mapper/ServiceFilterMapper.xml

@@ -1,18 +1,19 @@
 <?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">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.diagbot.mapper.ServiceFilterMapper">
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.ServiceFilter">
-        <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="product_id" property="productId" />
-        <result column="remark" property="remark" />
+        <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="product_id" property="productId"/>
+        <result column="remark" property="remark"/>
     </resultMap>
 
     <select id="getAll" resultMap="BaseResultMap">

+ 12 - 11
diagbotman-service/src/main/resources/mapper/ServiceInfoMapper.xml

@@ -1,18 +1,19 @@
 <?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">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.diagbot.mapper.ServiceInfoMapper">
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.ServiceInfo">
-        <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="description" property="description" />
-        <result column="user_id" property="userId" />
-        <result column="type" property="type" />
+        <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="description" property="description"/>
+        <result column="user_id" property="userId"/>
+        <result column="type" property="type"/>
     </resultMap>
 </mapper>

+ 16 - 15
diagbotman-service/src/main/resources/mapper/ServiceTokenMapper.xml

@@ -1,22 +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">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.diagbot.mapper.ServiceTokenMapper">
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.ServiceToken">
-        <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_service_id" property="productServiceId" />
-        <result column="app_key_id" property="appKeyId" />
-        <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" />
+        <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_service_id" property="productServiceId"/>
+        <result column="app_key_id" property="appKeyId"/>
+        <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>
 </mapper>