Преглед на файлове

feat(main): 添加学员信息管理功能

- 新增 main_student 表存储学员基本信息
- 新增 main_student_education 表存储学员教育经历
- 新增 main_student_experience 表存储学员工作经历
- 新增 main_student_project 表存储学员项目经历
- 创建 MainStudentController 提供学员CRUD接口
- 实现 IMainStudentService 接口及其实现类
- 添加学员相关的 BO 和 VO 对象定义
- 在回退记录中集成学员信息查询功能
- 修复租户服务中的联系人电话字段设置问题
西格玛许 преди 2 седмици
родител
ревизия
04a403fedd
променени са 20 файла, в които са добавени 927 реда и са изтрити 23 реда
  1. 119 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/controller/MainStudentController.java
  2. 105 13
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainStudent.java
  3. 25 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainStudentEducation.java
  4. 27 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainStudentExperience.java
  5. 26 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainStudentProject.java
  6. 105 1
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/bo/MainStudentBo.java
  7. 9 1
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainBackRecordVo.java
  8. 20 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainStudentEducationVo.java
  9. 22 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainStudentExperienceVo.java
  10. 21 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainStudentProjectVo.java
  11. 129 4
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainStudentVo.java
  12. 9 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/mapper/MainStudentEducationMapper.java
  13. 8 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/mapper/MainStudentExperienceMapper.java
  14. 8 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/mapper/MainStudentProjectMapper.java
  15. 45 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/IMainStudentService.java
  16. 1 1
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/impl/MainAuditServiceImpl.java
  17. 5 3
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/impl/MainBackRecordServiceImpl.java
  18. 129 0
      ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/impl/MainStudentServiceImpl.java
  19. 1 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysTenantServiceImpl.java
  20. 113 0
      script/sql/main.sql

+ 119 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/controller/MainStudentController.java

@@ -0,0 +1,119 @@
+package org.dromara.main.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.main.domain.bo.MainStudentBo;
+import org.dromara.main.domain.vo.MainStudentVo;
+import org.dromara.main.service.IMainStudentService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/main/student")
+public class MainStudentController extends BaseController {
+
+    private final IMainStudentService mainStudentService;
+
+    /**
+     * 查询学员列表
+     */
+    @SaCheckPermission("main:student:list")
+    @GetMapping("/list")
+    public TableDataInfo<MainStudentVo> list(MainStudentBo bo, PageQuery pageQuery) {
+        return mainStudentService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出学员列表
+     */
+    @SaCheckPermission("main:student:export")
+    @Log(title = "学员管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(MainStudentBo bo, HttpServletResponse response) {
+        List<MainStudentVo> list = mainStudentService.queryList(bo);
+        ExcelUtil.exportExcel(list, "学员信息", MainStudentVo.class, response);
+    }
+
+    /**
+     * 获取学员详细信息
+     *
+     * @param id 主键
+     */
+    @SaCheckPermission("main:student:query")
+    @GetMapping("/{id}")
+    public R<MainStudentVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
+        return R.ok(mainStudentService.queryById(id));
+    }
+
+    /**
+     * 新增学员
+     */
+    @SaCheckPermission("main:student:add")
+    @Log(title = "学员管理", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody MainStudentBo bo) {
+        return toAjax(mainStudentService.insertByBo(bo));
+    }
+
+    /**
+     * 修改学员
+     */
+    @SaCheckPermission("main:student:edit")
+    @Log(title = "学员管理", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody MainStudentBo bo) {
+        return toAjax(mainStudentService.updateByBo(bo));
+    }
+
+    /**
+     * 删除学员
+     *
+     * @param ids 主键串
+     */
+    @SaCheckPermission("main:student:remove")
+    @Log(title = "学员管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
+        return toAjax(mainStudentService.deleteWithValidByIds(List.of(ids), true));
+    }
+
+
+    /**
+     * 更新学员状态
+     */
+    @SaCheckPermission("main:student:edit")
+    @Log(title = "学员管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/updateStatus")
+    public R<Void> updateStatus(@RequestBody MainStudentBo bo) {
+        return toAjax(mainStudentService.updateStatus(bo.getId(), bo.getStatus()));
+    }
+
+    /**
+     * 更新学员用户类型(黑名单管理)
+     */
+    @SaCheckPermission("main:student:edit")
+    @Log(title = "学员管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/updateUserType")
+    public R<Void> updateUserType(@RequestBody MainStudentBo bo) {
+        return toAjax(mainStudentService.updateUserType(bo.getId(), bo.getUserType()));
+    }
+}

