更新数据库设计:移除学分相关模块

This commit is contained in:
likingcode
2026-03-01 17:14:49 +00:00
parent 6aaa7cdcc8
commit 9a1dc9687c
22 changed files with 626 additions and 0 deletions

92
backend/pom.xml Normal file
View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.3</version>
<relativePath/>
</parent>
<groupId>com.innovation</groupId>
<artifactId>innovation-platform</artifactId>
<version>1.0.0</version>
<name>innovation-platform</name>
<description>高校创新创业项目孵化平台</description>
<properties>
<java.version>17</java.version>
<mybatis-plus.version>3.5.5</mybatis-plus.version>
<sa-token.version>1.37.0</sa-token.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot3-starter</artifactId>
<version>${sa-token.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.25</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,16 @@
package com.innovation.platform;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* 高校创新创业项目孵化平台启动类
*/
@SpringBootApplication
@MapperScan("com.innovation.platform.mapper")
public class InnovationPlatformApplication {
public static void main(String[] args) {
SpringApplication.run(InnovationPlatformApplication.class, args);
}
}

View File

@@ -0,0 +1,28 @@
package com.innovation.platform.common;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 分页结果
*/
@Data
public class PageResult<T> implements Serializable {
private List<T> records;
private Long total;
private Long size;
private Long current;
private Long pages;
public static <T> PageResult<T> of(IPage<T> page) {
PageResult<T> result = new PageResult<>();
result.setRecords(page.getRecords());
result.setTotal(page.getTotal());
result.setSize(page.getSize());
result.setCurrent(page.getCurrent());
result.setPages(page.getPages());
return result;
}
}

View File

@@ -0,0 +1,56 @@
package com.innovation.platform.common;
import lombok.Data;
import java.io.Serializable;
/**
* 统一响应结果
*/
@Data
public class Result<T> implements Serializable {
private Integer code;
private String message;
private T data;
private Long timestamp;
public Result() {
this.timestamp = System.currentTimeMillis();
}
public static <T> Result<T> success() {
Result<T> result = new Result<>();
result.setCode(200);
result.setMessage("操作成功");
return result;
}
public static <T> Result<T> success(T data) {
Result<T> result = new Result<>();
result.setCode(200);
result.setMessage("操作成功");
result.setData(data);
return result;
}
public static <T> Result<T> success(String message, T data) {
Result<T> result = new Result<>();
result.setCode(200);
result.setMessage(message);
result.setData(data);
return result;
}
public static <T> Result<T> error(String message) {
Result<T> result = new Result<>();
result.setCode(500);
result.setMessage(message);
return result;
}
public static <T> Result<T> error(Integer code, String message) {
Result<T> result = new Result<>();
result.setCode(code);
result.setMessage(message);
return result;
}
}

View File

@@ -0,0 +1,30 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 成果实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("achievement")
public class Achievement extends BaseEntity {
private Long projectId;
private Integer achievementType;
private String achievementName;
private Integer achievementLevel;
private String authorNames;
private LocalDate publishTime;
private String publishOrg;
private String description;
private BigDecimal credit;
private Integer status;
private Long auditorId;
private LocalDateTime auditTime;
private String auditOpinion;
}

View File

@@ -0,0 +1,23 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 成果附件实体
*/
@Data
@TableName("achievement_attachment")
public class AchievementAttachment implements Serializable {
private Long id;
private Long achievementId;
private String fileName;
private String filePath;
private Long fileSize;
private String fileType;
private LocalDateTime createTime;
private Long createBy;
private Integer deleted;
}

View File

@@ -0,0 +1,30 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 基础实体类
*/
@Data
public class BaseEntity implements Serializable {
@TableId(type = IdType.AUTO)
private Long id;
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
@TableField(fill = FieldFill.INSERT)
private Long createBy;
@TableField(fill = FieldFill.UPDATE)
private Long updateBy;
@TableLogic
private Integer deleted;
}

View File

@@ -0,0 +1,25 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 学分申诉实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("credit_appeal")
public class CreditAppeal extends BaseEntity {
private Long creditDetailId;
private Long userId;
private String appealReason;
private String appealEvidence;
private Integer status;
private Long handlerId;
private LocalDateTime handleTime;
private String handleResult;
private BigDecimal adjustedCredit;
}

View File

@@ -0,0 +1,24 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* 学分明细实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("credit_detail")
public class CreditDetail extends BaseEntity {
private Long userId;
private Long projectId;
private Long achievementId;
private Integer creditSource;
private BigDecimal credit;
private BigDecimal coefficient;
private Long ruleId;
private String remark;
private Integer status;
}

View File

@@ -0,0 +1,24 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* 学分规则实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("credit_rule")
public class CreditRule extends BaseEntity {
private String ruleName;
private Integer ruleType;
private Integer targetType;
private Integer targetLevel;
private BigDecimal baseCredit;
private BigDecimal leaderCoefficient;
private BigDecimal memberCoefficient;
private String description;
private Integer status;
}

View File

@@ -0,0 +1,30 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* 项目实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("project")
public class Project extends BaseEntity {
private String projectNo;
private String projectName;
private Integer projectType;
private Integer projectLevel;
private Long leaderId;
private Long advisorId;
private String description;
private String researchPlan;
private String expectedResult;
private BigDecimal budget;
private Integer status;
private LocalDate startTime;
private LocalDate endTime;
private String college;
}

View File

@@ -0,0 +1,24 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 项目附件实体
*/
@Data
@TableName("project_attachment")
public class ProjectAttachment implements Serializable {
private Long id;
private Long projectId;
private String fileName;
private String filePath;
private Long fileSize;
private String fileType;
private Integer attachmentType;
private LocalDateTime createTime;
private Long createBy;
private Integer deleted;
}

View File

@@ -0,0 +1,22 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 项目成员实体
*/
@Data
@TableName("project_member")
public class ProjectMember implements Serializable {
private Long id;
private Long projectId;
private Long userId;
private Integer memberOrder;
private Integer role;
private LocalDateTime joinTime;
private LocalDateTime createTime;
private Integer deleted;
}

View File

@@ -0,0 +1,24 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 评审实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("review")
public class Review extends BaseEntity {
private Long projectId;
private Long reviewerId;
private Integer reviewType;
private BigDecimal score;
private String opinion;
private Integer result;
private Integer status;
private LocalDateTime reviewTime;
}

View File

@@ -0,0 +1,22 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 评审评分项实体
*/
@Data
@TableName("review_score_item")
public class ReviewScoreItem implements Serializable {
private Long id;
private Long reviewId;
private String itemName;
private BigDecimal itemScore;
private BigDecimal maxScore;
private String itemComment;
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,23 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* 学生信息实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("stu_info")
public class StuInfo extends BaseEntity {
private Long userId;
private String studentNo;
private String college;
private String major;
private String grade;
private String className;
private Long advisorId;
private BigDecimal totalCredit;
}

View File

@@ -0,0 +1,18 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 系统配置实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_config")
public class SysConfig extends BaseEntity {
private String configKey;
private String configValue;
private String configName;
private String description;
}

View File

@@ -0,0 +1,25 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 系统日志实体
*/
@Data
@TableName("sys_log")
public class SysLog implements Serializable {
private Long id;
private Long userId;
private String username;
private String operation;
private String method;
private String params;
private String ip;
private Long time;
private Integer result;
private String errorMsg;
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,23 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 用户实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_user")
public class SysUser extends BaseEntity {
private String username;
private String password;
private String realName;
private Integer gender;
private String phone;
private String email;
private String avatar;
private Integer status;
private Integer roleType;
}

View File

@@ -0,0 +1,19 @@
package com.innovation.platform.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 教师信息实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("teacher_info")
public class TeacherInfo extends BaseEntity {
private Long userId;
private String teacherNo;
private String college;
private String title;
private String researchField;
}

View File

@@ -0,0 +1,47 @@
server:
port: 8080
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/innovation_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: root123456
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
type-aliases-package: com.innovation.platform.entity
global-config:
db-config:
id-type: auto
logic-delete-field: deleted
logic-delete-value: 1
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
sa-token:
token-name: Authorization
timeout: 86400
active-timeout: -1
is-concurrent: true
is-share: true
token-style: uuid
is-log: true
knife4j:
enable: true
openapi:
title: 高校创新创业项目孵化平台API
description: 高校创新创业项目孵化平台接口文档
version: v1.0.0
group:
default:
group-name: default
api-rule: package
api-rule-resources:
- com.innovation.platform.controller

1
frontend Submodule

Submodule frontend added at 9d26c11875