|
@@ -5,15 +5,19 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.client.AuthServiceClient;
|
|
|
import com.diagbot.client.DiagbotmanClient;
|
|
|
+import com.diagbot.dto.AuthenticationDTO;
|
|
|
import com.diagbot.dto.GetConsoleUserInfoDTO;
|
|
|
import com.diagbot.dto.JwtDTO;
|
|
|
import com.diagbot.dto.LoginDTO;
|
|
|
+import com.diagbot.dto.OrganizationDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.dto.UserAllDTO;
|
|
|
import com.diagbot.dto.UserAndProdutUDTO;
|
|
|
import com.diagbot.dto.UserInfoDTO;
|
|
|
import com.diagbot.dto.UserInfoExportDTO;
|
|
|
import com.diagbot.dto.UserLoginDTO;
|
|
|
import com.diagbot.dto.UserOrgDTO;
|
|
|
+import com.diagbot.dto.UserOrgizationProductDTO;
|
|
|
import com.diagbot.entity.JWT;
|
|
|
import com.diagbot.entity.Organization;
|
|
|
import com.diagbot.entity.User;
|
|
@@ -41,16 +45,21 @@ import com.diagbot.util.UserUtils;
|
|
|
import com.diagbot.vo.BaseIdVO;
|
|
|
import com.diagbot.vo.ImgVerVerVO;
|
|
|
import com.diagbot.vo.OrganizationVO;
|
|
|
+import com.diagbot.vo.UserAndOrgPageVO;
|
|
|
import com.diagbot.vo.UserAndOrganizationVO;
|
|
|
import com.diagbot.vo.UserExportVO;
|
|
|
import com.diagbot.vo.UserInfoAuditVO;
|
|
|
import com.diagbot.vo.UserInfoOrganizationsVO;
|
|
|
+import com.diagbot.vo.UserInfoPagVO;
|
|
|
import com.diagbot.vo.UserSaveVO;
|
|
|
+import com.diagbot.vo.UsernameVO;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.crypto.factory.PasswordEncoderFactories;
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
import org.springframework.security.oauth2.common.OAuth2AccessToken;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
import java.util.ArrayList;
|
|
@@ -645,6 +654,7 @@ public class UserFacade extends UserServiceImpl {
|
|
|
auditMap.put("userId", userInfoAuditVO.getUserId());
|
|
|
auditMap.put("modifier", UserUtils.getCurrentPrincipleID());
|
|
|
auditMap.put("gmtModified", DateUtil.now());
|
|
|
+ auditMap.put("certificationDate", DateUtil.now());
|
|
|
auditMap.put("isReject", userInfoAuditVO.getIsReject());
|
|
|
auditMap.put("rejectComment", userInfoAuditVO.getRejectComment());
|
|
|
auditMap.put("rejectType", userInfoAuditVO.getRejectType());
|
|
@@ -808,4 +818,85 @@ public class UserFacade extends UserServiceImpl {
|
|
|
user.setRecords(userData);
|
|
|
return RespDTO.onSuc(user);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 1.分页查询注册用户信息接口 queryUserInformation
|
|
|
+ * @param page
|
|
|
+ * @param orgName
|
|
|
+ * @param autStatus
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public RespDTO<IPage<UserAllDTO>> queryUserInformations(Page page, String orgName, Integer autStatus){
|
|
|
+ UserInfoDTO userInfo = new UserInfoDTO();
|
|
|
+ userInfo.setOrgName(orgName);
|
|
|
+ userInfo.setAutStatus(autStatus);
|
|
|
+ return RespDTO.onSuc(queryUserInformation(page, userInfo));
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 2.分页查询机构信息接口 queryMechanismInformation
|
|
|
+ * @param page
|
|
|
+ * @param orgName
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public RespDTO<IPage<OrganizationDTO>> queryMechanismInformations(Page page, String orgName){
|
|
|
+ UserInfoDTO userInfo = new UserInfoDTO();
|
|
|
+ userInfo.setOrgName(orgName);
|
|
|
+ return RespDTO.onSuc(queryMechanismInformation(page, userInfo));
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 3.分页查询已认证用户信息和机构信息及开通产品接口 queryVerifiedUserOrganizationProduct
|
|
|
+ * @param page
|
|
|
+ * @param orgName
|
|
|
+ * @param userName
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public RespDTO<IPage<UserOrgizationProductDTO>> queryVerifiedUserOrganizationProducts(Page page,String orgName,String userName) {
|
|
|
+ UserInfoDTO userInfo = new UserInfoDTO();
|
|
|
+ userInfo.setOrgName(orgName);
|
|
|
+ userInfo.setUserName(userName);
|
|
|
+
|
|
|
+ IPage<UserOrgizationProductDTO> user = queryVerifiedUserOrganizationProduct(page, userInfo);
|
|
|
+ List<UserOrgizationProductDTO> userData = user.getRecords();
|
|
|
+ List<Long> userIds = new ArrayList<>();
|
|
|
+ for (UserOrgizationProductDTO userInfoDTO : userData) {
|
|
|
+ Long userInfoId = userInfoDTO.getUserId();
|
|
|
+ userIds.add(userInfoId);
|
|
|
+ }
|
|
|
+ RespDTO<List<UserAndProdutUDTO>> InformationData = diagbotmanService.getInformationAvailableAll(userIds);
|
|
|
+
|
|
|
+ if (InformationData == null || !"0".equals(InformationData.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "获取所有开通信息失败");
|
|
|
+ }
|
|
|
+ Map<Long, List<UserAndProdutUDTO>> map = new HashMap<>();
|
|
|
+ //获取所有用户开通的产品信息
|
|
|
+ List<UserAndProdutUDTO> dataList = InformationData.data;
|
|
|
+ map = EntityUtil.makeEntityListMap(dataList, "userId");
|
|
|
+ if (map.size() > 0) {
|
|
|
+ for (UserOrgizationProductDTO userInfoDTO : userData) {
|
|
|
+ List<UserAndProdutUDTO> userAndProdutUDTO = map.get(userInfoDTO.getUserId());
|
|
|
+ if (ListUtil.isNotEmpty(userAndProdutUDTO)) {
|
|
|
+ userInfoDTO.setUserAndProdutUDTO(userAndProdutUDTO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ System.out.println("====================" + GsonUtil.toJson(userData));
|
|
|
+ user.setRecords(userData);
|
|
|
+ return RespDTO.onSuc(user);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 4.分页查询认证中的用户信息接口 queryAuthentication
|
|
|
+ * @param page
|
|
|
+ * @param orgName
|
|
|
+ * @param userName
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public RespDTO<IPage<AuthenticationDTO>> queryAuthentications(Page page,String orgName,String userName) {
|
|
|
+ UserInfoDTO userInfo = new UserInfoDTO();
|
|
|
+ userInfo.setOrgName(orgName);
|
|
|
+ userInfo.setUserName(userName);
|
|
|
+ return RespDTO.onSuc(queryAuthentication(page, userInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|