weiximei пре 6 година
родитељ
комит
c328b6c0e1

+ 2
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpActivityMapper.xml Прегледај датотеку

@@ -270,7 +270,8 @@
270 270
     </if>
271 271
   ORDER BY
272 272
       a.sort,
273
-      a.activity_end_time DESC,
273
+      a.activity_end_time,
274
+      a.update_date,
274 275
 	  a.create_date DESC
275 276
   </select>
276 277
 

+ 1
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpAnnouncementMapper.xml Прегледај датотеку

@@ -176,6 +176,7 @@
176 176
       </if>
177 177
   ORDER BY
178 178
       a.sort,
179
+      a.update_date,
179 180
       a.create_date DESC
180 181
   </select>
181 182
 

+ 3
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml Прегледај датотеку

@@ -214,7 +214,7 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
214 214
       and transaction_title LIKE concat('%',#{transactionTitle,jdbcType=VARCHAR},'%')
215 215
     </if>
216 216
     and status = 1
217
-    order by create_date DESC
217
+    order by update_date, create_date DESC
218 218
   </select>
219 219
 
220 220
   <select id="selectTransaction" resultMap="BaseResultMap">
@@ -227,7 +227,7 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
227 227
       and type = #{type,jdbcType=INTEGER}
228 228
     </if>
229 229
     and status = 1
230
-    order by create_date DESC
230
+    order by update_date, create_date DESC
231 231
   </select>
232 232
 
233 233
   <update id="updateTransaction" parameterType="com.community.huiju.model.TpTransaction" >
@@ -249,7 +249,7 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
249 249
   </select>
250 250
 
251 251
   <select id="getReportReasons" resultType="java.util.Map">
252
-    SELECT id,reason FROM sys_report_reason ORDER BY sort
252
+    SELECT id,reason FROM sys_report_reason ORDER BY sort,update_date DESC
253 253
   </select>
254 254
 
255 255
   <insert id="saveReportReason">

+ 12
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java Прегледај датотеку

@@ -197,11 +197,21 @@ public class TpActivityServiceImpl extends ServiceImpl<TpActivityMapper, TpActiv
197 197
             responseBean.addError("活动不存在!");
198 198
             return responseBean;
199 199
         }
200
+        // 状态
201
+        int temp = Integer.valueOf(selectTpActivity.getStatus());
200 202
 
201 203
         BeanTools.copyProperties(tpActivity, selectTpActivity);
202 204
 
203
-        selectTpActivity.setUpdateDate(LocalDateTime.now());
204
-        selectTpActivity.setUpdateUser(userElement.getId());
205
+        /**
206
+         * 如果是草稿, 则只需要变更创建时间! 因为前端页面的活动修改, 就是发布按钮, 这样前端就不会显示为已修改状态
207
+         */
208
+        if (temp == 2) {
209
+            selectTpActivity.setCreateDate(LocalDateTime.now());
210
+        } else {
211
+            selectTpActivity.setUpdateDate(LocalDateTime.now());
212
+            selectTpActivity.setUpdateUser(userElement.getId());
213
+        }
214
+
205 215
 
206 216
         int row = tpActivityMapper.updateById(selectTpActivity);
207 217