mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 03:58:33 +08:00
refactor(用例管理): provider加错误日志读取文件关闭流
This commit is contained in:
parent
6a04e8c4dd
commit
bb3c121b8b
@ -60,16 +60,20 @@ public class CaseReviewCaseProvider implements BaseCaseProvider {
|
||||
* 1.关联用例(单独/批量)重新计算用例评审的通过率和用例数
|
||||
*/
|
||||
private void updateCaseReviewByAssociate(Map<String, Object> paramMap) {
|
||||
String reviewId = paramMap.get(CaseEvent.Param.REVIEW_ID).toString();
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
//获取关联前的caseIds
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListIncludes(reviewId, caseIdList, false);
|
||||
List<CaseReviewFunctionalCase> passList = caseReviewFunctionalCases.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getStatus(), FunctionalCaseReviewStatus.PASS.toString())).toList();
|
||||
int caseCount = Integer.parseInt(paramMap.get(CaseEvent.Param.CASE_COUNT).toString()) + caseReviewFunctionalCases.size();
|
||||
int passNumber = passList.size();
|
||||
List<CaseReviewFunctionalCase> unCompletedCaseList = getUnCompletedCaseList(caseReviewFunctionalCases, new ArrayList<>());
|
||||
updateCaseReview(reviewId, caseCount, passNumber, unCompletedCaseList.size()+Integer.parseInt(paramMap.get(CaseEvent.Param.CASE_COUNT).toString()), paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||
try {
|
||||
String reviewId = paramMap.get(CaseEvent.Param.REVIEW_ID).toString();
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
//获取关联前的caseIds
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListIncludes(reviewId, caseIdList, false);
|
||||
List<CaseReviewFunctionalCase> passList = caseReviewFunctionalCases.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getStatus(), FunctionalCaseReviewStatus.PASS.toString())).toList();
|
||||
int caseCount = Integer.parseInt(paramMap.get(CaseEvent.Param.CASE_COUNT).toString()) + caseReviewFunctionalCases.size();
|
||||
int passNumber = passList.size();
|
||||
List<CaseReviewFunctionalCase> unCompletedCaseList = getUnCompletedCaseList(caseReviewFunctionalCases, new ArrayList<>());
|
||||
updateCaseReview(reviewId, caseCount, passNumber, unCompletedCaseList.size() + Integer.parseInt(paramMap.get(CaseEvent.Param.CASE_COUNT).toString()), paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(CaseEvent.Event.ASSOCIATE + "事件更新失败", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,24 +82,28 @@ public class CaseReviewCaseProvider implements BaseCaseProvider {
|
||||
* 2.删除用例和用例评审人的关系
|
||||
*/
|
||||
private void updateCaseReviewByDisAssociate(Map<String, Object> paramMap) {
|
||||
String reviewId = paramMap.get(CaseEvent.Param.REVIEW_ID).toString();
|
||||
CaseReview caseReview = caseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
if (caseReview == null) {
|
||||
return;
|
||||
try {
|
||||
String reviewId = paramMap.get(CaseEvent.Param.REVIEW_ID).toString();
|
||||
CaseReview caseReview = caseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
if (caseReview == null) {
|
||||
return;
|
||||
}
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
//获取与选中case无关的其他case
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListIncludes(reviewId, caseIdList, false);
|
||||
List<CaseReviewFunctionalCase> passList = caseReviewFunctionalCases.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getStatus(), FunctionalCaseReviewStatus.PASS.toString())).toList();
|
||||
int caseCount = caseReviewFunctionalCases.size() - caseIdList.size();
|
||||
int passNumber = passList.size();
|
||||
List<CaseReviewFunctionalCase> unCompletedCaseList = getUnCompletedCaseList(caseReviewFunctionalCases, new ArrayList<>());
|
||||
updateCaseReview(reviewId, caseReview.getCaseCount() - caseCount, passNumber, unCompletedCaseList.size(), paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||
//删除用例和用例评审人的关系
|
||||
deleteCaseReviewFunctionalCaseUser(paramMap);
|
||||
//将评审历史状态置为true
|
||||
extCaseReviewHistoryMapper.updateDelete(caseIdList, reviewId, true);
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(CaseEvent.Event.DISASSOCIATE + "事件更新失败", e.getMessage());
|
||||
}
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
//获取与选中case无关的其他case
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListIncludes(reviewId, caseIdList, false);
|
||||
List<CaseReviewFunctionalCase> passList = caseReviewFunctionalCases.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getStatus(), FunctionalCaseReviewStatus.PASS.toString())).toList();
|
||||
int caseCount = caseReviewFunctionalCases.size()- caseIdList.size();
|
||||
int passNumber = passList.size();
|
||||
List<CaseReviewFunctionalCase> unCompletedCaseList = getUnCompletedCaseList(caseReviewFunctionalCases, new ArrayList<>());
|
||||
updateCaseReview(reviewId, caseReview.getCaseCount() - caseCount, passNumber, unCompletedCaseList.size(), paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||
//删除用例和用例评审人的关系
|
||||
deleteCaseReviewFunctionalCaseUser(paramMap);
|
||||
//将评审历史状态置为true
|
||||
extCaseReviewHistoryMapper.updateDelete(caseIdList,reviewId,true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -104,78 +112,98 @@ public class CaseReviewCaseProvider implements BaseCaseProvider {
|
||||
* 2.删除用例和用例评审人的关系
|
||||
*/
|
||||
private void updateCaseReviewByBatchDisassociate(Map<String, Object> paramMap) {
|
||||
String reviewId = paramMap.get(CaseEvent.Param.REVIEW_ID).toString();
|
||||
CaseReview caseReviewOld = caseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
Integer oldCaseCount = caseReviewOld.getCaseCount();
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
if (CollectionUtils.isEmpty(caseIdList)) {
|
||||
return;
|
||||
try {
|
||||
String reviewId = paramMap.get(CaseEvent.Param.REVIEW_ID).toString();
|
||||
CaseReview caseReviewOld = caseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
Integer oldCaseCount = caseReviewOld.getCaseCount();
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
if (CollectionUtils.isEmpty(caseIdList)) {
|
||||
return;
|
||||
}
|
||||
int passNumber = Integer.parseInt(paramMap.get(CaseEvent.Param.PASS_COUNT).toString());
|
||||
int unCompletedCount = Integer.parseInt(paramMap.get(CaseEvent.Param.UN_COMPLETED_COUNT).toString());
|
||||
updateCaseReview(reviewId, oldCaseCount - caseIdList.size(), passNumber, unCompletedCount, paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||
//删除用例和用例评审人的关系
|
||||
deleteCaseReviewFunctionalCaseUser(paramMap);
|
||||
//将评审历史状态置为true
|
||||
extCaseReviewHistoryMapper.updateDelete(caseIdList, reviewId, true);
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(CaseEvent.Event.BATCH_DISASSOCIATE + "事件更新失败", e.getMessage());
|
||||
}
|
||||
int passNumber = Integer.parseInt(paramMap.get(CaseEvent.Param.PASS_COUNT).toString());
|
||||
int unCompletedCount = Integer.parseInt(paramMap.get(CaseEvent.Param.UN_COMPLETED_COUNT).toString());
|
||||
updateCaseReview(reviewId, oldCaseCount - caseIdList.size(), passNumber, unCompletedCount, paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||
//删除用例和用例评审人的关系
|
||||
deleteCaseReviewFunctionalCaseUser(paramMap);
|
||||
//将评审历史状态置为true
|
||||
extCaseReviewHistoryMapper.updateDelete(caseIdList,reviewId,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.功能用例的删除/批量删除重新计算用例评审的通过率和用例数
|
||||
*/
|
||||
private void updateCaseReviewByDeleteFunctionalCase(Map<String, Object> paramMap) {
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
startUpdateCaseReview(paramMap, caseIdList);
|
||||
try {
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
startUpdateCaseReview(paramMap, caseIdList);
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(CaseEvent.Event.DELETE_FUNCTIONAL_CASE + "事件更新失败", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 5.功能用例的回收站删除/批量删除重新计算用例评审的通过率和用例数
|
||||
*/
|
||||
private void updateCaseReviewByDeleteTrashFunctionalCase(Map<String, Object> paramMap) {
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
if (startUpdateCaseReview(paramMap, caseIdList)) return;
|
||||
CaseReviewFunctionalCaseUserExample caseReviewFunctionalCaseUserExample = new CaseReviewFunctionalCaseUserExample();
|
||||
caseReviewFunctionalCaseUserExample.createCriteria().andCaseIdIn(caseIdList);
|
||||
caseReviewFunctionalCaseUserMapper.deleteByExample(caseReviewFunctionalCaseUserExample);
|
||||
//从回收站删除也删除关联关系
|
||||
CaseReviewFunctionalCaseExample caseReviewFunctionalCaseExample = new CaseReviewFunctionalCaseExample();
|
||||
caseReviewFunctionalCaseExample.createCriteria().andCaseIdIn(caseIdList);
|
||||
caseReviewFunctionalCaseMapper.deleteByExample(caseReviewFunctionalCaseExample);
|
||||
|
||||
try {
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
if (startUpdateCaseReview(paramMap, caseIdList)) return;
|
||||
CaseReviewFunctionalCaseUserExample caseReviewFunctionalCaseUserExample = new CaseReviewFunctionalCaseUserExample();
|
||||
caseReviewFunctionalCaseUserExample.createCriteria().andCaseIdIn(caseIdList);
|
||||
caseReviewFunctionalCaseUserMapper.deleteByExample(caseReviewFunctionalCaseUserExample);
|
||||
//从回收站删除也删除关联关系
|
||||
CaseReviewFunctionalCaseExample caseReviewFunctionalCaseExample = new CaseReviewFunctionalCaseExample();
|
||||
caseReviewFunctionalCaseExample.createCriteria().andCaseIdIn(caseIdList);
|
||||
caseReviewFunctionalCaseMapper.deleteByExample(caseReviewFunctionalCaseExample);
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(CaseEvent.Event.DELETE_TRASH_FUNCTIONAL_CASE + "事件更新失败", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 6.功能用例的回收站恢复/批量恢复重新计算用例评审的通过率和用例数
|
||||
*/
|
||||
private void updateCaseReviewByRecoverFunctionalCase(Map<String, Object> paramMap) {
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
CaseReviewFunctionalCaseExample functionalCaseExample = new CaseReviewFunctionalCaseExample();
|
||||
functionalCaseExample.createCriteria().andCaseIdIn(caseIdList);
|
||||
List<CaseReviewFunctionalCase> recoverCases = caseReviewFunctionalCaseMapper.selectByExample(functionalCaseExample);
|
||||
if (CollectionUtils.isEmpty(recoverCases)) {
|
||||
return;
|
||||
try {
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
CaseReviewFunctionalCaseExample functionalCaseExample = new CaseReviewFunctionalCaseExample();
|
||||
functionalCaseExample.createCriteria().andCaseIdIn(caseIdList);
|
||||
List<CaseReviewFunctionalCase> recoverCases = caseReviewFunctionalCaseMapper.selectByExample(functionalCaseExample);
|
||||
if (CollectionUtils.isEmpty(recoverCases)) {
|
||||
return;
|
||||
}
|
||||
List<String> reviewIds = recoverCases.stream().map(CaseReviewFunctionalCase::getReviewId).distinct().toList();
|
||||
Map<String, List<CaseReviewFunctionalCase>> recoverCaseMap = recoverCases.stream().collect(Collectors.groupingBy(CaseReviewFunctionalCase::getReviewId));
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListExcludes(reviewIds, caseIdList, false);
|
||||
Map<String, List<CaseReviewFunctionalCase>> reviewIdMap = caseReviewFunctionalCases.stream().collect(Collectors.groupingBy(CaseReviewFunctionalCase::getReviewId));
|
||||
CaseReviewExample caseReviewExample = new CaseReviewExample();
|
||||
caseReviewExample.createCriteria().andIdIn(reviewIds);
|
||||
List<CaseReview> caseReviews = caseReviewMapper.selectByExample(caseReviewExample);
|
||||
Map<String, CaseReview> reviewMap = caseReviews.stream().collect(Collectors.toMap(CaseReview::getId, t -> t));
|
||||
reviewMap.forEach((reviewId, caseReview) -> {
|
||||
List<CaseReviewFunctionalCase> recoverCaseList = recoverCaseMap.get(reviewId);
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCaseList = reviewIdMap.get(reviewId);
|
||||
if (CollectionUtils.isNotEmpty(caseReviewFunctionalCaseList)) {
|
||||
caseReviewFunctionalCaseList.addAll(recoverCaseList);
|
||||
} else {
|
||||
caseReviewFunctionalCaseList = recoverCaseList;
|
||||
}
|
||||
List<String> ids = caseReviewFunctionalCaseList.stream().map(CaseReviewFunctionalCase::getId).toList();
|
||||
List<CaseReviewFunctionalCase> unCompleteList = getUnCompletedCaseList(caseReviewFunctionalCaseList, ids);
|
||||
List<CaseReviewFunctionalCase> passList = caseReviewFunctionalCaseList.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getStatus(), FunctionalCaseReviewStatus.PASS.toString())).toList();
|
||||
updateCaseReview(reviewId, caseReview.getCaseCount() + caseReviewFunctionalCaseList.size(), passList.size(), unCompleteList.size(), paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||
});
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(CaseEvent.Event.RECOVER_FUNCTIONAL_CASE + "事件更新失败", e.getMessage());
|
||||
}
|
||||
List<String> reviewIds = recoverCases.stream().map(CaseReviewFunctionalCase::getReviewId).distinct().toList();
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListExcludes(reviewIds, caseIdList, false);
|
||||
Map<String, List<CaseReviewFunctionalCase>> recoverCaseMap = recoverCases.stream().collect(Collectors.groupingBy(CaseReviewFunctionalCase::getReviewId));
|
||||
Map<String, List<CaseReviewFunctionalCase>> reviewIdMap = caseReviewFunctionalCases.stream().collect(Collectors.groupingBy(CaseReviewFunctionalCase::getReviewId));
|
||||
CaseReviewExample caseReviewExample = new CaseReviewExample();
|
||||
caseReviewExample.createCriteria().andIdIn(reviewIds);
|
||||
List<CaseReview> caseReviews = caseReviewMapper.selectByExample(caseReviewExample);
|
||||
Map<String, CaseReview> reviewMap = caseReviews.stream().collect(Collectors.toMap(CaseReview::getId, t -> t));
|
||||
reviewIdMap.forEach((reviewId, caseReviewFunctionalCaseList) -> {
|
||||
CaseReview caseReview = reviewMap.get(reviewId);
|
||||
List<CaseReviewFunctionalCase> recoverCaseList = recoverCaseMap.get(reviewId);
|
||||
caseReviewFunctionalCaseList.addAll(recoverCaseList);
|
||||
List<String> ids = caseReviewFunctionalCaseList.stream().map(CaseReviewFunctionalCase::getId).toList();
|
||||
List<CaseReviewFunctionalCase> unCompleteList = getUnCompletedCaseList(caseReviewFunctionalCaseList, ids);
|
||||
List<CaseReviewFunctionalCase> passList = caseReviewFunctionalCaseList.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getStatus(), FunctionalCaseReviewStatus.PASS.toString())).toList();
|
||||
updateCaseReview(reviewId, caseReview.getCaseCount() + caseReviewFunctionalCaseList.size(), passList.size(), unCompleteList.size(), paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -183,45 +211,48 @@ public class CaseReviewCaseProvider implements BaseCaseProvider {
|
||||
* 7.评审用例/批量评审用例重新计算用例评审的通过率和用例评审状态和发送通知
|
||||
*/
|
||||
private void updateCaseReviewByReviewFunctionalCase(Map<String, Object> paramMap) {
|
||||
String reviewId = paramMap.get(CaseEvent.Param.REVIEW_ID).toString();
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListExcludes(List.of(reviewId), caseIdList, false);
|
||||
List<CaseReviewFunctionalCase> unCompletedCaseList = getUnCompletedCaseList(caseReviewFunctionalCases, new ArrayList<>());
|
||||
List<CaseReviewFunctionalCase> passList = caseReviewFunctionalCases.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getStatus(), FunctionalCaseReviewStatus.PASS.toString())).toList();
|
||||
try {
|
||||
String reviewId = paramMap.get(CaseEvent.Param.REVIEW_ID).toString();
|
||||
Object caseIds = paramMap.get(CaseEvent.Param.CASE_IDS);
|
||||
List<String> caseIdList = JSON.parseArray(JSON.toJSONString(caseIds), String.class);
|
||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListExcludes(List.of(reviewId), caseIdList, false);
|
||||
List<CaseReviewFunctionalCase> unCompletedCaseList = getUnCompletedCaseList(caseReviewFunctionalCases, new ArrayList<>());
|
||||
List<CaseReviewFunctionalCase> passList = caseReviewFunctionalCases.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getStatus(), FunctionalCaseReviewStatus.PASS.toString())).toList();
|
||||
|
||||
CaseReview caseReview = caseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
boolean completed = false;
|
||||
CaseReview caseReview = caseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
boolean completed = false;
|
||||
|
||||
String status = paramMap.get(CaseEvent.Param.STATUS).toString();
|
||||
List<String> completedStatusList = new ArrayList<>();
|
||||
completedStatusList.add(FunctionalCaseReviewStatus.PASS.toString());
|
||||
completedStatusList.add(FunctionalCaseReviewStatus.UN_PASS.toString());
|
||||
if (!completedStatusList.contains(status) || CollectionUtils.isNotEmpty(unCompletedCaseList)) {
|
||||
caseReview.setStatus(CaseReviewStatus.UNDERWAY.toString());
|
||||
} else {
|
||||
completed = true;
|
||||
caseReview.setStatus(CaseReviewStatus.COMPLETED.toString());
|
||||
}
|
||||
int passNumber = passList.size();
|
||||
if (StringUtils.equalsIgnoreCase(status, FunctionalCaseReviewStatus.PASS.toString())) {
|
||||
passNumber += caseIdList.size();
|
||||
}
|
||||
//通过率
|
||||
BigDecimal passCount = BigDecimal.valueOf(passNumber);
|
||||
BigDecimal totalCount = BigDecimal.valueOf(caseReview.getCaseCount());
|
||||
if (totalCount.compareTo(BigDecimal.ZERO) == 0) {
|
||||
caseReview.setPassRate(BigDecimal.ZERO);
|
||||
} else {
|
||||
BigDecimal passRate = passCount.divide(totalCount, 2, RoundingMode.HALF_UP);
|
||||
caseReview.setPassRate(passRate);
|
||||
}
|
||||
caseReviewMapper.updateByPrimaryKeySelective(caseReview);
|
||||
String status = paramMap.get(CaseEvent.Param.STATUS).toString();
|
||||
List<String> completedStatusList = new ArrayList<>();
|
||||
completedStatusList.add(FunctionalCaseReviewStatus.PASS.toString());
|
||||
completedStatusList.add(FunctionalCaseReviewStatus.UN_PASS.toString());
|
||||
if (!completedStatusList.contains(status) || CollectionUtils.isNotEmpty(unCompletedCaseList)) {
|
||||
caseReview.setStatus(CaseReviewStatus.UNDERWAY.toString());
|
||||
} else {
|
||||
completed = true;
|
||||
caseReview.setStatus(CaseReviewStatus.COMPLETED.toString());
|
||||
}
|
||||
int passNumber = passList.size();
|
||||
|
||||
if (completed) {
|
||||
reviewSendNoticeService.sendNotice(new ArrayList<>(), paramMap.get(CaseEvent.Param.USER_ID).toString(), reviewId, NoticeConstants.TaskType.CASE_REVIEW_TASK, NoticeConstants.Event.REVIEW_COMPLETED);
|
||||
}
|
||||
int pass = Integer.parseInt(paramMap.get(CaseEvent.Param.PASS_COUNT).toString());
|
||||
passNumber += pass;
|
||||
//通过率
|
||||
BigDecimal passCount = BigDecimal.valueOf(passNumber);
|
||||
BigDecimal totalCount = BigDecimal.valueOf(caseReview.getCaseCount());
|
||||
if (totalCount.compareTo(BigDecimal.ZERO) == 0) {
|
||||
caseReview.setPassRate(BigDecimal.ZERO);
|
||||
} else {
|
||||
BigDecimal passRate = passCount.divide(totalCount, 2, RoundingMode.HALF_UP);
|
||||
caseReview.setPassRate(passRate);
|
||||
}
|
||||
caseReviewMapper.updateByPrimaryKeySelective(caseReview);
|
||||
|
||||
if (completed) {
|
||||
reviewSendNoticeService.sendNotice(new ArrayList<>(), paramMap.get(CaseEvent.Param.USER_ID).toString(), reviewId, NoticeConstants.TaskType.CASE_REVIEW_TASK, NoticeConstants.Event.REVIEW_COMPLETED);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(CaseEvent.Event.REVIEW_FUNCTIONAL_CASE + "事件更新失败", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -149,10 +149,10 @@ public class CaseReviewFunctionalCaseService {
|
||||
List<CaseReviewFunctionalCase> unCompletedCaseList = caseReviewFunctionalCases.stream().filter(t -> !ids.contains(t.getId()) && statusList.contains(t.getStatus())).toList();
|
||||
List<String> list = caseReviewFunctionalCases.stream().filter(t -> ids.contains(t.getId())).map(CaseReviewFunctionalCase::getCaseId).toList();
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS, list.size());
|
||||
param.put(CaseEvent.Param.CASE_IDS, CollectionUtils.isNotEmpty(list) ? list : new ArrayList<>());
|
||||
param.put(CaseEvent.Param.REVIEW_ID, reviewId);
|
||||
param.put(CaseEvent.Param.PASS_COUNT, passList.size());
|
||||
param.put(CaseEvent.Param.UN_COMPLETED_COUNT, unCompletedCaseList.size());
|
||||
param.put(CaseEvent.Param.PASS_COUNT, CollectionUtils.isNotEmpty(passList) ? passList.size() : 0);
|
||||
param.put(CaseEvent.Param.UN_COMPLETED_COUNT, CollectionUtils.isNotEmpty(unCompletedCaseList) ? unCompletedCaseList.size() : 0);
|
||||
return param;
|
||||
}
|
||||
|
||||
@ -287,6 +287,7 @@ public class CaseReviewFunctionalCaseService {
|
||||
CaseReviewHistoryMapper caseReviewHistoryMapper = sqlSession.getMapper(CaseReviewHistoryMapper.class);
|
||||
CaseReviewFunctionalCaseMapper caseReviewFunctionalCaseMapper = sqlSession.getMapper(CaseReviewFunctionalCaseMapper.class);
|
||||
|
||||
int passCount = 0;
|
||||
for (CaseReviewFunctionalCase caseReviewFunctionalCase : caseReviewFunctionalCaseList) {
|
||||
String caseId = caseReviewFunctionalCase.getCaseId();
|
||||
CaseReviewHistory caseReviewHistory = buildCaseReviewHistory(request, userId, caseId);
|
||||
@ -300,6 +301,9 @@ public class CaseReviewFunctionalCaseService {
|
||||
}
|
||||
//根据评审规则更新用例评审和功能用例关系表中的状态 1.单人评审直接更新评审结果 2.多人评审需要计算
|
||||
setStatus(request, caseReviewFunctionalCase, caseHistoryMap, reviewerMap);
|
||||
if (StringUtils.equalsIgnoreCase(caseReviewFunctionalCase.getStatus(), FunctionalCaseReviewStatus.PASS.toString())) {
|
||||
passCount += 1;
|
||||
}
|
||||
caseReviewFunctionalCaseMapper.updateByPrimaryKeySelective(caseReviewFunctionalCase);
|
||||
|
||||
//检查是否有@,发送@通知
|
||||
@ -319,7 +323,8 @@ public class CaseReviewFunctionalCaseService {
|
||||
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
|
||||
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS, caseIds);
|
||||
param.put(CaseEvent.Param.CASE_IDS, CollectionUtils.isNotEmpty(caseIds) ? caseIds : new ArrayList<>());
|
||||
param.put(CaseEvent.Param.PASS_COUNT, passCount);
|
||||
param.put(CaseEvent.Param.REVIEW_ID, reviewId);
|
||||
param.put(CaseEvent.Param.STATUS, request.getStatus());
|
||||
param.put(CaseEvent.Param.USER_ID, userId);
|
||||
|
@ -470,7 +470,7 @@ public class CaseReviewService {
|
||||
param.put(CaseEvent.Param.USER_ID, userId);
|
||||
param.put(CaseEvent.Param.REVIEW_ID, caseReviewId);
|
||||
param.put(CaseEvent.Param.CASE_IDS, castIds);
|
||||
param.put(CaseEvent.Param.CASE_COUNT, caseRealIds.size());
|
||||
param.put(CaseEvent.Param.CASE_COUNT, CollectionUtils.isNotEmpty(caseRealIds) ? caseRealIds.size() : 0);
|
||||
param.put(CaseEvent.Param.EVENT_NAME, CaseEvent.Event.ASSOCIATE);
|
||||
provider.updateCaseReview(param);
|
||||
}
|
||||
|
@ -398,10 +398,10 @@ public class FunctionalCaseService {
|
||||
functionalCaseExample.createCriteria().andRefIdIn(refId);
|
||||
List<FunctionalCase> functionalCases = functionalCaseMapper.selectByExample(functionalCaseExample);
|
||||
List<String> caseIds = functionalCases.stream().map(FunctionalCase::getId).toList();
|
||||
param.put(CaseEvent.Param.CASE_IDS, caseIds);
|
||||
param.put(CaseEvent.Param.CASE_IDS, CollectionUtils.isNotEmpty(caseIds) ? caseIds : new ArrayList<>());
|
||||
extFunctionalCaseMapper.batchDelete(refId, userId);
|
||||
} else {
|
||||
param.put(CaseEvent.Param.CASE_IDS, ids);
|
||||
param.put(CaseEvent.Param.CASE_IDS, CollectionUtils.isNotEmpty(ids) ? ids : new ArrayList<>());
|
||||
doDelete(ids, userId);
|
||||
}
|
||||
param.put(CaseEvent.Param.USER_ID, userId);
|
||||
|
@ -57,14 +57,16 @@ public class FunctionalCaseTrashService {
|
||||
throw new MSException(Translator.get("case_comment.case_is_null"));
|
||||
}
|
||||
List<String> ids = getIdsByRefId(functionalCase.getRefId());
|
||||
//检查自定义字段是否还存在,不存在,删除关联关系(与恢复流程没关系可异步执行)
|
||||
delCustomFields(ids);
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS,ids);
|
||||
param.put(CaseEvent.Param.USER_ID,userId);
|
||||
param.put(CaseEvent.Param.EVENT_NAME,CaseEvent.Event.RECOVER_FUNCTIONAL_CASE);
|
||||
provider.updateCaseReview(param);
|
||||
extFunctionalCaseMapper.recoverCase(ids,userId,System.currentTimeMillis());
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
//检查自定义字段是否还存在,不存在,删除关联关系(与恢复流程没关系可异步执行)
|
||||
delCustomFields(ids);
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS,ids);
|
||||
param.put(CaseEvent.Param.USER_ID,userId);
|
||||
param.put(CaseEvent.Param.EVENT_NAME,CaseEvent.Event.RECOVER_FUNCTIONAL_CASE);
|
||||
provider.updateCaseReview(param);
|
||||
extFunctionalCaseMapper.recoverCase(ids,userId,System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -104,7 +106,7 @@ public class FunctionalCaseTrashService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 从回收站彻底用例
|
||||
* 从回收站彻底删除用例
|
||||
* @param id 用例ID
|
||||
*/
|
||||
public void deleteCase(String id, String userId) {
|
||||
@ -113,12 +115,14 @@ public class FunctionalCaseTrashService {
|
||||
return;
|
||||
}
|
||||
List<String> ids = getIdsByRefId(functionalCase.getRefId());
|
||||
deleteFunctionalCaseService.deleteFunctionalCaseResource(ids, functionalCase.getProjectId());
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS,ids);
|
||||
param.put(CaseEvent.Param.USER_ID,userId);
|
||||
param.put(CaseEvent.Param.EVENT_NAME,CaseEvent.Event.DELETE_TRASH_FUNCTIONAL_CASE);
|
||||
provider.updateCaseReview(param);
|
||||
if (CollectionUtils.isNotEmpty(ids)){
|
||||
deleteFunctionalCaseService.deleteFunctionalCaseResource(ids, functionalCase.getProjectId());
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS,ids);
|
||||
param.put(CaseEvent.Param.USER_ID,userId);
|
||||
param.put(CaseEvent.Param.EVENT_NAME,CaseEvent.Event.DELETE_TRASH_FUNCTIONAL_CASE);
|
||||
provider.updateCaseReview(param);
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getIdsByRefId(String refId) {
|
||||
@ -138,7 +142,7 @@ public class FunctionalCaseTrashService {
|
||||
if (request.isSelectAll()) {
|
||||
//回收站全部恢复
|
||||
List<String> ids = getIds(request);
|
||||
if (ids == null) return;
|
||||
if (CollectionUtils.isEmpty(ids)) return;
|
||||
refIds = extFunctionalCaseMapper.getRefIds(ids, true);
|
||||
} else {
|
||||
if (CollectionUtils.isEmpty(request.getSelectIds())) {
|
||||
@ -155,7 +159,7 @@ public class FunctionalCaseTrashService {
|
||||
List<FunctionalCase> functionalCases = functionalCaseMapper.selectByExample(functionalCaseExample);
|
||||
List<String> ids = functionalCases.stream().map(FunctionalCase::getId).toList();
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS,ids);
|
||||
param.put(CaseEvent.Param.CASE_IDS,CollectionUtils.isNotEmpty(ids) ? ids : new ArrayList<>());
|
||||
param.put(CaseEvent.Param.USER_ID,userId);
|
||||
param.put(CaseEvent.Param.EVENT_NAME,CaseEvent.Event.RECOVER_FUNCTIONAL_CASE);
|
||||
provider.updateCaseReview(param);
|
||||
@ -193,7 +197,7 @@ public class FunctionalCaseTrashService {
|
||||
if (request.isSelectAll()) {
|
||||
//判断是否全部删除
|
||||
List<String> ids = getIds(request);
|
||||
if (ids == null) return;
|
||||
if (CollectionUtils.isEmpty(ids)) return;
|
||||
if (request.getDeleteAll()) {
|
||||
//回收站全部版本全都删除
|
||||
refIds = extFunctionalCaseMapper.getRefIds(ids, true);
|
||||
@ -237,7 +241,7 @@ public class FunctionalCaseTrashService {
|
||||
List<String> deleteIds = functionalCases.stream().map(FunctionalCase::getId).toList();
|
||||
deleteFunctionalCaseService.deleteFunctionalCaseResource(deleteIds, request.getProjectId());
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS,deleteIds);
|
||||
param.put(CaseEvent.Param.CASE_IDS,CollectionUtils.isNotEmpty(deleteIds) ? deleteIds : new ArrayList<>());
|
||||
param.put(CaseEvent.Param.USER_ID,userId);
|
||||
param.put(CaseEvent.Param.EVENT_NAME,CaseEvent.Event.DELETE_TRASH_FUNCTIONAL_CASE);
|
||||
provider.updateCaseReview(param);
|
||||
|
@ -68,6 +68,10 @@ public class ReviewFunctionalCaseService {
|
||||
String functionalCaseStatus = getFunctionalCaseStatus(request, hasReviewedUserMap);
|
||||
extCaseReviewFunctionalCaseMapper.updateStatus(caseId, reviewId, functionalCaseStatus);
|
||||
caseReviewHistoryMapper.insert(caseReviewHistory);
|
||||
int passCount = 0;
|
||||
if (StringUtils.equalsIgnoreCase(FunctionalCaseReviewStatus.PASS.toString(),functionalCaseStatus)) {
|
||||
passCount=1;
|
||||
}
|
||||
|
||||
//检查是否有@,发送@通知
|
||||
if (StringUtils.isNotBlank(request.getNotifier())) {
|
||||
@ -83,6 +87,7 @@ public class ReviewFunctionalCaseService {
|
||||
}
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put(CaseEvent.Param.CASE_IDS, List.of(caseId));
|
||||
param.put(CaseEvent.Param.PASS_COUNT,passCount);
|
||||
param.put(CaseEvent.Param.REVIEW_ID, reviewId);
|
||||
param.put(CaseEvent.Param.STATUS, request.getStatus());
|
||||
param.put(CaseEvent.Param.USER_ID, userId);
|
||||
|
@ -66,12 +66,24 @@ VALUES ('Trash_TEST_FUNCTIONAL_CASE_ID_g', 8, 'Trash_TEST_MOUDLE_ID_1', 'project
|
||||
INSERT INTO functional_case(id, num, module_id, project_id, template_id, name, review_status, tags, case_edit_type, pos, version_id, ref_id, last_execute_result, deleted, public_case, latest, create_user, update_user, delete_user, create_time, update_time, delete_time)
|
||||
VALUES ('Trash_TEST_FUNCTIONAL_CASE_ID_GYQ', 100, 'Trash_TEST_MOUDLE_ID', 'project-case-trash-test', '100001', '回收站测信', 'UN_REVIEWED', NULL, 'STEP', 0, 'v1.0.0', 'Trash_TEST_FUNCTIONAL_CASE_ID_GYQ', 'UN_EXECUTED', true, b'0', b'0', 'gyq', 'gyq', '', 1698058347559, 1698058347559, NULL);
|
||||
|
||||
INSERT INTO functional_case(id, num, module_id, project_id, template_id, name, review_status, tags, case_edit_type, pos, version_id, ref_id, last_execute_result, deleted, public_case, latest, create_user, update_user, delete_user, create_time, update_time, delete_time)
|
||||
VALUES ('unTrash_TEST_FUNCTIONAL_CASE_ID', 100, 'Trash_TEST_MOUDLE_ID', 'project-case-trash-test', '100001', '回收站测信', 'UN_REVIEWED', NULL, 'STEP', 0, 'v1.0.0', 'unTrash_TEST_FUNCTIONAL_CASE_ID', 'UN_EXECUTED', false, b'0', b'0', 'gyq', 'gyq', '', 1698058347559, 1698058347559, NULL);
|
||||
|
||||
INSERT INTO case_review_functional_case(id, review_id, case_id, status, create_time, create_user, update_time, pos)
|
||||
VALUES ('Gyq_Review_Case_Id','Gyq_review_id', 'Trash_TEST_FUNCTIONAL_CASE_ID', 'PASS', 1698058347559, 'admin',1698058347559, 0);
|
||||
|
||||
INSERT INTO case_review_functional_case(id, review_id, case_id, status, create_time, create_user, update_time, pos)
|
||||
VALUES ('Gyq_Review_Case_Id2','Gyq_review_id1', 'Trash_TEST_FUNCTIONAL_CASE_ID_1', 'PASS', 1698058347559, 'admin',1698058347559, 0);
|
||||
|
||||
INSERT INTO case_review_functional_case(id, review_id, case_id, status, create_time, create_user, update_time, pos)
|
||||
VALUES ('Gyq_Review_Case_Id3','Gyq_review_id1', 'unTrash_TEST_FUNCTIONAL_CASE_ID', 'PASS', 1698058347559, 'admin',1698058347559, 0);
|
||||
|
||||
INSERT INTO case_review(id, num, name, module_id, project_id, status, review_pass_rule, pos, start_time, end_time, case_count, pass_rate, tags, description, create_time, create_user, update_time, update_user)
|
||||
VALUES ('Gyq_review_id', 10001, '用例评审1', 'Trash_TEST_MOUDLE_ID_1', 'project-case-trash-test', 'COMPLETE' , 'SINGLE', 0, 1698058347559, 1698058347559, 1, 100.00, null, null, 1698058347559, 'admin', 1698058347559, 'admin');
|
||||
|
||||
INSERT INTO case_review(id, num, name, module_id, project_id, status, review_pass_rule, pos, start_time, end_time, case_count, pass_rate, tags, description, create_time, create_user, update_time, update_user)
|
||||
VALUES ('Gyq_review_id1', 10001, '用例评审2', 'Trash_TEST_MOUDLE_ID_1', 'project-case-trash-test', 'COMPLETE' , 'SINGLE', 0, 1698058347559, 1698058347559, 1, 100.00, null, null, 1698058347559, 'admin', 1698058347559, 'admin');
|
||||
|
||||
INSERT INTO functional_case_custom_field(case_id, field_id, value) VALUES ('Trash_TEST_FUNCTIONAL_CASE_ID', 'gyq_custom_id1', '22');
|
||||
INSERT INTO functional_case_custom_field(case_id, field_id, value) VALUES ('Trash_TEST_FUNCTIONAL_CASE_ID', 'gyq_custom_id2', '33');
|
||||
|
||||
|
@ -78,15 +78,16 @@ public class CreateRobotResourceService implements CreateProjectResourceService
|
||||
|
||||
public void setMessageTask(String projectId, String defaultRobotId) {
|
||||
StringBuilder jsonStr = new StringBuilder();
|
||||
InputStream inputStream = getClass().getResourceAsStream("/message_task.json");
|
||||
assert inputStream != null;
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
try {
|
||||
InputStream inputStream = getClass().getResourceAsStream("/message_task.json");
|
||||
assert inputStream != null;
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
jsonStr.append(line);
|
||||
}
|
||||
reader.close();
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -320,13 +320,20 @@ public class NoticeMessageTaskService {
|
||||
checkProjectExist(projectId);
|
||||
//获取返回数据结构
|
||||
StringBuilder jsonStr = new StringBuilder();
|
||||
InputStream inputStream = getClass().getResourceAsStream("/message_task.json");
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
jsonStr.append(line);
|
||||
try{
|
||||
InputStream inputStream = getClass().getResourceAsStream("/message_task.json");
|
||||
assert inputStream != null;
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
jsonStr.append(line);
|
||||
}
|
||||
reader.close();
|
||||
inputStream.close();
|
||||
} catch (IOException e){
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
reader.close();
|
||||
|
||||
List<MessageTaskDTO> messageTaskDTOList = JSON.parseArray(jsonStr.toString(), MessageTaskDTO.class);
|
||||
//查询数据
|
||||
MessageTaskExample messageTaskExample = new MessageTaskExample();
|
||||
|
@ -595,18 +595,19 @@ public class NoticeMessageTaskControllerTests extends BaseTest {
|
||||
|
||||
public void setMessageTask(String projectId, String defaultRobotId) {
|
||||
StringBuilder jsonStr = new StringBuilder();
|
||||
InputStream inputStream = getClass().getResourceAsStream("/message_task.json");
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
|
||||
try {
|
||||
InputStream inputStream = getClass().getResourceAsStream("/message_task.json");
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
jsonStr.append(line);
|
||||
}
|
||||
reader.close();
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||
MessageTaskMapper mapper = sqlSession.getMapper(MessageTaskMapper.class);
|
||||
MessageTaskBlobMapper blobMapper = sqlSession.getMapper(MessageTaskBlobMapper.class);
|
||||
|
@ -516,18 +516,18 @@ public class ProjectRobotControllerTests extends BaseTest {
|
||||
|
||||
public void setMessageTask(String projectId, String defaultRobotId) throws Exception {
|
||||
StringBuilder jsonStr = new StringBuilder();
|
||||
InputStream inputStream = getClass().getResourceAsStream("/message_task.json");
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
try {
|
||||
InputStream inputStream = getClass().getResourceAsStream("/message_task.json");
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
jsonStr.append(line);
|
||||
}
|
||||
reader.close();
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||
MessageTaskMapper mapper = sqlSession.getMapper(MessageTaskMapper.class);
|
||||
MessageTaskBlobMapper blobMapper = sqlSession.getMapper(MessageTaskBlobMapper.class);
|
||||
|
@ -41,6 +41,9 @@ INSERT INTO project_robot(id, project_id, name, platform, webhook, type, app_key
|
||||
('test_message_robot4', 'project-message-test-3', '测试机器人1', 'IN_SITE', 'NONE', null, null, null, true, 'admin', unix_timestamp() * 1000,'admin', unix_timestamp() * 1000, null),
|
||||
('test_message_robot5', 'project-message-test', '测试机器人6', 'IN_SITE', 'NONE', null, null, null, true, 'admin', unix_timestamp() * 1000,'admin', unix_timestamp() * 1000, null);
|
||||
|
||||
INSERT INTO custom_field(id, name, scene, `type`, remark, internal, scope_type, create_time, update_time, create_user, scope_id)
|
||||
VALUES('gyq_custom_id_message1', 'gyq_functional_priority', 'FUNCTIONAL', 'SELECT', '', 1, 'ORGANIZATION', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000, 'admin', 'project-message-test');
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user