当前位置:   article > 正文

若依框架从mysql切换到postgresql数据库驱动_postgresql 若依

postgresql 若依

1、修改依赖包

2、修改数据库连接池

3、修改分页插件

4、在所有的Mapper.xml配置文件中,替换sql

sysdate()-->now()

 status = 0 --> status = '0'

date_format(create_time,'%y%m%d')--->to_timestamp(create_time,'YYYY-MM-DD')

date_format(#{params.beginTime},'%y%m%d')-->to_timestamp(#{params.beginTime},'YYYY-MM-DD')

date_format(#{params.endTime},'%y%m%d')-->to_timestamp(#{params.endTime},'YYYY-MM-DD')

date_format(r.create_time,'%y%m%d')-->to_timestamp(r.create_time,'YYYY-MM-DD')

date_format(u.create_time,'%y%m%d')-->to_timestamp(u.create_time,'YYYY-MM-DD')

ifnull-->coalesce

find_in_set(#{deptId}, ancestors)-->cast(#{deptId} as varchar) = any(string_to_array(ancestors,','))

find_in_set( {} , ancestors )-->cast({} as varchar) = any(string_to_array(ancestors,','))

5.如果启用quartz功能

修改ScheduleConfig,添加自动任务依赖
/pg启用特殊配置,否则会报错

//        // postgresql 启用

//        prop.put(“org.quartz.jobStore.driverDelegateClass”, “org.quartz.impl.jdbcjobstore.PostgreSQLDelegate”);

6、如果你嫌麻烦可以使用博主自己转好的代码,关注博主在资源里

若依postgresql数据库执行脚本

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/代码探险家/article/detail/956805
推荐阅读
相关标签
  

闽ICP备14008679号