Просмотр исходного кода

私有客户查询时间BUG修复

anderx лет назад: 3
Родитель
Сommit
040b8a0e72

+ 4 - 10
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1448,11 +1448,8 @@
     <if test="name != null and name != ''">
       and a.nickname like concat('%',#{name},'%')
     </if>
-    <if test="startDate != null and startDate != ''">
-      and a.transfer_time &gt; #{startDate}
-    </if>
-    <if test="endDate != null and endDate != ''">
-      and a.transfer_time &lt; #{endDate}
+    <if test="startDate != null and endDate != null">
+      and a.transfer_time BETWEEN #{startDate} and #{endDate}
     </if>
     <if test="province != null">
       and d.location_province = #{province,jdbcType=INTEGER}
@@ -1508,11 +1505,8 @@
     <if test="name != null and name != ''">
       and a.nickname like concat('%',#{name},'%')
     </if>
-    <if test="startDate != null and startDate != ''">
-      and a.transfer_time &gt; #{startDate}
-    </if>
-    <if test="endDate != null and endDate != ''">
-      and a.transfer_time &lt; #{endDate}
+    <if test="startDate != null and endDate != null">
+      and a.transfer_time BETWEEN #{startDate} and #{endDate}
     </if>
     <if test="province != null">
       and d.location_province = #{province,jdbcType=INTEGER}

+ 1 - 5
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -283,7 +283,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		if (StringUtils.isNotBlank(cli.getStartDate()))
 			params.put("startDate", cli.getStartDate());
 		if (StringUtils.isNotBlank(cli.getEndDate()))
-			params.put("endDate", cli.getEndDate());
+			params.put("endDate", cli.getEndDate()+" 23:59:59");
 		if (StringUtils.isNotBlank(cli.getIndustry()))
 			params.put("industry", Integer.parseInt(cli.getIndustry()));
 		if (StringUtils.isNotBlank(cli.getAid()))
@@ -296,10 +296,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			params.put("societyTag", cli.getSocietyTag());
 		if (StringUtils.isNotBlank(cli.getFollow()))
 			params.put("follow", cli.getFollow());
-		if (StringUtils.isNotBlank(cli.getStartDate()))
-			params.put("startDate", cli.getStartDate() + " 00:00:00");
-		if (StringUtils.isNotBlank(cli.getEndDate()))
-			params.put("endDate", cli.getEndDate() + " 23:59:59");
 		if (null != cli.getDataGrade())
 			params.put("dataGrade", cli.getDataGrade());
 		if (null != cli.getLevel())