diff --git a/src/main/java/club/joylink/rtss/dao/voice/VoiceDiscriminateConfigDAO.java b/src/main/java/club/joylink/rtss/dao/voice/VoiceDiscriminateConfigDAO.java new file mode 100644 index 000000000..0f55dfa91 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/voice/VoiceDiscriminateConfigDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao.voice; + +import club.joylink.rtss.entity.voice.VoiceDiscriminateConfig; +import club.joylink.rtss.entity.voice.VoiceDiscriminateConfigExample; +import club.joylink.rtss.entity.voice.VoiceDiscriminateConfigWithBLOBs; +import java.util.List; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +@Mapper +@Repository +public interface VoiceDiscriminateConfigDAO { + long countByExample(VoiceDiscriminateConfigExample example); + + int deleteByExample(VoiceDiscriminateConfigExample example); + + int deleteByPrimaryKey(Long id); + + int insert(VoiceDiscriminateConfigWithBLOBs record); + + int insertSelective(VoiceDiscriminateConfigWithBLOBs record); + + List selectByExampleWithBLOBs(VoiceDiscriminateConfigExample example); + + List selectByExample(VoiceDiscriminateConfigExample example); + + VoiceDiscriminateConfigWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") VoiceDiscriminateConfigWithBLOBs record, @Param("example") VoiceDiscriminateConfigExample example); + + int updateByExampleWithBLOBs(@Param("record") VoiceDiscriminateConfigWithBLOBs record, @Param("example") VoiceDiscriminateConfigExample example); + + int updateByExample(@Param("record") VoiceDiscriminateConfig record, @Param("example") VoiceDiscriminateConfigExample example); + + int updateByPrimaryKeySelective(VoiceDiscriminateConfigWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(VoiceDiscriminateConfigWithBLOBs record); + + int updateByPrimaryKey(VoiceDiscriminateConfig record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfig.java b/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfig.java new file mode 100644 index 000000000..e65147b4d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfig.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.entity.voice; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.Date; +import lombok.Data; + +/** + * @author + * + */ +@Data +public class VoiceDiscriminateConfig implements Serializable { + private Long id; + + /** + * 关键字正则 + */ + private String keyWordRules; + + private Long mapId; + + private LocalDateTime createTime; + + private LocalDateTime updateTime; + + private Long operateId; + + /** + * 描述 + */ + private String describe; + + /** + * 状态0=编辑,1=使用 + */ + private Integer status; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfigExample.java b/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfigExample.java new file mode 100644 index 000000000..6234eea5d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfigExample.java @@ -0,0 +1,723 @@ +package club.joylink.rtss.entity.voice; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class VoiceDiscriminateConfigExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public VoiceDiscriminateConfigExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesIsNull() { + addCriterion("key_word_rules is null"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesIsNotNull() { + addCriterion("key_word_rules is not null"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesEqualTo(String value) { + addCriterion("key_word_rules =", value, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesNotEqualTo(String value) { + addCriterion("key_word_rules <>", value, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesGreaterThan(String value) { + addCriterion("key_word_rules >", value, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesGreaterThanOrEqualTo(String value) { + addCriterion("key_word_rules >=", value, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesLessThan(String value) { + addCriterion("key_word_rules <", value, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesLessThanOrEqualTo(String value) { + addCriterion("key_word_rules <=", value, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesLike(String value) { + addCriterion("key_word_rules like", value, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesNotLike(String value) { + addCriterion("key_word_rules not like", value, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesIn(List values) { + addCriterion("key_word_rules in", values, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesNotIn(List values) { + addCriterion("key_word_rules not in", values, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesBetween(String value1, String value2) { + addCriterion("key_word_rules between", value1, value2, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andKeyWordRulesNotBetween(String value1, String value2) { + addCriterion("key_word_rules not between", value1, value2, "keyWordRules"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andOperateIdIsNull() { + addCriterion("operate_id is null"); + return (Criteria) this; + } + + public Criteria andOperateIdIsNotNull() { + addCriterion("operate_id is not null"); + return (Criteria) this; + } + + public Criteria andOperateIdEqualTo(Long value) { + addCriterion("operate_id =", value, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdNotEqualTo(Long value) { + addCriterion("operate_id <>", value, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdGreaterThan(Long value) { + addCriterion("operate_id >", value, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdGreaterThanOrEqualTo(Long value) { + addCriterion("operate_id >=", value, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdLessThan(Long value) { + addCriterion("operate_id <", value, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdLessThanOrEqualTo(Long value) { + addCriterion("operate_id <=", value, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdIn(List values) { + addCriterion("operate_id in", values, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdNotIn(List values) { + addCriterion("operate_id not in", values, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdBetween(Long value1, Long value2) { + addCriterion("operate_id between", value1, value2, "operateId"); + return (Criteria) this; + } + + public Criteria andOperateIdNotBetween(Long value1, Long value2) { + addCriterion("operate_id not between", value1, value2, "operateId"); + return (Criteria) this; + } + + public Criteria andDescribeIsNull() { + addCriterion("`describe` is null"); + return (Criteria) this; + } + + public Criteria andDescribeIsNotNull() { + addCriterion("`describe` is not null"); + return (Criteria) this; + } + + public Criteria andDescribeEqualTo(String value) { + addCriterion("`describe` =", value, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeNotEqualTo(String value) { + addCriterion("`describe` <>", value, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeGreaterThan(String value) { + addCriterion("`describe` >", value, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeGreaterThanOrEqualTo(String value) { + addCriterion("`describe` >=", value, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeLessThan(String value) { + addCriterion("`describe` <", value, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeLessThanOrEqualTo(String value) { + addCriterion("`describe` <=", value, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeLike(String value) { + addCriterion("`describe` like", value, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeNotLike(String value) { + addCriterion("`describe` not like", value, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeIn(List values) { + addCriterion("`describe` in", values, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeNotIn(List values) { + addCriterion("`describe` not in", values, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeBetween(String value1, String value2) { + addCriterion("`describe` between", value1, value2, "describe"); + return (Criteria) this; + } + + public Criteria andDescribeNotBetween(String value1, String value2) { + addCriterion("`describe` not between", value1, value2, "describe"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfigWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfigWithBLOBs.java new file mode 100644 index 000000000..fb3280ff6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/voice/VoiceDiscriminateConfigWithBLOBs.java @@ -0,0 +1,28 @@ +package club.joylink.rtss.entity.voice; + +import java.io.Serializable; +import lombok.Data; + +/** + * @author + * + */ +@Data +public class VoiceDiscriminateConfigWithBLOBs extends VoiceDiscriminateConfig implements Serializable { + /** + * 所需参数 + */ + private String paramsRules; + + /** + * 执行指令(系统操作指令) + */ + private String execOperateRule; + + /** + * 回复指令(系统指令操作完毕或者无系统指令时,交互回复) + */ + private String replyRule; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/services/voice/IVoiceDataConfigService.java b/src/main/java/club/joylink/rtss/services/voice/IVoiceDataConfigService.java new file mode 100644 index 000000000..89e34d57a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/voice/IVoiceDataConfigService.java @@ -0,0 +1,11 @@ +package club.joylink.rtss.services.voice; + +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.voice.VoiceDiscriminateConfigVO; + +public interface IVoiceDataConfigService { + PageVO query(); + VoiceDiscriminateConfigVO byId(Long id); + void saveOrUpdate(VoiceDiscriminateConfigVO configVO , LoginUserInfoVO userInfo); +} diff --git a/src/main/java/club/joylink/rtss/services/voice/discriminate/VoiceDataConfigServiceImpl.java b/src/main/java/club/joylink/rtss/services/voice/discriminate/VoiceDataConfigServiceImpl.java new file mode 100644 index 000000000..784d78400 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/voice/discriminate/VoiceDataConfigServiceImpl.java @@ -0,0 +1,75 @@ +package club.joylink.rtss.services.voice.discriminate; + +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.dao.voice.VoiceDiscriminateConfigDAO; +import club.joylink.rtss.entity.voice.VoiceDiscriminateConfigExample; +import club.joylink.rtss.entity.voice.VoiceDiscriminateConfigWithBLOBs; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.services.voice.IVoiceDataConfigService; +import club.joylink.rtss.simulation.cbtc.discriminate.IVoiceDiscriminateRule; +import club.joylink.rtss.simulation.cbtc.discriminate.VoiceDiscriminateRule; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.voice.VoiceDiscriminateConfigVO; +import club.joylink.rtss.vo.voice.VoiceQueryVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Service +@Slf4j +@Transactional +public class VoiceDataConfigServiceImpl implements IVoiceDataConfigService, IVoiceDiscriminateRule { + @Autowired + private VoiceDiscriminateConfigDAO configDAO; + + private VoiceDiscriminateConfigWithBLOBs findById(Long id){ + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(id),"数据id不能为空"); + VoiceDiscriminateConfigWithBLOBs data = this.configDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(data),String.format("未找到对应的数据id:%s",id)); + return data; + } + @Override + public PageVO query() { + return null; + } + + @Override + public VoiceDiscriminateConfigVO byId(Long id) { + VoiceDiscriminateConfigWithBLOBs data = this.findById(id); + return VoiceDiscriminateConfigVO.convertVO(data); + } + + @Override + public void saveOrUpdate(VoiceDiscriminateConfigVO configVO, LoginUserInfoVO userInfo) { + LocalDateTime dateTime = LocalDateTime.now(); + VoiceDiscriminateConfigWithBLOBs newData = configVO.convertToEntry(); + newData.setOperateId(userInfo.getAccountVO().getId()); + if(Objects.isNull(configVO.getId())){ + newData.setCreateTime(dateTime); + newData.setUpdateTime(dateTime); + this.configDAO.insert(newData); + }else{ + VoiceDiscriminateConfigWithBLOBs data = this.findById(configVO.getId()); + newData.setCreateTime(data.getCreateTime()); + newData.setUpdateTime(dateTime); + this.configDAO.updateByPrimaryKeyWithBLOBs(newData); + } + } + + + @Override + public List findRuleByMapId(Long mapId) { + VoiceQueryVO queryVO = new VoiceQueryVO(); + queryVO.setMapId(mapId); + queryVO.setStatus(BusinessConsts.STATUS_USE_INT); + List list = this.configDAO.selectByExampleWithBLOBs(queryVO.buildQueryExample()); + return list.stream().map(VoiceDiscriminateConfigVO::convertRule).collect(Collectors.toList()); + } +} diff --git a/src/main/java/club/joylink/rtss/services/voice/discriminate/VoiceParseServiceImpl.java b/src/main/java/club/joylink/rtss/services/voice/discriminate/VoiceParseServiceImpl.java index 0b6939029..a921eb89c 100644 --- a/src/main/java/club/joylink/rtss/services/voice/discriminate/VoiceParseServiceImpl.java +++ b/src/main/java/club/joylink/rtss/services/voice/discriminate/VoiceParseServiceImpl.java @@ -80,11 +80,16 @@ public class VoiceParseServiceImpl implements VoiceParseService { */ private void matchCommand(Simulation simulation, VoiceDiscriminateResult result) { // 加载本地图的规则信息列表:从数据库中获取 - List ruleList = List.of(new VoiceDiscriminateRule()); + List ruleList = simulation.getVoiceRuleList(); +// BusinessExceptionAssertEnum.VOICE_COMMAND_CONFIG_NULL.assertTrue(!CollectionUtils.isEmpty(ruleList),"该线路没有语音配置的数据"); + if(CollectionUtils.isEmpty(ruleList)){ + result.setSuccess(false); + result.setMsg("该线路没有语音配置的数据"); + return; + } // 匹配指令 - List matchGroupList = null; for (VoiceDiscriminateRule rule : ruleList) { - matchGroupList = keyWordsMatch(rule.getKeyWordRules(), result.getMatchOriginContent()); + List matchGroupList = keyWordsMatch(rule.getKeyWordRules(), result.getMatchOriginContent()); if (!CollectionUtils.isEmpty(matchGroupList)) { result.setRule(rule); result.setMatchGroupList(matchGroupList); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java b/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java index db6ecf5a8..c76aa68a6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java @@ -21,6 +21,7 @@ import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.device.RealDevice import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.heb.device.Heb1IbpConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.heb.device.Heb1PscConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.heb.device.Heb1PslConfig; +import club.joylink.rtss.simulation.cbtc.discriminate.VoiceDiscriminateRule; import club.joylink.rtss.simulation.cbtc.exception.SimulationException; import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType; import club.joylink.rtss.simulation.cbtc.member.SimulationMember; @@ -59,6 +60,11 @@ public class Simulation extends club.joylink.rtss.simulation.Simulation voiceRuleList; + /** * 仿真构建参数 */ diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/SimulationServiceImpl.java b/src/main/java/club/joylink/rtss/simulation/cbtc/SimulationServiceImpl.java index 00ed7049e..fbe80ff43 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/SimulationServiceImpl.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/SimulationServiceImpl.java @@ -6,6 +6,8 @@ import club.joylink.rtss.services.RunPlanDraftService; import club.joylink.rtss.services.mapFunction.RtsMapFunctionService; import club.joylink.rtss.services.permission.PermissionSubjectService; import club.joylink.rtss.simulation.SimulationManager; +import club.joylink.rtss.simulation.cbtc.discriminate.IVoiceDiscriminateRule; +import club.joylink.rtss.simulation.cbtc.discriminate.VoiceDiscriminateRule; import club.joylink.rtss.simulation.cbtc.event.SimulationCreateSuccessEvent; import club.joylink.rtss.simulation.cbtc.exception.SimulationException; import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType; @@ -67,7 +69,8 @@ public class SimulationServiceImpl implements SimulationService { @Autowired private ISysUserService iSysUserService; - + @Autowired + private IVoiceDiscriminateRule discriminateRule; @Override public String createSimulation(long mapId, Long mapFunctionId, SimulationWorkParamVO workParamVO, @NonNull LoginUserInfoVO loginUserInfoVO,Map createUserType) { return createSimulationPojo(mapId, mapFunctionId, workParamVO, loginUserInfoVO, createUserType).getId(); @@ -296,6 +299,12 @@ public class SimulationServiceImpl implements SimulationService { //创建仿真 String simulationId = SimulationIdGenerator.generateGroup(loginUserInfoVO.getAccountVO().getId(), mapId); Simulation simulation = initService.create(mapId, workParamVO, loginUserInfoVO, simulationId); + + + //语音配置数据 + List ruleList = this.discriminateRule.findRuleByMapId(mapId); + simulation.setVoiceRuleList(ruleList); + simulation.setMapFunctionId(mapFunctionId); simulation.setCreateUserType(createUserType); LoginUserInfoVO loginUserInfo = simulation.getBuildParams().getLoginUserInfo(); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/ExtractRule.java b/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/ExtractRule.java index 2190fddf5..56fc8aaa2 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/ExtractRule.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/ExtractRule.java @@ -1,7 +1,17 @@ package club.joylink.rtss.simulation.cbtc.discriminate; import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.data.map.*; +import club.joylink.rtss.util.PinYinUtil; +import club.joylink.rtss.util.StrUtils; +import com.google.common.collect.Maps; import lombok.Getter; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.similarity.JaroWinklerSimilarity; + +import java.util.List; +import java.util.Map; +import java.util.Objects; /** * 参数的提取规则 @@ -9,14 +19,62 @@ import lombok.Getter; @Getter public enum ExtractRule { + //车站名称 STATION_NAME { @Override public Object matchParam(Simulation simulation, String... sourceStr) { + return ExtractRule.findDevice(simulation, MapElement.DeviceType.STATION, Station.class,sourceStr[0]); + } + }, + // 道岔名称 + SWITCH_NAME{ + @Override + public Object matchParam(Simulation simulation, String... sourceStr) { + return ExtractRule.findDevice(simulation, MapElement.DeviceType.SWITCH, Switch.class,sourceStr[0]); + } + }, + //上下行 + UP_DOWN_WAY { + @Override + public Object matchParam(Simulation simulation, String... sourceStr) { + if(StringUtils.containsAnyIgnoreCase(sourceStr[0],"shangxing","shang")){ + return true; + }else if(StringUtils.containsAnyIgnoreCase(sourceStr[0],"xiaxing","xia")){ + return false; + }else{ + return null; + } + } + },SIGNAL_NAME{ + @Override + public Object matchParam(Simulation simulation, String... sourceStr) { + return ExtractRule.findDevice(simulation, MapElement.DeviceType.SIGNAL, Signal.class,sourceStr[0]); + } + },STAND_NAME{ + @Override + public Object matchParam(Simulation simulation, String... sourceStr) { return null; } }; public abstract Object matchParam(Simulation simulation, String... sourceStr); -} \ No newline at end of file + + + private static MapNamedElement findDevice(Simulation simulation, MapElement.DeviceType dt, Class eleClass,String matchVal){ + List eleList = simulation.getRepository().getListByType(dt,eleClass); + Map elementMap = Maps.newHashMap(); + for (MapNamedElement ele : eleList) { + String namePinYin = PinYinUtil.toPinYin(ele.getName()); + double ratio = StrUtils.getJaroWinklerSimilarityRatio(namePinYin,matchVal); + elementMap.put(ratio,ele); + } + Double d = elementMap.keySet().stream().mapToDouble(k->k).max().orElse(0D); + MapNamedElement nameEle = elementMap.get(d); + if(Objects.isNull(nameEle)){ + return null; + } + return nameEle; + } +} diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/IVoiceDiscriminateRule.java b/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/IVoiceDiscriminateRule.java new file mode 100644 index 000000000..c7ec8669c --- /dev/null +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/IVoiceDiscriminateRule.java @@ -0,0 +1,8 @@ +package club.joylink.rtss.simulation.cbtc.discriminate; + +import java.util.List; + +public interface IVoiceDiscriminateRule { + List findRuleByMapId(Long mapId); + +} diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/VoiceDiscriminateRule.java b/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/VoiceDiscriminateRule.java index 24becfa61..1d3d72a5e 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/VoiceDiscriminateRule.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/discriminate/VoiceDiscriminateRule.java @@ -9,7 +9,7 @@ import java.util.List; */ @Data public class VoiceDiscriminateRule { - private Long id; +// private Long id; /** * 关键字正则 @@ -30,4 +30,4 @@ public class VoiceDiscriminateRule { * 回复指令(系统指令操作完毕或者无系统指令时,交互回复) */ private ReplyRule replyRule; -} \ No newline at end of file +} diff --git a/src/main/java/club/joylink/rtss/util/StrUtils.java b/src/main/java/club/joylink/rtss/util/StrUtils.java index f13fe617c..8bf3b7854 100644 --- a/src/main/java/club/joylink/rtss/util/StrUtils.java +++ b/src/main/java/club/joylink/rtss/util/StrUtils.java @@ -1,7 +1,14 @@ package club.joylink.rtss.util; +import org.apache.commons.text.similarity.JaroWinklerSimilarity; + public class StrUtils { + private StrUtils(){ + + } + + final static JaroWinklerSimilarity SIMILARITY = new JaroWinklerSimilarity(); /** * 清理语音识别中的标点符号 * @param source @@ -30,6 +37,10 @@ public class StrUtils { return false; } + public static double getJaroWinklerSimilarityRatio(String str,String target){ + return SIMILARITY.apply(str,target); + } + /** * 获取两字符串的相似度 */ @@ -38,6 +49,7 @@ public class StrUtils { return 1 - (float) compare(str, target) / max; } + /** * 比较两个字符串的相识度 * 核心算法:用一个二维数组记录每个字符串是否相同,如果相同记为0,不相同记为1,每行每列相同个数累加 diff --git a/src/main/java/club/joylink/rtss/vo/voice/VoiceDiscriminateConfigVO.java b/src/main/java/club/joylink/rtss/vo/voice/VoiceDiscriminateConfigVO.java new file mode 100644 index 000000000..be06a2a8b --- /dev/null +++ b/src/main/java/club/joylink/rtss/vo/voice/VoiceDiscriminateConfigVO.java @@ -0,0 +1,97 @@ +package club.joylink.rtss.vo.voice; + +import club.joylink.rtss.entity.voice.VoiceDiscriminateConfigWithBLOBs; +import club.joylink.rtss.simulation.cbtc.discriminate.OperateRule; +import club.joylink.rtss.simulation.cbtc.discriminate.ParamExtractRule; +import club.joylink.rtss.simulation.cbtc.discriminate.ReplyRule; +import club.joylink.rtss.simulation.cbtc.discriminate.VoiceDiscriminateRule; +import club.joylink.rtss.util.JsonUtils; +import lombok.Data; +import org.springframework.beans.BeanUtils; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +@Data +public class VoiceDiscriminateConfigVO implements Serializable { + private Long id; + /** + * 描述 + */ + private String describe; + /** + * 关键字正则 + */ + private String keyWordRules; + private Long mapId; + + private LocalDateTime createTime; + + private LocalDateTime updateTime; + + private Long operateId; + + /** + * 所需参数 + * {@link List ParamExtractRule} + */ + private List paramsRules; + + /** + * 执行指令(系统操作指令) + * {@link OperateRule} + */ + private OperateRule execOperateRule; + + /** + * 回复指令(系统指令操作完毕或者无系统指令时,交互回复) + * {@link ReplyRule} + */ + private ReplyRule replyRule; + + public VoiceDiscriminateConfigWithBLOBs convertToEntry(){ + VoiceDiscriminateConfigWithBLOBs data = new VoiceDiscriminateConfigWithBLOBs(); + BeanUtils.copyProperties(this, data); + if(!CollectionUtils.isEmpty(this.paramsRules)){ + data.setParamsRules(JsonUtils.writeValueAsString(this.paramsRules)); + } + if(Objects.nonNull(this.execOperateRule)){ + data.setExecOperateRule(JsonUtils.writeValueAsString(this.execOperateRule)); + } + if(Objects.nonNull(this.replyRule)){ + data.setReplyRule(JsonUtils.writeValueAsString(this.replyRule)); + } + return data; + } + + public static VoiceDiscriminateConfigVO convertVO(VoiceDiscriminateConfigWithBLOBs data){ + VoiceDiscriminateConfigVO vo = new VoiceDiscriminateConfigVO(); + BeanUtils.copyProperties(data, vo); + if(StringUtils.hasText(data.getParamsRules())){ + vo.setParamsRules(JsonUtils.readCollection(data.getParamsRules(), ArrayList.class,ParamExtractRule.class)); + } + if(StringUtils.hasText(data.getExecOperateRule())){ + vo.setExecOperateRule(JsonUtils.read(data.getExecOperateRule(),OperateRule.class)); + } + if(StringUtils.hasText(data.getReplyRule())){ + vo.setReplyRule(JsonUtils.read(data.getReplyRule(),ReplyRule.class)); + } + return vo; + } + + public static VoiceDiscriminateRule convertRule(VoiceDiscriminateConfigWithBLOBs data){ + VoiceDiscriminateConfigVO configVO = convertVO(data); + + VoiceDiscriminateRule rule = new VoiceDiscriminateRule(); + rule.setKeyWordRules(configVO.getKeyWordRules()); + rule.setParamsRules(configVO.getParamsRules()); + rule.setExecOperateRule(configVO.getExecOperateRule()); + rule.setReplyRule(configVO.getReplyRule()); + return rule; + } +} diff --git a/src/main/java/club/joylink/rtss/vo/voice/VoiceQueryVO.java b/src/main/java/club/joylink/rtss/vo/voice/VoiceQueryVO.java new file mode 100644 index 000000000..1ae807507 --- /dev/null +++ b/src/main/java/club/joylink/rtss/vo/voice/VoiceQueryVO.java @@ -0,0 +1,25 @@ +package club.joylink.rtss.vo.voice; + +import club.joylink.rtss.entity.voice.VoiceDiscriminateConfigExample; +import club.joylink.rtss.vo.client.PageQueryVO; +import lombok.Data; + +import java.util.Objects; + +@Data +public class VoiceQueryVO extends PageQueryVO { + private Long mapId; + private Integer status; + + public VoiceDiscriminateConfigExample buildQueryExample(){ + VoiceDiscriminateConfigExample example = new VoiceDiscriminateConfigExample(); + VoiceDiscriminateConfigExample.Criteria criteria = example.createCriteria(); + if(Objects.nonNull(this.mapId)){ + criteria.andMapIdEqualTo(this.mapId); + } + if(Objects.nonNull(this.status)){ + criteria.andStatusEqualTo(this.status); + } + return example; + } +} diff --git a/src/main/resources/mybatis/mapper/voice/VoiceDiscriminateConfigDAO.xml b/src/main/resources/mybatis/mapper/voice/VoiceDiscriminateConfigDAO.xml new file mode 100644 index 000000000..f51366bd7 --- /dev/null +++ b/src/main/resources/mybatis/mapper/voice/VoiceDiscriminateConfigDAO.xml @@ -0,0 +1,363 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, key_word_rules, map_id, create_time, update_time, operate_id, `describe`, `status` + + + params_rules, exec_operate_rule, reply_rule + + + + + + delete from rts_voice_discriminate_config + where id = #{id,jdbcType=BIGINT} + + + delete from rts_voice_discriminate_config + + + + + + insert into rts_voice_discriminate_config (key_word_rules, map_id, create_time, + update_time, operate_id, `describe`, + `status`, params_rules, exec_operate_rule, + reply_rule) + values (#{keyWordRules,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}, #{operateId,jdbcType=BIGINT}, #{describe,jdbcType=VARCHAR}, + #{status,jdbcType=INTEGER}, #{paramsRules,jdbcType=LONGVARCHAR}, #{execOperateRule,jdbcType=LONGVARCHAR}, + #{replyRule,jdbcType=LONGVARCHAR}) + + + insert into rts_voice_discriminate_config + + + key_word_rules, + + + map_id, + + + create_time, + + + update_time, + + + operate_id, + + + `describe`, + + + `status`, + + + params_rules, + + + exec_operate_rule, + + + reply_rule, + + + + + #{keyWordRules,jdbcType=VARCHAR}, + + + #{mapId,jdbcType=BIGINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{operateId,jdbcType=BIGINT}, + + + #{describe,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{paramsRules,jdbcType=LONGVARCHAR}, + + + #{execOperateRule,jdbcType=LONGVARCHAR}, + + + #{replyRule,jdbcType=LONGVARCHAR}, + + + + + + update rts_voice_discriminate_config + + + id = #{record.id,jdbcType=BIGINT}, + + + key_word_rules = #{record.keyWordRules,jdbcType=VARCHAR}, + + + map_id = #{record.mapId,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + operate_id = #{record.operateId,jdbcType=BIGINT}, + + + `describe` = #{record.describe,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=INTEGER}, + + + params_rules = #{record.paramsRules,jdbcType=LONGVARCHAR}, + + + exec_operate_rule = #{record.execOperateRule,jdbcType=LONGVARCHAR}, + + + reply_rule = #{record.replyRule,jdbcType=LONGVARCHAR}, + + + + + + + + update rts_voice_discriminate_config + set id = #{record.id,jdbcType=BIGINT}, + key_word_rules = #{record.keyWordRules,jdbcType=VARCHAR}, + map_id = #{record.mapId,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + operate_id = #{record.operateId,jdbcType=BIGINT}, + `describe` = #{record.describe,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=INTEGER}, + params_rules = #{record.paramsRules,jdbcType=LONGVARCHAR}, + exec_operate_rule = #{record.execOperateRule,jdbcType=LONGVARCHAR}, + reply_rule = #{record.replyRule,jdbcType=LONGVARCHAR} + + + + + + update rts_voice_discriminate_config + set id = #{record.id,jdbcType=BIGINT}, + key_word_rules = #{record.keyWordRules,jdbcType=VARCHAR}, + map_id = #{record.mapId,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + operate_id = #{record.operateId,jdbcType=BIGINT}, + `describe` = #{record.describe,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=INTEGER} + + + + + + update rts_voice_discriminate_config + + + key_word_rules = #{keyWordRules,jdbcType=VARCHAR}, + + + map_id = #{mapId,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + operate_id = #{operateId,jdbcType=BIGINT}, + + + `describe` = #{describe,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=INTEGER}, + + + params_rules = #{paramsRules,jdbcType=LONGVARCHAR}, + + + exec_operate_rule = #{execOperateRule,jdbcType=LONGVARCHAR}, + + + reply_rule = #{replyRule,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update rts_voice_discriminate_config + set key_word_rules = #{keyWordRules,jdbcType=VARCHAR}, + map_id = #{mapId,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + operate_id = #{operateId,jdbcType=BIGINT}, + `describe` = #{describe,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=INTEGER}, + params_rules = #{paramsRules,jdbcType=LONGVARCHAR}, + exec_operate_rule = #{execOperateRule,jdbcType=LONGVARCHAR}, + reply_rule = #{replyRule,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + update rts_voice_discriminate_config + set key_word_rules = #{keyWordRules,jdbcType=VARCHAR}, + map_id = #{mapId,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + operate_id = #{operateId,jdbcType=BIGINT}, + `describe` = #{describe,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=INTEGER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file