|
@@ -89,11 +89,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="medicineAmount != null "> and medicine_amount = #{medicineAmount}</if>
|
|
|
<if test="revision != null "> and revision = #{revision}</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>-->
|
|
|
+ <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>
|
|
|
+ <!--<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>
|
|
@@ -252,6 +252,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<!-- 下面是新增的SQL,不要覆盖 -->
|
|
|
<select id="getLatestRecord" resultMap="TXinyiMedicineParamResult">
|
|
|
<include refid="selectTXinyiMedicineParamVo"/>
|
|
|
- where del_flag = 0 order by id desc limit 1
|
|
|
+ where del_flag = 0 order by id desc OFFSET 0 ROWS FETCH NEXT 1 ROW ONLY
|
|
|
</select>
|
|
|
</mapper>
|