| | |
| | | package com.yeshi.fanli.service.impl.config;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.config.AppHomeFloatImg;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.xcx.XCXSettingConfig;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | | return value;
|
| | | }
|
| | |
|
| | | |
| | | @Cacheable(value = "config", key = "'isRobotCloudOpen'+'-'+#key")
|
| | | @Override
|
| | | public boolean isRobotCloudOpen(String key) {
|
| | | String value = get(key);
|
| | | if (StringUtil.isNullOrEmpty(value))
|
| | | return false;
|
| | | if ("1".equalsIgnoreCase(value.trim())) {
|
| | | return true;
|
| | | } else {
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | |
| | | @Cacheable(value = "config", key = "'getTestUsers'")
|
| | | @Override
|
| | | public List<String> getTestUsers() {
|
| | | String value = get(ConfigKeyEnum.testUserArray.getKey());
|
| | | if (StringUtil.isNullOrEmpty(value))
|
| | | return null;
|
| | | try {
|
| | | return Arrays.asList(value.split(","));
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override
|
| | | public Config getConfig(long id) {
|
| | | return configMapper.selectByPrimaryKey(id);
|