yujian
2020-06-22 8bdf348179d2e1eaa8c31a14c9dc81b9693af25f
云发单朋友圈图片
1个文件已修改
21 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/service/impl/user/cloud/UserCloudServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/cloud/UserCloudServiceImpl.java
@@ -12,6 +12,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yeshi.utils.BigDecimalUtil;
import org.yeshi.utils.taobao.TbImgUtil;
import com.aliyun.openservices.ons.api.Message;
import com.aliyun.openservices.ons.api.Producer;
@@ -74,6 +75,7 @@
import com.yeshi.fanli.service.manger.goods.ConvertLinkManager;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.ImageToBase64;
import com.yeshi.fanli.util.ImageUtil;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
import com.yeshi.fanli.util.RedisKeyEnum;
import com.yeshi.fanli.util.RedisManager;
@@ -523,7 +525,6 @@
            throw new UserCloudException(1, "该内容包含可转链口令或链接");
        
        String qrCode = null;
        ImgInfo imgVideo = null;
        List<String> listImg = new ArrayList<>();
        
@@ -565,26 +566,22 @@
                sendContent.setType(UserCloudSendContent.TYPE_CIRCLE);
                
                if (imgVideo == null) {
                    // 发送图文
                    String picUrl = "";
                    if (!StringUtil.isNullOrEmpty(qrCode))
                        picUrl += qrCode;
                    if (listImg.size() > 0) {
                        for (String img: listImg) {
                            picUrl +=  img + ";" ;
                            picUrl +=  TbImgUtil.getTBSize220Img(img) + ";" ;
                        }
                        if (picUrl.endsWith(";"))
                            picUrl = picUrl.substring(0, picUrl.length()-1);
                    }
                    if (picUrl.endsWith(";"))
                        picUrl = picUrl.substring(0, picUrl.length()-1);
                    sendContent.setTitle(title);
                    sendContent.setPicUrl(picUrl);
                    // 发送图文
                    circleId = AitaokerApiUtil.macsendCircle(robotId, title, picUrl);
                } else {
                    // 发送视频
                    sendContent.setPicUrl(imgVideo.getUrl());
                    sendContent.setVideoUrl(imgVideo.getVideoUrl());
                    // 发送视频
                    circleId = AitaokerApiUtil.macsendCircleVideo(robotId, imgVideo.getVideoUrl(), imgVideo.getUrl());
                }
            
@@ -1093,15 +1090,15 @@
                String picUrl = "";
                if (listImg.size() > 0) {
                    for (String img: listImg) {
                        picUrl +=  img + ";" ;
                        picUrl +=  TbImgUtil.getTBSize220Img(img) + ";" ;
                    }
                }
                
                if (picUrl.endsWith(";")) 
                    picUrl = picUrl.substring(0, picUrl.length()-1);
                sendContent.setTitle(title);
                sendContent.setPicUrl(picUrl);
                // 发圈内容
                String circleId = AitaokerApiUtil.macsendCircle(robotId, title, picUrl);
                // 评论文本