无感五 2019-11-21 02:48 采纳率: 50%
浏览 1962
已采纳

SpringBootJPA 查询小于XXX时间报错

@Override
    public List<BhOrder1> findAll(Integer status, Date createTime){
        //条件
        SpecificationBuilder<BhOrder1> entitySpecificationBuilder = new SpecificationBuilder<>();


        //状态
        if (status != null){
            entitySpecificationBuilder.with("status", "like", status, false);
        }

        entitySpecificationBuilder.with("createTime", ">", createTime, false);


        List<BhOrder1> content = bhOrder1Repository.findAll(entitySpecificationBuilder.build());

        return content;
    }

当查询小于当前时间就会报错
报错代码

但是当查询等于当前时间就可以查询出来

  • 写回答

2条回答 默认 最新

  • threenewbee 2019-11-21 08:59
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?