From 4fd3407f7aeb2696432541dc44fa22ddbd8251f4 Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Mon, 28 Oct 2024 09:41:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=9C=B8=E7=8E=8B=E9=A4=90=E5=85=85?= =?UTF-8?q?=E5=80=BC=E8=AE=A2=E5=8D=95id=E6=9C=AA=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/PayService.java | 11 +++++------ src/main/resources/mapper/TbActivateMapper.xml | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java index 2815df7..8370242 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -19,10 +19,7 @@ import com.chaozhanggui.system.cashierservice.entity.dto.ShopEatTypeInfoDTO; import com.chaozhanggui.system.cashierservice.entity.vo.ShopUserListVo; import com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo; import com.chaozhanggui.system.cashierservice.exception.MsgException; -import com.chaozhanggui.system.cashierservice.mapper.MpCashierCartMapper; -import com.chaozhanggui.system.cashierservice.mapper.MpOrderDetailMapper; -import com.chaozhanggui.system.cashierservice.mapper.MpOrderInfoMapper; -import com.chaozhanggui.system.cashierservice.mapper.MpShopCouponMapper; +import com.chaozhanggui.system.cashierservice.mapper.*; import com.chaozhanggui.system.cashierservice.model.PayReq; import com.chaozhanggui.system.cashierservice.model.TradeQueryReq; import com.chaozhanggui.system.cashierservice.mpservice.MpShopTableService; @@ -192,6 +189,7 @@ public class PayService { private final MpShopTableService mpShopTableService; private final TbFreeDineConfigService freeDineConfigService; private final TbShopCouponService shopCouponService; + private final MpMemberInMapper mpMemberInMapper; @Qualifier("tbShopCouponService") @Autowired private TbShopCouponService tbShopCouponService; @@ -200,11 +198,12 @@ public class PayService { @Autowired private MpShopCouponMapper mpShopCouponMapper; - public PayService(@Qualifier("tbShopSongOrderServiceImpl") TbShopSongOrderService shopSongOrderService, MpShopTableService mpShopTableService, TbFreeDineConfigService freeDineConfigService, TbShopCouponService shopCouponService) { + public PayService(@Qualifier("tbShopSongOrderServiceImpl") TbShopSongOrderService shopSongOrderService, MpShopTableService mpShopTableService, TbFreeDineConfigService freeDineConfigService, TbShopCouponService shopCouponService, MpMemberInMapper mpMemberInMapper) { this.shopSongOrderService = shopSongOrderService; this.mpShopTableService = mpShopTableService; this.freeDineConfigService = freeDineConfigService; this.shopCouponService = shopCouponService; + this.mpMemberInMapper = mpMemberInMapper; } @Transactional(rollbackFor = Exception.class) @@ -1046,7 +1045,7 @@ public class PayService { memberIn.setMerchantId(Integer.valueOf(shopInfo.getMerchantId())); memberIn.setCreateTime(new Date()); memberIn.setOrderId(memberInDTO.getOrderId()); - tbMemberInMapper.insert(memberIn); + mpMemberInMapper.insert(memberIn); if ("ysk".equals(thirdPayType)) { diff --git a/src/main/resources/mapper/TbActivateMapper.xml b/src/main/resources/mapper/TbActivateMapper.xml index bddebc8..4e32f51 100644 --- a/src/main/resources/mapper/TbActivateMapper.xml +++ b/src/main/resources/mapper/TbActivateMapper.xml @@ -40,7 +40,7 @@ from tb_activate - where shop_id = #{shop_id} + where shop_id = #{shopId} and amount = #{amount} order by id desc limit 1