postgres

1、approval_status按照指定顺序排序,create_time 按倒序:

WHERE (status = 0 ) ORDER BY position (approval_status::text in '2,1,4,5,3'),create_time DESC limit 20 offset 0

 2、Mybatis-plus 数据库自增主键为int 类型对应Java类类型为Integer 报错问题

添加  type = IdType.AUTO

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
原文地址:https://www.cnblogs.com/lijianda/p/12768530.html