多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)处理
This commit is contained in:
@ -7,14 +7,62 @@
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,pid,group_id,dept_id,
|
||||
`name`,name_en,address,address_en,longitude,
|
||||
latitude,capacity,rate_power,
|
||||
status,type,create_time,
|
||||
contact,contact_details,grid_time,
|
||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||
name,nation,province,
|
||||
,status,type,create_time,contact,contact_details,grid_time,
|
||||
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
|
||||
electricity_type,customer_type,voltage_level,batch_number,nation
|
||||
electricity_type,customer_type,voltage_level,batch_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List1">
|
||||
id
|
||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||
name_en name,nation_en nation ,province_en province,
|
||||
,status,type,create_time,contact,contact_details,grid_time,
|
||||
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
|
||||
electricity_type,customer_type,voltage_level,batch_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List2">
|
||||
id
|
||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||
name_fra name,nation_fra nation ,province_fra province,
|
||||
,status,type,create_time,contact,contact_details,grid_time,
|
||||
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
|
||||
electricity_type,customer_type,voltage_level,batch_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List3">
|
||||
id
|
||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||
name_spa name,nation_spa nation ,province_spa province,
|
||||
,status,type,create_time,contact,contact_details,grid_time,
|
||||
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
|
||||
electricity_type,customer_type,voltage_level,batch_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List4">
|
||||
id
|
||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||
name_de name,nation_de nation ,province_de province,
|
||||
,status,type,create_time,contact,contact_details,grid_time,
|
||||
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
|
||||
electricity_type,customer_type,voltage_level,batch_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List5">
|
||||
id
|
||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||
name_pl name,nation_pl nation ,province_pl province,
|
||||
,status,type,create_time,contact,contact_details,grid_time,
|
||||
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
|
||||
electricity_type,customer_type,voltage_level,batch_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List6">
|
||||
id
|
||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||
name_ara name,nation_ara nation ,province_ara province,
|
||||
,status,type,create_time,contact,contact_details,grid_time,
|
||||
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
|
||||
electricity_type,customer_type,voltage_level,batch_number
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="selectByName" resultType="com.ho.business.entity.Station">
|
||||
select
|
||||
@ -119,7 +167,30 @@
|
||||
</select>
|
||||
|
||||
<select id="selectByGroupIdNotExclude" resultType="com.ho.business.entity.Station">
|
||||
select <include refid="Base_Column_List"/>
|
||||
select
|
||||
<choose>
|
||||
<when test="record.lang != null and record.lang=='en_US' ">
|
||||
<include refid="Base_Column_List1"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='fr_FR' ">
|
||||
<include refid="Base_Column_List2"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='es_ES' ">
|
||||
<include refid="Base_Column_List3"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='de_DE' ">
|
||||
<include refid="Base_Column_List4"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='pl_PL' ">
|
||||
<include refid="Base_Column_List5"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='ar_EG' ">
|
||||
<include refid="Base_Column_List6"/>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM station
|
||||
<where>
|
||||
<if test="record.name != null and record.name != ''">
|
||||
@ -152,6 +223,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM station
|
||||
where
|
||||
|
||||
deleted = #{deleted}
|
||||
and is_daily_count = #{dailyCount}
|
||||
</select>
|
||||
@ -195,6 +267,12 @@
|
||||
<if test="record.groupId != null">group_id,</if>
|
||||
<if test="record.deptId != null">dept_id,</if>
|
||||
<if test="record.name != null">name,</if>
|
||||
<if test="record.nameEn != null">name_en,</if>
|
||||
<if test="record.nameFra != null">name_fra,</if>
|
||||
<if test="record.nameSpa != null">name_spa,</if>
|
||||
<if test="record.nameDe != null">name_de,</if>
|
||||
<if test="record.namePl != null">name_pl,</if>
|
||||
<if test="record.nameAra != null">name_ara,</if>
|
||||
<if test="record.address != null">address,</if>
|
||||
<if test="record.longitude != null">longitude,</if>
|
||||
<if test="record.latitude != null">latitude,</if>
|
||||
@ -220,12 +298,24 @@
|
||||
<if test="record.pvPower != null">pv_power,</if>
|
||||
<if test="record.iccId != null">icc_id,</if>
|
||||
<if test="record.province != null">province,</if>
|
||||
<if test="record.provinceEn != null">province_en,</if>
|
||||
<if test="record.provinceFra != null">province_fra,</if>
|
||||
<if test="record.provinceSpa != null">province_spa,</if>
|
||||
<if test="record.provinceDe != null">province_de,</if>
|
||||
<if test="record.provincePl != null">province_pl,</if>
|
||||
<if test="record.provinceAra != null">province_ara,</if>
|
||||
<if test="record.city != null">city,</if>
|
||||
<if test="record.electricityType != null">electricity_type,</if>
|
||||
<if test="record.customerType != null">customer_type,</if>
|
||||
<if test="record.voltageLevel != null">voltage_level,</if>
|
||||
<if test="record.batchNumber != null">batch_number,</if>
|
||||
<if test="record.nation != null">nation,</if>
|
||||
<if test="record.nationEn != null">nation_en,</if>
|
||||
<if test="record.nationFra != null">nation_fra,</if>
|
||||
<if test="record.nationSpa != null">nation_spa,</if>
|
||||
<if test="record.nationDe != null">nation_de,</if>
|
||||
<if test="record.nationPl != null">nation_pl,</if>
|
||||
<if test="record.nationAra != null">nation_ara,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.id != null">#{record.id,jdbcType=INTEGER},</if>
|
||||
@ -233,6 +323,12 @@
|
||||
<if test="record.groupId != null">#{record.groupId,jdbcType=INTEGER},</if>
|
||||
<if test="record.deptId != null">#{record.deptId,jdbcType=INTEGER},</if>
|
||||
<if test="record.name != null">#{record.name,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameEn != null">#{record.nameEn,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameFra != null">#{record.nameFra,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameSpa != null">#{record.nameSpa,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameDe != null">#{record.nameDe,jdbcType=VARCHAR},</if>
|
||||
<if test="record.namePl != null">#{record.namePl,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameAra != null">#{record.nameAra,jdbcType=VARCHAR},</if>
|
||||
<if test="record.address != null">#{record.address,jdbcType=VARCHAR},</if>
|
||||
<if test="record.longitude != null">#{record.longitude,jdbcType=DECIMAL},</if>
|
||||
<if test="record.latitude != null">#{record.latitude,jdbcType=DECIMAL},</if>
|
||||
@ -258,12 +354,24 @@
|
||||
<if test="record.pvPower != null">#{record.pvPower},</if>
|
||||
<if test="record.iccId != null">#{record.iccId},</if>
|
||||
<if test="record.province != null">#{record.province},</if>
|
||||
<if test="record.provinceEn != null">#{record.provinceEn},</if>
|
||||
<if test="record.provinceFra != null">#{record.provinceFra},</if>
|
||||
<if test="record.provinceSpa != null">#{record.provinceSpa},</if>
|
||||
<if test="record.provinceDe != null">#{record.provinceDe},</if>
|
||||
<if test="record.provincePl != null">#{record.provincePl},</if>
|
||||
<if test="record.provinceAra != null">#{record.provinceAra},</if>
|
||||
<if test="record.city != null">#{record.city},</if>
|
||||
<if test="record.electricityType != null">#{record.electricityType},</if>
|
||||
<if test="record.customerType != null">#{record.customerType},</if>
|
||||
<if test="record.voltageLevel != null">#{record.voltageLevel},</if>
|
||||
<if test="record.batchNumber != null">#{record.batchNumber},</if>
|
||||
<if test="record.nation != null">#{record.nation},</if>
|
||||
<if test="record.nationEn != null">#{record.nationEn},</if>
|
||||
<if test="record.nationFra != null">#{record.nationFra},</if>
|
||||
<if test="record.nationSpa != null">#{record.nationSpa},</if>
|
||||
<if test="record.nationDe != null">#{record.nationDe},</if>
|
||||
<if test="record.nationPl != null">#{record.nationPl},</if>
|
||||
<if test="record.nationAra != null">#{record.nationAra},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -279,6 +387,24 @@
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameEn != null">
|
||||
name = #{record.nameEn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameFra != null">
|
||||
name = #{record.nameFra,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameSpa != null">
|
||||
name = #{record.nameSpa,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameDe != null">
|
||||
name = #{record.nameDe,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.namePl != null">
|
||||
name = #{record.namePl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameAra != null">
|
||||
name = #{record.nameAra,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.address != null">
|
||||
address = #{record.address,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -357,6 +483,24 @@
|
||||
<if test="record.province != null">
|
||||
province = #{record.province},
|
||||
</if>
|
||||
<if test="record.provinceEn != null">
|
||||
province = #{record.provinceEn},
|
||||
</if>
|
||||
<if test="record.provinceFra != null">
|
||||
province = #{record.provinceFra},
|
||||
</if>
|
||||
<if test="record.provinceSpa != null">
|
||||
province = #{record.provinceSpa},
|
||||
</if>
|
||||
<if test="record.provinceDe != null">
|
||||
province = #{record.provinceDe},
|
||||
</if>
|
||||
<if test="record.provincePl != null">
|
||||
province = #{record.provincePl},
|
||||
</if>
|
||||
<if test="record.provinceAra != null">
|
||||
province = #{record.provinceAra},
|
||||
</if>
|
||||
<if test="record.city != null">
|
||||
city = #{record.city},
|
||||
</if>
|
||||
@ -375,6 +519,24 @@
|
||||
<if test="record.nation != null">
|
||||
nation = #{record.nation},
|
||||
</if>
|
||||
<if test="record.nationEn != null">
|
||||
nation = #{record.nationEn},
|
||||
</if>
|
||||
<if test="record.nationFra != null">
|
||||
nation = #{record.nationFra},
|
||||
</if>
|
||||
<if test="record.nationSpa != null">
|
||||
nation = #{record.nationSpa},
|
||||
</if>
|
||||
<if test="record.nationDe != null">
|
||||
nation = #{record.nationDe},
|
||||
</if>
|
||||
<if test="record.nationPl != null">
|
||||
nation = #{record.nationPl},
|
||||
</if>
|
||||
<if test="record.nationAra != null">
|
||||
nation = #{record.nationAra},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user