package com.ffii.core.user.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.ffii.core.support.AbstractService;
import com.ffii.core.support.JdbcDao;
import com.ffii.core.user.service.pojo.AuthRecord;

@Service
public class AuthService extends AbstractService {

  public AuthService(JdbcDao jdbcDao) {
    super(jdbcDao);
  }

  public List<AuthRecord> list() {
    return jdbcDao.queryForList("SELECT"
        + " a.id,"
        + " a.module,"
        + " a.authority,"
        + " a.name,"
        + " a.description"
        + " FROM authority a"
        + " ORDER BY a.authority", AuthRecord.class);
  }

}
