hz-website/backend/target/classes/mapping/AttachmentMapper.xml

37 lines
1.6 KiB
XML
Raw Normal View History

2025-06-11 17:46:57 +08:00
<?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="cc.iteachyou.cms.dao.AttachmentMapper" >
<resultMap id="BaseResultMap" type="cc.iteachyou.cms.entity.Attachment" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="code" property="code" jdbcType="VARCHAR" />
<result column="filename" property="filename" jdbcType="VARCHAR" />
<result column="filesize" property="filesize" jdbcType="INTEGER" />
<result column="filetype" property="filetype" jdbcType="VARCHAR" />
<result column="filepath" property="filepath" jdbcType="VARCHAR" />
<result column="create_by" property="createBy" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, code, filename, filesize, filetype, filepath, create_by, create_time, update_by,
update_time
</sql>
<select id="queryListByPage" parameterType="java.util.Map" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from system_attachment
where 1 = 1
order by create_time desc
</select>
<select id="selectByCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from system_attachment
where
code = #{code,jdbcType=VARCHAR}
</select>
</mapper>