| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.base.BaseSelect; |
| | | import com.ycl.platform.domain.entity.CheckRule; |
| | | import com.ycl.platform.domain.entity.YwUnit; |
| | | import com.ycl.platform.mapper.CheckRuleMapper; |
| | |
| | | @Override |
| | | public Result all() { |
| | | List<CheckRule> entities = baseMapper.selectList(null); |
| | | List<CheckRuleVO> vos = entities.stream() |
| | | List<BaseSelect> vos = entities.stream() |
| | | .map( |
| | | entity -> CheckRuleVO.getVoByEntity(entity, null) |
| | | entity -> { |
| | | BaseSelect vo = new BaseSelect(); |
| | | vo.setId(entity.getId()); |
| | | vo.setValue(entity.getRuleName()); |
| | | return vo; |
| | | } |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |