| | |
| | | import com.ycl.platform.domain.entity.PlatformOnline; |
| | | import com.ycl.platform.domain.query.DataCenterQuery; |
| | | import com.ycl.platform.domain.vo.PlatformOnlineVO; |
| | | import com.ycl.platform.mapper.PlatformMapper; |
| | | import com.ycl.platform.mapper.PlatformOnlineMapper; |
| | | import com.ycl.platform.service.PlatformOnlineService; |
| | | import com.ycl.platform.service.PlatformService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.page.PageUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class PlatformOnlineServiceImpl extends ServiceImpl<PlatformOnlineMapper, PlatformOnline> implements PlatformOnlineService { |
| | | |
| | | private final PlatformOnlineMapper platformOnlineMapper; |
| | | private final PlatformService platformService; |
| | | |
| | | /** |
| | | * 批量删除 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(DataCenterQuery query) { |
| | | public Result page(DataCenterQuery query) { //分页 平台 |
| | | Page<PlatformOnlineVO> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | baseMapper.getPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("count", Arrays.asList(platformService.count())); |
| | | map.put("list", page.getRecords()); |
| | | return Result.ok().data(map).total(page.getTotal()); |
| | | } |
| | | |
| | | } |