| | |
| | | redisCache.setCacheObject(userId + "noVoice", noVoice2, 120, TimeUnit.MINUTES); |
| | | } |
| | | } else { |
| | | //对回答的问题,进行正则匹配(这里只针对选择题,其它题型不行)x |
| | | for (int j = 0; j < ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size(); j++) { |
| | | //包含 |
| | | Matcher matcher = null; |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex())) { |
| | | Pattern pattern = Pattern.compile(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()); |
| | | matcher = pattern.matcher(questionMessage.getContent()); |
| | | } |
| | | //不包含 |
| | | Matcher matcher2 = null; |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2())) { |
| | | Pattern pattern2 = Pattern.compile(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()); |
| | | matcher2 = pattern2.matcher(questionMessage.getContent()); |
| | | } |
| | | log.info("==============================Targetregex的值为:{}, Targetregex2的值为:{}", ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()); |
| | | //通过valueType判断是什么题型(值类型(1 选项 2 文本 3 数值)) |
| | | if (ivrLibaTemplateScriptVO.getValueType() == 2 || ivrLibaTemplateScriptVO.getValueType() == 3) { |
| | | ivrLibaTemplateScriptVO.setQuestionResult(questionMessage.getContent()); |
| | | |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | //说明匹配正确了 |
| | | ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true); |
| | | List<IvrLibaTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset"); |
| | | //匹配完成后,将结果保存到新的数组 |
| | | backQuset.add(ivrLibaTemplateScriptVO); |
| | | redisCache.setCacheObject(userId + "backQuset", backQuset, 120, TimeUnit.MINUTES); |
| | | //将静默置为0 |
| | | redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | //获取下一题 |
| | | Integer nextQuestion = ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion(); |
| | | if (nextQuestion > ivrLibaTemplateScriptVOList.size()) { |
| | | //如果下一题没有了,就结束了 |
| | | QuestionMessage returnQues = new QuestionMessage(); |
| | | List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset"); |
| | | returnQues.setContent(JSON.toJSONString(backQusetRedis)); |
| | | returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter()); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES); |
| | | } else { |
| | | for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) { |
| | | if (script.getTargetid() == nextQuestion) { |
| | | QuestionMessage returnQues = new QuestionMessage(); |
| | | returnQues.setNowQuestion(script); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | break; |
| | | } |
| | | List<IvrLibaTemplateScriptVO> backQusetList = redisCache.getCacheObject(userId + "backQuset"); |
| | | //匹配完成后,将结果保存到新的数组 |
| | | backQusetList.add(ivrLibaTemplateScriptVO); |
| | | redisCache.setCacheObject(userId + "backQuset", backQusetList, 120, TimeUnit.MINUTES); |
| | | //将静默置为0 |
| | | redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | //获取下一题 |
| | | Integer nextQuestion = ivrLibaTemplateScriptVO.getTargetid() + 1; |
| | | if (nextQuestion > ivrLibaTemplateScriptVOList.size()) { |
| | | //如果下一题没有了,就结束了 |
| | | QuestionMessage returnQues = new QuestionMessage(); |
| | | List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset"); |
| | | returnQues.setContent(JSON.toJSONString(backQusetRedis)); |
| | | returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter()); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES); |
| | | } else { |
| | | for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) { |
| | | if (script.getTargetid() == nextQuestion) { |
| | | QuestionMessage returnQues = new QuestionMessage(); |
| | | returnQues.setNowQuestion(script); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | } |
| | | } |
| | | break; |
| | | } else { |
| | | //没有匹配到 |
| | | Integer mateNum = redisCache.getCacheObject(userId + "mateNum"); |
| | | } |
| | | |
| | | //无匹配次数去判断是否到最大询问次数,并且所有的选项都匹配完了 |
| | | if (mateNum == ivrLibaTemplateVO1.getMateNum().intValue() && j == ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size() - 1) { |
| | | //问了最大询问次数后,还是没有匹配上,将结果保存到新的数组 |
| | | } else if (ivrLibaTemplateScriptVO.getValueType() == 1) { |
| | | |
| | | //对回答的问题,进行正则匹配(这里只针对选择题,其它题型不行)x |
| | | for (int j = 0; j < ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size(); j++) { |
| | | //包含 |
| | | Matcher matcher = null; |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex())) { |
| | | Pattern pattern = Pattern.compile(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()); |
| | | matcher = pattern.matcher(questionMessage.getContent()); |
| | | } |
| | | //不包含 |
| | | Matcher matcher2 = null; |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2())) { |
| | | Pattern pattern2 = Pattern.compile(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()); |
| | | matcher2 = pattern2.matcher(questionMessage.getContent()); |
| | | } |
| | | log.info("==============================Targetregex的值为:{}, Targetregex2的值为:{}", ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()); |
| | | |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | //说明匹配正确了 |
| | | ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true); |
| | | List<IvrLibaTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset"); |
| | | //匹配完成后,将结果保存到新的数组 |
| | | backQuset.add(ivrLibaTemplateScriptVO); |
| | | redisCache.setCacheObject(userId + "backQuset", backQuset, 120, TimeUnit.MINUTES); |
| | | |
| | | //如果下一题为空.则新的数据返回,并加上感谢语 |
| | | if (ivrLibaTemplateScriptVO.getTargetid() < ivrLibaTemplateScriptVOList.size()) { |
| | | QuestionMessage returnQues = getNextQuestion(ivrLibaTemplateScriptVOList, ivrLibaTemplateScriptVO); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(userId + "mateNum", 0, 120, TimeUnit.MINUTES); |
| | | } else { |
| | | QuestionMessage returnQues2 = new QuestionMessage(); |
| | | // returnQues2.setCode(null); |
| | | //将静默置为0 |
| | | redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | //获取下一题 |
| | | Integer nextQuestion = ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion(); |
| | | if (nextQuestion > ivrLibaTemplateScriptVOList.size()) { |
| | | //如果下一题没有了,就结束了 |
| | | QuestionMessage returnQues = new QuestionMessage(); |
| | | List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset"); |
| | | returnQues2.setQuestionList(backQusetRedis); |
| | | returnQues2.setJsy("感谢您的耐心回答,再见"); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues2, 120, TimeUnit.MINUTES); |
| | | returnQues.setContent(JSON.toJSONString(backQusetRedis)); |
| | | returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter()); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES); |
| | | break; |
| | | } else { |
| | | for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) { |
| | | if (script.getTargetid() == nextQuestion) { |
| | | QuestionMessage returnQues = new QuestionMessage(); |
| | | returnQues.setNowQuestion(script); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else if (mateNum < ivrLibaTemplateVO1.getMateNum().intValue() && j == ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size() - 1) { |
| | | //没有问到规定次数 |
| | | mateNum = mateNum + 1; |
| | | redisCache.setCacheObject(userId + "mateNum", mateNum, 120, TimeUnit.MINUTES); |
| | | break; |
| | | } else { |
| | | //没有匹配到 |
| | | Integer mateNum = redisCache.getCacheObject(userId + "mateNum"); |
| | | |
| | | //无匹配次数去判断是否到最大询问次数,并且所有的选项都匹配完了 |
| | | if (mateNum == ivrLibaTemplateVO1.getMateNum().intValue() && j == ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size() - 1) { |
| | | //问了最大询问次数后,还是没有匹配上,将结果保存到新的数组 |
| | | List<IvrLibaTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset"); |
| | | backQuset.add(ivrLibaTemplateScriptVO); |
| | | redisCache.setCacheObject(userId + "backQuset", backQuset, 120, TimeUnit.MINUTES); |
| | | |
| | | //如果下一题为空.则新的数据返回,并加上感谢语 |
| | | if (ivrLibaTemplateScriptVO.getTargetid() < ivrLibaTemplateScriptVOList.size()) { |
| | | QuestionMessage returnQues = getNextQuestion(ivrLibaTemplateScriptVOList, ivrLibaTemplateScriptVO); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(userId + "mateNum", 0, 120, TimeUnit.MINUTES); |
| | | } else { |
| | | QuestionMessage returnQues2 = new QuestionMessage(); |
| | | // returnQues2.setCode(null); |
| | | List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset"); |
| | | returnQues2.setQuestionList(backQusetRedis); |
| | | returnQues2.setJsy("感谢您的耐心回答,再见"); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues2, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES); |
| | | break; |
| | | } |
| | | } else if (mateNum < ivrLibaTemplateVO1.getMateNum().intValue() && j == ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().size() - 1) { |
| | | //没有问到规定次数 |
| | | mateNum = mateNum + 1; |
| | | redisCache.setCacheObject(userId + "mateNum", mateNum, 120, TimeUnit.MINUTES); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | QuestionMessage returnQues = redisCache.getCacheObject(userId + "returnQues"); |
| | | List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset"); |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | |
| | | PageUtils.startPageByPost(ivrTask.getPageNum(), ivrTask.getPageSize()); |
| | | List<IvrTask> list = ivrTaskService.selectIvrTaskList(ivrTask); |
| | | List<IvrTaskVO> ivrTaskVOS = DtoConversionUtils.sourceToTarget(list, IvrTaskVO.class); |
| | | |
| | | //设置分页 |
| | | TableDataInfo rspData = new TableDataInfo(); |
| | | rspData.setCode(HttpStatus.SUCCESS); |
| | | rspData.setMsg("查询成功"); |
| | | rspData.setRows(null); |
| | | rspData.setTotal(0); |
| | | |
| | | if (CollectionUtils.isNotEmpty(ivrTaskVOS)) { |
| | | for (IvrTaskVO ivrTaskVO : ivrTaskVOS) { |
| | | IvrTaskSingle ivrTaskcall = new IvrTaskSingle(); |
| | |
| | | ivrTaskVO.setWfs(wfs); |
| | | } |
| | | } |
| | | |
| | | //用于分页 |
| | | ivrTask.setPageNum(null); |
| | | ivrTask.setPageSize(null); |
| | | List<IvrTask> ivrTasks = ivrTaskService.selectIvrTaskList(ivrTask); |
| | | rspData.setCode(HttpStatus.SUCCESS); |
| | | rspData.setMsg("查询成功"); |
| | | rspData.setRows(ivrTaskVOS); |
| | | rspData.setTotal(new PageInfo(ivrTasks).getTotal()); |
| | | } |
| | | return getDataTable(ivrTaskVOS); |
| | | |
| | | return rspData; |
| | | } |
| | | |
| | | /** |
| | |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import java.io.*; |
| | | import java.nio.charset.Charset; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | |
| | | if (inputStream == null) { |
| | | throw new HttpRequestException(RESPONSE_NULL_ERROR_CODE, "响应为null"); |
| | | } |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("GB2312"))); |
| | | StringBuffer stringBuffer = new StringBuffer(); |
| | | String str = ""; |
| | | while ((str = reader.readLine()) != null) { |
| | |
| | | RESPBODY respBody = JSON.parseObject(respStr, respBodyClass); |
| | | rep = new HttpEntity<RESPBODY>(respHeaders, respBody); |
| | | } else { |
| | | rep = new HttpEntity<RESPBODY>(respHeaders, (RESPBODY) respStr); |
| | | rep = new HttpEntity<RESPBODY>(respHeaders, (RESPBODY) new String(respStr.getBytes("ISO8859-1"), StandardCharsets.UTF_8)); |
| | | } |
| | | } |
| | | return rep; |
| | |
| | | map.put("dnis", dnis); |
| | | map.put("call_uuid", call_uuid); |
| | | map.put("force_call", force_call); |
| | | map.put("fs_node_id", 8021); |
| | | if (force_call == null) map.put("force_call", true); |
| | | return sendReq(map, "/tel/ai_api/outbound"); |
| | | } |
| | |
| | | */ |
| | | @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值") |
| | | @ApiModelProperty(value = "值类型(1 选项 2 文本 3 数值)") |
| | | private Long isEnable; |
| | | private Long valueType; |
| | | |
| | | /** |
| | | * 删除标记 |
| | |
| | | @Excel(name = "是否必填(给人工用的,AI不用遵守)") |
| | | @ApiModelProperty(value = "是否必填(给人工用的,AI不用遵守)") |
| | | private String isMust; |
| | | |
| | | /** |
| | | * 问题结果(给“值类型”是文本或者数值用的) |
| | | */ |
| | | @Excel(name = "问题结果(给“值类型”是文本或者数值用的)") |
| | | @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)") |
| | | private String questionResult; |
| | | } |
| | |
| | | */ |
| | | @Excel(name = "值类型", readConverterExp = "1=,选=项,2=,文=本,3=,数=值") |
| | | @ApiModelProperty(value = "值类型(1 选项 2 文本 3 数值)") |
| | | private Long isEnable; |
| | | private Long valueType; |
| | | |
| | | /** |
| | | * 删除标记 |
| | |
| | | private String isMust; |
| | | |
| | | /** |
| | | * 问题结果(给“值类型”是文本或者数值用的) |
| | | */ |
| | | @Excel(name = "问题结果(给“值类型”是文本或者数值用的)") |
| | | @ApiModelProperty(value = "问题结果(给“值类型”是文本或者数值用的)") |
| | | private String questionResult; |
| | | |
| | | /** |
| | | * 话术选项 |
| | | */ |
| | | @ApiModelProperty(value = "话术选项") |
| | |
| | | */ |
| | | @Excel(name = "任务名称 ") |
| | | @ApiModelProperty(value = "任务名称") |
| | | private String taskname; |
| | | private String taskName; |
| | | |
| | | /** |
| | | * 模板ID |
| | |
| | | private Long isupload; |
| | | |
| | | /** |
| | | * 患者ID |
| | | */ |
| | | @Excel(name = "患者ID") |
| | | @ApiModelProperty(value = "患者ID") |
| | | private String patientid; |
| | | |
| | | /** |
| | | * 患者姓名 |
| | | */ |
| | | @Excel(name = "患者姓名") |
| | | @ApiModelProperty(value = "患者姓名") |
| | | private String patientname; |
| | | |
| | | /** |
| | | * 上传时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | |
| | | <result property="targetOptions" column="targetOptions"/> |
| | | <result property="language" column="language"/> |
| | | <result property="playWavOnly" column="playWavOnly"/> |
| | | <result property="isEnable" column="isEnable"/> |
| | | <result property="valueType" column="value_type"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | |
| | | <result property="nextQuestion" column="next_question"/> |
| | | <result property="otherdata" column="otherdata"/> |
| | | <result property="isMust" column="is_must"/> |
| | | <result property="questionResult" column="question_result"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrLibaTemplateScriptVo"> |
| | |
| | | next_question, |
| | | otherdata, |
| | | is_must, |
| | | targetOptions, language, playWavOnly, isEnable, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid |
| | | question_result, |
| | | targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid |
| | | from ivr_liba_template_script |
| | | </sql> |
| | | |
| | |
| | | <if test="noClearlyVoice != null and noClearlyVoice != ''">and noClearlyVoice = #{noClearlyVoice}</if> |
| | | <if test="questiontitle != null and questiontitle != ''">and questiontitle = #{questiontitle}</if> |
| | | <if test="nextQuestion != null and nextQuestion != ''">and next_question = #{nextQuestion}</if> |
| | | <if test="questionResult != null and questionResult != ''">and question_result = #{questionResult}</if> |
| | | <if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName}, |
| | | '%') |
| | | </if> |
| | | <if test="targetOptions != null and targetOptions != ''">and targetOptions = #{targetOptions}</if> |
| | | <if test="language != null and language != ''">and language = #{language}</if> |
| | | <if test="playWavOnly != null ">and playWavOnly = #{playWavOnly}</if> |
| | | <if test="isEnable != null ">and isEnable = #{isEnable}</if> |
| | | <if test="valueType != null ">and value_type = #{valueType}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | |
| | | <if test="targetOptions != null">targetOptions,</if> |
| | | <if test="language != null and language != ''">language,</if> |
| | | <if test="playWavOnly != null">playWavOnly,</if> |
| | | <if test="isEnable != null">isEnable,</if> |
| | | <if test="valueType != null">value_type,</if> |
| | | <if test="delFlag != null and delFlag != ''">del_flag,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | |
| | | <if test="nextQuestion != null">next_question,</if> |
| | | <if test="otherdata != null">otherdata,</if> |
| | | <if test="isMust != null and isMust != ''">is_must,</if> |
| | | <if test="questionResult != null and questionResult != ''">question_result,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="templateQuestionNum != null">#{templateQuestionNum},</if> |
| | |
| | | <if test="targetOptions != null">#{targetOptions},</if> |
| | | <if test="language != null and language != ''">#{language},</if> |
| | | <if test="playWavOnly != null">#{playWavOnly},</if> |
| | | <if test="isEnable != null">#{isEnable},</if> |
| | | <if test="valueType != null">#{valueType},</if> |
| | | <if test="delFlag != null and delFlag != ''">#{delFlag},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | |
| | | <if test="nextQuestion != null">#{nextQuestion},</if> |
| | | <if test="otherdata != null">#{otherdata},</if> |
| | | <if test="isMust != null and isMust != ''">#{isMust},</if> |
| | | <if test="questionResult != null and questionResult != ''">#{questionResult},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="targetOptions != null">targetOptions = #{targetOptions},</if> |
| | | <if test="language != null and language != ''">language = #{language},</if> |
| | | <if test="playWavOnly != null">playWavOnly = #{playWavOnly},</if> |
| | | <if test="isEnable != null">isEnable = #{isEnable},</if> |
| | | <if test="valueType != null">value_type = #{valueType},</if> |
| | | <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | |
| | | <if test="nextQuestion != null">next_question = #{nextQuestion},</if> |
| | | <if test="otherdata != null">otherdata = #{otherdata},</if> |
| | | <if test="isMust != null and isMust != ''">is_must = #{isMust}</if> |
| | | <if test="questionResult != null and questionResult != ''">question_result = #{questionResult},</if> |
| | | </trim> |
| | | where ID = #{ID} |
| | | </update> |
| | |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTask" id="IvrTaskResult"> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="taskname" column="taskname"/> |
| | | <result property="taskName" column="taskname"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="templatename" column="templatename"/> |
| | | <result property="labelinfo" column="labelinfo"/> |
| | |
| | | <select id="selectIvrTaskList" parameterType="com.smartor.domain.IvrTask" resultMap="IvrTaskResult"> |
| | | <include refid="selectIvrTaskVo"/> |
| | | <where> |
| | | <if test="taskname != null and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if> |
| | | <if test="taskName != null and taskName != ''">and taskname like concat('%', #{taskName}, '%')</if> |
| | | <if test="templateid != null and templateid != ''">and templateid = #{templateid}</if> |
| | | <if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename}, |
| | | '%') |
| | |
| | | keyProperty="taskid"> |
| | | insert into ivr_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskname != null">taskname,</if> |
| | | <if test="taskName != null">taskname,</if> |
| | | <if test="templateid != null">templateid,</if> |
| | | <if test="templatename != null">templatename,</if> |
| | | <if test="labelinfo != null">labelinfo,</if> |
| | |
| | | <if test="param != null">param,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskname != null">#{taskname},</if> |
| | | <if test="taskName != null">#{taskName},</if> |
| | | <if test="templateid != null">#{templateid},</if> |
| | | <if test="templatename != null">#{templatename},</if> |
| | | <if test="labelinfo != null">#{labelinfo},</if> |
| | |
| | | <update id="updateIvrTask" parameterType="com.smartor.domain.IvrTask"> |
| | | update ivr_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskname != null">taskname = #{taskname},</if> |
| | | <if test="taskName != null">taskname = #{taskName},</if> |
| | | <if test="templateid != null">templateid = #{templateid},</if> |
| | | <if test="templatename != null">templatename = #{templatename},</if> |
| | | <if test="labelinfo != null">labelinfo = #{labelinfo},</if> |