feat(hw-web): 新增haiwei官网json及文档模块
- 新增HwWeb和HwWeb1实体类,支持逻辑删除和时间字段自动填充 - 新增相应业务对象Bo和视图对象Vo,实现数据传输和映射 - 实现HwWeb1的业务逻辑,包括分页查询、版本化更新、逻辑删除等 - 添加HwWeb和HwWeb1的控制器,支持增删改查及导出Excel功能 - 新增HwWebDocument实体及Bo,实现文档信息管理 - 添加HwWebDocument控制器框架,准备后续完善API接口 - 编写HwWeb1Mapper及对应MyBatis XML,支持自定义SQL操作 - 建立完善的分页与查询条件构造,提高灵活性和性能 - 引入数据校验及重复提交防护机制保证接口安全与数据正确性main
parent
3f65fd0e7c
commit
9a817946fb
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>hw-web</artifactId>
|
||||
|
||||
<description>
|
||||
hw-web模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-doc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-translation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- OSS功能模块 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-oss</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- excel-->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SMS功能模块 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-sms</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-idempotent</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-sensitive</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-encrypt</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-websocket</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-sse</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,29 @@
|
||||
package org.dromara.web.domain.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 获取安全文件地址请求对象
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-11-28
|
||||
*/
|
||||
@Data
|
||||
public class SecureDocumentRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String documentId;
|
||||
|
||||
/**
|
||||
* 用户提供的密钥
|
||||
*/
|
||||
private String providedKey;
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package org.dromara.web.domain.vo;
|
||||
|
||||
import org.dromara.web.domain.HwWeb1;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* haiwei官网json视图对象 hw_web1
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-11-28
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = HwWeb1.class)
|
||||
public class HwWeb1Vo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long webId;
|
||||
|
||||
/**
|
||||
* json
|
||||
*/
|
||||
@ExcelProperty(value = "json")
|
||||
private String webJson;
|
||||
|
||||
/**
|
||||
* json字符串
|
||||
*/
|
||||
@ExcelProperty(value = "json字符串")
|
||||
private String webJsonString;
|
||||
|
||||
/**
|
||||
* 页面
|
||||
*/
|
||||
@ExcelProperty(value = "页面")
|
||||
private Long webCode;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@ExcelProperty(value = "设备id")
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
* 类型id
|
||||
*/
|
||||
@ExcelProperty(value = "类型id")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private String isDelete;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private String webJsonEnglish;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package org.dromara.web.service;
|
||||
|
||||
import org.dromara.web.domain.vo.HwWeb1Vo;
|
||||
import org.dromara.web.domain.bo.HwWeb1Bo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* haiwei官网jsonService接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-11-28
|
||||
*/
|
||||
public interface IHwWeb1Service {
|
||||
|
||||
/**
|
||||
* 查询haiwei官网json
|
||||
*
|
||||
* @param webId 主键
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
HwWeb1Vo queryById(Long webId);
|
||||
|
||||
/**
|
||||
* 分页查询haiwei官网json列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return haiwei官网json分页列表
|
||||
*/
|
||||
TableDataInfo<HwWeb1Vo> queryPageList(HwWeb1Bo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的haiwei官网json列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return haiwei官网json列表
|
||||
*/
|
||||
List<HwWeb1Vo> queryList(HwWeb1Bo bo);
|
||||
|
||||
/**
|
||||
* 新增haiwei官网json
|
||||
*
|
||||
* @param bo haiwei官网json
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(HwWeb1Bo bo);
|
||||
|
||||
/**
|
||||
* 修改haiwei官网json
|
||||
*
|
||||
* @param bo haiwei官网json
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(HwWeb1Bo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除haiwei官网json信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据页面编码查询haiwei官网json
|
||||
*
|
||||
* @param webCode 页面编码
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
HwWeb1Vo queryByWebCode(Long webCode);
|
||||
|
||||
/**
|
||||
* 根据 (webCode, deviceId, typeId) 三元组查询唯一记录
|
||||
*
|
||||
* @param bo 包含查询条件的业务对象
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
HwWeb1Vo queryOne(HwWeb1Bo bo);
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package org.dromara.web.service;
|
||||
|
||||
import org.dromara.web.domain.vo.HwWebMenu1Vo;
|
||||
import org.dromara.web.domain.bo.HwWebMenu1Bo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* HwWebMenu1Service接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-11-28
|
||||
*/
|
||||
public interface IHwWebMenu1Service {
|
||||
|
||||
/**
|
||||
* 查询HwWebMenu1
|
||||
*
|
||||
* @param webMenuId 主键
|
||||
* @return HwWebMenu1
|
||||
*/
|
||||
HwWebMenu1Vo queryById(Long webMenuId);
|
||||
|
||||
/**
|
||||
* 分页查询HwWebMenu1列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return HwWebMenu1分页列表
|
||||
*/
|
||||
TableDataInfo<HwWebMenu1Vo> queryPageList(HwWebMenu1Bo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的HwWebMenu1列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return HwWebMenu1列表
|
||||
*/
|
||||
List<HwWebMenu1Vo> queryList(HwWebMenu1Bo bo);
|
||||
|
||||
/**
|
||||
* 新增HwWebMenu1
|
||||
*
|
||||
* @param bo HwWebMenu1
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(HwWebMenu1Bo bo);
|
||||
|
||||
/**
|
||||
* 修改HwWebMenu1
|
||||
*
|
||||
* @param bo HwWebMenu1
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(HwWebMenu1Bo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除HwWebMenu1信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取菜单树列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 树形结构菜单列表
|
||||
*/
|
||||
List<HwWebMenu1Vo> selectMenuTree(HwWebMenu1Bo bo);
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package org.dromara.web.service;
|
||||
|
||||
import org.dromara.web.domain.vo.HwWebMenuVo;
|
||||
import org.dromara.web.domain.bo.HwWebMenuBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* HwWebMenuService接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-11-28
|
||||
*/
|
||||
public interface IHwWebMenuService {
|
||||
|
||||
/**
|
||||
* 查询HwWebMenu
|
||||
*
|
||||
* @param webMenuId 主键
|
||||
* @return HwWebMenu
|
||||
*/
|
||||
HwWebMenuVo queryById(Long webMenuId);
|
||||
|
||||
/**
|
||||
* 分页查询HwWebMenu列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return HwWebMenu分页列表
|
||||
*/
|
||||
TableDataInfo<HwWebMenuVo> queryPageList(HwWebMenuBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的HwWebMenu列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return HwWebMenu列表
|
||||
*/
|
||||
List<HwWebMenuVo> queryList(HwWebMenuBo bo);
|
||||
|
||||
/**
|
||||
* 新增HwWebMenu
|
||||
*
|
||||
* @param bo HwWebMenu
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(HwWebMenuBo bo);
|
||||
|
||||
/**
|
||||
* 修改HwWebMenu
|
||||
*
|
||||
* @param bo HwWebMenu
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(HwWebMenuBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除HwWebMenu信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取菜单树列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 树形结构菜单列表
|
||||
*/
|
||||
List<HwWebMenuVo> selectMenuTree(HwWebMenuBo bo);
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package org.dromara.web.service;
|
||||
|
||||
import org.dromara.web.domain.vo.HwWebVo;
|
||||
import org.dromara.web.domain.bo.HwWebBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* haiwei官网jsonService接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-11-28
|
||||
*/
|
||||
public interface IHwWebService {
|
||||
|
||||
/**
|
||||
* 查询haiwei官网json
|
||||
*
|
||||
* @param webId 主键
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
HwWebVo queryById(Long webId);
|
||||
|
||||
/**
|
||||
* 分页查询haiwei官网json列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return haiwei官网json分页列表
|
||||
*/
|
||||
TableDataInfo<HwWebVo> queryPageList(HwWebBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的haiwei官网json列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return haiwei官网json列表
|
||||
*/
|
||||
List<HwWebVo> queryList(HwWebBo bo);
|
||||
|
||||
/**
|
||||
* 新增haiwei官网json
|
||||
*
|
||||
* @param bo haiwei官网json
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(HwWebBo bo);
|
||||
|
||||
/**
|
||||
* 修改haiwei官网json
|
||||
*
|
||||
* @param bo haiwei官网json
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(HwWebBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除haiwei官网json信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据页面编码查询haiwei官网json
|
||||
*
|
||||
* @param webCode 页面编码
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
HwWebVo queryByWebCode(Long webCode);
|
||||
}
|
||||
@ -0,0 +1,176 @@
|
||||
<?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="org.dromara.web.mapper.HwWeb1Mapper">
|
||||
|
||||
<resultMap type="org.dromara.web.domain.vo.HwWeb1Vo" id="HwWeb1Result">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomHwWeb1VoList" resultMap="HwWeb1Result">
|
||||
select t.web_id, t.web_json, t.web_json_string, t.web_code, t.device_id, t.file_address, t.secret_ket, t.typeId, t.is_delete, t.update_time, t.create_time, t.web_json_english
|
||||
from hw_web1 t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询详情 -->
|
||||
<select id="selectCustomHwWeb1VoById" resultMap="HwWeb1Result">
|
||||
select t.web_id, t.web_json, t.web_json_string, t.web_code, t.device_id, t.file_address, t.secret_ket, t.typeId, t.is_delete, t.update_time, t.create_time, t.web_json_english
|
||||
from hw_web1 t
|
||||
where t.web_id = #{webId}
|
||||
</select>
|
||||
|
||||
<!-- 批量查询 - 根据ID列表 -->
|
||||
<select id="selectCustomHwWeb1VoByIds" resultMap="HwWeb1Result">
|
||||
select t.web_id, t.web_json, t.web_json_string, t.web_code, t.device_id, t.file_address, t.secret_ket, t.typeId, t.is_delete, t.update_time, t.create_time, t.web_json_english
|
||||
from hw_web1 t
|
||||
where t.web_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 统计查询 -->
|
||||
<select id="countCustomHwWeb1" resultType="java.lang.Long">
|
||||
select count(1) from hw_web1 t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(带自定义条件) -->
|
||||
<select id="selectCustomHwWeb1VoPage" resultMap="HwWeb1Result">
|
||||
select t.web_id, t.web_json, t.web_json_string, t.web_code, t.device_id, t.file_address, t.secret_ket, t.typeId, t.is_delete, t.update_time, t.create_time, t.web_json_english
|
||||
from hw_web1 t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsertHwWeb1">
|
||||
insert into hw_web1(
|
||||
web_json,
|
||||
|
||||
web_json_string,
|
||||
|
||||
web_code,
|
||||
|
||||
device_id,
|
||||
|
||||
file_address,
|
||||
|
||||
secret_ket,
|
||||
|
||||
typeId,
|
||||
|
||||
is_delete,
|
||||
|
||||
update_time,
|
||||
|
||||
create_time,
|
||||
|
||||
web_json_english
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.webJson},
|
||||
|
||||
#{item.webJsonString},
|
||||
|
||||
#{item.webCode},
|
||||
|
||||
#{item.deviceId},
|
||||
|
||||
#{item.fileAddress},
|
||||
|
||||
#{item.secretKet},
|
||||
|
||||
#{item.typeid},
|
||||
|
||||
#{item.isDelete},
|
||||
|
||||
#{item.updateTime},
|
||||
|
||||
#{item.createTime},
|
||||
|
||||
#{item.webJsonEnglish}
|
||||
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新 -->
|
||||
<update id="batchUpdateHwWeb1">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update hw_web1
|
||||
<set>
|
||||
<if test="item.webJson != null and item.webJson != ''">
|
||||
web_json = #{item.webJson},
|
||||
</if>
|
||||
<if test="item.webJsonString != null and item.webJsonString != ''">
|
||||
web_json_string = #{item.webJsonString},
|
||||
</if>
|
||||
<if test="item.webCode != null">
|
||||
web_code = #{item.webCode},
|
||||
</if>
|
||||
<if test="item.deviceId != null">
|
||||
device_id = #{item.deviceId},
|
||||
</if>
|
||||
<if test="item.fileAddress != null and item.fileAddress != ''">
|
||||
file_address = #{item.fileAddress},
|
||||
</if>
|
||||
<if test="item.secretKet != null and item.secretKet != ''">
|
||||
secret_ket = #{item.secretKet},
|
||||
</if>
|
||||
<if test="item.typeid != null">
|
||||
typeId = #{item.typeid},
|
||||
</if>
|
||||
<if test="item.isDelete != null and item.isDelete != ''">
|
||||
is_delete = #{item.isDelete},
|
||||
</if>
|
||||
<if test="item.updateTime != null">
|
||||
update_time = #{item.updateTime},
|
||||
</if>
|
||||
<if test="item.createTime != null">
|
||||
create_time = #{item.createTime},
|
||||
</if>
|
||||
<if test="item.webJsonEnglish != null and item.webJsonEnglish != ''">
|
||||
web_json_english = #{item.webJsonEnglish}
|
||||
</if>
|
||||
</set>
|
||||
where web_id = #{item.webId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据自定义条件删除 -->
|
||||
<delete id="deleteCustomHwWeb1">
|
||||
delete from hw_web1
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID列表批量删除 -->
|
||||
<delete id="deleteCustomHwWeb1ByIds">
|
||||
delete from hw_web1
|
||||
where web_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 检查是否存在 -->
|
||||
<select id="existsHwWeb1" resultType="java.lang.Boolean">
|
||||
select count(1) > 0 from hw_web1 t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,166 @@
|
||||
<?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="org.dromara.web.mapper.HwWebDocumentMapper">
|
||||
|
||||
<resultMap type="org.dromara.web.domain.vo.HwWebDocumentVo" id="HwWebDocumentResult">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomHwWebDocumentVoList" resultMap="HwWebDocumentResult">
|
||||
select t.document_id, t.tenant_id, t.document_address, t.create_time, t.web_code, t.secretKey, t.json, t.type, t.is_delete, t.update_time
|
||||
from hw_web_document t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询详情 -->
|
||||
<select id="selectCustomHwWebDocumentVoById" resultMap="HwWebDocumentResult">
|
||||
select t.document_id, t.tenant_id, t.document_address, t.create_time, t.web_code, t.secretKey, t.json, t.type, t.is_delete, t.update_time
|
||||
from hw_web_document t
|
||||
where t.document_id = #{documentId}
|
||||
</select>
|
||||
|
||||
<!-- 批量查询 - 根据ID列表 -->
|
||||
<select id="selectCustomHwWebDocumentVoByIds" resultMap="HwWebDocumentResult">
|
||||
select t.document_id, t.tenant_id, t.document_address, t.create_time, t.web_code, t.secretKey, t.json, t.type, t.is_delete, t.update_time
|
||||
from hw_web_document t
|
||||
where t.document_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 统计查询 -->
|
||||
<select id="countCustomHwWebDocument" resultType="java.lang.Long">
|
||||
select count(1) from hw_web_document t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(带自定义条件) -->
|
||||
<select id="selectCustomHwWebDocumentVoPage" resultMap="HwWebDocumentResult">
|
||||
select t.document_id, t.tenant_id, t.document_address, t.create_time, t.web_code, t.secretKey, t.json, t.type, t.is_delete, t.update_time
|
||||
from hw_web_document t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsertHwWebDocument">
|
||||
insert into hw_web_document(
|
||||
document_id,
|
||||
|
||||
tenant_id,
|
||||
|
||||
document_address,
|
||||
|
||||
create_time,
|
||||
|
||||
web_code,
|
||||
|
||||
secretKey,
|
||||
|
||||
json,
|
||||
|
||||
type,
|
||||
|
||||
is_delete,
|
||||
|
||||
update_time
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.documentId},
|
||||
|
||||
#{item.tenantId},
|
||||
|
||||
#{item.documentAddress},
|
||||
|
||||
#{item.createTime},
|
||||
|
||||
#{item.webCode},
|
||||
|
||||
#{item.secretkey},
|
||||
|
||||
#{item.json},
|
||||
|
||||
#{item.type},
|
||||
|
||||
#{item.isDelete},
|
||||
|
||||
#{item.updateTime}
|
||||
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新 -->
|
||||
<update id="batchUpdateHwWebDocument">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update hw_web_document
|
||||
<set>
|
||||
<if test="item.tenantId != null">
|
||||
tenant_id = #{item.tenantId},
|
||||
</if>
|
||||
<if test="item.documentAddress != null and item.documentAddress != ''">
|
||||
document_address = #{item.documentAddress},
|
||||
</if>
|
||||
<if test="item.createTime != null">
|
||||
create_time = #{item.createTime},
|
||||
</if>
|
||||
<if test="item.webCode != null and item.webCode != ''">
|
||||
web_code = #{item.webCode},
|
||||
</if>
|
||||
<if test="item.secretkey != null and item.secretkey != ''">
|
||||
secretKey = #{item.secretkey},
|
||||
</if>
|
||||
<if test="item.json != null and item.json != ''">
|
||||
json = #{item.json},
|
||||
</if>
|
||||
<if test="item.type != null and item.type != ''">
|
||||
type = #{item.type},
|
||||
</if>
|
||||
<if test="item.isDelete != null and item.isDelete != ''">
|
||||
is_delete = #{item.isDelete},
|
||||
</if>
|
||||
<if test="item.updateTime != null">
|
||||
update_time = #{item.updateTime}
|
||||
</if>
|
||||
</set>
|
||||
where document_id = #{item.documentId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据自定义条件删除 -->
|
||||
<delete id="deleteCustomHwWebDocument">
|
||||
delete from hw_web_document
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID列表批量删除 -->
|
||||
<delete id="deleteCustomHwWebDocumentByIds">
|
||||
delete from hw_web_document
|
||||
where document_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 检查是否存在 -->
|
||||
<select id="existsHwWebDocument" resultType="java.lang.Boolean">
|
||||
select count(1) > 0 from hw_web_document t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,148 @@
|
||||
<?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="org.dromara.web.mapper.HwWebMapper">
|
||||
|
||||
<resultMap type="org.dromara.web.domain.vo.HwWebVo" id="HwWebResult">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomHwWebVoList" resultMap="HwWebResult">
|
||||
select t.web_id, t.web_json, t.web_json_string, t.web_code, t.is_delete, t.update_time, t.create_time, t.web_json_english
|
||||
from hw_web t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询详情 -->
|
||||
<select id="selectCustomHwWebVoById" resultMap="HwWebResult">
|
||||
select t.web_id, t.web_json, t.web_json_string, t.web_code, t.is_delete, t.update_time, t.create_time, t.web_json_english
|
||||
from hw_web t
|
||||
where t.web_id = #{webId}
|
||||
</select>
|
||||
|
||||
<!-- 批量查询 - 根据ID列表 -->
|
||||
<select id="selectCustomHwWebVoByIds" resultMap="HwWebResult">
|
||||
select t.web_id, t.web_json, t.web_json_string, t.web_code, t.is_delete, t.update_time, t.create_time, t.web_json_english
|
||||
from hw_web t
|
||||
where t.web_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 统计查询 -->
|
||||
<select id="countCustomHwWeb" resultType="java.lang.Long">
|
||||
select count(1) from hw_web t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(带自定义条件) -->
|
||||
<select id="selectCustomHwWebVoPage" resultMap="HwWebResult">
|
||||
select t.web_id, t.web_json, t.web_json_string, t.web_code, t.is_delete, t.update_time, t.create_time, t.web_json_english
|
||||
from hw_web t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsertHwWeb">
|
||||
insert into hw_web(
|
||||
web_json,
|
||||
|
||||
web_json_string,
|
||||
|
||||
web_code,
|
||||
|
||||
is_delete,
|
||||
|
||||
update_time,
|
||||
|
||||
create_time,
|
||||
|
||||
web_json_english
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.webJson},
|
||||
|
||||
#{item.webJsonString},
|
||||
|
||||
#{item.webCode},
|
||||
|
||||
#{item.isDelete},
|
||||
|
||||
#{item.updateTime},
|
||||
|
||||
#{item.createTime},
|
||||
|
||||
#{item.webJsonEnglish}
|
||||
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新 -->
|
||||
<update id="batchUpdateHwWeb">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update hw_web
|
||||
<set>
|
||||
<if test="item.webJson != null and item.webJson != ''">
|
||||
web_json = #{item.webJson},
|
||||
</if>
|
||||
<if test="item.webJsonString != null and item.webJsonString != ''">
|
||||
web_json_string = #{item.webJsonString},
|
||||
</if>
|
||||
<if test="item.webCode != null">
|
||||
web_code = #{item.webCode},
|
||||
</if>
|
||||
<if test="item.isDelete != null and item.isDelete != ''">
|
||||
is_delete = #{item.isDelete},
|
||||
</if>
|
||||
<if test="item.updateTime != null">
|
||||
update_time = #{item.updateTime},
|
||||
</if>
|
||||
<if test="item.createTime != null">
|
||||
create_time = #{item.createTime},
|
||||
</if>
|
||||
<if test="item.webJsonEnglish != null and item.webJsonEnglish != ''">
|
||||
web_json_english = #{item.webJsonEnglish}
|
||||
</if>
|
||||
</set>
|
||||
where web_id = #{item.webId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据自定义条件删除 -->
|
||||
<delete id="deleteCustomHwWeb">
|
||||
delete from hw_web
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID列表批量删除 -->
|
||||
<delete id="deleteCustomHwWebByIds">
|
||||
delete from hw_web
|
||||
where web_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 检查是否存在 -->
|
||||
<select id="existsHwWeb" resultType="java.lang.Boolean">
|
||||
select count(1) > 0 from hw_web t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,183 @@
|
||||
<?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="org.dromara.web.mapper.HwWebMenu1Mapper">
|
||||
|
||||
<resultMap type="org.dromara.web.domain.vo.HwWebMenu1Vo" id="HwWebMenu1Result">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomHwWebMenu1VoList" resultMap="HwWebMenu1Result">
|
||||
select t.web_menu_id, t.parent, t.ancestors, t.status, t.web_menu_name, t.tenant_id, t.web_menu__pic, t.web_menu_type, t.value, t.is_delete, t.update_time, t.create_time, t.web_menu_name_english
|
||||
from hw_web_menu1 t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询详情 -->
|
||||
<select id="selectCustomHwWebMenu1VoById" resultMap="HwWebMenu1Result">
|
||||
select t.web_menu_id, t.parent, t.ancestors, t.status, t.web_menu_name, t.tenant_id, t.web_menu__pic, t.web_menu_type, t.value, t.is_delete, t.update_time, t.create_time, t.web_menu_name_english
|
||||
from hw_web_menu1 t
|
||||
where t.web_menu_id = #{webMenuId}
|
||||
</select>
|
||||
|
||||
<!-- 批量查询 - 根据ID列表 -->
|
||||
<select id="selectCustomHwWebMenu1VoByIds" resultMap="HwWebMenu1Result">
|
||||
select t.web_menu_id, t.parent, t.ancestors, t.status, t.web_menu_name, t.tenant_id, t.web_menu__pic, t.web_menu_type, t.value, t.is_delete, t.update_time, t.create_time, t.web_menu_name_english
|
||||
from hw_web_menu1 t
|
||||
where t.web_menu_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 统计查询 -->
|
||||
<select id="countCustomHwWebMenu1" resultType="java.lang.Long">
|
||||
select count(1) from hw_web_menu1 t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(带自定义条件) -->
|
||||
<select id="selectCustomHwWebMenu1VoPage" resultMap="HwWebMenu1Result">
|
||||
select t.web_menu_id, t.parent, t.ancestors, t.status, t.web_menu_name, t.tenant_id, t.web_menu__pic, t.web_menu_type, t.value, t.is_delete, t.update_time, t.create_time, t.web_menu_name_english
|
||||
from hw_web_menu1 t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsertHwWebMenu1">
|
||||
insert into hw_web_menu1(
|
||||
parent,
|
||||
|
||||
ancestors,
|
||||
|
||||
status,
|
||||
|
||||
web_menu_name,
|
||||
|
||||
tenant_id,
|
||||
|
||||
web_menu__pic,
|
||||
|
||||
web_menu_type,
|
||||
|
||||
value,
|
||||
|
||||
is_delete,
|
||||
|
||||
update_time,
|
||||
|
||||
create_time,
|
||||
|
||||
web_menu_name_english
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.parent},
|
||||
|
||||
#{item.ancestors},
|
||||
|
||||
#{item.status},
|
||||
|
||||
#{item.webMenuName},
|
||||
|
||||
#{item.tenantId},
|
||||
|
||||
#{item.webMenuPic},
|
||||
|
||||
#{item.webMenuType},
|
||||
|
||||
#{item.value},
|
||||
|
||||
#{item.isDelete},
|
||||
|
||||
#{item.updateTime},
|
||||
|
||||
#{item.createTime},
|
||||
|
||||
#{item.webMenuNameEnglish}
|
||||
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新 -->
|
||||
<update id="batchUpdateHwWebMenu1">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update hw_web_menu1
|
||||
<set>
|
||||
<if test="item.parent != null">
|
||||
parent = #{item.parent},
|
||||
</if>
|
||||
<if test="item.ancestors != null and item.ancestors != ''">
|
||||
ancestors = #{item.ancestors},
|
||||
</if>
|
||||
<if test="item.status != null and item.status != ''">
|
||||
status = #{item.status},
|
||||
</if>
|
||||
<if test="item.webMenuName != null and item.webMenuName != ''">
|
||||
web_menu_name = #{item.webMenuName},
|
||||
</if>
|
||||
<if test="item.tenantId != null">
|
||||
tenant_id = #{item.tenantId},
|
||||
</if>
|
||||
<if test="item.webMenuPic != null and item.webMenuPic != ''">
|
||||
web_menu__pic = #{item.webMenuPic},
|
||||
</if>
|
||||
<if test="item.webMenuType != null">
|
||||
web_menu_type = #{item.webMenuType},
|
||||
</if>
|
||||
<if test="item.value != null and item.value != ''">
|
||||
value = #{item.value},
|
||||
</if>
|
||||
<if test="item.isDelete != null and item.isDelete != ''">
|
||||
is_delete = #{item.isDelete},
|
||||
</if>
|
||||
<if test="item.updateTime != null">
|
||||
update_time = #{item.updateTime},
|
||||
</if>
|
||||
<if test="item.createTime != null">
|
||||
create_time = #{item.createTime},
|
||||
</if>
|
||||
<if test="item.webMenuNameEnglish != null and item.webMenuNameEnglish != ''">
|
||||
web_menu_name_english = #{item.webMenuNameEnglish}
|
||||
</if>
|
||||
</set>
|
||||
where web_menu_id = #{item.webMenuId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据自定义条件删除 -->
|
||||
<delete id="deleteCustomHwWebMenu1">
|
||||
delete from hw_web_menu1
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID列表批量删除 -->
|
||||
<delete id="deleteCustomHwWebMenu1ByIds">
|
||||
delete from hw_web_menu1
|
||||
where web_menu_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 检查是否存在 -->
|
||||
<select id="existsHwWebMenu1" resultType="java.lang.Boolean">
|
||||
select count(1) > 0 from hw_web_menu1 t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,176 @@
|
||||
<?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="org.dromara.web.mapper.HwWebMenuMapper">
|
||||
|
||||
<resultMap type="org.dromara.web.domain.vo.HwWebMenuVo" id="HwWebMenuResult">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomHwWebMenuVoList" resultMap="HwWebMenuResult">
|
||||
select t.web_menu_id, t.parent, t.ancestors, t.status, t.web_menu_name, t.tenant_id, t.web_menu__pic, t.web_menu_type, t.is_delete, t.update_time, t.create_time, t.web_menu_name_english
|
||||
from hw_web_menu t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询详情 -->
|
||||
<select id="selectCustomHwWebMenuVoById" resultMap="HwWebMenuResult">
|
||||
select t.web_menu_id, t.parent, t.ancestors, t.status, t.web_menu_name, t.tenant_id, t.web_menu__pic, t.web_menu_type, t.is_delete, t.update_time, t.create_time, t.web_menu_name_english
|
||||
from hw_web_menu t
|
||||
where t.web_menu_id = #{webMenuId}
|
||||
</select>
|
||||
|
||||
<!-- 批量查询 - 根据ID列表 -->
|
||||
<select id="selectCustomHwWebMenuVoByIds" resultMap="HwWebMenuResult">
|
||||
select t.web_menu_id, t.parent, t.ancestors, t.status, t.web_menu_name, t.tenant_id, t.web_menu__pic, t.web_menu_type, t.is_delete, t.update_time, t.create_time, t.web_menu_name_english
|
||||
from hw_web_menu t
|
||||
where t.web_menu_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 统计查询 -->
|
||||
<select id="countCustomHwWebMenu" resultType="java.lang.Long">
|
||||
select count(1) from hw_web_menu t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(带自定义条件) -->
|
||||
<select id="selectCustomHwWebMenuVoPage" resultMap="HwWebMenuResult">
|
||||
select t.web_menu_id, t.parent, t.ancestors, t.status, t.web_menu_name, t.tenant_id, t.web_menu__pic, t.web_menu_type, t.is_delete, t.update_time, t.create_time, t.web_menu_name_english
|
||||
from hw_web_menu t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsertHwWebMenu">
|
||||
insert into hw_web_menu(
|
||||
parent,
|
||||
|
||||
ancestors,
|
||||
|
||||
status,
|
||||
|
||||
web_menu_name,
|
||||
|
||||
tenant_id,
|
||||
|
||||
web_menu__pic,
|
||||
|
||||
web_menu_type,
|
||||
|
||||
is_delete,
|
||||
|
||||
update_time,
|
||||
|
||||
create_time,
|
||||
|
||||
web_menu_name_english
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.parent},
|
||||
|
||||
#{item.ancestors},
|
||||
|
||||
#{item.status},
|
||||
|
||||
#{item.webMenuName},
|
||||
|
||||
#{item.tenantId},
|
||||
|
||||
#{item.webMenuPic},
|
||||
|
||||
#{item.webMenuType},
|
||||
|
||||
#{item.isDelete},
|
||||
|
||||
#{item.updateTime},
|
||||
|
||||
#{item.createTime},
|
||||
|
||||
#{item.webMenuNameEnglish}
|
||||
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新 -->
|
||||
<update id="batchUpdateHwWebMenu">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update hw_web_menu
|
||||
<set>
|
||||
<if test="item.parent != null">
|
||||
parent = #{item.parent},
|
||||
</if>
|
||||
<if test="item.ancestors != null and item.ancestors != ''">
|
||||
ancestors = #{item.ancestors},
|
||||
</if>
|
||||
<if test="item.status != null and item.status != ''">
|
||||
status = #{item.status},
|
||||
</if>
|
||||
<if test="item.webMenuName != null and item.webMenuName != ''">
|
||||
web_menu_name = #{item.webMenuName},
|
||||
</if>
|
||||
<if test="item.tenantId != null">
|
||||
tenant_id = #{item.tenantId},
|
||||
</if>
|
||||
<if test="item.webMenuPic != null and item.webMenuPic != ''">
|
||||
web_menu__pic = #{item.webMenuPic},
|
||||
</if>
|
||||
<if test="item.webMenuType != null">
|
||||
web_menu_type = #{item.webMenuType},
|
||||
</if>
|
||||
<if test="item.isDelete != null and item.isDelete != ''">
|
||||
is_delete = #{item.isDelete},
|
||||
</if>
|
||||
<if test="item.updateTime != null">
|
||||
update_time = #{item.updateTime},
|
||||
</if>
|
||||
<if test="item.createTime != null">
|
||||
create_time = #{item.createTime},
|
||||
</if>
|
||||
<if test="item.webMenuNameEnglish != null and item.webMenuNameEnglish != ''">
|
||||
web_menu_name_english = #{item.webMenuNameEnglish}
|
||||
</if>
|
||||
</set>
|
||||
where web_menu_id = #{item.webMenuId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据自定义条件删除 -->
|
||||
<delete id="deleteCustomHwWebMenu">
|
||||
delete from hw_web_menu
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID列表批量删除 -->
|
||||
<delete id="deleteCustomHwWebMenuByIds">
|
||||
delete from hw_web_menu
|
||||
where web_menu_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 检查是否存在 -->
|
||||
<select id="existsHwWebMenu" resultType="java.lang.Boolean">
|
||||
select count(1) > 0 from hw_web_menu t
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue