src/main/resources/mapper/FilesDao.xml
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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="cn.hxh.files.mapper.FilesDao">
<resultMap type="cn.hxh.files.pojo.Files" id="FilesMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="oldfilename" column="oldFileName" jdbcType="VARCHAR"/>
<result property="newfilename" column="newFileName" jdbcType="VARCHAR"/>
<result property="ext" column="ext" jdbcType="VARCHAR"/>
<result property="path" column="path" jdbcType="VARCHAR"/>
<result property="size" column="size" jdbcType="INTEGER"/>
<result property="type" column="type" jdbcType="VARCHAR"/>
<result property="isimg" column="isImg" jdbcType="VARCHAR"/>
<result property="downcounts" column="downcounts" jdbcType="INTEGER"/>
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="FilesMap">
select
id, oldFileName, newFileName, ext, path, size, type, isImg, downcounts, upload_time, user_id
from userfiles.files
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="FilesMap">
select
id, oldFileName, newFileName, ext, path, size, type, isImg, downcounts, upload_time, user_id
from userfiles.files
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="FilesMap">
select
id, oldFileName, newFileName, ext, path, size, type, isImg, downcounts, upload_time, user_id
from userfiles.files
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="oldfilename != null and oldfilename != ''">
and oldFileName = #{oldfilename}
</if>
<if test="newfilename != null and newfilename != ''">
and newFileName = #{newfilename}
</if>
<if test="ext != null and ext != ''">
and ext = #{ext}
</if>
<if test="path != null and path != ''">
and path = #{path}
</if>
<if test="size != null">
and size = #{size}
</if>
<if test="type != null and type != ''">
and type = #{type}
</if>
后面还有 65 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
