语音指令

This commit is contained in:
tiger_zhou 2023-03-31 11:21:02 +08:00
parent d5a43c0af9
commit 24da4a2e94
2 changed files with 7 additions and 369 deletions

View File

@ -57,8 +57,14 @@ public class VoiceCommandAnalyseWork {
return null;
}
/**
* 执行操作
* @param simulation
* @param commandParse
* @param operate
* @return
*/
public WorkResult work(Simulation simulation, CommandParse commandParse,OperateEnum operate){
IDeviceWorkHandle deviceWork = this.findDeviceWorkHandle(operate.getDeviceType());
Optional<? extends MapNamedElement> optional = deviceWork.findDevice(simulation,commandParse,operate);
if(optional.isEmpty()){

View File

@ -1,368 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="club.joylink.rtss.dao.voice.VoiceDeviceConfigDAO">
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.voice.VoiceDeviceConfig">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="describe" jdbcType="VARCHAR" property="describe" />
<result column="map_id" jdbcType="BIGINT" property="mapId" />
<result column="create_id" jdbcType="BIGINT" property="createId" />
<result column="handle_type" jdbcType="VARCHAR" property="handleType" />
<result column="wake_up_kw" jdbcType="VARCHAR" property="wakeUpKw" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.voice.VoiceDeviceConfig">
<result column="config" jdbcType="LONGVARCHAR" property="config" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, `describe`, map_id, create_id, handle_type, wake_up_kw, create_time, update_time,
device_type, `status`
</sql>
<sql id="Blob_Column_List">
config
</sql>
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfigExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from rts_voice_device_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByExample" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfigExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from rts_voice_device_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from rts_voice_device_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from rts_voice_device_config
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfigExample">
delete from rts_voice_device_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfig" useGeneratedKeys="true">
insert into rts_voice_device_config (`describe`, map_id, create_id,
handle_type, wake_up_kw, create_time,
update_time, device_type, `status`,
config)
values (#{describe,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT}, #{createId,jdbcType=BIGINT},
#{handleType,jdbcType=VARCHAR}, #{wakeUpKw,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deviceType,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{config,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfig" useGeneratedKeys="true">
insert into rts_voice_device_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="describe != null">
`describe`,
</if>
<if test="mapId != null">
map_id,
</if>
<if test="createId != null">
create_id,
</if>
<if test="handleType != null">
handle_type,
</if>
<if test="wakeUpKw != null">
wake_up_kw,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deviceType != null">
device_type,
</if>
<if test="status != null">
`status`,
</if>
<if test="config != null">
config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="describe != null">
#{describe,jdbcType=VARCHAR},
</if>
<if test="mapId != null">
#{mapId,jdbcType=BIGINT},
</if>
<if test="createId != null">
#{createId,jdbcType=BIGINT},
</if>
<if test="handleType != null">
#{handleType,jdbcType=VARCHAR},
</if>
<if test="wakeUpKw != null">
#{wakeUpKw,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deviceType != null">
#{deviceType,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="config != null">
#{config,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfigExample" resultType="java.lang.Long">
select count(*) from rts_voice_device_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update rts_voice_device_config
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.describe != null">
`describe` = #{record.describe,jdbcType=VARCHAR},
</if>
<if test="record.mapId != null">
map_id = #{record.mapId,jdbcType=BIGINT},
</if>
<if test="record.createId != null">
create_id = #{record.createId,jdbcType=BIGINT},
</if>
<if test="record.handleType != null">
handle_type = #{record.handleType,jdbcType=VARCHAR},
</if>
<if test="record.wakeUpKw != null">
wake_up_kw = #{record.wakeUpKw,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.deviceType != null">
device_type = #{record.deviceType,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.config != null">
config = #{record.config,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update rts_voice_device_config
set id = #{record.id,jdbcType=BIGINT},
`describe` = #{record.describe,jdbcType=VARCHAR},
map_id = #{record.mapId,jdbcType=BIGINT},
create_id = #{record.createId,jdbcType=BIGINT},
handle_type = #{record.handleType,jdbcType=VARCHAR},
wake_up_kw = #{record.wakeUpKw,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
device_type = #{record.deviceType,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=INTEGER},
config = #{record.config,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update rts_voice_device_config
set id = #{record.id,jdbcType=BIGINT},
`describe` = #{record.describe,jdbcType=VARCHAR},
map_id = #{record.mapId,jdbcType=BIGINT},
create_id = #{record.createId,jdbcType=BIGINT},
handle_type = #{record.handleType,jdbcType=VARCHAR},
wake_up_kw = #{record.wakeUpKw,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
device_type = #{record.deviceType,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfig">
update rts_voice_device_config
<set>
<if test="describe != null">
`describe` = #{describe,jdbcType=VARCHAR},
</if>
<if test="mapId != null">
map_id = #{mapId,jdbcType=BIGINT},
</if>
<if test="createId != null">
create_id = #{createId,jdbcType=BIGINT},
</if>
<if test="handleType != null">
handle_type = #{handleType,jdbcType=VARCHAR},
</if>
<if test="wakeUpKw != null">
wake_up_kw = #{wakeUpKw,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deviceType != null">
device_type = #{deviceType,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="config != null">
config = #{config,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfig">
update rts_voice_device_config
set `describe` = #{describe,jdbcType=VARCHAR},
map_id = #{mapId,jdbcType=BIGINT},
create_id = #{createId,jdbcType=BIGINT},
handle_type = #{handleType,jdbcType=VARCHAR},
wake_up_kw = #{wakeUpKw,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
device_type = #{deviceType,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER},
config = #{config,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.voice.VoiceDeviceConfig">
update rts_voice_device_config
set `describe` = #{describe,jdbcType=VARCHAR},
map_id = #{mapId,jdbcType=BIGINT},
create_id = #{createId,jdbcType=BIGINT},
handle_type = #{handleType,jdbcType=VARCHAR},
wake_up_kw = #{wakeUpKw,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
device_type = #{deviceType,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>