bug修复
This commit is contained in:
parent
120a474e0f
commit
3d48696eee
@ -2,7 +2,7 @@ package com.zhgd.sjmq.listener;
|
||||
|
||||
import com.chinacreator.c2.uop.sync.receiver.UopMQMessageReceiverServiceImpl;
|
||||
import com.zhgd.sjmq.service.UopCustomMessageReceiverServiceImpl;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@ -27,11 +27,11 @@ public class UopModifyMessageReceiveListener {
|
||||
@Value("${c2_orguser_subscription:}")
|
||||
private String c2_orguser_subscription;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
@PostConstruct
|
||||
public void start() {
|
||||
if (profileJudgeUtil.isSjjt()) {
|
||||
if (environmentUtil.isSjjt()) {
|
||||
if (receiver != null) {
|
||||
receiver.stop();
|
||||
}
|
||||
@ -50,9 +50,9 @@ public class UopModifyMessageReceiveListener {
|
||||
|
||||
@PreDestroy
|
||||
public void end() {
|
||||
if (profileJudgeUtil.isSjjt()) {
|
||||
if (environmentUtil.isSjjt()) {
|
||||
receiver.stop();
|
||||
log.info("关闭mq");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ import com.zhgd.xmgl.modules.project.entity.ProjectUfaceConfig;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.ThirdPartyPlatformService;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProjectUfaceConfigMapper;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.ThirdPartyPlatformServiceMapper;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -34,7 +34,7 @@ public class AsyncEnvironment {
|
||||
@Autowired
|
||||
private ThirdPartyPlatformServiceMapper thirdPartyPlatformServiceMapper;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
@Value("${govt.host:}")
|
||||
public String govtHost;
|
||||
@ -47,7 +47,7 @@ public class AsyncEnvironment {
|
||||
@Async("environmentNoiseDataExecutor")
|
||||
public void sendEnvironmentNoiseData(DustNoiseData dustNoiseData, EnvironmentDev environmentDev) {
|
||||
try {
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
/*QueryWrapper<ProjectUfaceConfig> queryWrapper =new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(ProjectUfaceConfig::getProjectSn, environmentDev.getProjectSn());
|
||||
ProjectUfaceConfig tempProjectUfaceConfig=projectUfaceConfigMapper.selectOne(queryWrapper);
|
||||
|
||||
@ -13,7 +13,7 @@ import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.DepartmentInfoMapper;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.TeamInfoMapper;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerAttendancePresenceService;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
@ -43,14 +43,14 @@ public class AsyncSendAttendance {
|
||||
@Autowired
|
||||
private WkServiceuCall wkServiceuCall;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
@Autowired
|
||||
private GovtOpenApiService govtOpenApiService;
|
||||
|
||||
@Async("sendAttendanceExecutor")
|
||||
public void saveAndSendAttendance(WorkerAttendance workerAttendance, WorkerInfo info){
|
||||
try {
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
// 向政务平台发送数据
|
||||
govtOpenApiService.workerAttendanceSync(workerAttendance);
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ import com.zhgd.xmgl.modules.sanjiang.entity.SjImageProgress;
|
||||
import com.zhgd.xmgl.modules.sanjiang.entity.SjSendSjImageProgress;
|
||||
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -50,7 +50,7 @@ public class SanjiangDataCall {
|
||||
@Value("${sj.business.gateway.api.key:}")
|
||||
String apiKey;
|
||||
@Autowired
|
||||
ProfileJudgeUtil profileJudgeUtil;
|
||||
EnvironmentUtil environmentUtil;
|
||||
@Value("${sj.upload.image.url.prefix:}")
|
||||
private String sjUploadUrlPrefix;
|
||||
@Autowired
|
||||
@ -63,7 +63,7 @@ public class SanjiangDataCall {
|
||||
* 判断是三江环境
|
||||
*/
|
||||
private boolean judgeSjEnvironment() {
|
||||
boolean sjjt = profileJudgeUtil.isSjjt();
|
||||
boolean sjjt = environmentUtil.isSjjt();
|
||||
return sjjt && StringUtils.isNotBlank(gateWayUrl) && StringUtils.isNotBlank(apiKey);
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import cn.hutool.crypto.SecureUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gexin.fastjson.JSON;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
@ -125,7 +126,7 @@ public class ProjectController {
|
||||
@ApiOperation(value = " 三江业务中台添加项目", notes = "三江业务中台添加项目", httpMethod = "POST")
|
||||
@PostMapping(value = "/sj/business/add")
|
||||
public Result addSjProject(@RequestBody @Validate SjProjectDto dto) {
|
||||
log.info("addSjProject:{}", dto);
|
||||
log.info("addSjProject:{}", JSON.toJSONString(dto));
|
||||
Project project = new Project();
|
||||
BeanUtils.copyProperties(dto, project);
|
||||
project.setCompanySn("B386480F85E84592B8E102224D090794");
|
||||
@ -143,7 +144,7 @@ public class ProjectController {
|
||||
@ApiOperation(value = " 三江业务中台更新项目(根据项目编号projectNumber更新)", notes = "三江业务中台更新项目(根据项目编号projectNumber更新)", httpMethod = "POST")
|
||||
@PostMapping(value = "/sj/business/update")
|
||||
public Result updateSjProject(@RequestBody @Validate SjProjectDto dto) {
|
||||
log.info("updateSjProject:{}", dto);
|
||||
log.info("updateSjProject:{}", JSON.toJSONString(dto));
|
||||
Project project = new Project();
|
||||
BeanUtils.copyProperties(dto, project);
|
||||
project.setCompanySn("B386480F85E84592B8E102224D090794");
|
||||
|
||||
@ -28,7 +28,7 @@ import com.zhgd.xmgl.modules.project.entity.vo.ActualProgressVO;
|
||||
import com.zhgd.xmgl.modules.project.enums.LevelNameEnum;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProgressTaskMapper;
|
||||
import com.zhgd.xmgl.modules.project.service.ProgressTaskService;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.mpxj.MPXJException;
|
||||
import net.sf.mpxj.ProjectFile;
|
||||
@ -90,7 +90,7 @@ public class ProgressTaskServiceImpl extends ServiceImpl<ProgressTaskMapper, Pro
|
||||
private String basement = "地下室底板";
|
||||
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@ -489,7 +489,7 @@ public class ProgressTaskServiceImpl extends ServiceImpl<ProgressTaskMapper, Pro
|
||||
* @return
|
||||
*/
|
||||
private boolean isBIMAsyncEnable() {
|
||||
return profileJudgeUtil.isZjsj() || profileJudgeUtil.isShahu();
|
||||
return environmentUtil.isZjsj() || environmentUtil.isShahu();
|
||||
}
|
||||
|
||||
private BIMProgressTaskRqBody buildBimTask(ProgressTask progressTask, String major, String floorName, String district, String building) {
|
||||
@ -504,9 +504,9 @@ public class ProgressTaskServiceImpl extends ServiceImpl<ProgressTaskMapper, Pro
|
||||
body.setDistrict(district);
|
||||
body.setBuilding(building);
|
||||
body.setProgressTaskId(progressTask.getId());
|
||||
if (profileJudgeUtil.isZjsj()) {
|
||||
if (environmentUtil.isZjsj()) {
|
||||
body.setProjectId(1);
|
||||
} else if (profileJudgeUtil.isShahu()) {
|
||||
} else if (environmentUtil.isShahu()) {
|
||||
body.setProjectId(2);
|
||||
}
|
||||
String sign = getBimProgressTaskRqBodyMd5Sign(body);
|
||||
|
||||
@ -60,8 +60,8 @@ import com.zhgd.xmgl.modules.video.mapper.VideoItemMapper;
|
||||
import com.zhgd.xmgl.modules.worker.entity.UfaceDev;
|
||||
import com.zhgd.xmgl.modules.worker.service.*;
|
||||
import com.zhgd.xmgl.util.AddressUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -98,7 +98,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
||||
@Autowired
|
||||
private SystemAreasMapper systemAreasMapper;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
@Autowired
|
||||
private ProjectMapper projectMapper;
|
||||
@Autowired
|
||||
|
||||
@ -21,7 +21,7 @@ import com.zhgd.xmgl.modules.worker.entity.WorkerType;
|
||||
import com.zhgd.xmgl.modules.worker.service.ITeamInfoService;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerTypeService;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
@ -55,7 +55,7 @@ public class ProjectOperationsAnalysisServiceImpl extends ServiceImpl<ProjectOpe
|
||||
@Autowired
|
||||
GovtOpenApiService govtOpenApiService;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@ -81,7 +81,7 @@ public class ProjectOperationsAnalysisServiceImpl extends ServiceImpl<ProjectOpe
|
||||
baseMapper.deleteById(projectOperationsAnalysis.getId());
|
||||
}
|
||||
this.saveBatch(analysisList);
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
// 同步到政务平台
|
||||
govtOpenApiService.projectOperationsAnalysisUpdateSync(analysisList);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
|
||||
@Autowired
|
||||
private GovtOpenApiService govtOpenApiService;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
@ -122,7 +122,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
|
||||
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String nowTime = sdf1.format(new Date());
|
||||
workerAttendanceMapper.insert(workerAttendance);
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
// 向政务平台发送数据
|
||||
govtOpenApiService.workerAttendanceSync(workerAttendance);
|
||||
}
|
||||
@ -470,7 +470,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
|
||||
workerAttendance.setCardType(7);
|
||||
workerAttendance.setImageUrl(MapUtils.getString(map, "photoUrl"));
|
||||
workerAttendanceMapper.insert(workerAttendance);
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
// 向政务平台发送数据
|
||||
govtOpenApiService.workerAttendanceSync(workerAttendance);
|
||||
}
|
||||
@ -753,7 +753,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
|
||||
workerAttendance.setDevSn(devSn);
|
||||
workerAttendance.setPassType(type);
|
||||
workerAttendance.setCardType(2);
|
||||
if (profileJudgeUtil.isJlw()) {
|
||||
if (environmentUtil.isJlw()) {
|
||||
workerAttendance.setIsStatistics(0);
|
||||
} else {
|
||||
workerAttendance.setIsStatistics(1);
|
||||
@ -766,7 +766,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
|
||||
workerAttendance.setAttendanceType(1);
|
||||
workerAttendanceMapper.insert(workerAttendance);
|
||||
//asyncSendAttendance.saveAndSendAttendance(workerAttendance,info);
|
||||
if (profileJudgeUtil.isJlw()) {
|
||||
if (environmentUtil.isJlw()) {
|
||||
// 向政务平台发送数据
|
||||
govtOpenApiService.workerAttendanceSync(workerAttendance);
|
||||
workerAttendancePresenceService.addWorkerAttendancePresence(workerAttendance);
|
||||
|
||||
@ -107,7 +107,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
@Autowired
|
||||
private GovtOpenApiService govtOpenApiService;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
@Value("${basePath}")
|
||||
private String basePath;
|
||||
@ -273,7 +273,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
if (isGetFaceFeatureDate) {
|
||||
workerPhotoFeaturesService.saveWorkerPhotoFeatures(workerInfo);
|
||||
}
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
// 同步到政务平台
|
||||
govtOpenApiService.workerInfoAddSync(workerInfo);
|
||||
}
|
||||
@ -321,7 +321,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
if (isGetFaceFeatureDate) {
|
||||
workerPhotoFeaturesService.saveWorkerPhotoFeatures(workerInfo);
|
||||
}
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
// 同步到政务平台
|
||||
govtOpenApiService.workerInfoAddSync(workerInfo);
|
||||
}
|
||||
@ -343,7 +343,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
//上传住建
|
||||
asyncWorker.sendExitWorkById(workerInfo, 1);
|
||||
workerInfoMapper.deleteById(id);
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
// 同步
|
||||
govtOpenApiService.workerInfoDelSync(workerInfo);
|
||||
}
|
||||
|
||||
@ -16,8 +16,8 @@ import com.zhgd.xmgl.modules.worker.entity.WorkerMonthAttendanceStatistics;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.*;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerMonthAttendanceStatisticsService;
|
||||
import com.zhgd.xmgl.util.DateUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import com.zhgd.xmgl.util.JxlExcelUtils;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.ReflectUtils;
|
||||
import lombok.extern.log4j.Log4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
@ -57,7 +57,7 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
|
||||
@Autowired
|
||||
private GovtOpenApiService govtOpenApiService;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
|
||||
@Override
|
||||
@ -148,7 +148,7 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
|
||||
workerMonthAttendanceDurationMapper.insert(duration);
|
||||
//workerMonthAttendanceDurationMapper.insertMonthAttendanceDuration(param);
|
||||
}
|
||||
if (profileJudgeUtil.isJlwProd()) {
|
||||
if (environmentUtil.isJlwProd()) {
|
||||
// 同步到湖里政务平台
|
||||
WorkerMonthAttendanceStatistics syncData = workerMonthAttendanceStatisticsMapper.selectByCondition(param);
|
||||
if (ObjectUtil.isNotNull(syncData)) {
|
||||
|
||||
@ -10,7 +10,7 @@ import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.MiddleGcjkd;
|
||||
import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.MiddleGcxx;
|
||||
import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.VideoItemConfigBo;
|
||||
import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.bo.ProjectBo;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -32,13 +32,13 @@ public class MiddleService {
|
||||
@Autowired
|
||||
private VideoItemMapper videoItemMapper;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
/**
|
||||
* 同步项目结构化数据到北京市政局
|
||||
*/
|
||||
public void syncProject() {
|
||||
if (profileJudgeUtil.isYlwwProd()) {
|
||||
if (environmentUtil.isYlwwProd()) {
|
||||
//从中间库接口获取所有项目
|
||||
String url = ipPort + "/middle/middleGcxx/list";
|
||||
log.info("getMiddleProject:{}", url);
|
||||
@ -80,7 +80,7 @@ public class MiddleService {
|
||||
* 同步视频点位结构化数据到北京市政局
|
||||
*/
|
||||
public void syncMiddleGcjkd() {
|
||||
if (profileJudgeUtil.isYlwwProd()) {
|
||||
if (environmentUtil.isYlwwProd()) {
|
||||
//从中间库接口获取所有监控点位
|
||||
String url = ipPort + "/middle/middleGcjkd/list";
|
||||
log.info("getMiddleProject:{}", url);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.yunlianwanwu.middle.task;
|
||||
|
||||
import com.zhgd.xmgl.modules.yunlianwanwu.middle.service.MiddleService;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.javacrumbs.shedlock.core.SchedulerLock;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -18,7 +18,7 @@ public class MiddleTask {
|
||||
@Autowired
|
||||
private MiddleService middleService;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
/**
|
||||
* 云联万物同步结构化数据任务,每天同步一次
|
||||
|
||||
@ -7,7 +7,7 @@ import com.zhgd.xmgl.entity.sj.JwtPayloadUserInfo;
|
||||
import com.zhgd.xmgl.entity.sj.TokenResponse;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import com.zhgd.xmgl.util.sj.JwtRsaUtils;
|
||||
import com.zhgd.xmgl.util.sj.SjUnifiedAuthenticationHttpUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -54,7 +54,7 @@ public class JwtTokenFilter extends OncePerRequestFilter {
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
@Autowired
|
||||
private ProfileJudgeUtil profileJudgeUtil;
|
||||
private EnvironmentUtil environmentUtil;
|
||||
|
||||
public static ThreadLocal<JwtPayloadUserInfo> sjUser = new ThreadLocal<>();
|
||||
|
||||
@ -66,7 +66,7 @@ public class JwtTokenFilter extends OncePerRequestFilter {
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
if (securityEnable) {
|
||||
//三江统一认证,3.登录:过滤器判断,回调地址获取code调用获取令牌,首页根据令牌获取登录数据信息
|
||||
if (profileJudgeUtil.isSjjt()) {
|
||||
if (environmentUtil.isSjjt()) {
|
||||
try {
|
||||
validateSjProfile(request, response, filterChain);
|
||||
} catch (InvalidKeySpecException e) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.zhgd.xmgl.security;
|
||||
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import com.zhgd.xmgl.util.EnvironmentUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@ -44,7 +44,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
private boolean securityEnable;
|
||||
|
||||
@Autowired
|
||||
ProfileJudgeUtil profileJudgeUtil;
|
||||
EnvironmentUtil environmentUtil;
|
||||
|
||||
@Autowired
|
||||
public WebSecurityConfig(JwtAuthenticationEntryPoint unauthorizedHandler,
|
||||
@ -70,7 +70,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.headers().frameOptions().disable();
|
||||
if (securityEnable) {
|
||||
if (profileJudgeUtil.isGxlt()) {
|
||||
if (environmentUtil.isGxlt()) {
|
||||
http.authorizeRequests()
|
||||
//请求路径允许访问
|
||||
.antMatchers("/xmgl/project/getProjectInfoBySn").permitAll();
|
||||
|
||||
@ -11,7 +11,7 @@ import java.util.stream.Stream;
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ProfileJudgeUtil {
|
||||
public class EnvironmentUtil {
|
||||
@Value("${active.environment.name}")
|
||||
private String activeEnvironment;
|
||||
|
||||
@ -95,4 +95,4 @@ sj.business.gateway.url=http://116.169.63.183:30867/
|
||||
sj.business.gateway.api.key=nDmkHCxlQzCqE-xfYteXMw
|
||||
#\u4E09\u6C5F\u56FE\u7247\u8BBF\u95EE\u8DEF\u5F84\uFF08\u7528\u4E8E\u63A8\u9001\u4E1A\u52A1\u4E2D\u53F0\uFF09
|
||||
sj.upload.image.url.prefix=http://192.168.34.221:11111/image/
|
||||
|
||||
active.environment.name=sjjt-dev
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user