소스 검색

更新评论

Administrator 1 년 전
부모
커밋
9f283a4f96

+ 5 - 2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/info/InfoPingLun.java

@@ -1,5 +1,6 @@
 package org.dromara.system.domain.info;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -33,6 +34,7 @@ public class InfoPingLun extends TenantEntity {
 
     /** 校园安全信息父id */
 
+
     private Long infoPingLunParent;
 
     /** 评论内容 */
@@ -60,7 +62,7 @@ public class InfoPingLun extends TenantEntity {
     private String infoPingLunQuiltUserName;
 
     /** 评论时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd MM:dd:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 
     private Date pingLunTime;
 
@@ -75,5 +77,6 @@ public class InfoPingLun extends TenantEntity {
     /**
      * 对此评论的回复集合
      */
-    private List<InfoPingLun> InfoPingLunList;
+    @TableField(exist = false)
+    private List<InfoPingLun> infoPingLunList;
 }

+ 6 - 6
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/info/XiaoyuanInfo.java

@@ -72,32 +72,32 @@ public class XiaoyuanInfo extends TenantEntity {
     /**
      * 发布时间
      */
-    private Date fabuTime;
+    private Date faBuTime;
 
     /**
      * 已读人数
      */
-    private String infoYidu;
+    private String infoYiDu;
 
     /**
      * 点赞人数
      */
-    private String infoDianzan;
+    private String infoDianZan;
 
     /**
      * 点赞表id
      */
-    private Long infoDianzanId;
+    private Long infoDianZanId;
 
     /**
      * 转发人数
      */
-    private String infoZhuanfa;
+    private String infoZhuanFa;
 
     /**
      * 信息评论表id
      */
-    private Long infoPinglunId;
+    private Long infoPingLunId;
 
     /**
      * 备注

+ 15 - 8
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/info/bo/InfoPingLunBo.java

@@ -1,8 +1,14 @@
 package org.dromara.system.domain.info.bo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
 import org.dromara.system.domain.info.InfoPingLun;
+import org.dromara.system.domain.info.XiaoyuanInfo;
 
 import java.io.Serial;
 import java.util.Date;
@@ -13,12 +19,13 @@ import java.util.List;
  * @Date: 2023/8/18 10:06
  * @Describe:
  */
-public class InfoPingLunBo {
-    @Serial
-    private static final long serialVersionUID = 1L;
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = InfoPingLun.class, reverseConvertGenerate = false)
+public class InfoPingLunBo extends BaseEntity {
+
 
     /** 校园安全信息评论id */
-    @TableId(value = "info_pinglun_id")
     private Long infoPingLunId;
 
     /** 校园安全信息id */
@@ -54,8 +61,7 @@ public class InfoPingLunBo {
     private String infoPingLunQuiltUserName;
 
     /** 评论时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd MM:dd:ss")
-
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date pingLunTime;
 
     /** 评论类型 1:评论 2:回复 */
@@ -67,7 +73,8 @@ public class InfoPingLunBo {
     private String infoPingLunExamine;
 
     /**
-     * 对此评论的回复集合
+     * 对此评论的回复集合i
      */
-    private List<InfoPingLun> InfoPingLunList;
+    @TableField(exist = false)
+    private List<InfoPingLun> infoPingLunList;
 }

+ 6 - 12
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/info/bo/XiaoyuanInfoBo.java

@@ -80,38 +80,32 @@ public class XiaoyuanInfoBo extends BaseEntity {
     /**
      * 发布时间
      */
-    //@NotNull(message = "发布时间不能为空", groups = { AddGroup.class, EditGroup.class })
-    private Date fabuTime;
+    private Date faBuTime;
 
     /**
      * 已读人数
      */
-    //@NotBlank(message = "已读人数不能为空", groups = { AddGroup.class, EditGroup.class })
-    private String infoYidu;
+    private String infoYiDu;
 
     /**
      * 点赞人数
      */
-    //@NotBlank(message = "点赞人数不能为空", groups = { AddGroup.class, EditGroup.class })
-    private String infoDianzan;
+    private String infoDianZan;
 
     /**
      * 点赞表id
      */
-    //@NotNull(message = "点赞表id不能为空", groups = { AddGroup.class, EditGroup.class })
-    private Long infoDianzanId;
+    private Long infoDianZanId;
 
     /**
      * 转发人数
      */
-    //@NotBlank(message = "转发人数不能为空", groups = { AddGroup.class, EditGroup.class })
-    private String infoZhuanfa;
+    private String infoZhuanFa;
 
     /**
      * 信息评论表id
      */
-    //@NotNull(message = "信息评论表id不能为空", groups = { AddGroup.class, EditGroup.class })
-    private Long infoPinglunId;
+    private Long infoPingLunId;
 
     /**
      * 备注

+ 4 - 2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/info/vo/InfoPingLunVo.java

@@ -1,6 +1,7 @@
 package org.dromara.system.domain.info.vo;
 
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.github.linpeilie.annotations.AutoMapper;
@@ -62,7 +63,7 @@ public class InfoPingLunVo implements Serializable {
     private String infoPingLunQuiltUserName;
 
     /** 评论时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd MM:dd:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 
     private Date pingLunTime;
 
@@ -77,5 +78,6 @@ public class InfoPingLunVo implements Serializable {
     /**
      * 对此评论的回复集合
      */
-    private List<InfoPingLun> InfoPingLunList;
+    @TableField(exist = false)
+    private List<InfoPingLunVo> infoPingLunList;
 }

+ 17 - 7
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/info/vo/XiaoyuanInfoVo.java

@@ -1,6 +1,8 @@
 package org.dromara.system.domain.info.vo;
 
 import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
@@ -14,7 +16,7 @@ import org.dromara.system.domain.info.XiaoyuanInfo;
 import java.io.Serial;
 import java.io.Serializable;
 import java.util.Date;
-
+import java.util.List;
 
 
 /**
@@ -91,43 +93,51 @@ public class XiaoyuanInfoVo implements Serializable {
      * 发布时间
      */
     @ExcelProperty(value = "发布时间")
-    private Date fabuTime;
+    private Date faBuTime;
 
     /**
      * 已读人数
      */
     @ExcelProperty(value = "已读人数")
-    private String infoYidu;
+    private String infoYiDu;
 
     /**
      * 点赞人数
      */
     @ExcelProperty(value = "点赞人数")
-    private String infoDianzan;
+    private String infoDianZan;
 
     /**
      * 点赞表id
      */
     @ExcelProperty(value = "点赞表id")
-    private Long infoDianzanId;
+    private Long infoDianZanId;
 
     /**
      * 转发人数
      */
     @ExcelProperty(value = "转发人数")
-    private String infoZhuanfa;
+    private String infoZhuanFa;
 
+    /**
+     * 是否点赞,只作为查询使用
+     */
+    @TableField(exist = false)
+    private String isDianZan;
     /**
      * 信息评论表id
      */
     @ExcelProperty(value = "信息评论表id")
-    private Long infoPinglunId;
+    private Long infoPingLunId;
 
     /**
      * 备注
      */
     @ExcelProperty(value = "备注")
     private String remark;
+    /** 校园安全信息评论信息 */
+    @TableField(exist = false)
+    private List<InfoPingLunVo> infoPingLunList;
 
 
 }

+ 1 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/info/XiaoyuanInfoMapper.java

@@ -16,4 +16,5 @@ import java.util.List;
  */
 public interface XiaoyuanInfoMapper extends BaseMapperPlus<XiaoyuanInfo, XiaoyuanInfoVo> {
 
+    XiaoyuanInfoVo selectXiaoyuanInfoByInfoId (Long infoId);
 }

+ 67 - 13
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/info/XiaoyuanInfoServiceImpl.java

@@ -2,6 +2,7 @@ package org.dromara.system.service.impl.info;
 
 import com.google.api.client.util.SecurityUtils;
 import org.apache.commons.lang3.ObjectUtils;
+import org.dromara.common.core.utils.DateUtils;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -12,19 +13,20 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import org.dromara.common.redis.utils.RedisUtils;
 import org.dromara.common.satoken.utils.LoginHelper;
+import org.dromara.system.domain.info.InfoPingLun;
 import org.dromara.system.domain.info.XiaoyuanInfo;
 import org.dromara.system.domain.info.bo.InfoPingLunBo;
+import org.dromara.system.domain.info.vo.InfoPingLunVo;
 import org.dromara.system.domain.info.vo.XiaoyuanInfoVo;
+import org.dromara.system.domain.score.ScoreDataMf;
 import org.dromara.system.mapper.info.InfoPingLunMapper;
 import org.dromara.system.mapper.info.XiaoyuanInfoMapper;
 import org.dromara.system.service.info.IXiaoyuanInfoService;
 import org.springframework.stereotype.Service;
 import org.dromara.system.domain.bo.XiaoyuanInfoBo;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Collection;
+import java.util.*;
+import java.util.stream.Collectors;
 
 import static org.dromara.common.core.constant.CacheConstants.*;
 
@@ -46,7 +48,53 @@ public class XiaoyuanInfoServiceImpl implements IXiaoyuanInfoService {
      */
     @Override
     public XiaoyuanInfoVo queryById(Long infoId){
-        return baseMapper.selectVoById(infoId);
+        //已读数量+1
+        XiaoyuanInfoVo xiaoyuanInfo = baseMapper.selectXiaoyuanInfoByInfoId(infoId);
+        String infoYiDu = xiaoyuanInfo.getInfoYiDu();
+        int result = Integer.parseInt(infoYiDu) + 1;
+        xiaoyuanInfo.setInfoYiDu(String.valueOf(result));
+
+        //组装评论
+        List<InfoPingLunVo> infoPingLunList = xiaoyuanInfo.getInfoPingLunList();
+        if (infoPingLunList != null && infoPingLunList.size() > 0){
+            //根据评论类型进行分组评论类型 1:评论 2:回复
+            Map<String, List<InfoPingLunVo>> collect = infoPingLunList.stream().sorted(Comparator.comparing(InfoPingLunVo::getPingLunTime, Comparator.reverseOrder())).collect(Collectors.groupingBy(InfoPingLunVo::getInfoPingLunType));
+            if (collect != null && collect.size() > 0){
+                //所有评论类型的数据
+                List<InfoPingLunVo> infoPingLunListFather = collect.get("1");
+                //给他们找自己的回复类型的数据
+                if (infoPingLunListFather != null && infoPingLunListFather.size() > 0){
+                    for (InfoPingLunVo infoPinglun : infoPingLunListFather) {
+                        List<InfoPingLunVo> infoPinglunList = collect.get("2");
+                        //回复不是空
+                        if(infoPinglunList != null && infoPinglunList.size() > 0){
+                            Map<Long, List<InfoPingLunVo>> infoPingLunListParen = infoPinglunList.stream().collect(Collectors.groupingBy(InfoPingLunVo::getInfoPingLunParent));
+                            List<InfoPingLunVo> infoPinglunListCh = infoPingLunListParen.get(infoPinglun.getInfoPingLunId());
+                            if (infoPinglunListCh != null && infoPinglunListCh.size() > 0){
+                                infoPinglun.setInfoPingLunList(infoPinglunListCh.stream().sorted(Comparator.comparing(InfoPingLunVo::getPingLunTime, Comparator.reverseOrder())).collect(Collectors.toList()));
+                            }
+                        }
+                    }
+                }
+                xiaoyuanInfo.setInfoPingLunList(infoPingLunListFather);
+            }
+        }
+        //获取点赞/分享/这个人是否点赞信息
+        Object dianZan = RedisUtils.getCacheObject(XIAOYUAN_INFO_DIANZAN + xiaoyuanInfo.getInfoId());
+        if (ObjectUtils.isNotEmpty(dianZan)){
+            xiaoyuanInfo.setInfoDianZan(String.valueOf(dianZan));
+        }
+        Object zhuanFa = RedisUtils.getCacheObject(XIAOYUAN_INFO_ZHUANFA+ xiaoyuanInfo.getInfoId());
+        if (ObjectUtils.isNotEmpty(zhuanFa)){
+            xiaoyuanInfo.setInfoZhuanFa(String.valueOf(zhuanFa));
+        }
+        Object dianZanUser = RedisUtils.getCacheObject(XIAOYUAN_INFO_DIANZAN_USER + xiaoyuanInfo.getInfoId());
+        xiaoyuanInfo.setIsDianZan("N");
+        if (ObjectUtils.isNotEmpty(dianZanUser)){
+            xiaoyuanInfo.setIsDianZan("Y");
+        }
+        baseMapper.updateById(MapstructUtils.convert(xiaoyuanInfo, XiaoyuanInfo.class));
+        return xiaoyuanInfo;
     }
 
     /**
@@ -79,12 +127,12 @@ public class XiaoyuanInfoServiceImpl implements IXiaoyuanInfoService {
         lqw.eq(StringUtils.isNotBlank(bo.getInfoTypeZi()), XiaoyuanInfo::getInfoTypeZi, bo.getInfoTypeZi());
         lqw.eq(StringUtils.isNotBlank(bo.getInfoContent()), XiaoyuanInfo::getInfoContent, bo.getInfoContent());
         lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XiaoyuanInfo::getStatus, bo.getStatus());
-        lqw.eq(bo.getFabuTime() != null, XiaoyuanInfo::getFabuTime, bo.getFabuTime());
-        lqw.eq(StringUtils.isNotBlank(bo.getInfoYidu()), XiaoyuanInfo::getInfoYidu, bo.getInfoYidu());
-        lqw.eq(StringUtils.isNotBlank(bo.getInfoDianzan()), XiaoyuanInfo::getInfoDianzan, bo.getInfoDianzan());
-        lqw.eq(bo.getInfoDianzanId() != null, XiaoyuanInfo::getInfoDianzanId, bo.getInfoDianzanId());
-        lqw.eq(StringUtils.isNotBlank(bo.getInfoZhuanfa()), XiaoyuanInfo::getInfoZhuanfa, bo.getInfoZhuanfa());
-        lqw.eq(bo.getInfoPinglunId() != null, XiaoyuanInfo::getInfoPinglunId, bo.getInfoPinglunId());
+        lqw.eq(bo.getFaBuTime() != null, XiaoyuanInfo::getFaBuTime, bo.getFaBuTime());
+        lqw.eq(StringUtils.isNotBlank(bo.getInfoYiDu()), XiaoyuanInfo::getInfoYiDu, bo.getInfoYiDu());
+        lqw.eq(StringUtils.isNotBlank(bo.getInfoDianZan()), XiaoyuanInfo::getInfoDianZan, bo.getInfoDianZan());
+        lqw.eq(bo.getInfoDianZanId() != null, XiaoyuanInfo::getInfoDianZanId, bo.getInfoDianZanId());
+        lqw.eq(StringUtils.isNotBlank(bo.getInfoZhuanFa()), XiaoyuanInfo::getInfoZhuanFa, bo.getInfoZhuanFa());
+        lqw.eq(bo.getInfoPingLunId() != null, XiaoyuanInfo::getInfoPingLunId, bo.getInfoPingLunId());
         return lqw;
     }
 
@@ -94,6 +142,9 @@ public class XiaoyuanInfoServiceImpl implements IXiaoyuanInfoService {
     @Override
     public Boolean insertByBo(XiaoyuanInfoBo bo) {
         XiaoyuanInfo add = MapstructUtils.convert(bo, XiaoyuanInfo.class);
+        bo.setSchoolId(String.valueOf(LoginHelper.getDeptId()));
+        bo.setCreateBy(LoginHelper.getUserId());
+        bo.setCreateTime(DateUtils.getNowDate());
         validEntityBeforeSave(add);
         boolean flag = baseMapper.insert(add) > 0;
         if (flag) {
@@ -134,10 +185,13 @@ public class XiaoyuanInfoServiceImpl implements IXiaoyuanInfoService {
      * 新增校园安全信息评论
      */
     @Override
-    public int insertInfoPingLun(InfoPingLunBo bo) {
+    public Boolean insertInfoPingLun(InfoPingLunBo bo) {
         List<InfoPingLunBo> infoPingLunList = new ArrayList<>();
         infoPingLunList.add(bo);
-        return infoPingLunMapper.batchInfoPingLun(infoPingLunList);
+        List<InfoPingLun> convert = MapstructUtils.convert(infoPingLunList, InfoPingLun.class);
+        return infoPingLunMapper.insertBatch(convert);
+
+
     }
 
     /**

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/info/IXiaoyuanInfoService.java

@@ -50,7 +50,7 @@ public interface IXiaoyuanInfoService {
     /**
      * 新增校园安全信息评论
      */
-    int insertInfoPingLun(InfoPingLunBo bo);
+    Boolean insertInfoPingLun(InfoPingLunBo bo);
 
     /**
      * 删除评论

+ 2 - 2
ruoyi-modules/ruoyi-system/src/main/resources/mapper/info/InfoPingLunMapper.xml

@@ -10,9 +10,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             ( #{item.infoPingLunId}, #{item.infoId}, #{item.infoPingLunParent}, #{item.infoPingLunContent}, #{item.avatar}, #{item.infoPingLunUserId}, #{item.infoPingLunUserName}, #{item.infoPingLunQuiltUserId}, #{item.infoPingLunQuiltUserName}, #{item.pingLunTime}, #{item.infoPingLunType}, #{item.infoPingLunExamine}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
         </foreach>
     </insert>
-    <delete id="deletePingLun" parameterType="InfoPingLun">
+    <delete id="deletePingLun" >
         delete from info_pinglun where
-        <if test="infoPingLunType != null and infoPingLunType == 1">info_pinglun_parent = #{infoPingLunId} or info_pinglun_id = #{infoPingLunId}</if>
+        <if test="infoPingLunType != null and infoPingLunType == 1">info_ping_lun_parent = #{infoPingLunId} or info_pinglun_id = #{infoPingLunId}</if>
         <if test="infoPingLunType != null and infoPingLunType == 2">info_pinglun_id = #{infoPingLunId}</if>
     </delete>
 </mapper>

+ 42 - 0
ruoyi-modules/ruoyi-system/src/main/resources/mapper/info/XiaoyuanInfoMapper.xml

@@ -3,5 +3,47 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.dromara.system.mapper.info.XiaoyuanInfoMapper">
+    <resultMap type="org.dromara.system.domain.info.vo.XiaoyuanInfoVo" id="XiaoyuanInfoResult">
+        <result property="infoId"    column="info_id"    />
+        <result property="infoTitle"    column="info_title"    />
+        <result property="infoPhoto"    column="info_photo"    />
+        <result property="schoolId"    column="school_id"    />
+        <result property="schoolName"    column="school_name"    />
+        <result property="infoType"    column="info_type"    />
+        <result property="infoTypeZi"    column="info_type_zi"    />
+        <result property="infoContent"    column="info_content"    />
+        <result property="status"    column="status"    />
+        <result property="faBuTime"    column="fa_bu_time"    />
+        <result property="infoYiDu"    column="info_yi_du"    />
+        <result property="infoDianZanId"    column="info_dian_zan_id"    />
+        <result property="infoDianZan"    column="info_dian_zan"    />
+        <result property="infoZhuanFa"    column="info_zhuan_fa"    />
+        <result property="infoPingLunId"    column="info_ping_lun_id"    />
+    </resultMap>
 
+    <resultMap id="XiaoyuanInfoInfoPingLunResult" type="org.dromara.system.domain.info.vo.XiaoyuanInfoVo" extends="XiaoyuanInfoResult">
+        <collection property="infoPingLunList" notNullColumn="sub_info_PingLun_id" javaType="java.util.List" resultMap="InfoPingLunResult" />
+    </resultMap>
+
+    <resultMap type="org.dromara.system.domain.info.vo.InfoPingLunVo" id="InfoPingLunResult">
+        <result property="infoPingLunId"    column="sub_info_PingLun_id"    />
+        <result property="infoId"    column="sub_info_id"    />
+        <result property="infoPingLunParent"    column="sub_info_PingLun_parent"    />
+        <result property="infoPingLunContent"    column="sub_info_PingLun_content"    />
+        <result property="avatar"    column="sub_avatar"    />
+        <result property="infoPingLunUserId"    column="sub_info_PingLun_user_id"    />
+        <result property="infoPingLunUserName"    column="sub_info_PingLun_user_name"    />
+        <result property="infoPingLunQuiltUserId"    column="sub_info_PingLun_quilt_user_id"    />
+        <result property="infoPingLunQuiltUserName"    column="sub_info_PingLun_quilt_user_name"    />
+        <result property="pingLunTime"    column="sub_PingLun_time"    />
+        <result property="infoPingLunType"    column="sub_info_PingLun_type"    />
+        <result property="infoPingLunExamine"    column="sub_info_PingLun_examine"    />
+    </resultMap>
+    <select id="selectXiaoyuanInfoByInfoId" parameterType="Long" resultMap="XiaoyuanInfoInfoPingLunResult">
+        select a.info_id, a.info_title, a.info_photo, a.school_id, a.school_name, a.info_type, a.info_type_zi, a.info_content, a.status, a.fa_bu_time, a.info_yi_du, a.info_dian_zan_id,a.info_dian_zan, a.info_zhuan_fa, a.info_ping_lun_id, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
+               b.info_pinglun_id as sub_info_PingLun_id, b.info_id as sub_info_id, b.info_ping_lun_parent as sub_info_PingLun_parent, b.info_ping_lun_content as sub_info_PingLun_content, b.avatar as sub_avatar, b.info_ping_lun_user_id as sub_info_PingLun_user_id, b.info_ping_lun_user_name as sub_info_PingLun_user_name, b.info_ping_lun_quilt_user_id as sub_info_PingLun_quilt_user_id, b.info_ping_lun_quilt_user_name as sub_info_PingLun_quilt_user_name, b.ping_lun_time as sub_PingLun_time, b.info_ping_lun_type as sub_info_PingLun_type, b.info_ping_lun_examine as sub_info_PingLun_examine, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
+        from xiaoyuan_info a
+                 left join info_pinglun b on b.info_id = a.info_id
+        where a.info_id = #{infoId}
+    </select>
 </mapper>

+ 2 - 2
ruoyi-modules/ruoyi-system/src/main/resources/mapper/score/ScoreDataStudentMapper.xml

@@ -116,8 +116,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         a.score as sdd_score
         FROM
        ( SELECT
-        dd.score_data_name as sdd_score_data_name,
-        dd.score_data_name_id as sdd_score_data_name_id,
+        dd.score_data_name ,
+        dd.score_data_name_id,
         dd.xueke as sdd_xueke,
         dd.score as sdd_score
         FROM