zwhui 1 yıl önce
ebeveyn
işleme
80309cbb88

+ 2 - 1
wholesale/src/main/java/com/yhlxj/web/controller/login/WholesaleUserController.java

@@ -159,7 +159,8 @@ public class WholesaleUserController {
         List<WholesaleNotice> list = wholesaleNoticeService.list(Wrappers.lambdaQuery(WholesaleNotice.class)
                 .eq(WholesaleNotice::getWholesaleId, wholesaleId)
                 .eq(WholesaleNotice::getPlatform, platform)
-                .eq(WholesaleNotice::getStatus, true));
+                .eq(WholesaleNotice::getStatus, true)
+                .orderByDesc(WholesaleNotice::getId));
         return GatewayResponse.SUCCESS.newBuilder().toResult(list);
     }
 }

+ 1 - 1
wholesale/src/main/java/com/yhlxj/web/controller/manage/WholesaleController.java

@@ -135,7 +135,7 @@ public class WholesaleController {
     public Result<Page<WholesaleUser>> listUser(String username, @RequestParam(defaultValue = "1") Integer start, @RequestParam(defaultValue = "10") Integer limit) {
         long wholesaleId = StpUtil.getLoginIdAsLong();
         return GatewayResponse.SUCCESS.newBuilder().toResult(wholesaleUserService.page(new Page<>(start, limit),
-                Wrappers.lambdaQuery(WholesaleUser.class).eq(WholesaleUser::getWholesaleId, wholesaleId).like(WholesaleUser::getUsername, username)));
+                Wrappers.lambdaQuery(WholesaleUser.class).eq(WholesaleUser::getWholesaleId, wholesaleId).like(WholesaleUser::getUsername, username).orderByDesc(WholesaleUser::getId)));
     }
 
 

+ 2 - 1
wholesale/src/main/java/com/yhlxj/web/controller/manage/WholesaleNoticeController.java

@@ -80,7 +80,8 @@ public class WholesaleNoticeController {
                 .eq(WholesaleNotice::getWholesaleId, wholesaleId)
                 .like(StringUtil.isNotBlank(platform),WholesaleNotice::getPlatform, platform)
                 .like(StringUtil.isNotBlank(description),WholesaleNotice::getDescription, description)
-                .eq(status != null,WholesaleNotice::getStatus, status));
+                .eq(status != null,WholesaleNotice::getStatus, status)
+                .orderByDesc(WholesaleNotice::getId));
         return GatewayResponse.SUCCESS.newBuilder().toResult(page);
     }
 }