|
@@ -16,6 +16,7 @@ import org.eco.vip.nexus.core.mapper.ConfigMapper;
|
|
|
import org.eco.vip.orm.domain.PageQuery;
|
|
|
import org.eco.vip.orm.pojo.PageResult;
|
|
|
import org.eco.vip.orm.service.BaseService;
|
|
|
+import org.eco.vip.orm.utils.CollUtils;
|
|
|
import org.eco.vip.orm.utils.MapstructUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -38,6 +39,7 @@ public class ConfigService extends BaseService<ConfigMapper, Config> implements
|
|
|
private QueryWrapper buildQueryWrapper(ConfigBO configBO) {
|
|
|
return super.buildBaseQueryWrapper()
|
|
|
.and(CONFIG.CONFIG_ID.eq(configBO.getConfigId()))
|
|
|
+ .and(CONFIG.NAME.eq(configBO.getName()))
|
|
|
.and(CONFIG.CONFIG_KEY.eq(configBO.getConfigKey()))
|
|
|
.and(CONFIG.CONFIG_VALUE.eq(configBO.getConfigValue()))
|
|
|
.and(CONFIG.STATUS.eq(configBO.getStatus()));
|
|
@@ -78,4 +80,11 @@ public class ConfigService extends BaseService<ConfigMapper, Config> implements
|
|
|
QueryWrapper queryWrapper = query().where(CONFIG.CONFIG_ID.eq(id));
|
|
|
return this.getOneAs(queryWrapper, ConfigVO.class);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean hasKeyByKey(String key) {
|
|
|
+ QueryWrapper queryWrapper = query().where(CONFIG.CONFIG_KEY.eq(key));
|
|
|
+ List<Config> list = this.list(queryWrapper);
|
|
|
+ return CollUtils.isNotEmpty(list);
|
|
|
+ }
|
|
|
}
|