<?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.ArticleIntegralMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="articleIntegralResultMap" type="org.springblade.modules.article.vo.ArticleIntegralVO">
|
<result column="id" property="id"/>
|
<result column="article_id" property="articleId"/>
|
<result column="score" property="score"/>
|
<result column="create_time" property="createTime"/>
|
<result column="create_user" property="createUser"/>
|
<result column="is_deleted" property="isDeleted"/>
|
</resultMap>
|
|
<!--自定义分页查询-->
|
<select id="selectArticleIntegralPage" resultMap="articleIntegralResultMap">
|
select
|
jai.*,
|
jh.house_name as address,
|
jh.district_name as aoiName,
|
bu.real_name,
|
bu.phone,
|
bu.avatar
|
from jczz_article_integral jai
|
left join jczz_house jh on jai.house_code = jh.house_code and jh.is_deleted = 0
|
left join blade_user bu on bu.id = jai.create_user and bu.is_deleted = 0
|
where jai.is_deleted = 0
|
<if test="articleIntegral.realName!=null and articleIntegral.realName!=''">
|
and bu.real_name like concat('%',#{articleIntegral.realName},'%')
|
</if>
|
<if test="articleIntegral.phone!=null and articleIntegral.phone!=''">
|
and bu.phone like concat('%',#{articleIntegral.phone},'%')
|
</if>
|
<if test="articleIntegral.articleId!=null">
|
and jai.article_id = #{articleIntegral.articleId}
|
</if>
|
</select>
|
|
|
</mapper>
|