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.
|
|
|
package com.glxp.api.service.basic;
|
|
|
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
|
|
|
import com.glxp.api.req.basic.BasicSkProjectRequest;
|
|
|
|
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
|
|
|
import com.glxp.api.res.basic.BasicSkProjectResponse;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.glxp.api.dao.basic.BasicSkProjectMapper;
|
|
|
|
import com.glxp.api.entity.basic.BasicSkProjectEntity;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@Service
|
|
|
|
public class BasicSkProjectService extends ServiceImpl<BasicSkProjectMapper, BasicSkProjectEntity> {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
BasicSkProjectMapper basicSkProjectMapper;
|
|
|
|
|
|
|
|
public List<BasicSkProjectResponse> filterList(BasicSkProjectRequest basicSkProjectRequest) {
|
|
|
|
if (basicSkProjectRequest == null) {
|
|
|
|
return Collections.emptyList();
|
|
|
|
}
|
|
|
|
if (basicSkProjectRequest.getPage() != null) {
|
|
|
|
int offset = (basicSkProjectRequest.getPage() - 1) * basicSkProjectRequest.getLimit();
|
|
|
|
PageHelper.offsetPage(offset, basicSkProjectRequest.getLimit());
|
|
|
|
}
|
|
|
|
List<BasicSkProjectResponse> data = basicSkProjectMapper.filterList(basicSkProjectRequest);
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|