Просмотр исходного кода

接口超时上限,接口换名

wy 2 лет назад
Родитель
Сommit
cfac80edad

+ 11 - 3
ibps-bpmn-root/modules/bpmn-biz/src/main/java/com/lc/ibps/bpmn/core/engine/def/reader/DefaultBpmDefineReader.java

@@ -306,7 +306,12 @@ public class DefaultBpmDefineReader implements IBpmDefineReader {
 		if(isCacheOpenning() && getCache().exists(Region.REGION_IBPS_BPM_DEF, cacheKey)) {
 			CacheObject cacheObject = getCache().get(Region.REGION_IBPS_BPM_DEF, cacheKey, true);
 			bpmProcDefine = (BpmProcDefine) cacheObject.getValue();
-			return bpmProcDefine;
+			if(bpmProcDefine != null){
+				return bpmProcDefine;
+			}
+			else{
+				logger.warn("Can't get BpmProcDefine from cache with defID=" + procDefineId);
+			}
 			// 复制对象,防止外部操作直接修改缓存数据
 			// 上移到对应修改数据的位置
 			//return BeanUtils.copy(bpmProcDefine);
@@ -316,6 +321,7 @@ public class DefaultBpmDefineReader implements IBpmDefineReader {
 		BpmDefineRepository bpmDefineRepository = AppUtil.getBean(BpmDefineRepository.class);
 		BpmDefinePo bpmDefinePo = bpmDefineRepository.getByDefId(procDefineId, true);
 		if(bpmDefinePo == null) {
+			logger.warn("Can't get bpmDefinePo with defID=" + procDefineId);
 			return bpmProcDefine;
 		}
 		
@@ -328,9 +334,11 @@ public class DefaultBpmDefineReader implements IBpmDefineReader {
 		} catch (IOException e) {
 			logger.error(e.getMessage(), e);
 		}
-		
+		if(bpmProcDefine == null){
+			logger.warn("Can't get BpmProcDefine from database with defID=" + procDefineId);
+		}
 		// 添加缓存
-		if(isCacheOpenning()){
+		if(isCacheOpenning() && bpmProcDefine != null ){
 			getCache().set(Region.REGION_IBPS_BPM_DEF, cacheKey, bpmProcDefine);
 		}
 		

+ 1 - 1
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/sysdata/controller/UpdateDataTableController.java

@@ -60,7 +60,7 @@ public class UpdateDataTableController {
 
     @ApiOperation("直接运行查询sql")
     @ApiImplicitParams({@ApiImplicitParam("传入加密的sql字符串")})
-    @PostMapping("/encipher")
+    @PostMapping("/general")
     APIResult<Void> encipher(@RequestBody String data)throws Exception {
         return updateDataTableService.encipher(data);
     }