/** @Description 根据司机id查询月份 */ public List<Integer> getMonthsExist(int driverId) { String[] propertyNames = {"iDriverId", "nEnable"}; Object[] values = {driverId, SystemConstants.SYS_ENABLE}; List<TDriverSalary> salarys = salaryDao.findByPropertys(propertyNames, values); List<Integer> nMonths = new ArrayList<Integer>(); if (CollectionUtils.isEmpty(salarys)) { return null; } for (TDriverSalary salary : salarys) { int nMonth = salary.getnMonth(); nMonths.add(nMonth); } System.out.println("nMonths:" + nMonths); return nMonths; }
public void delete(int id) { TDriverSalary salary = salaryDao.get(id); salary.setnEnable(SystemConstants.SYS_DISABLE); salaryDao.update(salary); }