下单发送create消息,处理耗材
This commit is contained in:
@@ -678,6 +678,7 @@ public class CartService {
|
||||
orderInfo.setIsUseCoupon(isuseYhq);
|
||||
// orderInfo.setRemark(StringUtils.isBlank(jsonObject.getString("remark"))?"":jsonObject.getString("remark"));
|
||||
orderInfoMapper.updateByPrimaryKeySelective(orderInfo);
|
||||
|
||||
} else {
|
||||
orderInfo = getOrder(totalAmount, packAMount, shopTable, tbMerchantAccount.getId().toString(), jsonObject, originAmount);
|
||||
orderInfo.setMerchantId(String.valueOf(tbMerchantAccount.getId()));
|
||||
@@ -707,6 +708,12 @@ public class CartService {
|
||||
redisUtil.saveMessage(RedisCst.OUT_NUMBER.concat(jsonObject.getString("shopId")), object.toString());
|
||||
orderInfoMapper.insert(orderInfo);
|
||||
orderId = orderInfo.getId();
|
||||
|
||||
// 发送mq消息
|
||||
JSONObject jsonObject2=new JSONObject();
|
||||
jsonObject2.put("orderId",orderInfo.getId());
|
||||
jsonObject2.put("type","create");
|
||||
producer.cons(jsonObject2.toString());
|
||||
}
|
||||
for (TbOrderDetail orderDetail : orderDetails) {
|
||||
orderDetail.setOrderId(orderId);
|
||||
|
||||
@@ -87,6 +87,7 @@ public class LoginService {
|
||||
shopOpenId.setOpenId(openId);
|
||||
shopOpenId.setCreateTime(DateUtil.date());
|
||||
shopOpenId.setShopId(Integer.valueOf(shopId));
|
||||
shopOpenId.setStatus(1);
|
||||
shopOpenIdMapper.insert(shopOpenId);
|
||||
}
|
||||
return Result.success(CodeEnum.SUCCESS,shopMsg);
|
||||
|
||||
Reference in New Issue
Block a user