+ 105 - 13
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainStudent.java

@@ -7,39 +7,131 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("main_student")
 public class MainStudent extends BaseEntity {
 
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 学员ID
+     */
     @TableId(value = "id")
     private Long id;
 
-    /** 姓名 */
+    /**
+     * 学员展示编号(如U2023071567)
+     */
+    private String studentNo;
+
+    /**
+     * 学员姓名
+     */
     private String name;
 
-    /** 手机号 */
+    /**
+     * 联络手机号
+     */
     private String mobile;
 
-    /** 证件号码 */
-    private String idCardNumber;
+    /**
+     * 电子邮箱
+     */
+    private String email;
 
-    /** 背调/测评唯一码 */
-    private String uniqueCode;
+    /**
+     * 证件号码
+     */
+    private String idCardNumber;
 
-    /** 性别(0男 1女 2未知) */
+    /**
+     * 性别(0男 1女 2未知)
+     */
     private String gender;
 
-    /** 头像URL */
+    /**
+     * 头像ID(关联oss表)
+     */
     private Long avatar;
 
-    /** 状态(0正常 1停用) */
-    private String status;
+    /**
+     * 用户类型(1付费用户 2普通用户 3黑名单)
+     */
+    private String userType;
 
-    /** 所属租户 */
-    private String tenantId;
+    /**
+     * 历史累计消费金额
+     */
+    private BigDecimal totalAmount;
+
+    /**
+     * 求职状态/到岗时间(如:一周内到岗)
+     */
+    private String availability;
+
+    /**
+     * 求职意向(岗位ID或名称,逗号分隔)
+     */
+    private String jobIntention;
+
+    /**
+     * 建议类型(1全职 2实习 3兼职)
+     */
+    private String jobType;
+
+    /**
+     * 毕业/就读院校
+     */
+    private String schoolName;
 
-    /** 删除标志 */
+    /**
+     * 学历要求(字典:main_education)
+     */
+    private String education;
+
+    /**
+     * 当前年级(字典:main_experience)
+     */
+    private String grade;
+
+    /**
+     * 实习时长(字典:main_internship_duration)
+     */
+    private String internshipDuration;
+
+    /**
+     * 个人简历附件ID(关联oss表)
+     */
+    private Long resumeFile;
+
+    /**
+     * 账号状态(0正常 1停用)
+     */
+    private String status;
+
+    /**
+     * 逻辑删除标志(0存在 1删除)
+     */
     @TableLogic
     private String delFlag;
+
+    /**
+     * 所属租户/企业编号
+     */
+    private String tenantId;
+
+    /**
+     * 最后登录时间
+     */
+    private Date loginDate;
+
+    /**
+     * 备注信息
+     */
+    private String remark;
+
 }

+ 25 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainStudentEducation.java

@@ -0,0 +1,25 @@
+package org.dromara.main.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("main_student_education")
+public class MainStudentEducation extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id")
+    private Long id;
+    private Long studentId;
+    private String school;
+    private String education;
+    private String startTime;
+    private String endTime;
+    private String major;
+    private String campusExperience;
+    private String delFlag;
+}

+ 27 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainStudentExperience.java

@@ -0,0 +1,27 @@
+package org.dromara.main.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("main_student_experience")
+public class MainStudentExperience extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id")
+    private Long id;
+    private Long studentId;
+    private String company;
+    private String industry;
+    private String startTime;
+    private String endTime;
+    private Integer isInternship;
+    private String jobTitle;
+    private String department;
+    private String workContent;
+    private String delFlag;
+}

+ 26 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/MainStudentProject.java

@@ -0,0 +1,26 @@
+package org.dromara.main.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("main_student_project")
+public class MainStudentProject extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id")
+    private Long id;
+    private Long studentId;
+    private String projectName;
+    private String role;
+    private String startTime;
+    private String endTime;
+    private String description;
+    private String achievement;
+    private String link;
+    private String delFlag;
+}

