| | |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.module.infra.dal.dataobject.config.ConfigDO; |
| | | import com.iailab.module.infra.service.config.ConfigService; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | private ConfigService configService; |
| | | |
| | | @Override |
| | | public String queryConfigByCode(String configCode) { |
| | | ConfigDO configByKey = configService.getConfigByKey(configCode); |
| | | return ObjectUtils.isNotEmpty(configByKey) ? configByKey.getValue() : ""; |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult<String> getConfigValueByKey(String key) { |
| | | ConfigDO config = configService.getConfigByKey(key); |
| | | return success(config != null ? config.getValue() : null); |