Browse Source

修复bug 4508

傅行帆 6 years ago
parent
commit
faefd5643a

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java View File

@@ -342,10 +342,10 @@ public class SocialServiceImpl implements SocialServiceI {
342 342
         tpTransaction.setUuid(userElement.getUserVerifyId());
343 343
         tpTransaction.setUuidType("app");
344 344
         tpTransaction.setUuidName(userElement.getUserName());
345
-        tpTransaction.setCreateUser(userElement.getId());
345
+        tpTransaction.setCreateUser(userElement.getUserVerifyId());
346 346
         tpTransaction.setStatus("1");
347 347
         tpTransaction.setCreateDate(new Date());
348
-        tpTransaction.setUpdateUser(userElement.getId());
348
+        tpTransaction.setUpdateUser(userElement.getUserVerifyId());
349 349
         tpTransaction.setUpdateDate(new Date());
350 350
         TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
351 351
         tpTransaction.setRoomNoName(taUserVerify.getRoomNoName());

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

@@ -210,8 +210,19 @@ export default {
210 210
         this.$message.error('请选择一行数据进行修改!')
211 211
         return
212 212
       }
213
-       let id= this.deleteIds[0]
214
-       this.$router.push({ name: 'transaction-edit', query: { id: id }})
213
+      let id= this.deleteIds[0]
214
+      this.$store.dispatch('transaction/TransactionById', id).then((res) => {
215
+        const tpTransactionData = res.data.tpTransaction
216
+        if(tpTransactionData.uuidType === 'prop' && this.$store.getters.userData.id === tpTransactionData.uuid){
217
+          this.$router.push({ name: 'transaction-edit', query: { id: id }})
218
+        }else{
219
+          this.$message.error('您不是话题发布人,无法修改')
220
+          return
221
+        }
222
+        }).catch(() => {
223
+          this.$message.error('您不是话题发布人,无法修改')
224
+          return
225
+        })
215 226
       },
216 227
     deleteTransaction(){
217 228
       const ids = this.deleteIds

+ 13
- 1
VUECODE/smart-property-manage/src/views/social/transaction/transactionDetails.vue View File

@@ -144,7 +144,19 @@ export default {
144 144
       return year + '-' + month + '-' + day
145 145
     },
146 146
     edi() { 
147
-      this.$router.push({ name: 'transaction-edit', query: { id: this.ruleForm.id }})
147
+      this.$store.dispatch('transaction/TransactionById', this.ruleForm.id).then((res) => {
148
+        const tpTransactionData = res.data.tpTransaction
149
+        if(tpTransactionData.uuidType === 'prop' && this.$store.getters.userData.id === tpTransactionData.uuid){
150
+          this.$router.push({ name: 'transaction-edit', query: { id: this.ruleForm.id }})
151
+        }else{
152
+          this.$message.error('您不是话题发布人,无法修改')
153
+          return
154
+        }
155
+        }).catch(() => {
156
+          this.$message.error('您不是话题发布人,无法修改')
157
+          return
158
+        })
159
+      
148 160
     },
149 161
     // 查看此帖子的所有回复
150 162
     replyList(){