From d9361b75e7072b29535c571a76e0b9e7860d6805 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Mon, 06 Jan 2025 14:38:53 +0800 Subject: [PATCH] feat(mall): 后台活动列表添加分页和搜索功能 - 在 ActivityServiceImpl 中实现 getAdminListInPage 方法,支持分页和搜索 - 在 AdminActivityController 中添加 list 接口,返回分页数据 - 在 IActivityService 中定义 getAdminListInPage 接口 - 更新前端模板,根据活动状态控制按钮显示 --- src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallTeamLeaderServiceImpl.java | 36 +++++++++++++++++++++++++----------- 1 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallTeamLeaderServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallTeamLeaderServiceImpl.java index 7c79417..00ba3cf 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallTeamLeaderServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallTeamLeaderServiceImpl.java @@ -388,6 +388,10 @@ //获取退款订单信息 Long orderId = apiLeaderRefundOrderDto.getOrderId(); Long itemId = apiLeaderRefundOrderDto.getItemId(); + Integer agreeType = apiLeaderRefundOrderDto.getAgreeType(); + if(!(1 == agreeType || 2 == agreeType)){ + return new FebsResponse().fail().message("退款失败,请联系客服人员"); + } MallOrderInfo mallOrderInfo = mallOrderInfoMapper.selectById(orderId); MallOrderItem mallOrderItem = mallOrderItemMapper.selectById(itemId); @@ -421,23 +425,33 @@ int orderMoney = orderAmount.multiply(aa).intValue(); //退款退款金额 - BigDecimal refundAmount = mallRefundEntity.getAmount(); - List<MallOrderItem> mallOrderItemListOnly = mallOrderItemMapper.selectListByStateAndOrderId(1,orderId); - if(CollUtil.isNotEmpty(mallOrderItemListOnly)){ - if(1==mallOrderItemListOnly.size()){ - refundAmount = refundAmount.add(mallOrderInfo.getCarriage()); - log.info("退款订单编号为{},订单金额:{},待退款订单:{},退款金额:{}", refundNo,orderAmount,mallOrderItemListOnly.size(),refundAmount); - } - } // BigDecimal refundAmount = mallRefundEntity.getAmount(); // List<MallOrderItem> mallOrderItemListOnly = mallOrderItemMapper.selectListByStateAndOrderId(1,orderId); -// List<MallOrderItem> mallOrderItemListIng = mallOrderItemMapper.selectListByStateAndOrderId(2,orderId); -// if(CollUtil.isEmpty(mallOrderItemListOnly) && CollUtil.isNotEmpty(mallOrderItemListIng) ){ -// if(1 == mallOrderItemListIng.size() ){ +// if(CollUtil.isNotEmpty(mallOrderItemListOnly)){ +// if(1==mallOrderItemListOnly.size()){ // refundAmount = refundAmount.add(mallOrderInfo.getCarriage()); // log.info("退款订单编号为{},订单金额:{},待退款订单:{},退款金额:{}", refundNo,orderAmount,mallOrderItemListOnly.size(),refundAmount); // } // } + BigDecimal refundAmount = mallRefundEntity.getAmount(); + if(agreeType == 1){ + List<MallOrderItem> mallOrderItemListOnly = mallOrderItemMapper.selectListByStateAndOrderId(1,orderId); + if(CollUtil.isNotEmpty(mallOrderItemListOnly)){ + if(1==mallOrderItemListOnly.size()){ + refundAmount = refundAmount.add(mallOrderInfo.getCarriage()); + log.info("退款订单编号为{},订单金额:{},待退款订单:{},退款金额:{}", refundNo,orderAmount,mallOrderItemListOnly.size(),refundAmount); + } + } + }else if(agreeType == 2){ + List<MallOrderItem> mallOrderItemListOnly = mallOrderItemMapper.selectListByStateAndOrderId(1,orderId); + List<MallOrderItem> mallOrderItemListIng = mallOrderItemMapper.selectListByStateAndOrderId(2,orderId); + if(CollUtil.isEmpty(mallOrderItemListOnly) && CollUtil.isNotEmpty(mallOrderItemListIng) ){ + if(1 == mallOrderItemListIng.size() ){ + refundAmount = refundAmount.add(mallOrderInfo.getCarriage()); + log.info("退款订单编号为{},订单金额:{},待退款订单:{},退款金额:{}", refundNo,orderAmount,mallOrderItemListOnly.size(),refundAmount); + } + } + } // refundAmount = refundAmount.add(mallOrderInfo.getCarriage()); BigDecimal bb = new BigDecimal(100); int refundMoney = refundAmount.multiply(bb).intValue(); -- Gitblit v1.9.1