From d94776ba25ffcd19cdd7970048ed88d9212bd394 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期六, 08 二月 2025 10:10:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
index 2f33fca..71ee4c2 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -124,7 +124,7 @@
 
         //手动排序
         if(StringUtils.isNotEmpty(search.getOrderByColumn())){
-            if("selling_price".equals(search.getOrderByColumn())){
+            if("tgs.selling_price".equals(search.getOrderByColumn())){
                 list.sort(new Comparator<GoodsVO>() {
                     @Override
                     public int compare(GoodsVO o1, GoodsVO o2) {
@@ -146,13 +146,13 @@
                     @Override
                     public int compare(GoodsVO o1, GoodsVO o2) {
                         if(null != o1.getIntegral() && null != o2.getIntegral()){
-                            return o1.getIntegral().compareTo(o2.getIntegral()) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1);
+                            return o1.getIntegral().compareTo(o2.getIntegral()) * ("desc".equals(search.getIsAsc()) ? -1 : 1);
                         }
                         if(null == o1.getIntegral() && null != o2.getIntegral()){
-                            return Integer.valueOf(0).compareTo(o2.getIntegral()) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1);
+                            return Integer.valueOf(0).compareTo(o2.getIntegral()) * ("desc".equals(search.getIsAsc()) ? -1 : 1);
                         }
                         if(null != o1.getIntegral() && null == o2.getIntegral()){
-                            return o1.getIntegral().compareTo(Integer.valueOf(0)) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1);
+                            return o1.getIntegral().compareTo(Integer.valueOf(0)) * ("desc".equals(search.getIsAsc()) ? -1 : 1);
                         }
                         return 0;
                     }
@@ -162,7 +162,7 @@
                 list.sort(new Comparator<GoodsVO>() {
                     @Override
                     public int compare(GoodsVO o1, GoodsVO o2) {
-                        return o1.getSaleNum().compareTo(o2.getSaleNum()) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1);
+                        return o1.getSaleNum().compareTo(o2.getSaleNum()) * ("desc".equals(search.getIsAsc()) ? -1 : 1);
                     }
                 });
             }
@@ -673,4 +673,5 @@
         }
         return price;
     }
+
 }

--
Gitblit v1.7.1