| | |
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | |
| | | import org.yeshi.utils.wx.WXUtil;
|
| | |
|
| | | import com.aliyun.openservices.ons.api.Message;
|
| | | import com.aliyun.openservices.ons.api.Producer;
|
| | | import com.yeshi.fanli.dto.ConfigParamsDTO;
|
| | | import com.yeshi.fanli.dto.mq.order.OrderTopicTagEnum;
|
| | | import com.yeshi.fanli.dto.mq.order.body.BanLiShopOrderMQMsg;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudService;
|
| | | import com.yeshi.fanli.service.manger.msg.RocketMQManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | |
| | | @Resource
|
| | | private MsgDeviceReadStateService msgDeviceReadStateService;
|
| | |
|
| | | @Resource(name = "producer")
|
| | | private Producer producer;
|
| | | @Resource
|
| | | private RocketMQManager rocketMQManager;
|
| | |
|
| | | @Resource
|
| | | private BanLiShopOrderService banLiShopOrderService;
|
| | |
| | |
|
| | | @Resource
|
| | | private ActivityUserService activityUserService;
|
| | |
|
| | | @Resource
|
| | | private UserCloudService userCloudService;
|
| | |
|
| | | /**
|
| | | * 客服消息回调
|
| | |
| | | new BigDecimal(map.get("total_fee")).multiply(new BigDecimal("0.01")));
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER,
|
| | | OrderTopicTagEnum.banLiShopOrderPaid, msg);
|
| | | producer.send(message);
|
| | | rocketMQManager.sendNormalMsg(message, null,null);
|
| | | Map<String, String> returnMap = new HashMap<>();
|
| | | returnMap.put("return_code", "SUCCESS");
|
| | | returnMap.put("return_msg", "OK");
|
| | |
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | LogHelper.test("云发单回调内容:"+stringBuilder.toString());
|
| | |
|
| | | try {
|
| | | JSONObject root = JSONObject.fromObject(stringBuilder.toString());
|
| | | if (root.optInt("messageType") == 9) {
|
| | | String content = root.optJSONObject("data").optString("content");
|
| | | LogHelper.test("云发单群内容:" + content);
|
| | | if (content.trim().equalsIgnoreCase(Constant.YHG_CLOUD_GROUP_AWAKEN_KEY)) {
|
| | | LogHelper.test("云发单群匹配:" + root.optString("wcId") + "-"
|
| | | + root.optJSONObject("data").optString("fromGroup"));
|
| | | userCloudService.cacheMatchGroup(root.optString("wcId"),
|
| | | root.optJSONObject("data").optString("fromGroup"));
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|