|
|
@ -11,6 +11,8 @@ import com.epmet.opendata.dto.CaLoudongDTO; |
|
|
|
import com.epmet.opendata.entity.CaLoudongEntity; |
|
|
|
import com.epmet.opendata.redis.CaLoudongRedis; |
|
|
|
import com.epmet.opendata.service.CaLoudongService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -32,13 +34,21 @@ public class CaLoudongServiceImpl extends BaseServiceImpl<CaLoudongDao, CaLoudon |
|
|
|
@Autowired |
|
|
|
private CaLoudongRedis caLoudongRedis; |
|
|
|
|
|
|
|
// @Override
|
|
|
|
// public PageData<CaLoudongDTO> page(Map<String, Object> params) {
|
|
|
|
// IPage<CaLoudongEntity> page = baseDao.selectPage(
|
|
|
|
// getPage(params, FieldConstant.CREATED_TIME, false),
|
|
|
|
// getWrapper(params)
|
|
|
|
// );
|
|
|
|
// return getPageData(page, CaLoudongDTO.class);
|
|
|
|
// }
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<CaLoudongDTO> page(Map<String, Object> params) { |
|
|
|
IPage<CaLoudongEntity> page = baseDao.selectPage( |
|
|
|
getPage(params, FieldConstant.CREATED_TIME, false), |
|
|
|
getWrapper(params) |
|
|
|
); |
|
|
|
return getPageData(page, CaLoudongDTO.class); |
|
|
|
PageHelper.startPage((int)(params.get("limit")),(int)(params.get("pageSize"))); |
|
|
|
List<CaLoudongDTO> list = baseDao.getList(); |
|
|
|
PageInfo<CaLoudongDTO> info = new PageInfo<>(list); |
|
|
|
return new PageData<>(list, info.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|