张延森 3 years ago
parent
commit
91266262ed

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

140
     private String MARKETING_CODE;
140
     private String MARKETING_CODE;
141
     @Override
141
     @Override
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) {
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
         List<TaBuilding> buildings = taBuildingMapper.buildingList(page, name, code, startDate, buildingStatus, marketStatus, cityId, isMain, orgId, taPersonBuildingList);
151
         List<TaBuilding> buildings = taBuildingMapper.buildingList(page, name, code, startDate, buildingStatus, marketStatus, cityId, isMain, orgId, taPersonBuildingList);
148
 
152
 
149
         if (null != buildings) {
153
         if (null != buildings) {

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

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