xin
2025-06-03 142c47846c904ecd7387fce8e5fcbe3346884ebf
存储桶xml
1 files added
1 files modified
47 ■■■■■ changed files
oying-tools/src/main/java/com/oying/domain/dto/BucketStorageQueryCriteria.java 3 ●●●●● patch | view | raw | blame | history
oying-tools/src/main/resources/mapper/BucketStorageMapper.xml 44 ●●●●● patch | view | raw | blame | history
oying-tools/src/main/java/com/oying/domain/dto/BucketStorageQueryCriteria.java
@@ -21,5 +21,8 @@
    @ApiModelProperty(value = "模糊查询")
    private String blurry;
    @ApiModelProperty(value = "文件类型")
    private String type;
    private List<Timestamp> createTime;
}
oying-tools/src/main/resources/mapper/BucketStorageMapper.xml
New file
@@ -0,0 +1,44 @@
<?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.oying.mapper.BucketStorageMapper">
    <resultMap id="BaseResultMap" type="com.oying.domain.BucketStorage">
        <id column="bucket_id" property="bucketId"/>
        <result column="real_name" property="realName"/>
        <result column="name" property="name"/>
        <result column="suffix" property="suffix"/>
        <result column="path" property="path"/>
        <result column="type" property="type"/>
        <result column="size" property="size"/>
        <result column="create_by" property="createBy"/>
        <result column="create_time" property="createTime"/>
        <result column="update_by" property="updateBy"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>
    <sql id="Base_Column_List">
        bucket_id, real_name, name, suffix, path, type, size, create_by, create_time, update_by, update_time
    </sql>
    <select id="findAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from tool_bucket_storage
        <where>
            <if test="criteria.blurry != null and criteria.blurry != ''">
                and (real_name like concat('%',#{criteria.blurry},'%')
                or name like concat('%',#{criteria.blurry},'%')
                or suffix like concat('%',#{criteria.blurry},'%')
                or size like concat('%',#{criteria.blurry},'%')
                or create_by like concat('%',#{criteria.blurry},'%')
                )
            </if>
            <if test="criteria.type != null and criteria.type != ''">
                and type = #{criteria.type}
            </if>
            <if test="criteria.createTime != null and criteria.createTime.size() > 0">
                AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]}
            </if>
        </where>
        order by bucket_id desc
    </select>
</mapper>