yanghui
2022-10-21 5f3cf501f9f6c216df17ee8af6618b55b537d21a
flower_city/src/main/java/com/dg/core/service/impl/SlideshowServiceImpl.java
@@ -40,11 +40,13 @@
           return   ResultData.error("图片地址不能为空");
        if (slideshow.getLinkType()==null)
           return    ResultData.error("跳转链接类型不能为空");
        if (slideshow.getLinkType().equals(2)) {
        if (slideshow.getTitle()==null||slideshow.getTitle()=="")
           return   ResultData.error("标题不能为空");
        if (slideshow.getLinkType().equals(2)&&(slideshow.getContent()==null||slideshow.getContent()==""))
                return ResultData.error("类型为富文本时,标题不能为空");
            if (slideshow.getContent() == null || slideshow.getContent() == "")
            return   ResultData.error("类型为富文本时,富文本内容不能为空");
        if (slideshow.getLinkType().equals(4)&&(slideshow.getLink()==null||slideshow.getLink()==""))
        }
        if (slideshow.getLinkType().equals(3) && (slideshow.getLink() == null || slideshow.getLink() == ""))
            return   ResultData.error("类型为微信文章时,文章链接容不能为空");
        slideshow.setCreateTime(LocalDateTime.now());
        return    ResultData.success(  baseMapper.insert(slideshow)) ;
@@ -56,11 +58,13 @@
            return   ResultData.error("图片地址不能为空");
        if (slideshow.getLinkType()==null)
            return    ResultData.error("跳转链接类型不能为空");
        if (slideshow.getLinkType().equals(2)) {
        if (slideshow.getTitle()==null||slideshow.getTitle()=="")
            return   ResultData.error("标题不能为空");
        if (slideshow.getLinkType().equals(2)&&(slideshow.getContent()==null||slideshow.getContent()==""))
                return ResultData.error("类型为富文本时,标题不能为空");
            if (slideshow.getContent() == null || slideshow.getContent() == "")
            return   ResultData.error("类型为富文本时,富文本内容不能为空");
        if (slideshow.getLinkType().equals(4)&&(slideshow.getLink()==null||slideshow.getLink()==""))
        }
        if (slideshow.getLinkType().equals(3) && (slideshow.getLink() == null || slideshow.getLink() == ""))
            return   ResultData.error("类型为微信文章时,文章链接容不能为空");
        return  ResultData.success(baseMapper.updateById(slideshow));