| | |
| | | /** |
| | | * @author hxh |
| | | * @title: SystemConfigServiceImpl |
| | | * @description: TODO |
| | | * @description: 系统配置服务 |
| | | * @date 2025/2/11 15:45 |
| | | */ |
| | | @Service |
| | |
| | | if (systemConfig == null || systemConfig.getSystem() == null || systemConfig.getKey() == null) { |
| | | throw new ParamsException(1, "参数不完整"); |
| | | } |
| | | |
| | | |
| | | SystemConfig old = getConfig(SystemConfigKeyEnum.valueOf(systemConfig.getKey()), systemConfig.getSystem()); |
| | | if (old != null) { |
| | | SystemConfig update = new SystemConfig(); |
| | |
| | | update.setUpdateTime(new Date()); |
| | | systemConfigMapper.updateByPrimaryKeySelective(update); |
| | | } else { |
| | | if (systemConfig.getCreateTime() == null) { |
| | | systemConfig.setCreateTime(new Date()); |
| | | } |
| | | if (systemConfig.getUpdateTime() == null) { |
| | | systemConfig.setUpdateTime(new Date()); |
| | | } |
| | |
| | | .count(1) |
| | | .build(); |
| | | List<SystemConfig> mList = systemConfigMapper.list(daoQuery); |
| | | if(mList!=null&&mList.size()>0){ |
| | | if(mList!=null&& !mList.isEmpty()){ |
| | | return mList.get(0); |
| | | } |
| | | return null; |