| | |
| | | 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;
|
| | |
| | | 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;
|
| | |
| | | throw new UserCloudException(1, "该内容包含可转链口令或链接");
|
| | |
|
| | |
|
| | | String qrCode = null;
|
| | | ImgInfo imgVideo = null;
|
| | | List<String> listImg = new ArrayList<>();
|
| | |
|
| | |
| | | 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());
|
| | | }
|
| | |
|
| | |
| | | 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);
|
| | | // 评论文本
|