1、修复动态规则、任务批量审批bug
2、配置新增批量审批 3、规则、任务补全创建人属性 4、删去kafkatest配置文件
This commit is contained in:
@@ -61,5 +61,5 @@ public interface DynamicRuleMapper {
|
||||
|
||||
void updateAuditStatusByIdBatch(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idWithAuditStatusBatch);
|
||||
|
||||
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idWithAuditStatusMap);
|
||||
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusMap") Map<Integer, Integer> idWithAuditStatusMap);
|
||||
}
|
||||
|
||||
@@ -232,6 +232,9 @@ public class DynamicRuleService {
|
||||
public Object updateAuditStatusBatch(Map<Integer, Integer> idsWithAuditStatusMap) {
|
||||
//校验id和status是否合法
|
||||
List<Integer> originalAuditStatusList = dynamicRuleMapper.queryAuditStatusByIds(idsWithAuditStatusMap);
|
||||
if (originalAuditStatusList == null || originalAuditStatusList.size() != idsWithAuditStatusMap.size()) {
|
||||
return new IllegalArgumentException("部分动态规则id不存在");
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
List<Integer> errorIds = new ArrayList<>();
|
||||
@@ -240,15 +243,13 @@ public class DynamicRuleService {
|
||||
Integer auditStatus = entry.getValue();
|
||||
Integer originalAuditStatus = originalAuditStatusList.get(index);
|
||||
index++;
|
||||
if (originalAuditStatus == null) {
|
||||
errorIds.add(id);
|
||||
}
|
||||
|
||||
if (!AuditStatusValidator.setOriginal(originalAuditStatus).checkValidate(auditStatus)) {
|
||||
errorIds.add(id);
|
||||
}
|
||||
}
|
||||
if (!errorIds.isEmpty()){
|
||||
return new IllegalArgumentException("动态规则id不存在或无法修改为对应审核状态, errorIds: " + errorIds);
|
||||
return new IllegalArgumentException("动态规则id无法修改为对应审核状态, 错误id: " + errorIds);
|
||||
}
|
||||
|
||||
|
||||
@@ -277,4 +278,8 @@ public class DynamicRuleService {
|
||||
return sqlSessionWrapper.startBatchSession(DynamicRuleMapper.class, updateDynamicRuleAuditStatusFunction, idsWithAuditStatusMap);
|
||||
|
||||
}
|
||||
|
||||
public List<Integer> queryAuditStatusByIds(Map<Integer, Integer> idsWithAuditStatusMap) {
|
||||
return dynamicRuleMapper.queryAuditStatusByIds(idsWithAuditStatusMap);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user