From 4aff4b3d03a9cad901c8d2599c74b81faf357c34 Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 10:04:04 +0800 Subject: [PATCH 01/11] =?UTF-8?q?fix:=20=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=A1=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/shop/task/ReplenishmentTask.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java index 73be6d6dd..d456dbc74 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java @@ -45,7 +45,7 @@ public class ReplenishmentTask { /** * 每天上午8点和下午3点执行补单计划 */ -// @Scheduled(cron = "0 0 8,15 * * ?") + @Scheduled(cron = "0 0 9,15 * * ?") @TenantIgnore public void replenishmentTask() { /** @@ -74,7 +74,7 @@ public class ReplenishmentTask { // 生成随机字符串 String nonceStr = generateNonceStr(); // 商户密钥 - String key = properties.getMchKey(); + String key = properties.getApiv3Key(); // 构建请求参数 Map params = new HashMap<>(); @@ -93,12 +93,12 @@ public class ReplenishmentTask { Map map = parseResponse(response); if ("SUCCESS".equals(map.get("trade_state")) && "SUCCESS".equals(map.get("result_code"))) { // 修改订单状态 -// orderDO.setPaid(1); -// orderDO.setIsReplenishment(1); -// orderDO.setReplenishmentName(map.toString()); -// rechargeOrderMapper.updateById(orderDO); -// // 写入 充值档位记录表 -// storeOrderService.addPhone(orderDO, outTradeNo); + orderDO.setPaid(1); + orderDO.setIsReplenishment(1); + orderDO.setReplenishmentName(map.toString()); + rechargeOrderMapper.updateById(orderDO); + // 写入 充值档位记录表 + storeOrderService.addPhone(orderDO, outTradeNo); } } From fe0e7ae3b92ec654b0ad0b747a07a2d9084b6c06 Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 12:10:12 +0800 Subject: [PATCH 02/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/request/member/RefundRequest.java | 4 +-- .../shop/request/member/RemarkRequest.java | 30 +++++++++++++++++++ .../recharge/RechargeOrderController.java | 16 ++++++++-- .../recharge/vo/RechargeOrderExportReqVO.java | 5 ++++ .../recharge/vo/RechargeOrderPageReqVO.java | 5 ++++ .../recharge/vo/RechargeOrderRespVO.java | 29 ++++++++++++++++++ .../recharge/vo/RechargeOrderUpdateReqVO.java | 7 +++++ .../dataobject/recharge/RechargeOrderDO.java | 10 +++++++ .../order/impl/StoreOrderServiceImpl.java | 1 + .../recharge/RechargeOrderService.java | 3 ++ .../recharge/RechargeOrderServiceImpl.java | 11 +++++++ .../mapper/recharge/RechargeOrderMapper.xml | 3 ++ 12 files changed, 119 insertions(+), 5 deletions(-) create mode 100644 yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RemarkRequest.java diff --git a/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RefundRequest.java b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RefundRequest.java index 51f60389a..15905979c 100644 --- a/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RefundRequest.java +++ b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RefundRequest.java @@ -35,6 +35,6 @@ public class RefundRequest implements Serializable { private String refundName; @Schema(description = "会员退款理由") private String memberReason; - @Schema(description = "管理员理由") - private String adminReason; +// @Schema(description = "管理员理由") +// private String adminReason; } diff --git a/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RemarkRequest.java b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RemarkRequest.java new file mode 100644 index 000000000..1d6608128 --- /dev/null +++ b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RemarkRequest.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.shop.request.member; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Title:RemarkRequest + * @Description: TODO + * @author: tangqian + * @date: 2023/6/20 12:03 + * @version: V1.0.0 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@Schema(description="管理员备注") +public class RemarkRequest implements Serializable { + + private static final long serialVersionUID = -9107261692696656534L; + @Schema(description = "数据id") + @NotNull(message = "订单id不能为空") + private Long orderId; + @Schema(description = "管理员理由") + private String adminReason; +} diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java index 377bd9094..525a294d6 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.shop.controller.admin.recharge.method.Excel; import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderInfoConvert; import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderInfoDO; import cn.iocoder.yudao.module.shop.request.member.RefundRequest; +import cn.iocoder.yudao.module.shop.request.member.RemarkRequest; import cn.iocoder.yudao.module.shop.service.order.StoreOrderService; import cn.iocoder.yudao.module.shop.service.recharge.RechargeOrderInfoService; import lombok.extern.slf4j.Slf4j; @@ -25,6 +26,7 @@ import io.swagger.v3.oas.annotations.Operation; import javax.validation.constraints.*; import javax.validation.*; import javax.servlet.http.*; +import java.time.LocalDateTime; import java.util.*; import java.io.IOException; @@ -180,7 +182,7 @@ public class RechargeOrderController { RechargeOrderUpdateReqVO vo = new RechargeOrderUpdateReqVO(); vo.setId(request.getOrderId()); vo.setRefundStatus(3); - vo.setAdminReason(request.getAdminReason()); + vo.setApplySucceedTime(LocalDateTime.now()); rechargeOrderService.updateRechargeOrderStatus(vo); obj = storeOrderService.memberRefund(request, servletRequest); //拒绝退款 @@ -188,17 +190,25 @@ public class RechargeOrderController { RechargeOrderUpdateReqVO vo = new RechargeOrderUpdateReqVO(); vo.setId(request.getOrderId()); vo.setRefundStatus(4); - vo.setAdminReason(request.getAdminReason()); rechargeOrderService.updateRechargeOrderStatus(vo); //同意 } else if (request.getType() == 1) { RechargeOrderUpdateReqVO vo = new RechargeOrderUpdateReqVO(); vo.setId(request.getOrderId()); vo.setRefundStatus(3); - vo.setAdminReason(request.getAdminReason()); + vo.setApplySucceedTime(LocalDateTime.now()); rechargeOrderService.updateRechargeOrderStatus(vo); obj = storeOrderService.memberRefund(request, servletRequest); } return CommonResult.success(obj); } + + @TenantIgnore + @PreAuthenticated + @Operation(summary = "管理员填写备注") + @RequestMapping(value = "/adminRemark", method = RequestMethod.POST) + @PreAuthorize("@ss.hasPermission('shop:recharge-order:remark')") + public CommonResult adminRemark(@Valid @RequestBody RemarkRequest request) { + return CommonResult.success(rechargeOrderService.updateRemark(request)); + } } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExportReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExportReqVO.java index 9183a2fde..27f820a70 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExportReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExportReqVO.java @@ -130,4 +130,9 @@ public class RechargeOrderExportReqVO { private Long promoterId; + /** + * 退款类型 + */ + private Integer refundType; + } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java index 3afa4ca82..c451a6a1b 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java @@ -133,4 +133,9 @@ public class RechargeOrderPageReqVO extends PageParam { @Schema(description = "推广员id") private Long promoterId; + /** + * 退款类型 + */ + private Integer refundType; + } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderRespVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderRespVO.java index 17e14d775..018cc7830 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderRespVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderRespVO.java @@ -36,4 +36,33 @@ public class RechargeOrderRespVO extends RechargeOrderBaseVO { private String nickname; @Schema(description = "提成金额", required = true, example = "3114") private BigDecimal commissionPrice; + + + /** + * 退款类型 + */ + private Integer refundType; + /** + * 退款类型名称 + */ + private String refundName; + /** + * 会员退款理由 + */ + private String memberReason; + /** + * 管理员理由 + */ + private String adminReason; + + /** + * 申请退款时间 + */ + private LocalDateTime applyTime; + + /** + * 申请退款时间 + */ + private LocalDateTime applySucceedTime; + } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderUpdateReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderUpdateReqVO.java index def8575ca..abca57dc6 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderUpdateReqVO.java @@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; + +import java.time.LocalDateTime; import java.util.*; import javax.validation.constraints.*; @@ -18,4 +20,9 @@ public class RechargeOrderUpdateReqVO extends RechargeOrderBaseVO { * 管理员理由 */ private String adminReason; + + /** + * 申请退款时间 + */ + private LocalDateTime applySucceedTime; } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/RechargeOrderDO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/RechargeOrderDO.java index e21109e97..2769d8d46 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/RechargeOrderDO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/RechargeOrderDO.java @@ -206,4 +206,14 @@ public class RechargeOrderDO extends TenantBaseDO { * 管理员理由 */ private String adminReason; + + /** + * 申请退款时间 + */ + private LocalDateTime applyTime; + + /** + * 申请退款时间 + */ + private LocalDateTime applySucceedTime; } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java index e28daade5..f17c9574e 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java @@ -1434,6 +1434,7 @@ public class StoreOrderServiceImpl extends ServiceImpl 0; } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderService.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderService.java index a672ec54b..965b34d1c 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderService.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderService.java @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.shop.controller.app.member.vo.ShoppingMemberOrder import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.shop.request.member.MemberChangeTieRequest; +import cn.iocoder.yudao.module.shop.request.member.RemarkRequest; import cn.iocoder.yudao.module.shop.response.member.MemberHeadResponse; import org.apache.ibatis.annotations.Param; @@ -93,4 +94,6 @@ public interface RechargeOrderService { List findPromoterDrawExcel(PromoterDrawReqExcelVO excelVO); Boolean updateByIds(BatchOrderUpdateReqVO updateReqVO); + + Boolean updateRemark(RemarkRequest request); } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java index 3d8b37614..f529a8140 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java @@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.shop.dal.mysql.order.StoreOrderMapper; import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderInfoMapper; import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper; import cn.iocoder.yudao.module.shop.request.member.MemberChangeTieRequest; +import cn.iocoder.yudao.module.shop.request.member.RemarkRequest; import cn.iocoder.yudao.module.shop.response.member.MemberHeadResponse; import cn.iocoder.yudao.module.system.api.tenant.TenantApi; import cn.iocoder.yudao.module.system.api.tenant.dto.TenantDTO; @@ -148,6 +149,16 @@ public class RechargeOrderServiceImpl implements RechargeOrderService { return Boolean.TRUE; } + @Override + public Boolean updateRemark(RemarkRequest request) { + RechargeOrderDO orderDO = rechargeOrderMapper.selectById(request.getOrderId()); + if (null != orderDO) { + orderDO.setAdminReason(request.getAdminReason()); + rechargeOrderMapper.updateById(orderDO); + } + return Boolean.TRUE; + } + @Override public PageResult findPromoterDrawPage(PromoterDrawReqVO pageReqVO) { Page page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml index dc4763715..14b9a2e7c 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml @@ -242,6 +242,9 @@ and a.paid =#{data.paid} + + and a.refund_type =#{refundType} + and a.tenant_id =#{data.tenantId} From 932295c664fd305765950263cc3193d3e8b3acd9 Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 12:10:42 +0800 Subject: [PATCH 03/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/recharge/RechargeOrderController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java index 525a294d6..43d1fa607 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java @@ -204,10 +204,10 @@ public class RechargeOrderController { } @TenantIgnore - @PreAuthenticated +// @PreAuthenticated @Operation(summary = "管理员填写备注") @RequestMapping(value = "/adminRemark", method = RequestMethod.POST) - @PreAuthorize("@ss.hasPermission('shop:recharge-order:remark')") +// @PreAuthorize("@ss.hasPermission('shop:recharge-order:remark')") public CommonResult adminRemark(@Valid @RequestBody RemarkRequest request) { return CommonResult.success(rechargeOrderService.updateRemark(request)); } From e3d06db3434eb975eab5fea33097ed2ad8f966e7 Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 14:27:36 +0800 Subject: [PATCH 04/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/shop/request/member/RefundRequest.java | 2 -- .../controller/admin/recharge/RechargeOrderController.java | 4 ++-- .../admin/recharge/vo/RechargeOrderExportReqVO.java | 3 +++ .../admin/recharge/vo/RechargeOrderPageReqVO.java | 6 ++++++ .../main/resources/mapper/recharge/RechargeOrderMapper.xml | 6 ++++++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RefundRequest.java b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RefundRequest.java index 15905979c..bc3aee194 100644 --- a/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RefundRequest.java +++ b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/member/RefundRequest.java @@ -5,10 +5,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; -import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.io.Serializable; -import java.util.List; /** * @Title:OrderContentRequest diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java index 43d1fa607..525a294d6 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java @@ -204,10 +204,10 @@ public class RechargeOrderController { } @TenantIgnore -// @PreAuthenticated + @PreAuthenticated @Operation(summary = "管理员填写备注") @RequestMapping(value = "/adminRemark", method = RequestMethod.POST) -// @PreAuthorize("@ss.hasPermission('shop:recharge-order:remark')") + @PreAuthorize("@ss.hasPermission('shop:recharge-order:remark')") public CommonResult adminRemark(@Valid @RequestBody RemarkRequest request) { return CommonResult.success(rechargeOrderService.updateRemark(request)); } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExportReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExportReqVO.java index 27f820a70..04b9856b6 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExportReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExportReqVO.java @@ -135,4 +135,7 @@ public class RechargeOrderExportReqVO { */ private Integer refundType; + private LocalDateTime startApplyTime; + private LocalDateTime endApplyTime; + } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java index c451a6a1b..d53bbd444 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java @@ -138,4 +138,10 @@ public class RechargeOrderPageReqVO extends PageParam { */ private Integer refundType; + + /** + * 申请退款时间 + */ + private LocalDateTime startApplyTime; + private LocalDateTime endApplyTime; } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml index 14b9a2e7c..c032d64f8 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml @@ -275,6 +275,12 @@ and a.status =#{data.status} + + and a.apply_time >=#{data.startApplyTime} + + + and a.apply_time <=#{data.endApplyTime} + From b7b9c15b18deaf8333b7580f148fd7d0a63193e6 Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 15:40:57 +0800 Subject: [PATCH 05/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/controller/admin/recharge/RechargeOrderController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java index 525a294d6..8b9823324 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java @@ -115,7 +115,7 @@ public class RechargeOrderController { @GetMapping("/page") @Operation(summary = "获得订单分页") - @PreAuthorize("@ss.hasPermission('shop:recharge-order:query')") + @PreAuthorize("@ss.hasPermission('shop:recharge-order:query','shop:recharge-order:refund')") @TenantIgnore public CommonResult> getRechargeOrderPage(@Valid RechargeOrderPageReqVO pageVO) { if (!TenantContextHolder.ID_SYSTEM.equals(SecurityFrameworkUtils.getLoginUser().getTenantId())) { From ba45dc7202764178632045df2edb3472168fa534 Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 15:54:51 +0800 Subject: [PATCH 06/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/recharge/RechargeOrderController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java index 8b9823324..f9a3c6fa9 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java @@ -115,7 +115,7 @@ public class RechargeOrderController { @GetMapping("/page") @Operation(summary = "获得订单分页") - @PreAuthorize("@ss.hasPermission('shop:recharge-order:query','shop:recharge-order:refund')") + @PreAuthorize("@ss.hasPermission('shop:recharge-order:query')") @TenantIgnore public CommonResult> getRechargeOrderPage(@Valid RechargeOrderPageReqVO pageVO) { if (!TenantContextHolder.ID_SYSTEM.equals(SecurityFrameworkUtils.getLoginUser().getTenantId())) { @@ -139,7 +139,7 @@ public class RechargeOrderController { @GetMapping("/promoterDraw-excel") @Operation(summary = "导出推广员抽佣统计") - @PreAuthorize("@ss.hasPermission('shop:recharge-order:export')") + @PreAuthorize("@ss.hasPermission('shop:recharge-order:export','shop:recharge-order-refund:export')") @OperateLog(type = EXPORT) @TenantIgnore public void getRechargeOrderExcel(@Valid PromoterDrawReqExcelVO excelVO, HttpServletResponse response) throws IOException { From 51378e0a226398e779a473e617fba94af7d13bfe Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 16:36:28 +0800 Subject: [PATCH 07/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/shop/service/recharge/RechargeOrderServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java index f529a8140..baa4207bb 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeOrderServiceImpl.java @@ -226,7 +226,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService { List orderDOS = rechargeOrderMapper.selectList(Wrappers.lambdaQuery() .eq(RechargeOrderDO::getUid, loginUser.getId()) .eq(RechargeOrderDO::getPaid, 1) - .eq(RechargeOrderDO::getRefundStatus, 0) + .ne(RechargeOrderDO::getRefundStatus, 2) .orderByDesc(RechargeOrderDO::getCreateTime)); if (!CollectionUtils.isEmpty(orderDOS)) { List rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS); From b24ff623428def70adc476427a6a0004d9f77d52 Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 16:56:55 +0800 Subject: [PATCH 08/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/controller/admin/recharge/RechargeOrderController.java | 2 +- .../cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java index f9a3c6fa9..79d3bd1d2 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java @@ -189,7 +189,7 @@ public class RechargeOrderController { } else if (request.getType() == 2) { RechargeOrderUpdateReqVO vo = new RechargeOrderUpdateReqVO(); vo.setId(request.getOrderId()); - vo.setRefundStatus(4); + vo.setRefundStatus(0); rechargeOrderService.updateRechargeOrderStatus(vo); //同意 } else if (request.getType() == 1) { diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java index d456dbc74..796998af8 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.java @@ -274,7 +274,7 @@ public class ReplenishmentTask { // Map params = new HashMap<>(); // params.put("appid", appId); // params.put("mch_id", mchId); -// params.put("out_trade_no", "MEMBER_16700496905020866571"); +// params.put("out_trade_no", "MEMBER_1669714426202210305"); // params.put("nonce_str", nonceStr); // String sign = generateSign(params, key); // 生成签名 // params.put("sign", sign); From 3948729a18e7e5ce4d14e4b03c17578d376b302b Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 17:27:27 +0800 Subject: [PATCH 09/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/recharge/RechargeOrderMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml index c032d64f8..ff0b9ff8d 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml @@ -243,7 +243,7 @@ and a.paid =#{data.paid} - and a.refund_type =#{refundType} + and a.refund_type =#{data.refundType} and a.tenant_id =#{data.tenantId} From 7b919a32e4203f3d0dd149a5493f0e86b548f69d Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 17:38:16 +0800 Subject: [PATCH 10/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/recharge/RechargeOrderMapper.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml index ff0b9ff8d..4fb7d1f07 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml @@ -119,7 +119,13 @@ a.status, CONVERT(a.pay_price*e.member_commission/100, DECIMAL(15,2)) as commissionPrice, a.paid, - d.parent_organization_name + d.parent_organization_name, + a.refund_type, + a.refund_name, + a.member_reason, + a.admin_reason, + a.apply_time, + a.apply_succeed_time from cy_recharge_order a left join member_user b on a.promoter_id = b.id left join system_dept d on d.id = a.dept_id From 3b4ad83dd0bc96896320e3553a12e807222aec50 Mon Sep 17 00:00:00 2001 From: tangqian Date: Tue, 20 Jun 2023 17:55:02 +0800 Subject: [PATCH 11/11] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A4=87=E6=B3=A8=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/recharge/vo/RechargeOrderPageReqVO.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java index d53bbd444..8b3ee7bdc 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java @@ -142,6 +142,8 @@ public class RechargeOrderPageReqVO extends PageParam { /** * 申请退款时间 */ + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime startApplyTime; + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endApplyTime; }