feat(portal): 添加英文JSON字符串和菜单名称字段

- 在HwWeb和HwWeb1实体类中新增webJsonStringEnglish字段
- 在HwWebMenu和HwWebMenu1实体类中新增webMenuNameEnglish字段
- 更新对应的XML映射文件,增加新字段的数据库映射
- 修改SQL查询语句,包含新字段的查询条件和插入更新操作
- 修正HwWebMapper.xml中webCode更新条件被注释的问题
master
zangch@mesnac.com 2 months ago
parent f12b0f01b7
commit e5c4ceba65

@ -33,6 +33,10 @@ public class HwWeb extends BaseEntity
/** 逻辑删除标志:'0'未删除,'1'已删除 */
private String isDelete;
/** json字符串 */
@Excel(name = "字符串")
private String webJsonStringEnglish;
public void setWebId(Long webId)
{
this.webId = webId;
@ -78,6 +82,14 @@ public class HwWeb extends BaseEntity
this.isDelete = isDelete;
}
public String getWebJsonStringEnglish() {
return webJsonStringEnglish;
}
public void setWebJsonStringEnglish(String webJsonStringEnglish) {
this.webJsonStringEnglish = webJsonStringEnglish;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -86,6 +98,7 @@ public class HwWeb extends BaseEntity
.append("webJsonString", getWebJsonString())
.append("webCode", getWebCode())
.append("isDelete", getIsDelete())
.append("webJsonStringEnglish", getWebJsonStringEnglish())
.toString();
}
}

@ -37,6 +37,10 @@ public class HwWeb1 extends BaseEntity
/** 逻辑删除标志:'0'未删除,'1'已删除 */
private String isDelete;
/** json字符串 */
@Excel(name = "字符串")
private String webJsonStringEnglish;
public void setWebId(Long webId)
{
this.webId = webId;
@ -98,6 +102,14 @@ public class HwWeb1 extends BaseEntity
this.isDelete = isDelete;
}
public String getWebJsonStringEnglish() {
return webJsonStringEnglish;
}
public void setWebJsonStringEnglish(String webJsonStringEnglish) {
this.webJsonStringEnglish = webJsonStringEnglish;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -108,6 +120,7 @@ public class HwWeb1 extends BaseEntity
.append("deviceId", getDeviceId())
.append("typeId", getTypeId())
.append("isDelete", getIsDelete())
.append("webJsonStringEnglish", getWebJsonStringEnglish())
.toString();
}
}

@ -47,6 +47,8 @@ public class HwWebMenu extends TreeEntity
/** 逻辑删除标志:'0'未删除,'1'已删除 */
private String isDelete;
private String webMenuNameEnglish;
public void setWebMenuId(Long webMenuId)
{
this.webMenuId = webMenuId;
@ -119,6 +121,14 @@ public class HwWebMenu extends TreeEntity
this.isDelete = isDelete;
}
public String getWebMenuNameEnglish() {
return webMenuNameEnglish;
}
public void setWebMenuNameEnglish(String webMenuNameEnglish) {
this.webMenuNameEnglish = webMenuNameEnglish;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -131,6 +141,7 @@ public class HwWebMenu extends TreeEntity
.append("webMenuPic", getWebMenuPic())
.append("webMenuType", getWebMenuType())
.append("isDelete", getIsDelete())
.append("webMenuNameEnglish", getWebMenuNameEnglish())
.toString();
}
}

@ -49,6 +49,8 @@ public class HwWebMenu1 extends TreeEntity
/** 逻辑删除标志:'0'未删除,'1'已删除 */
private String isDelete;
private String webMenuNameEnglish;
public void setWebMenuId(Long webMenuId)
{
this.webMenuId = webMenuId;
@ -128,6 +130,14 @@ public class HwWebMenu1 extends TreeEntity
this.isDelete = isDelete;
}
public String getWebMenuNameEnglish() {
return webMenuNameEnglish;
}
public void setWebMenuNameEnglish(String webMenuNameEnglish) {
this.webMenuNameEnglish = webMenuNameEnglish;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -141,6 +151,7 @@ public class HwWebMenu1 extends TreeEntity
.append("webMenuType", getWebMenuType())
.append("valuel", getValuel())
.append("isDelete", getIsDelete())
.append("webMenuNameEnglish", getWebMenuNameEnglish())
.toString();
}
}

