添加系统配置接口

yun-zuoyi
wei.peng 6 years ago
parent f1a7bb0063
commit 4c2639efe4

@ -75,6 +75,9 @@ public interface ISysConfigService {
@ApiOperation(value = "查询系统邮件配置项")
List findMailConfig();
@ApiOperation(value = "查询系统配置信息项")
List findSystemInfoConfig();
/**
*
* @param code

@ -80,6 +80,9 @@ public class WhiteController extends CoreBaseController {
@Autowired
private ISysLabelTemplateService sysLabelTemplateService;
@Autowired
private ISysConfigService configService;
@Resource(name="redisRes")
private ImppRedis redisRes;
@ -96,6 +99,18 @@ public class WhiteController extends CoreBaseController {
}
}
@GetMapping(value = "/system-info")
@ApiOperation(value = "查询可用语言",notes = "查询可用语言")
public ResultBean getSystemInfo(){
try {
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(configService.findSystemInfoConfig());
}catch(ImppBusiException busExcep){
return ResultBean.fail(busExcep);
}catch(Exception e){
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
/**
*
* @return

@ -345,9 +345,4 @@ public class SysConfigController extends CoreBaseController {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
public static void main(String[] args) {
SnowflakeIdMaker snowflakeIdMaker = new SnowflakeIdMaker();
System.out.println(snowflakeIdMaker.nextId());
}
}

@ -100,6 +100,19 @@ public class SysConfigService implements ISysConfigService {
}
@Override
public List findSystemInfoConfig() {
List mailConfig = new ArrayList();
mailConfig.add(SysConfigRDao.getByProperty("configCode", PlatformConstWords.SYSTEM_HOME_LOGO));
mailConfig.add(SysConfigRDao.getByProperty("configCode", PlatformConstWords.SYSTEM_LOGO));
mailConfig.add(SysConfigRDao.getByProperty("configCode", PlatformConstWords.SYSTEM_COMPANY_NAME));
mailConfig.add(SysConfigRDao.getByProperty("configCode", PlatformConstWords.SYSTEM_NAME));
mailConfig.add(SysConfigRDao.getByProperty("configCode", PlatformConstWords.SYSTEM_TITLE_NAME));
mailConfig.add(SysConfigRDao.getByProperty("configCode", PlatformConstWords.SYSTEM_COPYRIGHT));
return mailConfig;
}
@Override
@ApiOperation(value = "根据code修改系统配置")
public void updateSysConfigByCode(String code, String value) {
SysConfigRDao.updateByProperties("configCode",code,"configValue",value);

Loading…
Cancel
Save