+ 105 - 1
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/bo/MainStudentBo.java

@@ -6,18 +6,122 @@ import lombok.EqualsAndHashCode;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
 import org.dromara.main.domain.MainStudent;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 @Data
 @EqualsAndHashCode(callSuper = true)
 @AutoMapper(target = MainStudent.class, reverseConvertGenerate = false)
 public class MainStudentBo extends BaseEntity {
 
+    /**
+     * 学员ID
+     */
     private Long id;
+
+    /**
+     * 学员展示编号(如U2023071567)
+     */
+    private String studentNo;
+
+    /**
+     * 学员姓名
+     */
     private String name;
+
+    /**
+     * 联络手机号
+     */
     private String mobile;
+
+    /**
+     * 电子邮箱
+     */
+    private String email;
+
+    /**
+     * 证件号码
+     */
     private String idCardNumber;
-    private String uniqueCode;
+
+    /**
+     * 性别(0男 1女 2未知)
+     */
     private String gender;
+
+    /**
+     * 头像ID(关联oss表)
+     */
     private Long avatar;
+
+    /**
+     * 用户类型(1付费用户 2普通用户 3黑名单)
+     */
+    private String userType;
+
+    /**
+     * 历史累计消费金额
+     */
+    private BigDecimal totalAmount;
+
+    /**
+     * 求职状态/到岗时间(如:一周内到岗)
+     */
+    private String availability;
+
+    /**
+     * 求职意向(岗位ID或名称,逗号分隔)
+     */
+    private String jobIntention;
+
+    /**
+     * 建议类型(1全职 2实习 3兼职)
+     */
+    private String jobType;
+
+    /**
+     * 毕业/就读院校
+     */
+    private String schoolName;
+
+    /**
+     * 学历要求(字典:main_education)
+     */
+    private String education;
+
+    /**
+     * 当前年级(字典:main_experience)
+     */
+    private String grade;
+
+    /**
+     * 实习时长(字典:main_internship_duration)
+     */
+    private String internshipDuration;
+
+    /**
+     * 个人简历附件ID(关联oss表)
+     */
+    private Long resumeFile;
+
+    /**
+     * 账号状态(0正常 1停用)
+     */
     private String status;
+
+    /**
+     * 所属租户/企业编号
+     */
     private String tenantId;
+
+    /**
+     * 最后登录时间
+     */
+    private Date loginDate;
+
+    /**
+     * 备注信息
+     */
+    private String remark;
+
 }

+ 9 - 1
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainBackRecordVo.java

@@ -24,10 +24,18 @@ public class MainBackRecordVo implements Serializable {
     private LocalDateTime finishTime;
     private LocalDateTime createTime;
 
+    /** 学员展示编号 */
+    private String studentNo;
+    /** 学员姓名 */
     private String studentName;
+    /** 联络手机号 */
     private String studentMobile;
+    /** 证件号码 */
     private String studentIdCard;
+    /** 性别 */
     private String studentGender;
+    /** 账号状态 */
     private String studentStatus;
-
+    /** 用户类型(1付费用户 2普通用户 3黑名单) */
+    private String studentUserType;
 }

+ 20 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainStudentEducationVo.java

@@ -0,0 +1,20 @@
+package org.dromara.main.domain.vo;
+
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import org.dromara.main.domain.MainStudentEducation;
+
+import java.io.Serializable;
+
+@Data
+@AutoMapper(target = MainStudentEducation.class)
+public class MainStudentEducationVo implements Serializable {
+    private Long id;
+    private Long studentId;
+    private String school;
+    private String education;
+    private String startTime;
+    private String endTime;
+    private String major;
+    private String campusExperience;
+}

+ 22 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainStudentExperienceVo.java

@@ -0,0 +1,22 @@
+package org.dromara.main.domain.vo;
+
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import org.dromara.main.domain.MainStudentExperience;
+
+import java.io.Serializable;
+
+@Data
+@AutoMapper(target = MainStudentExperience.class)
+public class MainStudentExperienceVo implements Serializable {
+    private Long id;
+    private Long studentId;
+    private String company;
+    private String industry;
+    private String startTime;
+    private String endTime;
+    private Integer isInternship;
+    private String jobTitle;
+    private String department;
+    private String workContent;
+}

+ 21 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainStudentProjectVo.java

