【新增】根据不同的用户类型,查询不同的专业数据

This commit is contained in:
任维炳
2025-04-24 14:42:04 +08:00
parent 9179cfe989
commit 0b2829f40d
5 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package pc.exam.pp.module.exam.controller.admin.specialty.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 专业列表 Request VO")
@Data
public class SpecialtListByUserReqVo {
@Schema(description = "用户类型", example = "xxxx")
private String userType;
}

View File

@@ -1,11 +1,13 @@
package pc.exam.pp.module.exam.dal.mysql.specialty;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX;
import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtListReqVo;
import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo;
import pc.exam.pp.module.exam.dal.dataobject.specialty.ExamSpecialty;
import java.util.List;
import java.util.Set;
/**
* 客户端Mapper接口
@@ -40,6 +42,20 @@ public interface ExamSpecialtyMapper extends BaseMapperX<ExamSpecialty>
*/
public List<SpecialtyQueryVo> selectExamSpecialtyListVo(SpecialtListReqVo reqVo);
/**
* 查询所有数据信息
*
* @return 数据集合
*/
public List<SpecialtyQueryVo> selectExamSpecialtyAll();
/**
* 通过ID查询数据数据信息
*
* @return 数据集合
*/
public List<SpecialtyQueryVo> selectExamSpecialtyByids(@Param("ids") Set<Long> ids);
/**
* 查询部分数据信息
*

View File

@@ -28,6 +28,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectExamSpecialtyAll" resultType="pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo">
select sp_id as id, sp_name as name, parent_id, status, create_time from exam_specialty where deleted = 0 and status = 0
</select>
<select id="selectExamSpecialtyByids" resultType="pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo">
SELECT sp_id AS id, sp_name AS name, parent_id, status, create_time from exam_specialty
WHERE sp_id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
AND deleted = 0 and status = 0
</select>
<select id="selectExamSpecialtyPart" resultType="pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo">
select sp_id as id, sp_name as name, parent_id, status, create_time
FROM exam_specialty