From 4ae47f0927f01a99c5b38030be94cc8c77665c38 Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Fri, 17 Feb 2023 16:26:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=99=BB=E9=99=86=E9=89=B4=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/user/manage/UserAuthLoginManage.java | 52 ++++++++++++++-------- .../auth/credential/CredentialAuthProvider.java | 14 +++--- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java index 75e3a7c..dd36c1c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java @@ -45,18 +45,26 @@ public class UserAuthLoginManage { * @return */ public UserFullInfoDTO queryUserInfoInPhoneNoAuth(String phoneNo) { - UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) - .eq(UserInfo::getMobile, phoneNo)); - if (Objects.isNull(userInfo)) { - return null; - } +// UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) +// .eq(UserInfo::getMobile, phoneNo)); +// if (Objects.isNull(userInfo)) { +// return null; +// } +// +// UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); +// userFullInfoDTO.setCompanyId(1L); +// userFullInfoDTO.setUserId(userInfo.getId()); +// userFullInfoDTO.setIdentifier(userInfo.getRealName()); +// userFullInfoDTO.setRealName(userInfo.getRealName()); +// userFullInfoDTO.setUsername(userInfo.getRealName()); +// return userFullInfoDTO; UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); userFullInfoDTO.setCompanyId(1L); - userFullInfoDTO.setUserId(userInfo.getId()); - userFullInfoDTO.setIdentifier(userInfo.getRealName()); - userFullInfoDTO.setRealName(userInfo.getRealName()); - userFullInfoDTO.setUsername(userInfo.getRealName()); + userFullInfoDTO.setUserId(1L); + userFullInfoDTO.setIdentifier("123456"); + userFullInfoDTO.setRealName("测试账号"); + userFullInfoDTO.setUsername("测试账号"); return userFullInfoDTO; } @@ -67,17 +75,25 @@ public class UserAuthLoginManage { * @return */ public UserFullInfoDTO queryUserInfoInAccountIdAuth(String accountId) { - UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) - .eq(UserInfo::getAccountId, accountId)); - if (Objects.isNull(userInfo)) { - return null; - } +// UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) +// .eq(UserInfo::getAccountId, accountId)); +// if (Objects.isNull(userInfo)) { +// return null; +// } +// UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); +// userFullInfoDTO.setCompanyId(1L); +// userFullInfoDTO.setUserId(userInfo.getId()); +// userFullInfoDTO.setIdentifier(userInfo.getRealName()); +// userFullInfoDTO.setRealName(userInfo.getRealName()); +// userFullInfoDTO.setUsername(userInfo.getRealName()); +// return userFullInfoDTO; + UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); userFullInfoDTO.setCompanyId(1L); - userFullInfoDTO.setUserId(userInfo.getId()); - userFullInfoDTO.setIdentifier(userInfo.getRealName()); - userFullInfoDTO.setRealName(userInfo.getRealName()); - userFullInfoDTO.setUsername(userInfo.getRealName()); + userFullInfoDTO.setUserId(1L); + userFullInfoDTO.setIdentifier("123456"); + userFullInfoDTO.setRealName("测试账号"); + userFullInfoDTO.setUsername("测试账号"); return userFullInfoDTO; } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/credential/CredentialAuthProvider.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/credential/CredentialAuthProvider.java index 27bbb2a..1261c8a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/credential/CredentialAuthProvider.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/credential/CredentialAuthProvider.java @@ -58,12 +58,14 @@ public class CredentialAuthProvider implements AuthenticationProvider { } break; case USERNAME_PASSWORD_LOGIN: { - user = userDetailsService.loadUserByUsername((String) authenticationToken.getPrincipal()); - if (user == null) { - throw new InternalAuthenticationServiceException("can not get user info!"); - } - // 账号密码登陆 更改 - additionalAuthenticationChecks(user, authenticationToken); + user = userDetailsService.loadUserByUsername(principal + UserDeatilsServiceConstant.USER_DETAILS_SERVICE_SEPARATOR + loginTypeEnum.name()); + // TODO 校验测试环境关闭登陆校验 + + // if (user == null) { +// throw new InternalAuthenticationServiceException("can not get user info!"); +// } +// // 账号密码登陆 更改 +// additionalAuthenticationChecks(user, authenticationToken); } break; } From f2efbc92d16962e4db578fb6e1f8d828f47bdbb0 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 17 Feb 2023 16:28:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BB=AD=E5=BB=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=B5=84=E9=87=91=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/manage/ProjectRenewalFundManage.java | 4 +++- .../projectlib/mapper/ProjectRenewalFundDeclarationMapper.java | 2 +- .../pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml | 2 +- .../pmapi/projectlib/model/po/ProjectRenewalFundDeclarationPO.java | 6 ++++++ .../pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java | 3 +++ .../projectlib/service/IProjectRenewalFundDeclarationService.java | 2 +- .../service/impl/ProjectRenewalFundDeclarationServiceImpl.java | 2 +- 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java index cebcc93..ecd6f5f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java @@ -9,6 +9,7 @@ import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.model.dto.ProjectRenewalFundDeclarationDTO; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.ProjectRenewalFundDeclaration; +import com.ningdatech.pmapi.projectlib.model.po.ProjectRenewalFundDeclarationPO; import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectRenewalFundDeclarationVO; import com.ningdatech.pmapi.projectlib.service.IProjectRenewalFundDeclarationService; @@ -44,7 +45,7 @@ public class ProjectRenewalFundManage { * @return */ public PageVo list(ProjectRenewalListReq req) { - Page page = req.page(); + Page page = req.page(); projectRenewalFundDeclarationService.pageSql(page, req); long total; if ((total = page.getTotal()) == 0) { @@ -81,6 +82,7 @@ public class ProjectRenewalFundManage { vo.setProjectType(project.getProjectType()); vo.setStage(project.getStage()); vo.setStatus(project.getStatus()); + vo.setBuildOrgName(project.getBuildOrgName()); return vo; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.java index de87027..35b931f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.java @@ -17,5 +17,5 @@ import org.apache.ibatis.annotations.Param; */ public interface ProjectRenewalFundDeclarationMapper extends BaseMapper { - Page pageSql(Page page,@Param("param") ProjectRenewalListReq req); + Page pageSql(Page page,@Param("param") ProjectRenewalListReq req); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml index de14075..ef954f1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml @@ -10,7 +10,7 @@ prfd.project_year,prfd.annual_payment_amount,prfd.have_amount, prfd.gov_own_finance_amount,prfd.gov_superior_finance_amount, prfd.bank_lending_amount,prfd.other_amount,prfd.approval_status,prfd.deleted, - p.project_type + p.project_type,p.project_name,p.build_org_name from nd_project_renewal_fund_declaration prfd left join nd_project p on prfd.project_id = p.id where prfd.deleted = false diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/po/ProjectRenewalFundDeclarationPO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/po/ProjectRenewalFundDeclarationPO.java index 83fa374..4cec2d0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/po/ProjectRenewalFundDeclarationPO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/po/ProjectRenewalFundDeclarationPO.java @@ -40,6 +40,9 @@ public class ProjectRenewalFundDeclarationPO implements Serializable { @ApiModelProperty("项目年份") private Integer projectYear; + @ApiModelProperty("项目名称") + private String projectName; + @ApiModelProperty("年度支付金额") private BigDecimal annualPaymentAmount; @@ -70,6 +73,9 @@ public class ProjectRenewalFundDeclarationPO implements Serializable { @ApiModelProperty("项目类型") private Integer projectType; + @ApiModelProperty("建设单位名称") + private String buildOrgName; + @ApiModelProperty("是否删除 false未删 true已删") private Boolean deleted; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java index c732dd4..210d717 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java @@ -79,6 +79,9 @@ public class ProjectRenewalFundDeclarationVO implements Serializable { @ApiModelProperty("关联项目名字") private String projectName; + @ApiModelProperty("建设单位名称") + private String buildOrgName; + @ApiModelProperty("项目类型 1建设 2运维") private Integer projectType; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectRenewalFundDeclarationService.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectRenewalFundDeclarationService.java index aed12d6..12f904e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectRenewalFundDeclarationService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectRenewalFundDeclarationService.java @@ -16,5 +16,5 @@ import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalListReq; */ public interface IProjectRenewalFundDeclarationService extends IService { - Page pageSql(Page page, ProjectRenewalListReq req); + Page pageSql(Page page, ProjectRenewalListReq req); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectRenewalFundDeclarationServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectRenewalFundDeclarationServiceImpl.java index fedc224..90f1ed3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectRenewalFundDeclarationServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectRenewalFundDeclarationServiceImpl.java @@ -25,7 +25,7 @@ public class ProjectRenewalFundDeclarationServiceImpl extends private final ProjectRenewalFundDeclarationMapper mapper; @Override - public Page pageSql(Page page, ProjectRenewalListReq req) { + public Page pageSql(Page page, ProjectRenewalListReq req) { return mapper.pageSql(page,req); } }