多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)处理
This commit is contained in:
@ -32,6 +32,36 @@
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List2">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_fra deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List3">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_spa deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List4">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_de deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List5">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_pl deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List6">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_ara deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<select id="selectByInfo" resultType="com.ho.business.vo.resp.DeviceRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
@ -91,6 +121,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
<include refid="Base_Column_List1"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
<include refid="Base_Column_List2"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
<include refid="Base_Column_List3"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
<include refid="Base_Column_List4"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
<include refid="Base_Column_List5"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
<include refid="Base_Column_List6"/>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List"/>
|
||||
</otherwise>
|
||||
@ -276,6 +321,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
<include refid="Base_Column_List1"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
<include refid="Base_Column_List2"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
<include refid="Base_Column_List3"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
<include refid="Base_Column_List4"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
<include refid="Base_Column_List5"/>
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
<include refid="Base_Column_List6"/>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List"/>
|
||||
</otherwise>
|
||||
@ -355,6 +415,11 @@
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="deviceNameEn != null">device_name_en,</if>
|
||||
<if test="deviceNameFra != null">device_name_fra,</if>
|
||||
<if test="deviceNameSpa != null">device_name_spa,</if>
|
||||
<if test="deviceNameDe != null">device_name_de,</if>
|
||||
<if test="deviceNamePl != null">device_name_pl,</if>
|
||||
<if test="deviceNameAra != null">device_name_ara,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="producer != null">producer,</if>
|
||||
<if test="serialNo != null">serial_no,</if>
|
||||
@ -373,6 +438,11 @@
|
||||
<if test="stationId != null">#{stationId,jdbcType=INTEGER},</if>
|
||||
<if test="deviceName != null">#{deviceName,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameEn != null">#{deviceNameEn,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameFra != null">#{deviceNameFra,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameSpa != null">#{deviceNameSpa,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameDe != null">#{deviceNameDe,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNamePl != null">#{deviceNamePl,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameAra != null">#{deviceNameAra,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceType != null">#{deviceType,jdbcType=VARCHAR},</if>
|
||||
<if test="producer != null">#{producer,jdbcType=VARCHAR},</if>
|
||||
<if test="serialNo != null">#{serialNo,jdbcType=VARCHAR},</if>
|
||||
@ -388,14 +458,16 @@
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO device
|
||||
(group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name,device_name_en,device_type,
|
||||
serial_no,status,`virtual`,from_id,create_time)
|
||||
station_id,device_name,device_name_en,
|
||||
device_name_fra,device_name_spa,device_name_de,device_name_pl,device_name_ara,
|
||||
device_type,serial_no,status,`virtual`,from_id,create_time)
|
||||
VALUES
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.groupId},#{item.deptId},#{item.srcId},#{item.pid}
|
||||
,#{item.category} ,#{item.stationId},#{item.deviceName},#{item.deviceNameEn},#{item.deviceType}
|
||||
,#{item.serialNo},#{item.status},#{item.virtual},#{item.fromId},#{item.createTime}
|
||||
,#{item.category} ,#{item.stationId},#{item.deviceName},#{item.deviceNameEn}
|
||||
,#{item.deviceNameFra},#{item.deviceNameSpa},#{item.deviceNameDe},#{item.deviceNamePl},#{item.deviceNameAra}
|
||||
,#{item.deviceType},#{item.serialNo},#{item.status},#{item.virtual},#{item.fromId},#{item.createTime}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user