@ -10,10 +10,12 @@
<result property="webJsonString" column="web_json_string" />
<result property="webCode" column="web_code" />
<result property="isDelete" column="is_delete" />
<result property="webJsonStringEnglish" column="web_json_string_english" />
</resultMap>
<sql id="selectHwWebVo">
select web_id, web_json, web_json_string, web_code,
select web_id, web_json, web_json_string, web_code,
web_json_string_english,
is_delete
from hw_web
</sql>
@ -26,6 +28,7 @@
<if test="webJson != null and webJson != ''"> and web_json = #{webJson}</if>
<if test="webJsonString != null and webJsonString != ''"> and web_json_string = #{webJsonString}</if>
<if test="webCode != null "> and web_code = #{webCode}</if>
<if test="webJsonStringEnglish != null"> and web_json_string_english = #{webJsonStringEnglish}</if>
</where>
</select>
@ -40,12 +43,14 @@
<if test="webJson != null">web_json,</if>
<if test="webJsonString != null">web_json_string,</if>
<if test="webCode != null">web_code,</if>
<if test="webJsonStringEnglish != null">web_json_string_english,</if>
is_delete,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="webJson != null">#{webJson},</if>
<if test="webJsonString != null">#{webJsonString},</if>
<if test="webCode != null">#{webCode},</if>
<if test="webJsonStringEnglish != null">#{webJsonStringEnglish},</if>
<choose>
<when test="isDelete != null and isDelete != ''">#{isDelete},</when>
<otherwise>'0',</otherwise>
@ -59,6 +64,7 @@
<if test="webJson != null">web_json = #{webJson},</if>
<if test="webJsonString != null">web_json_string = #{webJsonString},</if>
<!-- <if test="webCode != null">web_code = #{webCode},</if>-->
<if test="webJsonStringEnglish != null">web_json_string_english = #{webJsonStringEnglish},</if>
</trim>
where web_code = #{webCode}
</update>

@ -12,11 +12,12 @@
<result property="deviceId" column="device_id" />
<result property="typeId" column="typeId" />
<result property="isDelete" column="is_delete" />
<result property="webJsonStringEnglish" column="web_json_string_english" />
</resultMap>
<sql id="selectHwWebVo">
select web_id, web_json, web_json_string, web_code,
device_id, typeId,
device_id, typeId, web_json_string_english,
is_delete
from hw_web1
</sql>
@ -31,6 +32,7 @@
<if test="webCode != null "> and web_code = #{webCode}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="typeId != null "> and typeId = #{typeId}</if>
<if test="webJsonStringEnglish != null "> and web_json_string_english = #{webJsonStringEnglish}</if>
</where>
</select>
@ -54,6 +56,7 @@
<if test="webCode != null">web_code,</if>
<if test="deviceId != null">device_id,</if>
<if test="typeId != null">typeId,</if>
<if test="webJsonStringEnglish != null">web_json_string_english,</if>
is_delete,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -62,6 +65,7 @@
<if test="webCode != null">#{webCode},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="typeId != null">#{typeId},</if>
<if test="webJsonStringEnglish != null">#{webJsonStringEnglish},</if>
<choose>
<when test="isDelete != null and isDelete != ''">#{isDelete},</when>
<otherwise>'0',</otherwise>
@ -77,6 +81,7 @@
<!-- <if test="webCode != null">web_code = #{webCode},</if>-->
<!-- <if test="deviceId != null">device_id = #{deviceId},</if>-->
<!-- <if test="typeId != null">typeId = #{typeId},</if>-->
<if test="webJsonStringEnglish != null">web_json_string_english = #{webJsonStringEnglish},</if>
</trim>
where web_code = #{webCode}
and device_id = #{deviceId}

