dingxin 6 yıl önce
ebeveyn
işleme
0a07453f99

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Dosyayı Görüntüle

@@ -344,8 +344,8 @@ public class SocialController extends BaseController {
344 344
         
345 345
         ResponseBean responseBean = new ResponseBean();
346 346
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
347
-        Integer userId = userElement.getId();
348
-        ResponseBean response = socialServiceI.reportTransaction(userId, communityId,paramets);
347
+        Integer userVerifyId = userElement.getUserVerifyId();
348
+        ResponseBean response = socialServiceI.reportTransaction(userVerifyId, communityId,paramets);
349 349
         return response;
350 350
     }
351 351
 

+ 9
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Dosyayı Görüntüle

@@ -502,12 +502,12 @@ public class SocialServiceImpl implements SocialServiceI {
502 502
     /**
503 503
      * 举报二手交易帖子
504 504
      *
505
-     * @param userId
505
+     * @param userVerifyUserId
506 506
      * @param paramets
507 507
      * @return
508 508
      */
509 509
     @Override
510
-    public ResponseBean reportTransaction(Integer userId, Integer communityId, String paramets) {
510
+    public ResponseBean reportTransaction(Integer userVerifyUserId, Integer communityId, String paramets) {
511 511
         ResponseBean responseBean = new ResponseBean();
512 512
         JSONObject jsonObject = JSONObject.parseObject(paramets);
513 513
         Integer transactionId = jsonObject.getInteger("transactionId");
@@ -519,13 +519,13 @@ public class SocialServiceImpl implements SocialServiceI {
519 519
             return responseBean;
520 520
         }
521 521
         // 举报原因
522
-        TpTransactionReport tpTransactionReport = tpTransactionReportMapper.selectByCommunityIdAndTransactionId(userId, communityId, tpTransaction.getId());
522
+        TpTransactionReport tpTransactionReport = tpTransactionReportMapper.selectByCommunityIdAndTransactionId(userVerifyUserId, communityId, tpTransaction.getId());
523 523
         if (null != tpTransactionReport) {
524 524
             responseBean.addError("您已举报了该帖子!");
525 525
             return responseBean;
526 526
         }
527 527
         //插入举报表
528
-        tpTransactionMapper.saveReportReason(userId, communityId, transactionId, reportReasonId,new Date());
528
+        tpTransactionMapper.saveReportReason(userVerifyUserId, communityId, transactionId, reportReasonId,new Date());
529 529
         //更新交易表的举报状态为被举报
530 530
         TpTransaction record = new TpTransaction();
531 531
         record.setId(transactionId);
@@ -534,9 +534,10 @@ public class SocialServiceImpl implements SocialServiceI {
534 534
         if (size > 0) {
535 535
 
536 536
             // 举报人
537
-            TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
537
+            TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userVerifyUserId);
538
+            TaUser taUser = taUserMapper.selectByPrimaryKey(taUserVerify.getUserId());
538 539
             // 发帖人
539
-            TaUser createUser = taUserMapper.selectByPrimaryKey(tpTransaction.getCreateUser());
540
+//            TaUser createUser = taUserMapper.selectByPrimaryKey(tpTransaction.getCreateUser());
540 541
 
541 542
             // 举报原因
542 543
             //TpTransactionReport tpTransactionReport = tpTransactionReportMapper.selectByCommunityIdAndTransactionId(communityId, tpTransaction.getId());
@@ -555,12 +556,12 @@ public class SocialServiceImpl implements SocialServiceI {
555 556
             message.setModelType("1");
556 557
             message.setUuidType("2");
557 558
             message.setSource("1");
558
-            message.setMessageContent("{" + taUser.getUserName() + "}举报了{" + createUser.getUserName() + "}发布的帖子:{" + tpTransaction.getTransactionTitle() + "},举报原因:{" + sysReportReason.getReason() + "},点击责令发布人修改或直接作废帖子");
559
+            message.setMessageContent("{" + taUser.getUserName() + "}举报了{" + tpTransaction.getUuidName() + "}发布的帖子:{" + tpTransaction.getTransactionTitle() + "},举报原因:{" + sysReportReason.getReason() + "},点击责令发布人修改或直接作废帖子");
559 560
             message.setStatus("1");
560 561
             message.setReadStatus("0");
561 562
             message.setTransactionId(transactionId);
562 563
             message.setCreateDate(new Date());
563
-            message.setCreateUser(userId);
564
+            message.setCreateUser(userVerifyUserId);
564 565
             tpMessageMapper.insertSelective(message);
565 566
 
566 567
 

+ 4
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReportMapper.xml Dosyayı Görüntüle

@@ -95,6 +95,9 @@
95 95
     select
96 96
      <include refid="Base_Column_List"/>
97 97
      from tp_transaction_report
98
-     where reporter_id = #{userId, jdbcType=INTEGER} and community_id = #{communityId,jdbcType=INTEGER} and transaction_id = #{transactionId,jdbcType=INTEGER}
98
+     where
99
+      reporter_id = #{userId, jdbcType=INTEGER}
100
+      and community_id = #{communityId,jdbcType=INTEGER}
101
+      and transaction_id = #{transactionId,jdbcType=INTEGER}
99 102
   </select>
100 103
 </mapper>