张延森 3 anni fa
parent
commit
91266262ed

+ 7
- 3
src/main/java/com/yunzhi/marketing/service/impl/TaBuildingServiceImpl.java Vedi File

@@ -140,10 +140,14 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
140 140
     private String MARKETING_CODE;
141 141
     @Override
142 142
     public ResponseBean buildingList(Integer pageNum, Integer pageSize, String name, String code, LocalDateTime startDate, String buildingStatus, String marketStatus, Integer cityId, Integer isMain, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
143
-        Page<TaBuilding> page = new Page<>();
144
-        page.setSize(pageSize == null ? 10 : pageSize);
145
-        page.setCurrent(pageNum == null ? 1 : pageNum);
143
+        if (pageNum == null) {
144
+            pageNum = 1;
145
+        }
146
+        if (pageSize == null) {
147
+            pageSize = 10;
148
+        }
146 149
 
150
+        Page<TaBuilding> page = new Page<>(pageNum, pageSize);
147 151
         List<TaBuilding> buildings = taBuildingMapper.buildingList(page, name, code, startDate, buildingStatus, marketStatus, cityId, isMain, orgId, taPersonBuildingList);
148 152
 
149 153
         if (null != buildings) {

+ 1
- 1
src/main/resources/mapper/TaBuildingMapper.xml Vedi File

@@ -36,7 +36,7 @@
36 36
                 </foreach>
37 37
             </if>
38 38
         </where>
39
-        ORDER BY status ASC, create_date DESC
39
+        ORDER BY status ASC, create_date DESC, building_id ASC
40 40
     </select>
41 41
 
42 42
     <select id="buildingListSelect" resultType="com.yunzhi.marketing.entity.TaBuilding">