diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java index bc035309f..78fa5bba3 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java @@ -32,6 +32,7 @@ import com.fuint.business.marketingActivity.cardFuleOrders.service.CardFuleOrder import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper; import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService; +import com.fuint.business.marketingActivity.cardValueOrders.service.CardValueOrdersService; import com.fuint.business.member.entity.LJStaff; import com.fuint.business.member.service.ILJStaffService; import com.fuint.business.order.entity.AllOrderInfo; @@ -111,6 +112,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { private ILJStoreService storeService; @Resource private StaffCommissionService staffCommissionService; + @Resource + private CardValueOrdersService cardValueOrdersService; /** * 通过ID查询单条数据 * @@ -266,6 +269,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { if ("CASH".equals(cardFuelRecordDTO.getPaymentType())) { AllOrderInfo allOrderInfo = getAllOrderInfo(cardFuelRecordDTO); allOrderInfoService.insertAllOrderInfo(allOrderInfo); + cardValueOrdersService.updateBalances(orderNo,"paid"); } double theAmountToBePaid = 0.0; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/service/CardValueOrdersService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/service/CardValueOrdersService.java index d83b5ce45..14a91b5d4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/service/CardValueOrdersService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/service/CardValueOrdersService.java @@ -35,5 +35,6 @@ public interface CardValueOrdersService extends IService { void updateOrderStatus(String orderNo,String status); void updateBalance(String orderNo,String status); + void updateBalances(String orderNo,String status); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/service/impl/CardValueOrdersServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/service/impl/CardValueOrdersServiceImpl.java index d20d1110a..802aa5330 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/service/impl/CardValueOrdersServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/service/impl/CardValueOrdersServiceImpl.java @@ -7,6 +7,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders; import com.fuint.business.marketingActivity.cardValueOrders.mapper.CardValueOrdersMapper; import com.fuint.business.marketingActivity.cardValueOrders.service.CardValueOrdersService; +import com.fuint.business.order.mapper.AllOrderInfoMapper; +import com.fuint.business.order.service.AllOrderInfoService; +import com.fuint.business.order.vo.AllOrderInfoVo; import com.fuint.business.userManager.entity.UserBalance; import com.fuint.business.userManager.service.UserBalanceService; import com.fuint.common.dto.AccountInfo; @@ -29,6 +32,9 @@ public class CardValueOrdersServiceImpl extends ServiceImpl { AllOrderInfoVo getIndexData4Pos(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo); AllOrderInfoVo getHandOverList(HandoverRecord record); + + AllOrderInfoVo getOneByOrderNo(String orderNo); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml index 63001b722..b8c939e7b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml @@ -395,6 +395,13 @@ + + @@ -411,4 +418,4 @@ - \ No newline at end of file + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java index 55da5abb4..fd65af3b1 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/AllOrderInfoService.java @@ -2,6 +2,7 @@ package com.fuint.business.order.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders; import com.fuint.business.order.dto.AllOrderInfoDto; import com.fuint.business.order.entity.AllOrderInfo; import com.fuint.business.order.entity.CashierOrder; @@ -92,4 +93,5 @@ public interface AllOrderInfoService { AllOrderInfoVo getIndexData4Pos(); AllOrderInfoVo getOperatingDataPos(AllOrderInfoDto allOrderInfo); + AllOrderInfoVo getOneByOrderNo(String orderNo); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java index 72fe7a028..8c14dcccc 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java @@ -14,6 +14,7 @@ import com.fuint.business.convenienceSore.dto.LJGoodsDto; import com.fuint.business.convenienceSore.service.LJGoodsService; import com.fuint.business.convenienceSore.service.StockTrackService; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; +import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders; import com.fuint.business.order.dto.AllOrderInfoDto; import com.fuint.business.order.entity.*; import com.fuint.business.order.mapper.AllOrderInfoMapper; @@ -955,6 +956,10 @@ public class AllOrderInfoServiceImpl extends ServiceImpl