当前位置 : 主页 > 手机开发 > ROM >

JBOOT使用总结

来源:互联网 收集:自由互联 发布时间:2021-06-10
@Override public SwAdmin findById( long id) { return DAO.findFirst("SELECT * FROM sw_admin WHERE id = ?" , id); } @Override public boolean deleteById( long id) { return Db.update("UPDATE sw_admin SET status = 0 WHERE status = 1 AND id = ?",
    @Override
    public SwAdmin findById(long id) {
        return DAO.findFirst("SELECT * FROM sw_admin WHERE id = ?", id);
    }

    @Override
    public boolean deleteById(long id) {
        return Db.update("UPDATE sw_admin SET status = 0 WHERE status = 1 AND id = ?", id) > 0;
    }

    @Override
    public SwAdmin findByColumns(Columns columns) {
        columns.eq("status", 1);
        return DAO.findFirstByColumns(columns, "id DESC");
    }

    @Override
    public List<SwAdmin> findAllByColumns(Columns columns) {
        columns.eq("status", 1);
        return DAO.findListByColumns(columns, "id DESC");
    }
网友评论