You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.3 KiB
Java
37 lines
1.3 KiB
Java
2 years ago
|
package com.glxp.api.service.inout;
|
||
|
|
||
|
import com.github.pagehelper.PageHelper;
|
||
|
import com.glxp.api.entity.inout.IoStatDayEntity;
|
||
|
import com.glxp.api.entity.inout.IoStatDetailEntity;
|
||
|
import com.glxp.api.req.inout.FilterStatDataDetailRequest;
|
||
|
import org.springframework.stereotype.Service;
|
||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||
|
import com.glxp.api.dao.inout.IoStatDetailMapper;
|
||
|
|
||
|
import javax.annotation.Resource;
|
||
|
import java.util.Collections;
|
||
|
import java.util.List;
|
||
|
|
||
|
@Service
|
||
|
public class IoStatDetailService extends ServiceImpl<IoStatDetailMapper, IoStatDetailEntity> {
|
||
|
|
||
|
@Resource
|
||
|
IoStatDetailMapper statDetailMapper;
|
||
|
|
||
|
public List<IoStatDetailEntity> filterList(FilterStatDataDetailRequest statDataDetailRequest) {
|
||
|
if (null == statDataDetailRequest) {
|
||
|
return Collections.emptyList();
|
||
|
}
|
||
|
if (null != statDataDetailRequest.getPage() && null != statDataDetailRequest.getLimit()) {
|
||
|
PageHelper.offsetPage((statDataDetailRequest.getPage() - 1) * statDataDetailRequest.getLimit(), statDataDetailRequest.getLimit());
|
||
|
}
|
||
|
return statDetailMapper.filterList(statDataDetailRequest);
|
||
|
}
|
||
|
|
||
|
public List<IoStatDetailEntity> filterListByRecordKey(String recordKey) {
|
||
|
return statDetailMapper.filterListByRecordKey(recordKey);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|