|
@@ -30,33 +30,53 @@ public class KlRuleFacade extends KlRuleServiceImpl {
|
|
|
RespDTO<IPage<KlRuleInfoDTO>> klRuleInfoPages = cdssCoreClient.getKlRuleInfoPages(klRuleInfoVO);
|
|
|
if (klRuleInfoPages == null || !CommonErrorCode.OK.getCode().equals(klRuleInfoPages.code)) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
- "获取cdss_core数据失败");
|
|
|
+ "分页获取规则维护列表数据失败");
|
|
|
}
|
|
|
return klRuleInfoPages.data;
|
|
|
}
|
|
|
|
|
|
public KlRuleByIdParDTO getByIdRuleInfos(KlRuleByIdVO klRuleByIdVO) {
|
|
|
RespDTO<KlRuleByIdParDTO> byIdRuleInfoAll = cdssCoreClient.getByIdRuleInfoAll(klRuleByIdVO);
|
|
|
+ if (byIdRuleInfoAll == null || !CommonErrorCode.OK.getCode().equals(byIdRuleInfoAll.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "获取规则详情数据失败");
|
|
|
+ }
|
|
|
return byIdRuleInfoAll.data;
|
|
|
}
|
|
|
|
|
|
public Boolean saveRuleInfos(KlRuleInfoSaveVO klRuleInfoSaveVO) {
|
|
|
RespDTO<Boolean> booleanRespDTO = cdssCoreClient.saveRuleInfoAll(klRuleInfoSaveVO);
|
|
|
+ if (booleanRespDTO == null || !CommonErrorCode.OK.getCode().equals(booleanRespDTO.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "保存规则详情数据失败");
|
|
|
+ }
|
|
|
return booleanRespDTO.data;
|
|
|
}
|
|
|
|
|
|
public Boolean clearRuleInfos(KlRuleInfoClearVO klRuleInfoClearVO) {
|
|
|
RespDTO<Boolean> booleanRespDTO = cdssCoreClient.clearRuleInfoAll(klRuleInfoClearVO);
|
|
|
+ if (booleanRespDTO == null || !CommonErrorCode.OK.getCode().equals(booleanRespDTO.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "刪除规则详情数据失败");
|
|
|
+ }
|
|
|
return booleanRespDTO.data;
|
|
|
}
|
|
|
|
|
|
public Boolean startOrDisableRule(KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
|
|
|
RespDTO<Boolean> booleanRespDTO = cdssCoreClient.disableRuleInfos(klRuleSatartOrdisaVO);
|
|
|
+ if (booleanRespDTO == null || !CommonErrorCode.OK.getCode().equals(booleanRespDTO.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "停用规则失败");
|
|
|
+ }
|
|
|
return booleanRespDTO.data;
|
|
|
}
|
|
|
|
|
|
public Boolean startRuleInfos(KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
|
|
|
RespDTO<Boolean> booleanRespDTO = cdssCoreClient.startRuleInfos(klRuleSatartOrdisaVO);
|
|
|
+ if (booleanRespDTO == null || !CommonErrorCode.OK.getCode().equals(booleanRespDTO.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "启用规则失败");
|
|
|
+ }
|
|
|
return booleanRespDTO.data;
|
|
|
}
|
|
|
}
|