Parcourir la source

fix(alien-second): 修复举报功能中获取举报者信息错误- 将获取举报者信息的逻辑从被举报用户 ID 更改为举报用户 ID
- 确保在 SecondReportingVo 中设置正确的举报用户名称

wxd il y a 3 mois
Parent
commit
c651a925dd

+ 1 - 1
alien-second/src/main/java/shop/alien/second/service/impl/SecondGoodsServiceImpl.java

@@ -395,7 +395,7 @@ public class SecondGoodsServiceImpl extends ServiceImpl<SecondGoodsMapper, Secon
             SecondReportingVo reportingVo = new SecondReportingVo();
 
             // 查询用户表 根据举报用户类型和举报用户ID 查询 life_user 表 user_phone
-            LifeUser reporter = lifeUserMapper.selectById(report.getReportedUserId());
+            LifeUser reporter = lifeUserMapper.selectById(report.getReportingUserId());
             if (reporter != null) {
                 // 处理举报用户名称  life_user 表 user_name
                 reportingVo.setReportingUserName(reporter.getUserName());