| | |
| | | public boolean updateDeptName() { |
| | | return empBaseInfoMapper.updateDeptName() > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateEmpAge(String userId) { |
| | | List<EmpBaseInfo> empBaseInfoList = new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(userId)){ |
| | | EmpBaseInfo empBaseInfo = this.getById(userId); |
| | | empBaseInfoList.add(empBaseInfo); |
| | | } else { |
| | | empBaseInfoList = this.list(); |
| | | } |
| | | if(empBaseInfoList.size()>0){ |
| | | empBaseInfoList.forEach(p->{ |
| | | p.setAge(DateUtil.ageOfNow(p.getBirthdate())); |
| | | this.saveOrUpdate(p); |
| | | }); |
| | | } |
| | | return false; |
| | | } |
| | | } |