mq增加事务
This commit is contained in:
parent
9c90074614
commit
9e7cf9e56a
|
|
@ -143,6 +143,9 @@ public class DutyService {
|
||||||
shopUserDutyPay.setAmount(orderInfo.getOrderAmount());
|
shopUserDutyPay.setAmount(orderInfo.getOrderAmount());
|
||||||
shopUserDutyPayMapper.insert(shopUserDutyPay);
|
shopUserDutyPayMapper.insert(shopUserDutyPay);
|
||||||
}
|
}
|
||||||
|
// for (TbOrderDetail orderDetail : list){
|
||||||
|
//
|
||||||
|
// }
|
||||||
} else if (type.equals("return")) {
|
} else if (type.equals("return")) {
|
||||||
BigDecimal amount = jsonObject.getBigDecimal("amount");
|
BigDecimal amount = jsonObject.getBigDecimal("amount");
|
||||||
if (Objects.isNull(shopUserDuty)) {
|
if (Objects.isNull(shopUserDuty)) {
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,9 @@ public class OrderService {
|
||||||
List<TbOrderDetail> orderDetails = new ArrayList<>();
|
List<TbOrderDetail> orderDetails = new ArrayList<>();
|
||||||
String masterId = "";
|
String masterId = "";
|
||||||
int orderId = 0;
|
int orderId = 0;
|
||||||
|
if (list.size()<1 || list.isEmpty()){
|
||||||
|
return Result.fail(CARTEXIST);
|
||||||
|
}
|
||||||
for (TbCashierCart cashierCart : list) {
|
for (TbCashierCart cashierCart : list) {
|
||||||
TbProductSkuWithBLOBs tbProduct = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId()));
|
TbProductSkuWithBLOBs tbProduct = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId()));
|
||||||
totalAmount = totalAmount.add(cashierCart.getTotalAmount());
|
totalAmount = totalAmount.add(cashierCart.getTotalAmount());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue