admin
2020-07-03 651a15c78f668bef3859d9ed1bb7ad0b669d3600
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);