@@ -0,0 +1,21 @@
+package org.dromara.main.domain.vo;
+
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import org.dromara.main.domain.MainStudentProject;
+
+import java.io.Serializable;
+
+@Data
+@AutoMapper(target = MainStudentProject.class)
+public class MainStudentProjectVo implements Serializable {
+    private Long id;
+    private Long studentId;
+    private String projectName;
+    private String role;
+    private String startTime;
+    private String endTime;
+    private String description;
+    private String achievement;
+    private String link;
+}

+ 129 - 4
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/domain/vo/MainStudentVo.java

@@ -3,10 +3,19 @@ package org.dromara.main.domain.vo;
 import io.github.linpeilie.annotations.AutoMapper;
 import lombok.Data;
 import org.dromara.main.domain.MainStudent;
+import org.dromara.main.domain.MainStudentEducation;
+import org.dromara.main.domain.MainStudentExperience;
+import org.dromara.main.domain.MainStudentProject;
 
 import java.io.Serial;
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+import org.dromara.main.domain.vo.MainStudentEducationVo;
+import org.dromara.main.domain.vo.MainStudentExperienceVo;
+import org.dromara.main.domain.vo.MainStudentProjectVo;
 
 @Data
 @AutoMapper(target = MainStudent.class)
@@ -15,15 +24,131 @@ public class MainStudentVo implements Serializable {
     @Serial
     private static final long serialVersionUID = 1L;
 
+    /**
+     * 学员ID
+     */
     private Long id;
+
+    /**
+     * 学员展示编号(如U2023071567)
+     */
+    private String studentNo;
+
+    /**
+     * 学员姓名
+     */
     private String name;
+
+    /**
+     * 联络手机号
+     */
     private String mobile;
+
+    /**
+     * 电子邮箱
+     */
+    private String email;
+
+    /**
+     * 证件号码
+     */
     private String idCardNumber;
-    private String uniqueCode;
+
+    /**
+     * 性别(0男 1女 2未知)
+     */
     private String gender;
+
+    /**
+     * 头像ID(关联oss表)
+     */
     private Long avatar;
+
+    /**
+     * 用户类型(1付费用户 2普通用户 3黑名单)
+     */
+    private String userType;
+
+    /**
+     * 历史累计消费金额
+     */
+    private BigDecimal totalAmount;
+
+    /**
+     * 求职状态/到岗时间(如:一周内到岗)
+     */
+    private String availability;
+
+    /**
+     * 求职意向(岗位ID或名称,逗号分隔)
+     */
+    private String jobIntention;
+
+    /**
+     * 建议类型(1全职 2实习 3兼职)
+     */
+    private String jobType;
+
+    /**
+     * 毕业/就读院校
+     */
+    private String schoolName;
+
+    /**
+     * 学历要求(字典:main_education)
+     */
+    private String education;
+
+    /**
+     * 当前年级(字典:main_experience)
+     */
+    private String grade;
+
+    /**
+     * 实习时长(字典:main_internship_duration)
+     */
+    private String internshipDuration;
+
+    /**
+     * 个人简历附件ID(关联oss表)
+     */
+    private Long resumeFile;
+
+    /**
+     * 账号状态(0正常 1停用)
+     */
     private String status;
-    private String tenantId;
-    private LocalDateTime createTime;
-    private LocalDateTime updateTime;
+
+    /**
+     * 最后登录时间
+     */
+    private Date loginDate;
+
+    /**
+     * 创建日期
+     */
+    private Date createTime;
+
+    /**
+     * 备注信息
+     */
+    private String remark;
+
+
+
+    /**
+     * 教育经历列表
+     */
+    private List<MainStudentEducationVo> educationList;
+
+    /**
+     * 工作经历列表
+     */
+    private List<MainStudentExperienceVo> experienceList;
+
+    /**
+     * 项目经历列表
+     */
+    private List<MainStudentProjectVo> projectList;
+
 }

+ 9 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/mapper/MainStudentEducationMapper.java

@@ -0,0 +1,9 @@
+package org.dromara.main.mapper;
+
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+import org.dromara.main.domain.MainStudentEducation;
+import org.dromara.main.domain.vo.MainStudentEducationVo;
+
+public interface MainStudentEducationMapper extends BaseMapperPlus<MainStudentEducation, MainStudentEducationVo> {
+
+}

