From 651a15c78f668bef3859d9ed1bb7ad0b669d3600 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 03 七月 2020 17:52:07 +0800 Subject: [PATCH] 多APP优化 --- fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgConfigServiceImpl.java | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgConfigServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgConfigServiceImpl.java index 7669f5c..399339e 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgConfigServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgConfigServiceImpl.java @@ -4,6 +4,7 @@ import javax.annotation.Resource; +import com.yeshi.fanli.entity.SystemEnum; import org.springframework.stereotype.Service; import com.google.gson.Gson; @@ -26,8 +27,8 @@ private JumpDetailV2Service jumpDetailV2Service; @Override - public void addZhuShouMsg(MsgCommonDTO dto) throws ConfigException { - Config value = configService.getConfig(KEY_ZHUSHOU); + public void addZhuShouMsg(MsgCommonDTO dto, SystemEnum systemEnum) throws ConfigException { + Config value = configService.getConfig(KEY_ZHUSHOU,systemEnum); if (StringUtil.isNullOrEmpty(dto.getContent()) || StringUtil.isNullOrEmpty(dto.getParams()) || dto.getShow() == null) throw new ConfigException(1, "鍙傛暟涓嶅畬鏁�"); @@ -61,8 +62,8 @@ } @Override - public void addGuanXuanMsg(MsgCommonDTO dto) throws ConfigException { - Config value = configService.getConfig(KEY_GUANXUAN); + public void addGuanXuanMsg(MsgCommonDTO dto, SystemEnum systemEnum) throws ConfigException { + Config value = configService.getConfig(KEY_GUANXUAN,systemEnum); if (StringUtil.isNullOrEmpty(dto.getContent()) || StringUtil.isNullOrEmpty(dto.getParams()) || dto.getShow() == null) throw new ConfigException(1, "鍙傛暟涓嶅畬鏁�"); @@ -96,24 +97,24 @@ } @Override - public MsgCommonDTO getZhuShouMsg() { - Config value = configService.getConfig(KEY_ZHUSHOU); + public MsgCommonDTO getZhuShouMsg( SystemEnum systemEnum) { + Config value = configService.getConfig(KEY_ZHUSHOU,systemEnum); if (value == null) return null; return new Gson().fromJson(value.getValue(), MsgCommonDTO.class); } @Override - public MsgCommonDTO getGuanXuanMsg() { - Config value = configService.getConfig(KEY_GUANXUAN); + public MsgCommonDTO getGuanXuanMsg( SystemEnum systemEnum) { + Config value = configService.getConfig(KEY_GUANXUAN,systemEnum); if (value == null) return null; return new Gson().fromJson(value.getValue(), MsgCommonDTO.class); } @Override - public void addNotifyMsg(MsgCommonDTO dto) throws ConfigException { - Config value = configService.getConfig(KEY_NOTIFY); + public void addNotifyMsg(MsgCommonDTO dto, SystemEnum systemEnum) throws ConfigException { + Config value = configService.getConfig(KEY_NOTIFY,systemEnum); if (StringUtil.isNullOrEmpty(dto.getContent()) || StringUtil.isNullOrEmpty(dto.getParams()) || dto.getShow() == null) throw new ConfigException(1, "鍙傛暟涓嶅畬鏁�"); @@ -146,8 +147,8 @@ } @Override - public MsgCommonDTO getNotifyMsg() { - Config value = configService.getConfig(KEY_NOTIFY); + public MsgCommonDTO getNotifyMsg(SystemEnum systemEnum) { + Config value = configService.getConfig(KEY_NOTIFY,systemEnum); if (value == null) return null; return new Gson().fromJson(value.getValue(), MsgCommonDTO.class); -- Gitblit v1.8.0