@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"); }