Преглед изворни кода

红德堂-总后台新增【是否下载app】筛选条件

Long пре 4 недеља
родитељ
комит
3470f63e80

+ 4 - 0
fs-service/src/main/java/com/fs/his/domain/FsUser.java

@@ -265,4 +265,8 @@ public class FsUser extends BaseEntity
     // app注册时间
     @JsonFormat(pattern = "yyyy-MM-dd")
     private LocalDateTime appCreateTime;
+
+    /** 是否下载APP (1=已下载, 0=未下载) */
+    @TableField(exist = false)
+    private Integer isDownloadApp;
 }

+ 4 - 0
fs-service/src/main/java/com/fs/his/mapper/FsUserMapper.java

@@ -141,6 +141,10 @@ public interface FsUserMapper
             "            <if test=\"loginDevice != null  and loginDevice != ''\"> and f1.login_device = #{loginDevice}</if>\n" +
             "            <if test=\"sTime != null \">  and DATE(f1.create_time) &gt;= DATE(#{sTime})</if>\n" +
             "            <if test=\"eTime != null \">  and DATE(f1.create_time) &lt;= DATE(#{eTime})</if>\n" +
+            "            <if test=\"isDownloadApp != null \">" +
+            "               <if test=\"isDownloadApp == 1\"> and ((f1.source is not null and f1.source != '') or f1.login_device is not null or f1.app_create_time is not null)</if>\n" +
+            "               <if test=\"isDownloadApp == 0\"> and ((f1.source is null or f1.source = '') and f1.login_device is null and f1.app_create_time is null)</if>\n" +
+            "            </if>\n" +
             "order by f1.user_id desc"+
             "</script>"})
     @Results({

+ 10 - 0
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -2079,6 +2079,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test = "maps.projectId != null" >
                 AND ucu.project_id = #{maps.projectId}
             </if >
+            <if test="maps.isDownloadApp != null">
+                <choose>
+                    <when test="maps.isDownloadApp == 1">
+                        and ((u.source is not null and u.source != '') or u.login_device is not null or u.app_create_time is not null)
+                    </when>
+                    <when test="maps.isDownloadApp == 0">
+                        and ((u.source is null or u.source = '') and u.login_device is null and u.app_create_time is null)
+                    </when>
+                </choose>
+            </if>
         </where>
         ORDER BY
         user_id DESC