diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java index 7556ebd..0e20ce2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java @@ -60,13 +60,12 @@ public class ExpertManage { * * @param request */ + @Transactional(rollbackFor = Exception.class) public void expertBasicInfoSubmit(ExpertUserBasicInfoSubmitRequest request) { // 用户id -// Long userId = LoginUserUtil.getUserId(); ExpertBasicInfo basicInfo = request.getBasicInfo(); Long userId = generateOrGetUserId(basicInfo); - // 校验区域编码合法性 校验履职意向编码合法性 ExpertRegionInfo expertRegionInfo = basicInfo.getExpertRegionInfo(); expertManageHelper.expertRegionInfoCheck(expertRegionInfo); @@ -99,13 +98,13 @@ public class ExpertManage { List recommendedWay = recommendInfo.getRecommendedWay(); // 推荐方式 List recommendProofFile = recommendInfo.getRecommendationProofFile(); - expertRecommendProofSubmit(recommendedWay, recommendProofFile); + expertRecommendProofSubmit(recommendedWay, recommendProofFile, userId); } - public void expertRecommendProofSubmit(List recommendedWay, List recommendProofFile) { + @Transactional(rollbackFor = Exception.class) + public void expertRecommendProofSubmit(List recommendedWay, List recommendProofFile, Long expertUserId) { // 用户id - Long expertUserId = LoginUserUtil.getUserId(); ExpertUserFullInfo expertUserFullInfo = iExpertUserFullInfoService.getByUserId(expertUserId); // 判断专家状态,是否可以进行证明材料提交 if (Objects.isNull(expertUserFullInfo) @@ -158,6 +157,7 @@ public class ExpertManage { .realName(basicInfo.getName()) // .employeeCode(dingEmployeeInfo.getEmployeeCode()) .available(UserAvailableEnum.DISABLE.name()) + .mobile(phoneNo) .createBy(LoginUserUtil.getUserId()) .updateBy(LoginUserUtil.getUserId()) .createOn(LocalDateTime.now()) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/WebSecurityConfig.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/WebSecurityConfig.java index 99c8077..9d88156 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/WebSecurityConfig.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/WebSecurityConfig.java @@ -4,8 +4,9 @@ import com.ningdatech.basic.util.NdJsonUtil; import com.ningdatech.basic.util.StrPool; import com.ningdatech.pmapi.common.constant.BizConst; import com.ningdatech.pmapi.common.constant.CommonConst; -import com.ningdatech.pmapi.user.security.auth.handler.DefaultExpiredSessionStrategy; +import com.ningdatech.pmapi.user.security.auth.agent.AgentAuthSecurityConfig; import com.ningdatech.pmapi.user.security.auth.credential.CredentialAuthSecurityConfig; +import com.ningdatech.pmapi.user.security.auth.handler.DefaultExpiredSessionStrategy; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpStatus; @@ -31,13 +32,16 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { private final CredentialAuthSecurityConfig credentialAuthSecurityConfig; private final LogoutSuccessHandler logoutSuccessHandler; private final DefaultExpiredSessionStrategy defaultExpiredSessionStrategy; + private final AgentAuthSecurityConfig agentAuthSecurityConfig; public WebSecurityConfig(AuthProperties authProperties, CredentialAuthSecurityConfig credentialAuthSecurityConfig, + AgentAuthSecurityConfig agentAuthSecurityConfig, @Qualifier(value = "defaultLogoutSuccessHandler") LogoutSuccessHandler logoutSuccessHandler, DefaultExpiredSessionStrategy defaultExpiredSessionStrategy) { this.authProperties = authProperties; this.credentialAuthSecurityConfig = credentialAuthSecurityConfig; + this.agentAuthSecurityConfig = agentAuthSecurityConfig; this.logoutSuccessHandler = logoutSuccessHandler; this.defaultExpiredSessionStrategy = defaultExpiredSessionStrategy; } @@ -47,7 +51,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { assemblerPreAuthUrls(http); http.formLogin() .loginPage(authProperties.getAuthRequireUrl()) - .and().apply(credentialAuthSecurityConfig) + .and().apply(credentialAuthSecurityConfig).and().apply(agentAuthSecurityConfig) .and() .authorizeRequests().antMatchers(authProperties.getIgnoreAuthUrlsArray()).permitAll().anyRequest() .authenticated().and()