34 lines
1.5 KiB
XML
34 lines
1.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- @author <a href="https://github.com/liyupi">程序员鱼皮</a> -->
|
|
<!-- @from <a href="https://yupi.icu">编程导航知识星球</a> -->
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.yupi.springbootinit.mapper.PostMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.yupi.springbootinit.model.entity.Post">
|
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
|
<result property="title" column="title" jdbcType="VARCHAR"/>
|
|
<result property="content" column="content" jdbcType="VARCHAR"/>
|
|
<result property="tags" column="tags" jdbcType="VARCHAR"/>
|
|
<result property="thumbNum" column="thumbNum" jdbcType="BIGINT"/>
|
|
<result property="favourNum" column="favourNum" jdbcType="BIGINT"/>
|
|
<result property="userId" column="userId" jdbcType="BIGINT"/>
|
|
<result property="createTime" column="createTime" jdbcType="TIMESTAMP"/>
|
|
<result property="updateTime" column="updateTime" jdbcType="TIMESTAMP"/>
|
|
<result property="isDelete" column="isDelete" jdbcType="TINYINT"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id,title,content,tags,
|
|
thumbNum,favourNum,userId,
|
|
createTime,updateTime,isDelete
|
|
</sql>
|
|
|
|
<select id="listPostWithDelete" resultType="com.yupi.springbootinit.model.entity.Post">
|
|
select *
|
|
from post
|
|
where updateTime >= #{minUpdateTime}
|
|
</select>
|
|
</mapper>
|
|
<!--帖子--> |