48 lines
1.5 KiB
Java
48 lines
1.5 KiB
Java
package com.gxwebsoft.bszx.service.impl;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.gxwebsoft.bszx.mapper.BszxEraMapper;
|
|
import com.gxwebsoft.bszx.service.BszxEraService;
|
|
import com.gxwebsoft.bszx.entity.BszxEra;
|
|
import com.gxwebsoft.bszx.param.BszxEraParam;
|
|
import com.gxwebsoft.common.core.web.PageParam;
|
|
import com.gxwebsoft.common.core.web.PageResult;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 百色中学-年代Service实现
|
|
*
|
|
* @author 科技小王子
|
|
* @since 2025-03-06 22:50:25
|
|
*/
|
|
@Service
|
|
public class BszxEraServiceImpl extends ServiceImpl<BszxEraMapper, BszxEra> implements BszxEraService {
|
|
|
|
@Override
|
|
public PageResult<BszxEra> pageRel(BszxEraParam param) {
|
|
PageParam<BszxEra, BszxEraParam> page = new PageParam<>(param);
|
|
page.setDefaultOrder("sort_number asc, create_time desc");
|
|
List<BszxEra> list = baseMapper.selectPageRel(page, param);
|
|
return new PageResult<>(list, page.getTotal());
|
|
}
|
|
|
|
@Override
|
|
public List<BszxEra> listRel(BszxEraParam param) {
|
|
List<BszxEra> list = baseMapper.selectListRel(param);
|
|
// 排序
|
|
PageParam<BszxEra, BszxEraParam> page = new PageParam<>();
|
|
page.setDefaultOrder("sort_number asc, create_time desc");
|
|
return page.sortRecords(list);
|
|
}
|
|
|
|
@Override
|
|
public BszxEra getByIdRel(Integer id) {
|
|
BszxEraParam param = new BszxEraParam();
|
|
param.setId(id);
|
|
return param.getOne(baseMapper.selectListRel(param));
|
|
}
|
|
|
|
}
|