fengjin
2022-10-20 20f3e2c40e8b1f85e8785c33af0c4896ed2eaac7
修改bug
1个文件已修改
16 ■■■■■ 已修改文件
flower_city/src/main/java/com/dg/core/service/impl/SlideshowServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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));