|
|
@@ -1,6 +1,60 @@ |
|
|
|
<?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="com.iformall.mapper.VoiceMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.VoiceInfo"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/> |
|
|
|
<result column="language_id" jdbcType="BIGINT" property="languageId"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> |
|
|
|
<result column="sex" jdbcType="INTEGER" property="sex"/> |
|
|
|
<result column="age_type" jdbcType="INTEGER" property="ageType"/> |
|
|
|
<result column="display_name" jdbcType="VARCHAR" property="displayName"/> |
|
|
|
<result column="local_name" jdbcType="VARCHAR" property="localName"/> |
|
|
|
<result column="mould_sm_id" jdbcType="VARCHAR" property="mouldSmId"/> |
|
|
|
<result column="sample_rate_hertz" jdbcType="VARCHAR" property="sampleRateHertz"/> |
|
|
|
<result column="words_per_minute" jdbcType="VARCHAR" property="wordsPerMinute"/> |
|
|
|
<result column="voice_type" jdbcType="VARCHAR" property="voiceType"/> |
|
|
|
<result column="style_list" jdbcType="VARCHAR" property="styleList"/> |
|
|
|
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> |
|
|
|
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> |
|
|
|
<result column="is_del" jdbcType="INTEGER" property="isDel"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
id,language_id,tenant_id,parent_tenant_id,sex,age_type,display_name,local_name,mould_sm_id,sample_rate_hertz, |
|
|
|
words_per_minute,voice_type,style_list,create_date,update_date,is_del |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
where is_del = 0 |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and `id` = #{id} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != languageId "> |
|
|
|
and `language_id` = #{languageId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != ids "> |
|
|
|
and id in |
|
|
|
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
#{idItem} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
|
|
|
|
|
</sql> |
|
|
|
|
|
|
|
|
|
|
|
<select id="findList" parameterType="com.iformall.domain.po.sm.VoiceInfo" resultMap="BaseResultMap"> |
|
|
|
select <include refid="allColumns"/> |
|
|
|
from voice_info |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<insert id="saveBatch" parameterType="java.util.List"> |
|
|
|
INSERT INTO voice_info (`id`, `language_id`, `sex`, |
|
|
|
`display_name`, `local_name`, `mould_sm_id`, |
|
|
|