Commit b7182608 by Jbb

postgresql 时间格式的转化问题

parent 60e17712
......@@ -34,6 +34,7 @@ public class EduConfig {
public PageHelper getPageHelper(){
PageHelper pageHelper=new PageHelper();
Properties properties=new Properties();
//properties.setProperty("helperDialect","mysql");
properties.setProperty("helperDialect","postgresql");
properties.setProperty("reasonable","true");
properties.setProperty("supportMethodsArguments","true");
......
......@@ -16,15 +16,16 @@
<result column="count" property="count" jdbcType="TIMESTAMP"></result>
</resultMap>
<select id="selectLayers" parameterType="com.founder.commonutils.viewEntity.TbStLayer" resultMap="tbStLayer">
select * from tb_st_layer t1 where 1=1 order by lrsj DESC
select * from tb_st_layer t1 where 1=1
<if test="lrr!='' and lrr!=null">
and t1.lrr like CONCAT('%',#{lrr},'%')
</if>
<if test="startTime!='' and startTime!=null">
and t1.lrsj <![CDATA[>=]]> #{startTime}
and t1.lrsj <![CDATA[>=]]> to_timestamp(#{startTime},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="endTime!='' and endTime!=null">
and t1.lrsj <![CDATA[<=]]> #{endTime}
and t1.lrsj <![CDATA[<=]]> to_timestamp(#{endTime},'yyyy-MM-dd hh24:mi:ss')
</if>
order by lrsj DESC
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment