Example #1
0
 /*
  * 保存/修改角色
  * @see com.cxstock.biz.power.RoleBiz#saveOrUpdateRole(com.cxstock.biz.power.dto.RoleDTO)
  */
 public void saveOrUpdateRole(RoleDTO dto) {
   Role role = new Role();
   if (dto.getRoleid() != null) {
     role = (Role) baseDao.loadById(Role.class, dto.getRoleid());
   }
   role.setRolename(dto.getRolename());
   role.setBz(dto.getBz());
   baseDao.saveOrUpdate(role);
 }
Example #2
0
 /*
  * 角色下拉数据
  * @see com.cxstock.biz.power.RoleBiz#deleteRole(java.lang.Integer)
  */
 public List findRoleType() {
   List list = new ArrayList();
   List<Role> roleList = baseDao.listAll("Role");
   for (Role role : roleList) {
     ComboData dto = new ComboData();
     dto.setValue(role.getRoleid().toString());
     dto.setText(role.getRolename());
     list.add(dto);
   }
   return list;
 }