Browse Source

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

wangyu 6 years ago
parent
commit
a7ea6c2b9f
25 changed files with 248 additions and 71 deletions
  1. 3 2
      diagbotman-service/src/main/java/com/diagbot/client/UserServiceClient.java
  2. 2 2
      diagbotman-service/src/main/java/com/diagbot/client/hystrix/UserServiceHystrix.java
  3. 1 0
      diagbotman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  4. 1 0
      diagbotman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  5. 2 2
      diagbotman-service/src/main/java/com/diagbot/entity/UserOrgVO.java
  6. 13 0
      diagbotman-service/src/main/java/com/diagbot/entity/ServiceInfo.java
  7. 42 0
      diagbotman-service/src/main/java/com/diagbot/entity/wrapper/LantoneProductWrapper.java
  8. 15 0
      diagbotman-service/src/main/java/com/diagbot/facade/LantoneProductFacade.java
  9. 3 3
      diagbotman-service/src/main/java/com/diagbot/facade/ServiceInfoFacade.java
  10. 11 1
      diagbotman-service/src/main/java/com/diagbot/mapper/LantoneProductMapper.java
  11. 1 1
      diagbotman-service/src/main/java/com/diagbot/mapper/ServiceInfoMapper.java
  12. 9 0
      diagbotman-service/src/main/java/com/diagbot/service/LantoneProductService.java
  13. 1 1
      diagbotman-service/src/main/java/com/diagbot/service/ServiceInfoService.java
  14. 12 0
      diagbotman-service/src/main/java/com/diagbot/service/impl/LantoneProductServiceImpl.java
  15. 1 1
      diagbotman-service/src/main/java/com/diagbot/service/impl/ServiceInfoServiceImpl.java
  16. 1 0
      diagbotman-service/src/main/java/com/diagbot/vo/ServiceSaveVO.java
  17. 10 1
      diagbotman-service/src/main/java/com/diagbot/web/DiagLantoneProductController.java
  18. 2 2
      diagbotman-service/src/main/java/com/diagbot/web/ServiceInfoController.java
  19. 27 0
      diagbotman-service/src/main/resources/mapper/LantoneProductMapper.xml
  20. 23 0
      user-service/src/main/java/com/diagbot/dto/GetConsoleUserInfoDTO.java
  21. 4 2
      user-service/src/main/java/com/diagbot/dto/QueryAuthProgressDTO.java
  22. 7 22
      user-service/src/main/java/com/diagbot/facade/UserAuthenticationFacade.java
  23. 28 13
      user-service/src/main/java/com/diagbot/facade/UserFacade.java
  24. 6 6
      user-service/src/main/java/com/diagbot/web/UserAuthenticationController.java
  25. 23 12
      user-service/src/main/java/com/diagbot/web/UserController.java

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

@@ -3,7 +3,7 @@ package com.diagbot.client;
 import com.diagbot.client.hystrix.UserServiceHystrix;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.User;
-import com.diagbot.entity.UserOrgVO;
+import com.diagbot.dto.UserOrgDTO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -26,7 +26,8 @@ public interface UserServiceClient {
     RespDTO<User> getUser(@RequestHeader(value = "Authorization") String token, @PathVariable("username") String username);
 
     @PostMapping(value = "/user/getUserAndOrg")
-    RespDTO<Map<Long, UserOrgVO>> getUserAndOrg(@RequestBody List<Long> userIds);
+    RespDTO<Map<Long, UserOrgDTO>> getUserAndOrg(@RequestBody List<Long> userIds);
+
 }
 
 

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

@@ -3,7 +3,7 @@ package com.diagbot.client.hystrix;
 import com.diagbot.client.UserServiceClient;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.User;
-import com.diagbot.entity.UserOrgVO;
+import com.diagbot.dto.UserOrgDTO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
@@ -28,7 +28,7 @@ public class UserServiceHystrix implements UserServiceClient {
     }
 
     @Override
