|
|
|
@ -22,41 +22,32 @@ public class SystemPDFTemplateService {
|
|
|
|
|
@Resource
|
|
|
|
|
private SystemPDFTemplateDao systemPDFTemplateDao;
|
|
|
|
|
|
|
|
|
|
public Page<SystemPDFTemplateEntity> queryPage(SystemPDFTemplateRequest systemPDFTemplateRequest) {
|
|
|
|
|
Page<SystemPDFTemplateEntity> page = new Page<>(systemPDFTemplateRequest.getPage(), systemPDFTemplateRequest.getLimit());
|
|
|
|
|
public IPage<SystemPDFTemplateEntity> queryPage(SystemPDFTemplateRequest systemPDFTemplateRequest) {
|
|
|
|
|
IPage<SystemPDFTemplateEntity> page = new Page<>(systemPDFTemplateRequest.getPage(), systemPDFTemplateRequest.getLimit());
|
|
|
|
|
return systemPDFTemplateDao.selectPage(page, buildQueryWrapper(systemPDFTemplateRequest));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Page<SystemPDFTemplateEntity> listPDFTemplates(Integer page, Integer limit) {
|
|
|
|
|
Page<SystemPDFTemplateEntity> pageParam = new Page<>(page, limit);
|
|
|
|
|
if (null == page || null == limit) {
|
|
|
|
|
pageParam = new Page<>(0, 100);
|
|
|
|
|
}
|
|
|
|
|
return systemPDFTemplateDao.listPDFTemplates(pageParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public SystemPDFTemplateEntity selectById(String id) {
|
|
|
|
|
return systemPDFTemplateDao.selectById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) {
|
|
|
|
|
return systemPDFTemplateDao.updateByParams(systemPDFTemplateSaveRequest);
|
|
|
|
|
/**
|
|
|
|
|
* 更新模板,同步修改模板关联表数据
|
|
|
|
|
*
|
|
|
|
|
* @param systemPDFTemplateSaveRequest
|
|
|
|
|
*/
|
|
|
|
|
public void updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) {
|
|
|
|
|
systemPDFTemplateDao.updateByParams(systemPDFTemplateSaveRequest);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean insert(SystemPDFTemplateEntity systemPDFTemplateEntity) {
|
|
|
|
|
int insert = systemPDFTemplateDao.insert(systemPDFTemplateEntity);
|
|
|
|
|
if (insert > 0) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
return insert > 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean deleteById(Integer id) {
|
|
|
|
|
int i = systemPDFTemplateDao.deleteById(id);
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
return i > 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|