| | |
| | | import org.yeshi.utils.BigDecimalUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.alibaba.druid.support.logging.Log;
|
| | | import com.aliyun.openservices.ons.api.Message;
|
| | | import com.aliyun.openservices.ons.api.Producer;
|
| | | import com.yeshi.fanli.dao.mybatis.user.cloud.UserCloudMapper;
|
| | |
| | | if (!hasToken)
|
| | | throw new UserCloudException(1, "该内容包含可转链口令或链接");
|
| | |
|
| | | // 异步执行发送
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | sendEvaluate(uid, evaluate, way, userCloud, listOpen, listComment);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | private void sendEvaluate(Long uid, GoodsEvaluate evaluate, int way, UserCloud userCloud, |
| | | List<UserCloudGroup> listOpen, List<String> listComment) {
|
| | | ImgInfo imgVideo = null;
|
| | | List<String> listImg = new ArrayList<>();
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | long time7= java.lang.System.currentTimeMillis();
|
| | | LogHelper.test("sendCircleByDynamic发圈内容组织转链:" + (time7 - time6));
|
| | | |
| | |
|
| | | String wxId = userCloud.getWxId();
|
| | | Integer robotId = userCloud.getRobotId();
|
| | | // 保存发送记录
|
| | | UserCloudSendRecord sendRecord = new UserCloudSendRecord();
|
| | | sendRecord.setUid(uid);
|
| | | sendRecord.setSendId(id);
|
| | | sendRecord.setSendId(evaluate.getId());
|
| | | sendRecord.setSendWay(way);
|
| | | sendRecord.setWxId(wxId);
|
| | | sendRecord.setRobotId(robotId);
|
| | |
| | | sendRecord.setSendOrigin(UserCloudSendRecord.ORIGIN_EVALUATE);
|
| | | UserCloudSendRecord result = userCloudSendRecordService.save(sendRecord);
|
| | | String pid = result.getId();
|
| | |
|
| | | long time8= java.lang.System.currentTimeMillis();
|
| | | LogHelper.test("sendCircleByDynamic保存发圈记录:" + (time8 - time7));
|
| | |
|
| | |
|
| | | for (UserCloudGroup cloudGroup : listOpen) {
|
| | |
| | | }
|
| | | userCloudSendContentService.save(sendContent);
|
| | | }
|
| | | |
| | | long time9= java.lang.System.currentTimeMillis();
|
| | | LogHelper.test("sendCircleByDynamic执行发圈耗时:" + (time9 - time8));
|
| | | |
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | |
| | | String commentText = shareGoodsTextTemplateService.getCommentTextByTaoToken(coupon, taoBaoLink.getTaoToken(),
|
| | | goods.getZkPrice().toString(), quanPrice);
|
| | |
|
| | | // 云发单
|
| | | // 异步执行发送
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | sendGoods(robotId, wxId, listOpen, recommendText, commentText, goods.getImgList(), user.getId(), pid);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | String commentText = shareGoodsTextTemplateService.getCommentTextByLink(coupon, jumpLink, zkPrice, quanPrice,
|
| | | ConfigKeyEnum.quickShareJDCommentText);
|
| | |
|
| | | // 云发单
|
| | | // 异步执行发送
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | sendGoods(robotId, wxId, listOpen, recommendText, commentText, jdGoods.getImageList(), user.getId(), pid);
|
| | | }
|
| | | });
|
| | | |
| | | }
|
| | |
|
| | | /**
|
| | |
| | | if (goodsGalleryUrls != null && goodsGalleryUrls.length > 0) {
|
| | | list = Arrays.asList(goodsGalleryUrls);
|
| | | }
|
| | | // 云发单
|
| | | sendGoods(robotId, wxId, listOpen, recommendText, commentText, list, user.getId(), pid);
|
| | | |
| | | List<String> list2 = list;
|
| | | // 异步执行发送
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | sendGoods(robotId, wxId, listOpen, recommendText, commentText, list2, user.getId(), pid);
|
| | | }
|
| | | });
|
| | | |
| | | }
|
| | |
|
| | | /**
|
| | |
| | | String commentText = shareGoodsTextTemplateService.getCommentTextByLink(coupon, jumpLink,
|
| | | goods.getMarketPrice(), quanPrice, ConfigKeyEnum.quickShareVIPCommentText);
|
| | |
|
| | | // 云发单
|
| | | // 异步执行发送
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | sendGoods(robotId, wxId, listOpen, recommendText, commentText, goods.getGoodsDetailPictures(), user.getId(),
|
| | | pid);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | imgList.add(img.getPicUrl());
|
| | | }
|
| | |
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | // 云发单
|
| | | sendGoods(robotId, wxId, listOpen, recommendText, commentText, imgList, user.getId(), pid);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | /**
|
| | | * 发送商品
|