dingxin 6 years ago
parent
commit
9418663589

+ 2
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpActivityMapper.xml View File

@@ -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 View File

@@ -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 View File

@@ -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">

+ 13
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java View File

@@ -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
 
@@ -259,7 +269,7 @@ public class TpActivityServiceImpl extends ServiceImpl<TpActivityMapper, TpActiv
259 269
                 throw new WisdomException("已作废活动无法修改");
260 270
             }
261 271
             e.setStatus("0");
262
-            e.setUpdateUser(userElement.getId());
272
+            // e.setUpdateUser(userElement.getId());
263 273
         });
264 274
         updateBatchById(tpActivityList);
265 275
 

+ 9
- 1
VUECODE/smart-property-manage/src/views/social/activity/index.vue View File

@@ -229,7 +229,15 @@ export default {
229 229
         this.$message.error('请选择一行数据进行修改!')
230 230
         return
231 231
       }
232
-      this.$router.push({ name: 'activity-edi', params: { id: ids[0] }})
232
+      this.$store.dispatch('ActivityById', ids).then((res) => {
233
+        if (res.data.info.status === '0') {
234
+          this.$message.error('已作废活动无法修改')
235
+          return
236
+        }
237
+        this.$router.push({ name: 'activity-edi', params: { id: ids[0] }})
238
+      }).catch(() => {
239
+        console.log('error InvalidActivity')
240
+      })
233 241
     },
234 242
     infoActivity(id) { // 查看活动
235 243
       this.$router.push({ name: 'activity-info', params: { id: id }})

+ 2
- 2
VUECODE/smart-property-manage/src/views/social/transaction/index.vue View File

@@ -11,8 +11,8 @@
11 11
         <el-option label="无举报" value="0"/>
12 12
         <el-option label="被举报" value="1"/>
13 13
       </el-select>
14
-      <el-button v-waves class="filter-item" type="info" icon="el-icon-warning" @click="clearListQuery">清空</el-button>
15
-      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">查询</el-button>
14
+      <el-button v-waves class="filter-item" type="info" @click="clearListQuery">清空</el-button>
15
+      <el-button v-waves class="filter-item" type="primary" @click="handleFilter">查询</el-button>
16 16
     </div>
17 17
 
18 18
     <el-table