| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.sql.Time; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalTime; |
| | |
| | | Pattern pattern2 = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex2()); |
| | | matcher2 = pattern2.matcher(returnQues.getContent()); |
| | | } |
| | | log.info("++++++++++++++++++++++++++通用库是否为空:selfRegex : {} , selfRegex2 : {}", ivrLibaExtemplatescript.getSelfRegex(), ivrLibaExtemplatescript.getSelfRegex2()); |
| | | log.error("++++++++++++++++++++++++++通用库是否为空:selfRegex : {} , selfRegex2 : {}", ivrLibaExtemplatescript.getSelfRegex(), ivrLibaExtemplatescript.getSelfRegex2()); |
| | | if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) { |
| | | QuestionMessage questionMessage = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues"); |
| | | IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = returnQues.getNowQuestion(); |
| | |
| | | Object obj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | Double score = (obj == null ? new Double(0.00) : new Double(((Double) obj).doubleValue())); |
| | | score = BigDecimal.valueOf(score).add(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getScore()).doubleValue(); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score,120,TimeUnit.MINUTES); |
| | | } |
| | | |
| | | for (IvrTaskTemplateScript script : ivrTaskTemplateScripts) { |
| | |
| | | double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | score = BigDecimal.valueOf(score).add(script.getScore()).doubleValue(); |
| | | |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score,120, TimeUnit.MINUTES); |
| | | } |
| | | } |
| | | } |
| | |
| | | //更新一下分数 |
| | | double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | score = BigDecimal.valueOf(score).add(ivrTaskTemplateScriptVO.getScore()).doubleValue(); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score,120, TimeUnit.MINUTES); |
| | | |
| | | // return phoneCallBackYQVO; |
| | | } |