引入包名称

This commit is contained in:
2025-09-23 16:51:21 +08:00
parent 887746e9d3
commit 307ebac8fa
4 changed files with 8 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ public class RedisKeyExpirationListener implements MessageListener {
@Value("${spring.data.redis.database}") @Value("${spring.data.redis.database}")
private String database; private String database;
@Resource @Resource
private OrderInfoService tbOrderInfoService; private OrderInfoService orderInfoService;
@DubboReference @DubboReference
private ShopTableService tableService; private ShopTableService tableService;
@@ -49,7 +49,7 @@ public class RedisKeyExpirationListener implements MessageListener {
if (expiredKey.startsWith(RedisCst.classKeyExpired.EXPIRED_ORDER)) { if (expiredKey.startsWith(RedisCst.classKeyExpired.EXPIRED_ORDER)) {
log.info("监听到订单过期,订单Id: {}", expiredKey); log.info("监听到订单过期,订单Id: {}", expiredKey);
String orderId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_ORDER.length()); String orderId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_ORDER.length());
tbOrderInfoService.expired(Long.parseLong(orderId)); orderInfoService.expired(Long.parseLong(orderId));
}else if (expiredKey.startsWith(RedisCst.classKeyExpired.EXPIRED_TABLE)) { }else if (expiredKey.startsWith(RedisCst.classKeyExpired.EXPIRED_TABLE)) {
log.info("监听到台桌清台过期,台桌Id: {}", expiredKey); log.info("监听到台桌清台过期,台桌Id: {}", expiredKey);
String tableId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_TABLE.length()); String tableId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_TABLE.length());

View File

@@ -35,7 +35,7 @@ public class OrderPayController {
@Resource @Resource
private PayService payService; private PayService payService;
@Resource @Resource
private OrderInfoService orderService; private OrderInfoService orderInfoService;
@DubboReference @DubboReference
private SysParamsService paramsService; private SysParamsService paramsService;
@@ -141,7 +141,7 @@ public class OrderPayController {
map.put("payAmount", checkOrderPay.getOrderAmount()); map.put("payAmount", checkOrderPay.getOrderAmount());
map.put("extend", StrUtil.isEmpty(extend) ? "" : extend); map.put("extend", StrUtil.isEmpty(extend) ? "" : extend);
if (checkOrderPay.getOrderId() != null) { if (checkOrderPay.getOrderId() != null) {
OrderInfo orderInfo = orderService.checkOrderPay(checkOrderPay); OrderInfo orderInfo = orderInfoService.checkOrderPay(checkOrderPay);
map.put("payAmount", orderInfo.getOrderAmount()); map.put("payAmount", orderInfo.getOrderAmount());
} }
String baseUrl = paramsService.getSysParamValue(SysParamCodeEnum.SHOP_ORDER_PAY_BASE_URL.getCode()); String baseUrl = paramsService.getSysParamValue(SysParamCodeEnum.SHOP_ORDER_PAY_BASE_URL.getCode());
@@ -168,7 +168,7 @@ public class OrderPayController {
@GetMapping("/queryOrderStatus") @GetMapping("/queryOrderStatus")
public CzgResult<String> queryOrderStatus(Long orderId) { public CzgResult<String> queryOrderStatus(Long orderId) {
CzgResult<String> result = CzgResult.success(); CzgResult<String> result = CzgResult.success();
String status = orderService.queryChain().select(OrderInfo::getStatus).eq(OrderInfo::getId, orderId).oneAs(String.class); String status = orderInfoService.queryChain().select(OrderInfo::getStatus).eq(OrderInfo::getId, orderId).oneAs(String.class);
result.setData(status); result.setData(status);
switch (status) { switch (status) {
case "unpaid" -> result.setMsg("等待用户付款"); case "unpaid" -> result.setMsg("等待用户付款");

View File

@@ -51,7 +51,7 @@ public class MemberOrderServiceImpl extends ServiceImpl<MemberOrderMapper, Membe
@DubboReference @DubboReference
private OrderInfoService orderInfoService; private OrderInfoService orderInfoService;
@DubboReference @DubboReference
private OrderPaymentService orderPaymentService; private OrderPaymentService paymentService;
@Override @Override
public MemberOrder createMemberOrder(MemberOrderDTO orderDTO) { public MemberOrder createMemberOrder(MemberOrderDTO orderDTO) {

View File

@@ -62,7 +62,7 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
@DubboReference @DubboReference
private OrderInfoService orderInfoService; private OrderInfoService orderInfoService;
@DubboReference @DubboReference
private OrderPaymentService orderPaymentService; private OrderPaymentService paymentService;
@DubboReference @DubboReference
private MemberPointsService memberPointsService; private MemberPointsService memberPointsService;
@Resource @Resource
@@ -336,7 +336,7 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
.notIn(OrderInfo::getStatus, OrderStatusEnums.UNPAID.getCode(), OrderStatusEnums.CANCELLED.getCode())) .notIn(OrderInfo::getStatus, OrderStatusEnums.UNPAID.getCode(), OrderStatusEnums.CANCELLED.getCode()))
.stream().map(OrderInfo::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add).compareTo(new BigDecimal(item.getValue())) > 0; .stream().map(OrderInfo::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add).compareTo(new BigDecimal(item.getValue())) > 0;
case "RECHARGE_AMOUNT" -> case "RECHARGE_AMOUNT" ->
orderPaymentService.list(new QueryWrapper().eq(OrderPayment::getShopId, shopUser.getSourceShopId()) paymentService.list(new QueryWrapper().eq(OrderPayment::getShopId, shopUser.getSourceShopId())
.eq(OrderPayment::getSourceId, shopUser.getId()).isNotNull(OrderPayment::getTradeNumber)) .eq(OrderPayment::getSourceId, shopUser.getId()).isNotNull(OrderPayment::getTradeNumber))
.stream().map(OrderPayment::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add).compareTo(new BigDecimal(item.getValue())) > 0; .stream().map(OrderPayment::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add).compareTo(new BigDecimal(item.getValue())) > 0;
default -> throw new CzgException("会员开通条件类型错误"); default -> throw new CzgException("会员开通条件类型错误");