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