傅行帆 5 vuotta sitten
vanhempi
commit
91473b4292

+ 1
- 0
src/main/java/com/huiju/estateagents/controller/ExtendContentController.java Näytä tiedosto

@@ -105,6 +105,7 @@ public class ExtendContentController extends BaseController {
105 105
             queryWrapper.eq(status != null, "status", status);
106 106
             queryWrapper.eq( "org_id", getOrgId(request));
107 107
             queryWrapper.and(taPersonBuildingList.size() > 0, wapper -> wapper.in("building_id",taPersonBuildingList.stream().map(TaPersonBuilding::getBuildingId).collect(Collectors.toList())).or().isNull("building_id"));
108
+            queryWrapper.orderByDesc("order_no");
108 109
             queryWrapper.orderByDesc("create_date");
109 110
             IPage<ExtendContent> result = iExtendContentService.page(pg, queryWrapper);
110 111
 

+ 4
- 1
src/main/java/com/huiju/estateagents/entity/ExtendContent.java Näytä tiedosto

@@ -101,5 +101,8 @@ public class ExtendContent implements Serializable {
101 101
 
102 102
     private Integer cityId;
103 103
 
104
-
104
+    /**
105
+     * 排序
106
+     */
107
+    private Integer orderNo;
105 108
 }

+ 2
- 0
src/main/java/com/huiju/estateagents/service/impl/ExtendContentServiceImpl.java Näytä tiedosto

@@ -86,6 +86,8 @@ public class ExtendContentServiceImpl extends ServiceImpl<ExtendContentMapper, E
86 86
         extendContentQuery.eq(null != cityId && cityId != 0, "city_id", cityId);
87 87
         extendContentQuery.eq("status","1");
88 88
         extendContentQuery.eq("org_id",orgId);
89
+        extendContentQuery.orderByDesc("order_no");
90
+        extendContentQuery.orderByDesc("create_date");
89 91
         List<ExtendContent> taExtendContent = extendContentMapper.selectList(extendContentQuery);
90 92
         responseBean.addSuccess(taExtendContent);
91 93
         return responseBean;