| | |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.service.ConfigService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.redis.RedisUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.redis.RedisUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.mapper.SysConfigMapper; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @RequiredArgsConstructor |
| | | @Service |
| | | public class SysConfigServiceImpl extends ServicePlusImpl<SysConfigMapper, SysConfig, SysConfig> implements ISysConfigService, ConfigService { |
| | | public class SysConfigServiceImpl implements ISysConfigService, ConfigService { |
| | | |
| | | private final SysConfigMapper baseMapper; |
| | | |
| | | @Override |
| | | public TableDataInfo<SysConfig> selectPageConfigList(SysConfig config, PageQuery pageQuery) { |
| | |
| | | .like(StringUtils.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey()) |
| | | .between(params.get("beginTime") != null && params.get("endTime") != null, |
| | | SysConfig::getCreateTime, params.get("beginTime"), params.get("endTime")); |
| | | Page<SysConfig> page = page(pageQuery.build(), lqw); |
| | | Page<SysConfig> page = baseMapper.selectPage(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | |
| | | return UserConstants.UNIQUE; |
| | | } |
| | | |
| | | @Override |
| | | public SysConfig getOne(SysConfig config) { |
| | | return baseMapper.selectOne(new LambdaQueryWrapper<>(config)); |
| | | } |
| | | |
| | | /** |
| | | * 根据参数 key 获取参数值 |
| | | * |