+ 8 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/mapper/MainStudentExperienceMapper.java

@@ -0,0 +1,8 @@
+package org.dromara.main.mapper;
+
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+import org.dromara.main.domain.MainStudentExperience;
+import org.dromara.main.domain.vo.MainStudentExperienceVo;
+
+public interface MainStudentExperienceMapper extends BaseMapperPlus<MainStudentExperience, MainStudentExperienceVo> {
+}

+ 8 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/mapper/MainStudentProjectMapper.java

@@ -0,0 +1,8 @@
+package org.dromara.main.mapper;
+
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+import org.dromara.main.domain.MainStudentProject;
+import org.dromara.main.domain.vo.MainStudentProjectVo;
+
+public interface MainStudentProjectMapper extends BaseMapperPlus<MainStudentProject, MainStudentProjectVo> {
+}

+ 45 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/IMainStudentService.java

@@ -0,0 +1,45 @@
+package org.dromara.main.service;
+
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.main.domain.bo.MainStudentBo;
+import org.dromara.main.domain.vo.MainStudentVo;
+
+import java.util.Collection;
+import java.util.List;
+
+public interface IMainStudentService {
+    /**
+     * 查询学员详情
+     */
+    MainStudentVo queryById(Long id);
+
+    /**
+     * 分页查询学员列表
+     */
+    TableDataInfo<MainStudentVo> queryPageList(MainStudentBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询学员列表
+     */
+    List<MainStudentVo> queryList(MainStudentBo bo);
+
+    /**
+     * 新增学员
+     */
+    Boolean insertByBo(MainStudentBo bo);
+
+    /**
+     * 修改学员
+     */
+    Boolean updateByBo(MainStudentBo bo);
+
+    /**
+     * 校验并批量删除学员信息
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    Boolean updateStatus(Long id,String status);
+
+    Boolean updateUserType(Long id,String userType);
+}

+ 1 - 1
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/impl/MainAuditServiceImpl.java

@@ -168,7 +168,7 @@ public class MainAuditServiceImpl implements IMainAuditService {
         tenantBo.setAddress(companyApply.getOfficeAddress());
         tenantBo.setContactUserName(companyApply.getSurname() + companyApply.getName());
         tenantBo.setContactPhone(companyApply.getMobile());
-        // tenantBo.setCompanyEntrustProof(companyApply.getAuthLetter()); // 暂时注释
+        tenantBo.setCompanyEntrustProof(companyApply.getAuthLetter()); // 暂时注释
         tenantBo.setLogo(companyApply.getAvatar());
         tenantBo.setStatus("0"); // 正常状态
 

+ 5 - 3
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/impl/MainBackRecordServiceImpl.java

@@ -42,21 +42,23 @@ public class MainBackRecordServiceImpl implements IMainBackRecordService {
         // 3. 分页查询
         Page<MainBackRecordVo> pageResult = baseMapper.selectVoPage(pageQuery.build(), lqw);
 
-        TableDataInfo<MainBackRecordVo> result= TableDataInfo.build(pageResult);
+        TableDataInfo<MainBackRecordVo> result = TableDataInfo.build(pageResult);
 
         for (MainBackRecordVo vo : result.getRows()) {
-            // 1. 先查询 main_candidate 表
+            // 1. 先查询候选人信息
             MainBackCandidate candidate = candidateMapper.selectById(vo.getCandidateId());
 
             if (candidate != null) {
-                // 2. 再通过 student_id 查询 main_student 表
+                // 2. 通过 student_id 查询最新的学员信息
                 MainStudent student = studentMapper.selectById(candidate.getStudentId());
                 if (student != null) {
+                    vo.setStudentNo(student.getStudentNo()); // 新增:学员编号
                     vo.setStudentName(student.getName());
                     vo.setStudentMobile(student.getMobile());
                     vo.setStudentIdCard(student.getIdCardNumber());
                     vo.setStudentGender(student.getGender());
                     vo.setStudentStatus(student.getStatus());
+                    vo.setStudentUserType(student.getUserType()); // 新增:用户类型
                 }
             }
         }

+ 129 - 0
ruoyi-modules/ruoyi-main/src/main/java/org/dromara/main/service/impl/MainStudentServiceImpl.java

@@ -0,0 +1,129 @@
+package org.dromara.main.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.main.domain.MainStudent;
+import org.dromara.main.domain.MainStudentEducation;
+import org.dromara.main.domain.MainStudentExperience;
+import org.dromara.main.domain.MainStudentProject;
+import org.dromara.main.domain.bo.MainStudentBo;
+import org.dromara.main.domain.vo.MainStudentEducationVo;
+import org.dromara.main.domain.vo.MainStudentExperienceVo;
+import org.dromara.main.domain.vo.MainStudentProjectVo;
+import org.dromara.main.domain.vo.MainStudentVo;
+import org.dromara.main.mapper.MainStudentEducationMapper;
+import org.dromara.main.mapper.MainStudentExperienceMapper;
+import org.dromara.main.mapper.MainStudentMapper;
+import org.dromara.main.mapper.MainStudentProjectMapper;
+import org.dromara.main.service.IMainStudentService;
+import org.springframework.stereotype.Service;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+@RequiredArgsConstructor
+@Service
+public class MainStudentServiceImpl implements IMainStudentService {
+
+    private final MainStudentMapper baseMapper;
+    private final MainStudentEducationMapper educationMapper;
+    private final MainStudentProjectMapper projectMapper;
+    private final MainStudentExperienceMapper experienceMapper;
+
+    @Override
+    public MainStudentVo queryById(Long id){
+        MainStudentVo vo = baseMapper.selectVoById(id);
+        if(vo != null){
+            vo.setEducationList(educationMapper.selectVoList(new LambdaQueryWrapper<MainStudentEducation>()
+                    .eq(MainStudentEducation::getStudentId, id)));
+            vo.setExperienceList(experienceMapper.selectVoList(new LambdaQueryWrapper<MainStudentExperience>()
+                    .eq(MainStudentExperience::getStudentId, id)));
+            vo.setProjectList(projectMapper.selectVoList(new LambdaQueryWrapper<MainStudentProject>()
+                    .eq(MainStudentProject::getStudentId, id)));
+        }
+        return vo;
+    }
+
+    @Override
+    public TableDataInfo<MainStudentVo> queryPageList(MainStudentBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<MainStudent> lqw = buildQueryWrapper(bo);
+        Page<MainStudentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    @Override
+    public List<MainStudentVo> queryList(MainStudentBo bo) {
+        LambdaQueryWrapper<MainStudent> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<MainStudent> buildQueryWrapper(MainStudentBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<MainStudent> lqw = Wrappers.lambdaQuery();
+        lqw.eq(ObjectUtil.isNotNull(bo.getStudentNo()), MainStudent::getStudentNo, bo.getStudentNo());
+        lqw.like(ObjectUtil.isNotNull(bo.getName()), MainStudent::getName, bo.getName());
+        lqw.eq(ObjectUtil.isNotNull(bo.getMobile()), MainStudent::getMobile, bo.getMobile());
+        lqw.eq(ObjectUtil.isNotNull(bo.getEmail()), MainStudent::getEmail, bo.getEmail());
+        lqw.eq(ObjectUtil.isNotNull(bo.getIdCardNumber()), MainStudent::getIdCardNumber, bo.getIdCardNumber());
+        lqw.eq(ObjectUtil.isNotNull(bo.getGender()), MainStudent::getGender, bo.getGender());
+        lqw.eq(ObjectUtil.isNotNull(bo.getUserType()), MainStudent::getUserType, bo.getUserType());
+        lqw.eq(ObjectUtil.isNotNull(bo.getJobType()), MainStudent::getJobType, bo.getJobType());
+        lqw.like(ObjectUtil.isNotNull(bo.getSchoolName()), MainStudent::getSchoolName, bo.getSchoolName());
+        lqw.eq(ObjectUtil.isNotNull(bo.getEducation()), MainStudent::getEducation, bo.getEducation());
+        lqw.eq(ObjectUtil.isNotNull(bo.getStatus()), MainStudent::getStatus, bo.getStatus());
+        return lqw;
+    }
+
+    @Override
+    public Boolean insertByBo(MainStudentBo bo) {
+        MainStudent add = BeanUtil.toBean(bo, MainStudent.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    @Override
+    public Boolean updateByBo(MainStudentBo bo) {
+        MainStudent update = BeanUtil.toBean(bo, MainStudent.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    private void validEntityBeforeSave(MainStudent entity){
+        // TODO 做一些数据校验,例如唯一性校验
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            // TODO 做一些业务上的校验,判断是否可删除
+        }
+        return baseMapper.deleteBatchIds(ids) > 0;
+    }
+
+    @Override
+    public Boolean updateStatus(Long id,String status){
+        MainStudent student=new MainStudent();
+        student.setId(id);
+        student.setStatus( status);
+        return baseMapper.updateById(student) > 0;
+    }
+
+    @Override
+    public Boolean updateUserType(Long id, String userType) {
+        MainStudent student = new MainStudent();
+        student.setId(id);
+        student.setUserType(userType);
+        return baseMapper.updateById(student) > 0;
+    }
+}

+ 1 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysTenantServiceImpl.java

@@ -180,6 +180,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
         user.setAvatar(bo.getAvatar());
         user.setDeptId(deptId);
         user.setPlatformId(Platform.MERCHANT.getId());
+        user.setPhonenumber(bo.getContactPhone());
         userMapper.insert(user);
         //新增系统用户后,默认当前用户为部门的负责人
         SysDept sd = new SysDept();

+ 113 - 0
script/sql/main.sql

@@ -322,3 +322,116 @@ CREATE TABLE `main_position` (
   PRIMARY KEY (`id`) USING BTREE,
   KEY `idx_tenant_id` (`tenant_id`) USING BTREE
 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='岗位表(这是要发布出去的,与sys_post不同)';
+
+
+
+
+
+
+CREATE TABLE `main_student` (
+  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '学员ID',
+  `student_no` varchar(30) NOT NULL COMMENT '学员展示编号(如U2023071567)',
+  `name` varchar(50) NOT NULL COMMENT '学员姓名',
+  `mobile` varchar(11) NOT NULL COMMENT '联络手机号',
+  `email` varchar(50) DEFAULT '' COMMENT '电子邮箱',
+  `id_card_number` varchar(18) DEFAULT '' COMMENT '证件号码',
+  `gender` char(1) DEFAULT '0' COMMENT '性别(0男 1女 2未知)',
+  `avatar` bigint DEFAULT NULL COMMENT '头像ID(关联oss表)',
+  `user_type` char(1) DEFAULT '2' COMMENT '用户类型(1付费用户 2普通用户 3黑名单)',
+  `total_amount` decimal(10,2) DEFAULT '0.00' COMMENT '历史累计消费金额',
+  `availability` varchar(50) DEFAULT '' COMMENT '求职状态/到岗时间(如:一周内到岗)',
+  `job_intention` varchar(255) DEFAULT '' COMMENT '求职意向(岗位ID或名称,逗号分隔)',
+  `job_type` varchar(50) DEFAULT NULL COMMENT '建议类型(1全职 2实习 3兼职)',
+  `school_name` varchar(100) DEFAULT '' COMMENT '毕业/就读院校',
+  `education` varchar(50) DEFAULT '' COMMENT '学历要求(字典:main_education)',
+  `grade` varchar(50) DEFAULT '' COMMENT '当前年级(字典:main_experience)',
+  `internship_duration` varchar(50) DEFAULT '' COMMENT '实习时长(字典:main_internship_duration)',
+  `resume_file` bigint DEFAULT NULL COMMENT '个人简历附件ID(关联oss表)',
+  `status` char(1) DEFAULT '0' COMMENT '账号状态(0正常 1停用)',
+  `del_flag` char(1) DEFAULT '0' COMMENT '逻辑删除标志(0存在 1删除)',
+  `tenant_id` varchar(20) DEFAULT '000000' COMMENT '所属租户/企业编号',
+  `login_date` datetime DEFAULT NULL COMMENT '最后登录时间',
+  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
+  `create_by` bigint DEFAULT NULL COMMENT '创建者',
+  `create_time` datetime DEFAULT NULL COMMENT '注册/创建日期',
+  `update_by` bigint DEFAULT NULL COMMENT '更新者',
+  `update_time` datetime DEFAULT NULL COMMENT '最后信息更新时间',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注信息',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE KEY `uk_student_no` (`student_no`) USING BTREE,
+  UNIQUE KEY `uk_mobile` (`mobile`) USING BTREE,
+  KEY `idx_tenant_id` (`tenant_id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='学员简历与个人信息总表';
+
+-- 1. 学员教育经历表
+CREATE TABLE IF NOT EXISTS `main_student_education` (
+    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+    `student_id` bigint(20) NOT NULL COMMENT '学员ID (关联 main_student.id)',
+    `school` varchar(100) DEFAULT NULL COMMENT '学校名称',
+    `education` varchar(50) DEFAULT NULL COMMENT '学历',
+    `start_time` varchar(20) DEFAULT NULL COMMENT '开始时间 (如 2022.9)',
+    `end_time` varchar(20) DEFAULT NULL COMMENT '结束时间 (如 2026.7)',
+    `major` varchar(100) DEFAULT NULL COMMENT '专业',
+    `campus_experience` text DEFAULT NULL COMMENT '在校经历描述',
+    `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户ID',
+    `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
+		`create_by` bigint DEFAULT NULL COMMENT '创建者',
+		`create_time` datetime DEFAULT NULL COMMENT '创建时间',
+		`update_by` bigint DEFAULT NULL COMMENT '更新者',
+		`update_time` datetime DEFAULT NULL COMMENT '更新时间',
+		`del_flag` char(1) DEFAULT '0' COMMENT '删除标志',
+    PRIMARY KEY (`id`),
+    KEY `idx_student_id` (`student_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学员教育经历表';
+
+-- 2. 学员工作经历表
+CREATE TABLE IF NOT EXISTS `main_student_experience` (
+    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+    `student_id` bigint(20) NOT NULL COMMENT '学员ID (关联 main_student.id)',
+    `company` varchar(100) DEFAULT NULL COMMENT '公司名称',
+    `industry` varchar(100) DEFAULT NULL COMMENT '所属行业',
+    `start_time` varchar(20) DEFAULT NULL COMMENT '开始时间',
+    `end_time` varchar(20) DEFAULT NULL COMMENT '结束时间',
+    `is_internship` tinyint(1) DEFAULT '0' COMMENT '是否实习 (0否 1是)',
+    `job_title` varchar(100) DEFAULT NULL COMMENT '职位名称',
+    `department` varchar(100) DEFAULT NULL COMMENT '所属部门',
+    `work_content` text DEFAULT NULL COMMENT '工作内容描述',
+    `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户ID',
+    `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
+		`create_by` bigint DEFAULT NULL COMMENT '创建者',
+		`create_time` datetime DEFAULT NULL COMMENT '创建时间',
+		`update_by` bigint DEFAULT NULL COMMENT '更新者',
+		`update_time` datetime DEFAULT NULL COMMENT '更新时间',
+		`del_flag` char(1) DEFAULT '0' COMMENT '删除标志',
+    PRIMARY KEY (`id`),
+    KEY `idx_student_id` (`student_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学员工作经历表';
+
+-- 3. 学员项目经历表
+CREATE TABLE IF NOT EXISTS `main_student_project` (
+    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+    `student_id` bigint(20) NOT NULL COMMENT '学员ID (关联 main_student.id)',
+    `project_name` varchar(100) DEFAULT NULL COMMENT '项目名称',
+    `role` varchar(100) DEFAULT NULL COMMENT '担任角色',
+    `start_time` varchar(20) DEFAULT NULL COMMENT '开始时间',
+    `end_time` varchar(20) DEFAULT NULL COMMENT '结束时间',
+    `description` text DEFAULT NULL COMMENT '项目描述',
+    `achievement` text DEFAULT NULL COMMENT '业绩描述',
+    `link` varchar(255) DEFAULT NULL COMMENT '项目链接',
+    `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
+		`create_by` bigint DEFAULT NULL COMMENT '创建者',
+		`create_time` datetime DEFAULT NULL COMMENT '创建时间',
+		`update_by` bigint DEFAULT NULL COMMENT '更新者',
+		`update_time` datetime DEFAULT NULL COMMENT '更新时间',
+		`del_flag` char(1) DEFAULT '0' COMMENT '删除标志',
+    PRIMARY KEY (`id`),
+    KEY `idx_student_id` (`student_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学员项目经历表';
+
+
+
+
+
+
+
+