From 540f66bd151c013e858f878eda8a8f0573f12ef2 Mon Sep 17 00:00:00 2001 From: zhaohengkun Date: Thu, 31 Oct 2024 17:53:09 +0800 Subject: [PATCH] 1 --- .../cardFule/mapper/CardFuelChangeMapper.java | 3 +- .../service/CardFuelChangeService.java | 3 +- .../impl/CardFuelChangeServiceImpl.java | 3 +- .../service/impl/AllOrderInfoServiceImpl.java | 30 ++++++++++++++++--- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelChangeMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelChangeMapper.java index 8398d251f..55c8e1e97 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelChangeMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelChangeMapper.java @@ -1,5 +1,6 @@ package com.fuint.business.marketingActivity.cardFule.mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange; @@ -14,7 +15,7 @@ import java.util.List; * @author wangh * @since 2023-11-13 18:53:47 */ -public interface CardFuelChangeMapper { +public interface CardFuelChangeMapper extends BaseMapper { /** * 通过ID查询单条数据 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelChangeService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelChangeService.java index fda41992a..8a0d7be92 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelChangeService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelChangeService.java @@ -2,6 +2,7 @@ package com.fuint.business.marketingActivity.cardFule.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; import com.fuint.business.integral.entity.IntegralDetail; import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange; import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo; @@ -14,7 +15,7 @@ import io.lettuce.core.dynamic.annotation.Param; * @author wangh * @since 2023-11-13 18:53:47 */ -public interface CardFuelChangeService { +public interface CardFuelChangeService extends IService { /** * 通过ID查询单条数据 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java index d246e9d90..037267fb6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange; import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelChangeMapper; import com.fuint.business.marketingActivity.cardFule.service.CardFuelChangeService; @@ -29,7 +30,7 @@ import javax.annotation.Resource; * @since 2023-11-13 18:53:47 */ @Service("cardFuelChangeService") -public class CardFuelChangeServiceImpl implements CardFuelChangeService { +public class CardFuelChangeServiceImpl extends ServiceImpl implements CardFuelChangeService { @Resource private CardFuelChangeMapper cardFuelChangeMapper; @Autowired 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 5b2cb8299..8aa704aaa 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 @@ -21,6 +21,8 @@ import com.fuint.business.convenienceSore.dto.LJGoodsDto; import com.fuint.business.convenienceSore.mapper.LJGoodsMapper; import com.fuint.business.convenienceSore.service.LJGoodsService; import com.fuint.business.convenienceSore.service.StockTrackService; +import com.fuint.business.fleet.entity.FleetInfo; +import com.fuint.business.fleet.entity.FleetMember; import com.fuint.business.fleet.mapper.FleetInfoMapper; import com.fuint.business.fleet.mapper.FleetLinesChangeMapper; import com.fuint.business.fleet.mapper.FleetMemberMapper; @@ -28,7 +30,9 @@ import com.fuint.business.largeSscreen.vo.OrderGoodsVO; import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange; import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord; +import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelChangeMapper; import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper; import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders; import com.fuint.business.order.dto.AllOrderInfoDto; @@ -110,8 +114,10 @@ public class AllOrderInfoServiceImpl extends ServiceImpl q4 = Wrappers.query(); + q2.eq("order_no", userBalance.getMtUserId()); + CardFuelChange cardFuelChange = cardFuelChangeMapper.selectOne(q4); + mtUserFuel.setFuelAmount(mtUserFuel.getFuelAmount() + cardFuelChange.getBalance()); + mtUserFuelMapper.updateById(mtUserFuel); } if (orderNo.equals("car_card_value")) { + QueryWrapper q5 = Wrappers.query(); + q5.eq("user_id", userBalance.getMtUserId()) + .eq("store_id", oilOrder.getOils()); + FleetMember fleetMember = fleetMemberMapper.selectOne(q5); + QueryWrapper q6 = Wrappers.query(); + q6.eq("id", fleetMember.getFleetId()); + FleetInfo fleetInfo = fleetInfoMapper.selectOne(q6); + +// 待编辑 } if (orderNo.equals("card_value")) { - + QueryWrapper q6 = Wrappers.query(); + q6.eq("order_no", cashierOrder.getOrderNo()); + CardBalanceChange cardBalanceChange = cardBalanceChangeMapper.selectOne(q6); + userBalance.setCardBalance(userBalance.getCardBalance() + cardBalanceChange.getBalance()); + userBalanceMapper.updateById(userBalance); } // 5.如果是 小程序码付款 则按照 油品表的 囤油卡金额 和 储值卡金额 还原