Esempio n. 1
0
  // 废弃
  @Override
  public void update(EmployeeModel model) {
    EmployeeModel em = new EmployeeModel();
    em = employeeDao.findById(model.getUuid());

    em.setUserName(model.getUserName());
    em.setName(model.getName());
    em.setEmail(model.getEmail());
    em.setPhone(model.getPhone());
    em.setSex(model.getSex());
    em.setAddres(model.getAddres());
    em.setBirthday(model.getBirthday());
    em.setDepartM(model.getDepartM());
    employeeDao.update(em);
  }
Esempio n. 2
0
 public void save(EmployeeModel model, Long[] roleUuids) {
   Set<RoleModel> roms = new HashSet<RoleModel>();
   for (Long uuid : roleUuids) {
     RoleModel rm = roleDao.findById(uuid);
     roms.add(rm);
   }
   model.setRoles(roms);
   employeeDao.save(model);
 }
Esempio n. 3
0
  public void update(EmployeeModel model, Long[] roleUuids) {
    EmployeeModel em = new EmployeeModel();
    em = employeeDao.findById(model.getUuid());

    em.setUserName(model.getUserName());
    em.setName(model.getName());
    em.setEmail(model.getEmail());
    em.setPhone(model.getPhone());
    em.setSex(model.getSex());
    em.setAddres(model.getAddres());
    em.setBirthday(model.getBirthday());
    em.setDepartM(model.getDepartM());

    Set<RoleModel> roms = new HashSet<RoleModel>();
    for (Long uuid : roleUuids) {
      RoleModel rm = roleDao.findById(uuid);
      roms.add(rm);
    }
    em.setRoles(roms);
    employeeDao.update(em);
  }
Esempio n. 4
0
 @Override
 public List<EmployeeModel> findAll() {
   return employeeDao.findAll();
 }
Esempio n. 5
0
 @Override
 public void delete(EmployeeModel entity) {
   employeeDao.delete(entity);
 }
Esempio n. 6
0
 // 废弃
 @Override
 public void save(EmployeeModel model) {
   String pass = model.getUserPass();
   model.setUserPass(MD5Utils.md5(pass));
   employeeDao.save(model);
 }
Esempio n. 7
0
 @Override
 public EmployeeModel findById(Long uuid) {
   return employeeDao.findById(uuid);
 }
Esempio n. 8
0
 @Override
 public int rowCount(BaseModel dct) {
   return employeeDao.rowCount(dct);
 }
Esempio n. 9
0
 @Override
 public EmployeeModel findByNameAndPass(String userName, String userPass) {
   return employeeDao.findByNameAndPass(userName, userPass);
 }
Esempio n. 10
0
 @Override
 public List<EmployeeModel> findAll(BaseModel bsm, int currPage, int pageSize) {
   return employeeDao.findAll(bsm, currPage, pageSize);
 }
Esempio n. 11
0
 @Override
 public List<EmployeeModel> findByDepartUuid(Long uuid) {
   return employeeDao.findByDepartUuid(uuid);
 }
Esempio n. 12
0
 @Override
 public Boolean changePass(String userName, String userPass, String newPass) {
   newPass = MD5Utils.md5(newPass);
   userPass = MD5Utils.md5(userPass);
   return employeeDao.changePass(userName, userPass, newPass);
 }