|
|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springblade.common.enums.AppConstant;
|
|
|
import org.springblade.common.enums.OrderType;
|
|
|
import org.springblade.common.enums.ResCode;
|
|
|
import org.springblade.common.enums.SystemConstant;
|
|
|
@@ -62,7 +63,7 @@ public class UserPayCallback {
|
|
|
|
|
|
@EventListener
|
|
|
@Async
|
|
|
- @Transactional
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void PaySuccess(UserPayEvent userPayEvent) {
|
|
|
SuccessParams successParams = userPayEvent.getSuccessParams();
|
|
|
PaymentVO paymentVO = PaymentVO.builder().isSuccess(Boolean.FALSE).msg("订单付款异常!").build();
|
|
|
@@ -109,13 +110,14 @@ public class UserPayCallback {
|
|
|
|
|
|
paymentVO.setIsSuccess(Boolean.TRUE);
|
|
|
paymentVO.setMsg("交易成功!");
|
|
|
+ paymentVO.setSuccessParams(successParams);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage());
|
|
|
throw new ServiceException(ResCode.TRADE_ERROR);
|
|
|
} finally {
|
|
|
webSocketServer.sendInfo(
|
|
|
- Convert.toStr(successParams.getShopId()),
|
|
|
+ AppConstant.SOCKET_PRE.SHOP.getName()+successParams.getShopId(),
|
|
|
JSON.toJSONString(paymentVO)
|
|
|
);
|
|
|
}
|