|
@@ -1,11 +1,14 @@
|
|
|
package com.ims.eval.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.ims.common.utils.StringUtils;
|
|
|
import com.ims.eval.dao.DataDictionaryMapper;
|
|
|
import com.ims.eval.config.CustomException;
|
|
|
import com.ims.eval.entity.DataDictionary;
|
|
|
+import com.ims.eval.entity.Indicator;
|
|
|
import com.ims.eval.service.IDataDictionaryService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -31,7 +34,7 @@ public class DataDictionaryServiceImpl extends ServiceImpl<DataDictionaryMapper,
|
|
|
qw.lambda().eq(DataDictionary::getId, id);
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(dataKey)) {
|
|
|
- qw.lambda().eq(DataDictionary::getDataKey, dataKey);
|
|
|
+ qw.lambda().like(DataDictionary::getDataKey, dataKey);
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(keyName)) {
|
|
|
qw.lambda().like(DataDictionary::getKeyName, keyName);
|
|
@@ -45,6 +48,29 @@ public class DataDictionaryServiceImpl extends ServiceImpl<DataDictionaryMapper,
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public IPage<DataDictionary> listPage(Integer pageNum, Integer pageSize, String dataKey, String keyName,String superKey) {
|
|
|
+ QueryWrapper<DataDictionary> qw = new QueryWrapper<>();
|
|
|
+ Page<DataDictionary> page = new Page<>(pageNum, pageSize);
|
|
|
+
|
|
|
+ if (null == pageNum || null == pageSize) {
|
|
|
+ throw new CustomException("分页参数为空");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(dataKey)) {
|
|
|
+ qw.lambda().like(DataDictionary::getDataKey, dataKey);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(keyName)) {
|
|
|
+ qw.lambda().like(DataDictionary::getKeyName, keyName);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(superKey)) {
|
|
|
+ qw.lambda().eq(DataDictionary::getSuperKey, superKey);
|
|
|
+ }
|
|
|
+ qw.lambda().orderByAsc(DataDictionary::getOrderNum);
|
|
|
+
|
|
|
+ IPage<DataDictionary> list = baseMapper.selectPage(page, qw);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public boolean saveOrUpdate(DataDictionary entity) {
|