|
|
|
@ -40,7 +40,7 @@ public class CallbackController {
|
|
|
|
|
public String evaluation(@RequestParam Map<String, Object> params) {
|
|
|
|
|
log.info("回调请求参数:{}", params);
|
|
|
|
|
|
|
|
|
|
if (params == null) {
|
|
|
|
|
if (params == null || params.get("jsonTestDetails") == null) {
|
|
|
|
|
return RESULT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -53,10 +53,8 @@ public class CallbackController {
|
|
|
|
|
|
|
|
|
|
long incr;
|
|
|
|
|
String incrKey = String.format("evaluationResult:%s", tpiID);
|
|
|
|
|
boolean flag = (incr = redisUtil.increment(incrKey)) > 3;
|
|
|
|
|
log.info("evaluationResult, tpiID:{},第{}次评测失败", tpiID, incr);
|
|
|
|
|
if (matchOutPut(decodeOutPut) && flag) {
|
|
|
|
|
log.info("tpiID:{},需要发送钉钉通知", tpiID);
|
|
|
|
|
if (matchOutPut(decodeOutPut) && (incr = redisUtil.increment(incrKey)) > 3) {
|
|
|
|
|
log.info("evaluationResult, tpiID:{},第{}次评测失败,需要发送钉钉通知", tpiID, incr);
|
|
|
|
|
// 钉钉通知
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
sb.append("【自动化评测】tpiID:").append(tpiID).append(" 错误:消息").append(decodeOutPut);
|
|
|
|
@ -65,7 +63,9 @@ public class CallbackController {
|
|
|
|
|
|
|
|
|
|
// 通知之后清空
|
|
|
|
|
redisUtil.remove(incrKey);
|
|
|
|
|
return RESULT;
|
|
|
|
|
}
|
|
|
|
|
log.info("tpiID:{},评测通过", tpiID);
|
|
|
|
|
|
|
|
|
|
return RESULT;
|
|
|
|
|
}
|
|
|
|
|