@ -14,10 +14,12 @@
<result property="webMenuPic" column="web_menu__pic" />
<result property="webMenuType" column="web_menu_type" />
<result property="isDelete" column="is_delete" />
<result property="webMenuNameEnglish;" column="web_menu_name_english" />
</resultMap>
<sql id="selectHwWebMenuVo">
select web_menu_id, parent, ancestors, status, web_menu_name, tenant_id, web_menu__pic, web_menu_type,
select web_menu_id, parent, ancestors, status, web_menu_name, tenant_id, web_menu__pic, web_menu_type,
web_menu_name_english,
is_delete
from hw_web_menu
</sql>
@ -33,6 +35,7 @@
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
<if test="webMenuPic != null and webMenuPic != ''"> and web_menu__pic = #{webMenuPic}</if>
<if test="webMenuType != null "> and web_menu_type = #{webMenuType}</if>
<if test="webMenuNameEnglish != null and webMenuNameEnglish != ''"> and web_menu_name_english = #{webMenuNameEnglish}</if>
</where>
</select>
@ -52,6 +55,7 @@
<if test="tenantId != null">tenant_id,</if>
<if test="webMenuPic != null">web_menu__pic,</if>
<if test="webMenuType != null">web_menu_type,</if>
<if test="webMenuNameEnglish != null">web_menu_name_english,</if>
is_delete,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -63,6 +67,7 @@
<if test="tenantId != null">#{tenantId},</if>
<if test="webMenuPic != null">#{webMenuPic},</if>
<if test="webMenuType != null">#{webMenuType},</if>
<if test="webMenuNameEnglish != null">#{webMenuNameEnglish},</if>
<choose>
<when test="isDelete != null and isDelete != ''">#{isDelete},</when>
<otherwise>'0',</otherwise>
@ -80,6 +85,7 @@
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="webMenuPic != null">web_menu__pic = #{webMenuPic},</if>
<if test="webMenuType != null">web_menu_type = #{webMenuType},</if>
<if test="webMenuNameEnglish != null">web_menu_name_english = #{webMenuNameEnglish},</if>
</trim>
where web_menu_id = #{webMenuId}
</update>

@ -15,12 +15,14 @@
<result property="webMenuType" column="web_menu_type" />
<result property="value" column="value" />
<result property="isDelete" column="is_delete" />
<result property="webMenuNameEnglish;" column="web_menu_name_english" />
</resultMap>
<sql id="selectHwWebMenuVo">
select web_menu_id, parent, ancestors, status, web_menu_name, tenant_id, web_menu__pic,
value,
web_menu_type,
web_menu_type,
web_menu_name_english,
is_delete
from hw_web_menu1
</sql>
@ -37,6 +39,7 @@
<if test="webMenuPic != null and webMenuPic != ''"> and web_menu__pic = #{webMenuPic}</if>
<if test="webMenuType != null "> and web_menu_type = #{webMenuType}</if>
<if test="value != null and value != ''"> and value like concat('%', #{value}, '%')</if>
<if test="webMenuNameEnglish != null and webMenuNameEnglish != ''"> and web_menu_name_english like concat('%', #{webMenuNameEnglish}, '%')</if>
</where>
</select>
@ -57,6 +60,7 @@
<if test="webMenuPic != null">web_menu__pic,</if>
<if test="webMenuType != null">web_menu_type,</if>
<if test="value != null">value,</if>
<if test="webMenuNameEnglish != null">web_menu_name_english,</if>
is_delete,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -69,6 +73,7 @@
<if test="webMenuPic != null">#{webMenuPic},</if>
<if test="webMenuType != null">#{webMenuType},</if>
<if test="value != null">#{value},</if>
<if test="webMenuNameEnglish != null">#{webMenuNameEnglish},</if>
<choose>
<when test="isDelete != null and isDelete != ''">#{isDelete},</when>
<otherwise>'0',</otherwise>
@ -87,6 +92,7 @@
<if test="webMenuPic != null">web_menu__pic = #{webMenuPic},</if>
<if test="webMenuType != null">web_menu_type = #{webMenuType},</if>
<if test="value != null">value = #{value},</if>
<if test="webMenuNameEnglish != null">web_menu_name_english = #{webMenuNameEnglish},</if>
</trim>
where web_menu_id = #{webMenuId}
</update>

Loading…
Cancel
Save