|
|
|
@ -26,15 +26,6 @@ public class SystemPDFTemplateService {
|
|
|
|
|
return systemPDFTemplateDao.selectPage(page, buildQueryWrapper(systemPDFTemplateRequest));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private QueryWrapper<SystemPDFTemplateEntity> buildQueryWrapper(SystemPDFTemplateRequest systemPDFTemplateRequest) {
|
|
|
|
|
QueryWrapper<SystemPDFTemplateEntity> wrapper = new QueryWrapper<>();
|
|
|
|
|
wrapper.like(StrUtil.isNotBlank(systemPDFTemplateRequest.getName()), "name", systemPDFTemplateRequest.getName())
|
|
|
|
|
.eq(null != systemPDFTemplateRequest.getModule(), "module", systemPDFTemplateRequest.getModule())
|
|
|
|
|
.eq(null != systemPDFTemplateRequest.getId(), "id", systemPDFTemplateRequest.getId())
|
|
|
|
|
.orderByDesc("update_time");
|
|
|
|
|
return wrapper;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Page<SystemPDFTemplateEntity> listPDFTemplates(Integer page, Integer limit) {
|
|
|
|
|
Page<SystemPDFTemplateEntity> pageParam = new Page<>(page, limit);
|
|
|
|
|
if (null == page || null == limit) {
|
|
|
|
@ -68,4 +59,14 @@ public class SystemPDFTemplateService {
|
|
|
|
|
public int countByName(String name) {
|
|
|
|
|
return systemPDFTemplateDao.countByName(name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private QueryWrapper<SystemPDFTemplateEntity> buildQueryWrapper(SystemPDFTemplateRequest systemPDFTemplateRequest) {
|
|
|
|
|
QueryWrapper<SystemPDFTemplateEntity> wrapper = new QueryWrapper<>();
|
|
|
|
|
wrapper.like(StrUtil.isNotBlank(systemPDFTemplateRequest.getName()), "name", systemPDFTemplateRequest.getName())
|
|
|
|
|
.eq(null != systemPDFTemplateRequest.getModule(), "module", systemPDFTemplateRequest.getModule())
|
|
|
|
|
.eq(null != systemPDFTemplateRequest.getId(), "id", systemPDFTemplateRequest.getId())
|
|
|
|
|
.orderByDesc("update_time");
|
|
|
|
|
return wrapper;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|