-    public RespDTO<Map<Long, UserOrgVO>> getUserAndOrg(List<Long> userIds) {
+    public RespDTO<Map<Long, UserOrgDTO>> getUserAndOrg(List<Long> userIds) {
         log.error("【hystrix】调用{}异常","getUserAndOrg");
         return null;
     }

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

@@ -28,6 +28,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .regexMatchers(".*swagger.*",".*v2.*",".*webjars.*","/druid.*","/actuator.*","/hystrix.*"
                         ,"/service_filter/getAll", "/serviceToken/hasPermission").permitAll()
                 .antMatchers("/getDiagbotManEnumsData").permitAll()
+                .antMatchers("/diagLantoneProduct/selectProduct").permitAll()
                 .antMatchers("/**").authenticated();
 //        .antMatchers("/**").permitAll();
     }

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

@@ -37,6 +37,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                     || matchers("/getDiagbotManEnumsData", request)
                     || matchers("/service_filter/getAll", request)
                     || matchers("/serviceToken/hasPermission", request)
+                    || matchers("/diagLantoneProduct/selectProduct", request)
                     || matchers("/", request)){
                 return;
             } else {

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

@@ -1,4 +1,4 @@
-package com.diagbot.entity;
+package com.diagbot.dto;
 
 import lombok.Getter;
 import lombok.Setter;
@@ -13,7 +13,7 @@ import java.io.Serializable;
 
 @Getter
 @Setter
-public class UserOrgVO implements Serializable{
+public class UserOrgDTO implements Serializable{
 	
 	 private static final long serialVersionUID = 1L;
 

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

@@ -56,6 +56,10 @@ public class ServiceInfo implements Serializable {
      */
     private Long userId;
 
+    /**
+     * 服务端类型(1:用户建立,2:系统生成)
+     */
+    private Integer type;
 
     public Long getId() {
         return id;
@@ -129,6 +133,14 @@ public class ServiceInfo implements Serializable {
         this.userId = userId;
     }
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
     @Override
     public String toString() {
         return "ServiceInfo{" +
@@ -141,6 +153,7 @@ public class ServiceInfo implements Serializable {
         ", name=" + name +
         ", description=" + description +
         ", userId=" + userId +
+        ", type=" + type +
         "}";
     }
 }

+ 42 - 0
diagbotman-service/src/main/java/com/diagbot/entity/wrapper/LantoneProductWrapper.java

@@ -2,10 +2,52 @@ package com.diagbot.entity.wrapper;
 
 import com.diagbot.entity.LantoneProduct;
 
+import java.util.Date;
+
 /**
  * @Description:
  * @author: wangyu
  * @time: 2018/9/19 17:09
  */
 public class LantoneProductWrapper extends LantoneProduct {
+    /**
+     * 开通日期
+     */
+    private Date startTime;
+
+    /**
+     * 结束日期
+     */
+    private Date endTime;
+
+    /**
+     * 停用状态
+     */
+    private Integer serviceStatus;
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    @Override
+    public Integer getServiceStatus() {
+        return serviceStatus;
+    }
+
+    @Override
+    public void setServiceStatus(Integer serviceStatus) {
+        this.serviceStatus = serviceStatus;
+    }
 }

+ 15 - 0
diagbotman-service/src/main/java/com/diagbot/facade/LantoneProductFacade.java

@@ -3,11 +3,16 @@ package com.diagbot.facade;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.entity.LantoneProduct;
+import com.diagbot.entity.wrapper.LantoneProductWrapper;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.service.impl.LantoneProductServiceImpl;
+import com.diagbot.util.BeanUtil;
 import com.diagbot.util.UserUtils;
+import com.google.common.collect.Lists;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
+
 /**
  * @Description:产品业务层
  * @author: wangyu
@@ -66,6 +71,16 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
         return CommonErrorCode.OK;
     }
 
+    /**
+     * @Description: 查询当前用户已开通产品
+     * @Author: zhaops
+     * @Date: 10:10 2018/9/20
+     */
+    public List<LantoneProductWrapper> opendedProductByCurrentUser() {
+        Long userId=Long.parseLong(UserUtils.getCurrentPrincipleID());
+        return this.opendedProductByUserId(userId);
+    }
+
     /**
      * @Description: 根据用户id查询是否有开通产品
      * @Author: wangyu

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

@@ -25,6 +25,7 @@ public class ServiceInfoFacade extends ServiceInfoServiceImpl {
         ServiceInfo serviceInfo = new ServiceInfo();
         serviceInfo.setName(serviceSaveVO.getName());
         serviceInfo.setDescription(serviceSaveVO.getDescription());
+        serviceInfo.setType(serviceSaveVO.getType());
         serviceInfo.setUserId(userId);
         serviceInfo.setCreator(userId.toString());
         serviceInfo.setGmtCreate(new Date());
@@ -32,10 +33,9 @@ public class ServiceInfoFacade extends ServiceInfoServiceImpl {
         return serviceInfo;
     }
 
-    public Boolean updateService(ServiceSaveVO serviceSaveVO) {
+    public Boolean updateService(ServiceInfo serviceInfo) {
         Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
-        ServiceInfo serviceInfo = this.findByName(serviceSaveVO.getName());
-        serviceInfo.setDescription(serviceSaveVO.getDescription());
+        serviceInfo.setUserId(userId);
         serviceInfo.setModifier(userId.toString());
         serviceInfo.setGmtModified(new Date());
         return this.updateById(serviceInfo);

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

@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.entity.LantoneProduct;
+import com.diagbot.entity.wrapper.LantoneProductWrapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -29,7 +31,7 @@ public interface LantoneProductMapper extends BaseMapper<LantoneProduct> {
      * @Author: wangyu
      * @Date: 9:49 2018/9/18
      */
-    IPage<LantoneProduct> selectProduct(Page page, @Param("name") String name );
+    IPage<LantoneProduct> selectProduct(Page page, @Param("name") String name);
 
     /**
      * @Description: 查询开通当前产品的所有用户
@@ -38,4 +40,12 @@ public interface LantoneProductMapper extends BaseMapper<LantoneProduct> {
      */
     IPage<LantoneProduct> opendedProduct(Page page, @Param("map") Map map);
 
+
+    /**
+     * @Description: 根据用户查询已开通产品
+     * @Author: zhaops
+     * @Date: 10:10 2018/9/20
+     */
+    List<LantoneProductWrapper> opendedProductByUserId(Long userId);
+
 }

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

@@ -17,7 +17,7 @@ import java.util.List;
  * @since 2018-09-17
  */
 public interface ServiceInfoMapper extends BaseMapper<ServiceInfo> {
-    ServiceInfo findByName(String name);
+    List<ServiceInfo> findByName(String name);
 
     List<ServiceInfo> getListByUserId(Long userId);
 

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

@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.diagbot.entity.LantoneProduct;
+import com.diagbot.entity.wrapper.LantoneProductWrapper;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -36,4 +38,11 @@ public interface LantoneProductService extends IService<LantoneProduct> {
      * @Date: 13:32 2018/9/18
      */
     IPage<LantoneProduct> opendedProduct(Page page, Map map);
+
+    /**
+     * @Description: 根据用户查询已开通产品
+     * @Author: zhaops
+     * @Date: 10:10 2018/9/20
+     */
+    List<LantoneProductWrapper> opendedProductByUserId(Long userId);
 }

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

@@ -16,7 +16,7 @@ import java.util.List;
  * @since 2018-09-17
  */
 public interface ServiceInfoService extends IService<ServiceInfo> {
-    ServiceInfo findByName(String name);
+    List<ServiceInfo> findByName(String name);
 
     List<ServiceInfo> getListByUserId(Long userId);
 

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

@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.entity.LantoneProduct;
+import com.diagbot.entity.wrapper.LantoneProductWrapper;
 import com.diagbot.mapper.LantoneProductMapper;
 import com.diagbot.service.LantoneProductService;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -45,4 +47,14 @@ public class LantoneProductServiceImpl extends ServiceImpl<LantoneProductMapper,
     public IPage<LantoneProduct> opendedProduct(Page page, Map map) {
         return baseMapper.opendedProduct(page,map);
     }
+
+    /**
+     * @Description: 根据用户查询已开通产品
+     * @Author: zhaops
+     * @Date: 10:10 2018/9/20
+     */
+    @Override
+    public List<LantoneProductWrapper> opendedProductByUserId(Long userId) {
+        return baseMapper.opendedProductByUserId(userId);
+    }
 }

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

@@ -20,7 +20,7 @@ import java.util.List;
  */
 @Service
 public class ServiceInfoServiceImpl extends ServiceImpl<ServiceInfoMapper, ServiceInfo> implements ServiceInfoService {
-    public ServiceInfo findByName(String name) {
+    public List<ServiceInfo> findByName(String name) {
         return baseMapper.findByName(name);
     }
 

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

@@ -17,4 +17,5 @@ public class ServiceSaveVO {
     private String name;
     @NotBlank(message = "请输入产品介绍!")
     private String description;
+    private Integer type;
 }

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

@@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.LantoneProduct;
+import com.diagbot.entity.wrapper.LantoneProductWrapper;
 import com.diagbot.facade.LantoneProductFacade;
+import com.diagbot.util.UserUtils;
 import com.diagbot.facade.OpenedProductsFacade;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -90,6 +93,12 @@ public class DiagLantoneProductController {
         return RespDTO.onSuc(lantoneProductFacade.opendedProduct(page,map));
     }
 
-
+    @ApiOperation(value = "查询当前登录用户已开通产品列表")
+    @GetMapping("/opendedProductByCurrentUser")
+    @SysLogger("opendedProductByCurrentUser")
+    public RespDTO opendedProductByCurrentUser() {
+        List<LantoneProductWrapper> list = lantoneProductFacade.opendedProductByCurrentUser();
+        return RespDTO.onSuc(list);
+    }
 }
 

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

@@ -54,8 +54,8 @@ public class ServiceInfoController {
     @PostMapping("/updateService")
     @SysLogger("updateService")
     @Transactional
-    public RespDTO<Boolean> updateService(@RequestBody @Valid ServiceSaveVO serviceSaveVO) {
-        Boolean isSuccess = serviceInfoFacade.updateService(serviceSaveVO);
+    public RespDTO<Boolean> updateService(@RequestBody @Valid ServiceInfo serviceInfo) {
+        Boolean isSuccess = serviceInfoFacade.updateService(serviceInfo);
         return RespDTO.onSuc(isSuccess);
     }
 

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

@@ -20,6 +20,27 @@
         <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" />
+    </resultMap>
 
     <!--根据用户id查询用户是否有开通产品-->
     <select id="productLine" resultMap="BaseResultMap">
@@ -46,4 +67,10 @@
         </if>
     </select>
 
+    <!--根据用户查询已开通产品-->
+    <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}
+    </select>
 </mapper>

+ 23 - 0
user-service/src/main/java/com/diagbot/dto/GetConsoleUserInfoDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.Organization;
+import com.diagbot.entity.User;
+import com.diagbot.entity.UserAuthentication;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 控制台账户信息
+ * @author rgb
+ *
+ */
+@Getter
+@Setter
+public class GetConsoleUserInfoDTO {
+
+    private User user;
+    private Organization organization;
+    private UserAuthentication userAuthentication;
+	
+}

+ 4 - 2
user-service/src/main/java/com/diagbot/dto/QueryAuthProgressDTO.java

@@ -12,8 +12,10 @@ import lombok.Setter;
 @Setter
 public class QueryAuthProgressDTO {
    
-	private String status;
+	private Integer status;
 	
-	private String statusMessage;
+	private String isReject;
+	
+	private String rejectComment;
 	
 }

+ 7 - 22
user-service/src/main/java/com/diagbot/facade/UserAuthenticationFacade.java

@@ -150,30 +150,15 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
     }
 
     public QueryAuthProgressDTO queryAuthProgress() {
-        QueryAuthProgressDTO queryAuthProgressDTO = new QueryAuthProgressDTO();
         Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
         UserAuthentication userAuthentication = this.getByUserId(userId);
-        Integer status = userAuthentication.getStatus();
-        String isReject = userAuthentication.getIsReject();
-        if (StringUtils.isBlank(isReject)) {
-            if (status == 0) {
-                queryAuthProgressDTO.setStatus("1");
-                queryAuthProgressDTO.setStatusMessage("未认证");
-            } else if (status == 2) {
-                queryAuthProgressDTO.setStatus("2");
-                queryAuthProgressDTO.setStatusMessage("认证中");
-            }
-        } else if (isReject.equals("N")) {
-            if (status == 0) {
-                queryAuthProgressDTO.setStatus("3");
-                queryAuthProgressDTO.setStatusMessage("认证未通过");
-            }
-        } else if (isReject.equals("Y")) {
-            if (status == 1) {
-                queryAuthProgressDTO.setStatus("4");
-                queryAuthProgressDTO.setStatusMessage("认证通过");
-            }
-        }
+        
+        QueryAuthProgressDTO queryAuthProgressDTO = new QueryAuthProgressDTO();
+        queryAuthProgressDTO.setStatus(userAuthentication.getStatus());
+        queryAuthProgressDTO.setIsReject(userAuthentication.getIsReject());
+        queryAuthProgressDTO.setRejectComment(userAuthentication.getRejectComment());
+        
         return queryAuthProgressDTO;
     }
+    
 }

+ 28 - 13
user-service/src/main/java/com/diagbot/facade/UserFacade.java

@@ -1,8 +1,23 @@
 package com.diagbot.facade;
 
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.CachePut;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.security.crypto.factory.PasswordEncoderFactories;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Component;
+
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.client.AuthServiceClient;
+import com.diagbot.dto.GetConsoleUserInfoDTO;
 import com.diagbot.dto.LoginDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.UserOrgDTO;
@@ -24,19 +39,6 @@ import com.diagbot.util.StringUtil;
 import com.diagbot.util.UserUtils;
 import com.diagbot.vo.ImgVerVerVO;
 import com.diagbot.vo.UserSaveVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.CacheEvict;
-import org.springframework.cache.annotation.CachePut;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.security.crypto.factory.PasswordEncoderFactories;
-import org.springframework.security.crypto.password.PasswordEncoder;
-import org.springframework.stereotype.Component;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 
 /**
  * @Description: 用户业务层
@@ -285,5 +287,18 @@ public class UserFacade extends UserServiceImpl {
         return super.removeById(id);
     }
 
+	public GetConsoleUserInfoDTO getConsoleUserInfo() {
+		Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
+	    User user = this.getById(userId);
+	    Organization organization = organizationFacade.getByUserId(userId);
+	    UserAuthentication userAuthentication = userAuthenticationFacade.getByUserId(userId);
+	        
+	    GetConsoleUserInfoDTO getConsoleUserInfoDTO = new GetConsoleUserInfoDTO();
+	    getConsoleUserInfoDTO.setUser(user);
+	    getConsoleUserInfoDTO.setOrganization(organization);
+	    getConsoleUserInfoDTO.setUserAuthentication(userAuthentication);
+	      
+	    return getConsoleUserInfoDTO;
+	}
 
 }

+ 6 - 6
user-service/src/main/java/com/diagbot/web/UserAuthenticationController.java

@@ -64,11 +64,11 @@ public class UserAuthenticationController {
         return RespDTO.onSuc(map);
     }
     
-	 @ApiOperation(value = "当前用户认证进度")
-	 @PostMapping("/queryAuthProgress")
-	 @SysLogger("queryAuthProgress")
-	 public RespDTO<QueryAuthProgressDTO> queryAuthProgress() {
-		 return RespDTO.onSuc(userAuthenticationFacade.queryAuthProgress());
-	 }
+	@ApiOperation(value = "控制台-账号认证进度",notes="控制台-账号认证进度")
+	@PostMapping("/queryAuthProgress")
+	@SysLogger("queryAuthProgress")
+	public RespDTO<QueryAuthProgressDTO> queryAuthProgress() {
+		return RespDTO.onSuc(userAuthenticationFacade.queryAuthProgress());
+	}
     
 }

+ 23 - 12
user-service/src/main/java/com/diagbot/web/UserController.java

@@ -1,8 +1,23 @@
 package com.diagbot.web;
 
+import java.util.List;
+import java.util.Map;
+
+import javax.validation.Valid;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.GetConsoleUserInfoDTO;
 import com.diagbot.dto.LoginDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.UserOrgDTO;
@@ -11,22 +26,11 @@ import com.diagbot.entity.User;
 import com.diagbot.facade.PermissionFacade;
 import com.diagbot.facade.UserFacade;
 import com.diagbot.vo.UserSaveVO;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
-import javax.validation.Valid;
-import java.util.List;
-import java.util.Map;
-
 /**
  * @Description: 用户操作API
  * @author: gaodm
@@ -216,4 +220,11 @@ public class UserController {
     public RespDTO delUser(Long id){
         return RespDTO.onSuc(userFacade.removeById(id));
     }
+    
+    @ApiOperation(value = "控制台账户信息", notes="控制台账户信息")
+	@PostMapping("/getConsoleUserInfo")
+	@SysLogger("getConsoleUserInfo")
+	public RespDTO<GetConsoleUserInfoDTO> getConsoleUserInfo() {
+		return RespDTO.onSuc(userFacade.getConsoleUserInfo());
+	}
 }