Prechádzať zdrojové kódy

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

wangyu 6 rokov pred
rodič
commit
26c0b51a31

+ 0 - 18
user-service/src/main/java/com/diagbot/entity/wrapper/UserWrapper.java

@@ -1,18 +0,0 @@
-package com.diagbot.entity.wrapper;
-
-import com.diagbot.entity.User;
-
-/**
- * Created by dell on 2018/8/8.
- */
-public class UserWrapper extends User {
-    private String status;
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-}

+ 13 - 9
user-service/src/main/java/com/diagbot/facade/UserAuthenticationFacade.java

@@ -131,7 +131,7 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
      *
      * @return
      */
-    public UserAuthenticationDTO getuserAuthenticationInfo() {
+    public UserAuthenticationDTO getUserAuthenticationInfo() {
         Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
         User user = userFacade.getById(userId);
         //密码置空
@@ -195,14 +195,14 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
         QueryAuthProgressDTO queryAuthProgressDTO = new QueryAuthProgressDTO();
         queryAuthProgressDTO.setUserStatus(user.getAuthStatus());
         queryAuthProgressDTO.setUserStatusMsg(AuthStatusEnum.getName(user.getAuthStatus()));
-        if(userAuthentication!=null){
-        	queryAuthProgressDTO.setIsReject(userAuthentication.getIsReject());
-        	if(userAuthentication.getRejectType()!=null){
-        		queryAuthProgressDTO.setRejectType(AccdenEnum.getName(userAuthentication.getRejectType()));
-        	}
-        	queryAuthProgressDTO.setRejectComment(userAuthentication.getRejectComment());
+        if (userAuthentication != null) {
+            queryAuthProgressDTO.setIsReject(userAuthentication.getIsReject());
+            if (userAuthentication.getRejectType() != null) {
+                queryAuthProgressDTO.setRejectType(AccdenEnum.getName(userAuthentication.getRejectType()));
+            }
+            queryAuthProgressDTO.setRejectComment(userAuthentication.getRejectComment());
         }
-        
+
 
         return queryAuthProgressDTO;
     }
@@ -241,7 +241,11 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
      */
     public WaitAuthenDTO waitAuthen() {
         WaitAuthenDTO waitAuthenDTO = new WaitAuthenDTO();
-        waitAuthenDTO.setCount(baseMapper.getAllWaitAuthCou());
+        QueryWrapper<User> qw = new QueryWrapper<>();
+        qw.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("auth_status", AuthStatusEnum.Authorizing.getKey());
+        Integer count = userFacade.list(qw).size();
+        waitAuthenDTO.setCount(count);
         return waitAuthenDTO;
     }
 }

+ 0 - 2
user-service/src/main/java/com/diagbot/mapper/UserAuthenticationMapper.java

@@ -12,6 +12,4 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @since 2018-09-17
  */
 public interface UserAuthenticationMapper extends BaseMapper<UserAuthentication> {
-
-    int getAllWaitAuthCou();
 }

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

@@ -19,7 +19,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
-import java.util.Map;
 
 /**
  * <p>
@@ -64,7 +63,7 @@ public class UserAuthenticationController {
     @PostMapping("/getuserAuthenticationInfo")
     @SysLogger("getuserAuthenticationInfo")
     public RespDTO<UserAuthenticationDTO> getuserAuthenticationInfo() {
-        UserAuthenticationDTO userAuthenticationDTO = userAuthenticationFacade.getuserAuthenticationInfo();
+        UserAuthenticationDTO userAuthenticationDTO = userAuthenticationFacade.getUserAuthenticationInfo();
         return RespDTO.onSuc(userAuthenticationDTO);
     }
 

+ 0 - 8
user-service/src/main/resources/mapper/UserAuthenticationMapper.xml

@@ -20,12 +20,4 @@
         <result column="status" property="status"/>
         <result column="remark" property="remark"/>
     </resultMap>
-
-    <select id="getAllWaitAuthCou" resultType="int">
-    	select
-    		count(1)
-    	from sys_user
-    	where is_deleted = 'N' and auth_status=2
-    </select>
-
 </mapper>