成绩管理列表增加标识符

hehai
jiakun.lin 4 years ago
parent 4b590cfd64
commit 700a1db096
  1. 3
      src/main/java/com/msdw/tms/dao/ProjectHiddenDao.java
  2. 4
      src/main/java/com/msdw/tms/entity/ResultsEntity.java
  3. 8
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  4. 10
      src/main/resources/mapper/tms/ProjectHiddenDao.xml

@ -7,4 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ProjectHiddenDao extends BaseMapper<ProjectHiddenEntity> {
ProjectHiddenEntity selectByProjectId(Integer projectId);
ProjectHiddenEntity selectByTeachId(Integer teachId);
}

@ -48,8 +48,10 @@ public class ResultsEntity{
//实验名称
private String experimentalName;
//是否删除
private Integer isdel;
//是否隐藏项目实体类
private ProjectHiddenEntity projectHiddenEntity;
}

@ -96,9 +96,14 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
for (ResultsEntity entity : list) {
Integer number = achievementManagementDao.getImitationAchievement(entity.getProjectId()).size();
entity.setNumber(number);
ProjectHiddenEntity hiddenEntity = projectHiddenDao.selectByProjectId(entity.getProjectId());
entity.setProjectHiddenEntity(hiddenEntity);
}
return list;
}
@ -114,6 +119,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
for (ResultsEntity entity : newList) {
Integer number = achievementManagementDao.getTeachAchievement(entity.getId()).size();
entity.setNumber(number);
ProjectHiddenEntity hiddenEntity = projectHiddenDao.selectByTeachId(entity.getId());
entity.setProjectHiddenEntity(hiddenEntity);
}
return newList;
}

@ -1,6 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.msdw.tms.dao.ProjectDao">
<mapper namespace="com.msdw.tms.dao.ProjectHiddenDao">
<select id="selectByProjectId" resultType="com.msdw.tms.entity.ProjectHiddenEntity">
SELECT is_hidden FROM tms_project_hidden WHERE project_id = #{projectId}
</select>
<select id="selectByTeachId" resultType="com.msdw.tms.entity.ProjectHiddenEntity">
SELECT is_hidden FROM tms_project_hidden WHERE teach_id = #{teachId}
</select>
</mapper>
Loading…
Cancel
Save