linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?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.springblade.modules.article.mapper.ArticleCollectMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="articleCollectResultMap" type="org.springblade.modules.article.entity.ArticleCollectEntity">
        <result column="id" property="id"/>
        <result column="article_id" property="articleId"/>
        <result column="user_id" property="userId"/>
        <result column="create_time" property="createTime"/>
    </resultMap>
 
 
    <select id="selectArticleCollectPage" resultMap="articleCollectResultMap">
        select * from jczz_article_collect
        <where>
            <if test="noticeCollect.id != null "> and id = #{noticeCollect.id}</if>
            <if test="noticeCollect.articleId != null "> and article_id = #{noticeCollect.articleId}</if>
            <if test="noticeCollect.userId != null "> and user_id = #{noticeCollect.userId}</if>
            <if test="noticeCollect.createTime != null "> and create_time = #{noticeCollect.createTime}</if>
        </where>
    </select>
 
 
</mapper>