| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | wrapper.lambda().eq(Areas::getId,areas.getId()); |
| | | Areas update = new Areas(); |
| | | update.setName(areas.getName()); |
| | | update.setCode(areas.getCode()); |
| | | update.setSortnum(areas.getSortnum()); |
| | | areasMapper.update(update,wrapper); |
| | | //刷新缓存数据 |
| | |
| | | return result; |
| | | } |
| | | @Override |
| | | @PostConstruct |
| | | public void cacheData() { |
| | | Areas a = new Areas(); |
| | | a.setIsdeleted(Constants.ZERO); |
| | |
| | | CITY_LIST=null; |
| | | AREA_LIST = null; |
| | | ALL_AREA_TREE = null; |
| | | ALL_AREA_LIST = areasMapper.selectList(new QueryWrapper<>(a).lambda().orderByDesc(Areas::getSortnum)); |
| | | ALL_AREA_LIST = areasMapper.selectList(new QueryWrapper<>(a).lambda().orderByAsc(Areas::getCode)); |
| | | if(ALL_AREA_LIST!=null){ |
| | | for(Areas model : ALL_AREA_LIST){ |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO)){ |