From afda08833e460a40a2d4e509f9df9d809c6f8f31 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Fri, 26 Mar 2021 15:38:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml
index 825cc94..cd2985f 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="org.springblade.jfpt.healthcode.mapper.healthcodeMapper">
<!-- 通用查询映射结果 -->
- <resultMap id="healthcodeResultMap" type="org.springblade.jfpt.healthcode.entity.healthcode">
+ <resultMap id="healthcodeResultMap" type="org.springblade.jfpt.healthcode.entity.Healthcode">
<id column="id" property="id"/>
<result column="type" property="type"/>
<result column="sex" property="sex"/>
@@ -118,6 +118,39 @@
) b
on
a.click_date = b.datetime
+ order by a.click_date asc
+ </select>
+
+
+ <!--自定义健康码分页/健康码统计图表点击事件-->
+ <select id="selectHealthcodeListPage" resultType="org.springblade.jfpt.healthcode.entity.Healthcode">
+ SELECT * FROM healthcode
+ where 1=1
+ <if test="healthcodeVO.status==0">
+ and to_days(dtime)=to_days(now())
+ </if>
+ <if test="healthcodeVO.status==1">
+ and YEARWEEK(date_format(dtime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)
+ </if>
+ <if test="healthcodeVO.status==2">
+ and date_format(dtime,'%Y%m') = date_format(now(),'%Y%m')
+ </if>
+ <if test="healthcodeVO.type!=null">
+ and type=#{healthcodeVO.type}
+ </if>
+ <if test="healthcodeVO.province!=null">
+ and province like concat('%',#{healthcodeVO.province},'%')
+ </if>
+ <if test="healthcodeVO.city!=null">
+ and city like concat('%',#{healthcodeVO.city},'%')
+ </if>
+ <if test="healthcodeVO.district!=null">
+ and district like concat('%',#{healthcodeVO.district},'%')
+ </if>
+ <if test="healthcodeVO.begTime!=null and healthcodeVO.begTime!='' and healthcodeVO.endTime!=null and healthcodeVO.endTime!='' ">
+ and date(dtime) between #{healthcodeVO.begTime} and #{healthcodeVO.endTime}
+ </if>
+ ORDER BY dtime desc
</select>
</mapper>
--
Gitblit v1.9.3