From 85adfec0dbf3e5747dc46f071275cd14d7210b35 Mon Sep 17 00:00:00 2001 From: tangqian Date: Wed, 31 May 2023 14:58:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=A8=E5=B9=BF=E5=91=98=E6=8F=90?= =?UTF-8?q?=E6=88=90=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC?= =?UTF-8?q?=E5=87=BA.=20=E5=95=86=E5=9F=8E=E6=8F=90=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/recharge/vo/PromoterDrawExcelVO.java | 7 ------- .../admin/recharge/vo/PromoterDrawReqVO.java | 1 - .../service/recharge/RechargeOrderServiceImpl.java | 4 ++++ .../mapper/recharge/RechargeOrderMapper.xml | 14 ++++++++------ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PromoterDrawExcelVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PromoterDrawExcelVO.java index b14072a85..9ff79df27 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PromoterDrawExcelVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PromoterDrawExcelVO.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo; import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.math.BigDecimal; @@ -10,12 +9,6 @@ import java.time.LocalDateTime; @Data public class PromoterDrawExcelVO { - @ExcelProperty( "用户id") - private Long userId; - @ExcelProperty( "组织id") - private Long deptId; - @ExcelProperty( "商户id") - private Long tenantId; @ExcelProperty( "组织名称") private String deptName; @ExcelProperty( "组织结构名称") diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PromoterDrawReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PromoterDrawReqVO.java index 347e12ff1..6414a239b 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PromoterDrawReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PromoterDrawReqVO.java @@ -6,7 +6,6 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; -import java.math.BigDecimal; import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; 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 2e1b71cae..7b8914900 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 @@ -20,6 +20,7 @@ import cn.iocoder.yudao.module.system.api.tenant.TenantApi; import cn.iocoder.yudao.module.system.api.tenant.dto.TenantDTO; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -138,6 +139,9 @@ public class RechargeOrderServiceImpl implements RechargeOrderService { @Override public PageResult findPromoterDrawPage(PromoterDrawReqVO pageReqVO) { Page page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); + if (Objects.nonNull(pageReqVO.getSort())&& StringUtils.equals("2",pageReqVO.getSort())) { + pageReqVO.setSort(null); + } rechargeOrderMapper.findPromoterDrawPage(page, pageReqVO); List list = page.getRecords(); if (list != null && list.size() > 0) { 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 f5b04f6bd..04f4364cf 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 @@ -67,12 +67,14 @@ GROUP BY b.promoter_id ) x2 ON x1.user_id = x2.user_id - - ORDER BY x2.total_amount ASC - - - ORDER BY x2.total_amount DESC - + + + ORDER BY x2.total_amount ASC + + + ORDER BY x2.total_amount DESC + +