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
         tpTransaction.setUuid(userElement.getUserVerifyId());
342
         tpTransaction.setUuid(userElement.getUserVerifyId());
343
         tpTransaction.setUuidType("app");
343
         tpTransaction.setUuidType("app");
344
         tpTransaction.setUuidName(userElement.getUserName());
344
         tpTransaction.setUuidName(userElement.getUserName());
345
-        tpTransaction.setCreateUser(userElement.getId());
345
+        tpTransaction.setCreateUser(userElement.getUserVerifyId());
346
         tpTransaction.setStatus("1");
346
         tpTransaction.setStatus("1");
347
         tpTransaction.setCreateDate(new Date());
347
         tpTransaction.setCreateDate(new Date());
348
-        tpTransaction.setUpdateUser(userElement.getId());
348
+        tpTransaction.setUpdateUser(userElement.getUserVerifyId());
349
         tpTransaction.setUpdateDate(new Date());
349
         tpTransaction.setUpdateDate(new Date());
350
         TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
350
         TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
351
         tpTransaction.setRoomNoName(taUserVerify.getRoomNoName());
351
         tpTransaction.setRoomNoName(taUserVerify.getRoomNoName());

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

210
         this.$message.error('请选择一行数据进行修改!')
210
         this.$message.error('请选择一行数据进行修改!')
211
         return
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
     deleteTransaction(){
227
     deleteTransaction(){
217
       const ids = this.deleteIds
228
       const ids = this.deleteIds

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

144
       return year + '-' + month + '-' + day
144
       return year + '-' + month + '-' + day
145
     },
145
     },
146
     edi() { 
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
     replyList(){
162
     replyList(){