From 764d883b5ea3bdc06abbec548b6df0511e567978 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 03 Sep 2024 09:46:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/binlog' into binlog

---
 src/main/java/org/springblade/modules/article/mapper/ArticleIntegralMapper.xml |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/article/mapper/ArticleIntegralMapper.xml b/src/main/java/org/springblade/modules/article/mapper/ArticleIntegralMapper.xml
new file mode 100644
index 0000000..48724b9
--- /dev/null
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleIntegralMapper.xml
@@ -0,0 +1,41 @@
+<?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>
+        order by jai.create_time desc
+    </select>
+
+
+</mapper>

--
Gitblit v1.9.3