doum
2026-06-18 93de43267e1663031fe5dc2f5ae40d128a182a76
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwCustomerWxPayServiceImpl.java
@@ -15,6 +15,7 @@
import com.doumee.dao.business.model.*;
import com.doumee.service.business.YwContractRevenueService;
import com.doumee.service.business.YwCustomerH5BizService;
import com.doumee.service.business.YwCustomerH5AuthService;
import com.doumee.service.business.YwCustomerRechargeBizService;
import com.doumee.service.business.YwCustomerWxPayService;
import lombok.extern.slf4j.Slf4j;
@@ -48,6 +49,8 @@
    private YwContractRevenueService ywContractRevenueService;
    @Autowired
    private YwCustomerH5BizService ywCustomerH5BizService;
    @Autowired
    private YwCustomerH5AuthService ywCustomerH5AuthService;
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -74,6 +77,7 @@
        order.setIsdeleted(Constants.ZERO);
        order.setOrderNo(orderNo);
        order.setCustomerId(user.getCustomerId());
        order.setMemberId(user.getMemberId());
        order.setOrderType(orderType);
        order.setBizRefId(bizRefId);
        order.setAmount(dto.getAmount());
@@ -120,7 +124,7 @@
        if (Objects.equals(order.getStatus(), YwWxPayOrder.STATUS_SUCCESS)) {
            return successXml();
        }
        LoginUserInfo user = buildCustomerUser(order.getCustomerId());
        LoginUserInfo user = buildCustomerUser(order);
        try {
            Integer bizRecordId = fulfillBiz(order, user);
            order.setStatus(YwWxPayOrder.STATUS_SUCCESS);
@@ -238,13 +242,11 @@
        throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "订单类型无效");
    }
    private LoginUserInfo buildCustomerUser(Integer customerId) {
        LoginUserInfo u = new LoginUserInfo();
        u.setId(customerId);
        u.setCustomerId(customerId);
        u.setH5UserType(LoginUserInfo.H5_USER_CUSTOMER);
        u.setRealname("商户H5");
        return u;
    private LoginUserInfo buildCustomerUser(YwWxPayOrder order) {
        if (order == null || order.getCustomerId() == null) {
            return null;
        }
        return ywCustomerH5AuthService.buildLoginUserInfo(order.getCustomerId(), order.getMemberId());
    }
    private String successXml() {