|
@@ -88,9 +88,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="tdb != null "> and tdb = #{tdb}</if>
|
|
|
<if test="medicineAmount != null "> and medicine_amount = #{medicineAmount}</if>
|
|
|
<if test="revision != null "> and revision = #{revision}</if>
|
|
|
- <!-- 下面是新增的SQL检索条件 -->
|
|
|
- <if test="timeBegin != null and timeBegin != ''"> and SUBSTRING (CONVERT ( VARCHAR, create_time, 120 ), 1, 10 ) >= #{timeBegin}</if>
|
|
|
- <if test="timeEnd != null and timeEnd != ''"> and SUBSTRING (CONVERT ( VARCHAR, create_time, 120 ), 1, 10 ) <= #{timeEnd}</if>
|
|
|
+ <!-- 下面是新增的SQL检索条件 SqlServer写法-->
|
|
|
+ <!--<if test="timeBegin != null and timeBegin != ''"> and SUBSTRING (CONVERT ( VARCHAR, create_time, 120 ), 1, 10 ) >= #{timeBegin}</if>
|
|
|
+ <if test="timeEnd != null and timeEnd != ''"> and SUBSTRING (CONVERT ( VARCHAR, create_time, 120 ), 1, 10 ) <= #{timeEnd}</if>-->
|
|
|
+ <!-- 下面是新增的SQL检索条件 MySQL写法-->
|
|
|
+ <if test="timeBegin != null and timeBegin != ''"> and DATE_FORMAT(create_time, '%Y-%m-%d') >= #{timeBegin}</if>
|
|
|
+ <if test="timeEnd != null and timeEnd != ''"> DATE_FORMAT(create_time, '%Y-%m-%d') <= #{timeEnd}</if>
|
|
|
</where>
|
|
|
and del_flag = 0 order by id desc
|
|
|
</select>
|