1 files modified
14 files added
| New file |
| | |
| | | package org.springblade.modules.exam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.service.ExamSubjectChoicesService; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | | * @time 2021-07-16 |
| | | * @desc 选择题管理控制层 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/examSubjectChoices") |
| | | public class ExamSubjectChoicesController { |
| | | |
| | | private final ExamSubjectChoicesService examSubjectChoicesService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * @param query page,size |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @GetMapping("/page") |
| | | public R<IPage<ExamSubjectChoicesVO>> page(ExamSubjectChoicesVO examSubjectChoices, Query query) { |
| | | IPage<ExamSubjectChoicesVO> pages = examSubjectChoicesService.selectExamSubjectChoicesPage(Condition.getPage(query), examSubjectChoices); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperation(value = "新增", notes = "传入examSubjectChoices") |
| | | public R save(@RequestBody ExamSubjectChoices examSubjectChoices) { |
| | | return R.status(examSubjectChoicesService.save(examSubjectChoices)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ExamSubjectChoices examSubjectChoices) { |
| | | return R.status(examSubjectChoicesService.updateById(examSubjectChoices)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody ExamSubjectChoices examSubjectChoices) { |
| | | if (null!=examSubjectChoices.getId()){ |
| | | examSubjectChoices.setCreateDate(new Date()); |
| | | }else { |
| | | examSubjectChoices.setModifyDate(new Date()); |
| | | } |
| | | return R.status(examSubjectChoicesService.saveOrUpdate(examSubjectChoices)); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param ids 选择题信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | return R.status(examSubjectChoicesService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperation(value = "详情", notes = "传入examSubjectChoices") |
| | | public R<ExamSubjectChoicesVO> detail(ExamSubjectChoices examSubjectChoices) { |
| | | //查询选择题详情 |
| | | ExamSubjectChoicesVO detail = examSubjectChoicesService.selectExamSubjectChoicesInfo(examSubjectChoices); |
| | | //返回 |
| | | return R.data(detail); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.exam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.exam.entity.ExamSubjectOption; |
| | | import org.springblade.modules.exam.service.ExamSubjectOptionService; |
| | | import org.springblade.modules.exam.vo.ExamSubjectOptionVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | | * @time 2021-07-16 |
| | | * @desc 选择题选项管理控制层 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/examSubjectOption") |
| | | public class ExamSubjectOptionController { |
| | | |
| | | private final ExamSubjectOptionService examSubjectOptionService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * @param query page,size |
| | | * @param examSubjectOption 选择题选项信息对象 |
| | | */ |
| | | @GetMapping("/page") |
| | | public R<IPage<ExamSubjectOptionVO>> page(ExamSubjectOptionVO examSubjectOption, Query query) { |
| | | IPage<ExamSubjectOptionVO> pages = examSubjectOptionService.selectExamSubjectOptionPage(Condition.getPage(query), examSubjectOption); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param examSubjectOption 选择题选项信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperation(value = "新增", notes = "传入examSubjectOption") |
| | | public R save(@RequestBody ExamSubjectOption examSubjectOption) { |
| | | return R.status(examSubjectOptionService.save(examSubjectOption)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param examSubjectOption 选择题选项信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ExamSubjectOption examSubjectOption) { |
| | | return R.status(examSubjectOptionService.updateById(examSubjectOption)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * @param examSubjectOption 选择题选项信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody ExamSubjectOption examSubjectOption) { |
| | | if (null!=examSubjectOption.getId()){ |
| | | examSubjectOption.setCreateDate(new Date()); |
| | | }else { |
| | | examSubjectOption.setModifyDate(new Date()); |
| | | } |
| | | return R.status(examSubjectOptionService.saveOrUpdate(examSubjectOption)); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param ids 选择题选项信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | return R.status(examSubjectOptionService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param examSubjectOption 选择题选项信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperation(value = "详情", notes = "传入examSubjectOption") |
| | | public R<ExamSubjectOptionVO> detail(ExamSubjectOption examSubjectOption) { |
| | | //查询选择题选项详情 |
| | | ExamSubjectOptionVO detail = examSubjectOptionService.selectExamSubjectOptionInfo(examSubjectOption); |
| | | //返回 |
| | | return R.data(detail); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.exam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 选择题实体类 |
| | | * @author zhongrj |
| | | * @time 2021-07-16 |
| | | */ |
| | | @Data |
| | | @TableName("exam_subject_choices") |
| | | public class ExamSubjectChoices implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 选择题主键id |
| | | */ |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 题目 ID |
| | | */ |
| | | @TableField("category_id") |
| | | private Long categoryId; |
| | | |
| | | /** |
| | | * 题目名称 |
| | | */ |
| | | @TableField("subject_name") |
| | | private String subjectName; |
| | | |
| | | /** |
| | | * 题目类型 |
| | | */ |
| | | @TableField("choices_type") |
| | | private Integer choicesType; |
| | | |
| | | /** |
| | | * 参考答案 |
| | | */ |
| | | private String answer; |
| | | |
| | | /** |
| | | * 题目分值 |
| | | */ |
| | | private Integer score; |
| | | |
| | | /** |
| | | * 解析 |
| | | */ |
| | | private String analysis; |
| | | |
| | | |
| | | /** |
| | | * 难度等级 |
| | | */ |
| | | private Integer level; |
| | | |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private String creator; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_date") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | private String modifier; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @TableField("modify_date") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date modifyDate; |
| | | |
| | | /** |
| | | * 删除标记 0:正常;1:删除 |
| | | */ |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | /** |
| | | * 系统编号 |
| | | */ |
| | | @TableField("application_code") |
| | | private String applicationCode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("tenant_code") |
| | | private String tenantCode; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.exam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 选择题选项实体类 |
| | | * @author zhongrj |
| | | * @time 2021-07-16 |
| | | */ |
| | | @Data |
| | | @TableName("exam_subject_option") |
| | | public class ExamSubjectOption implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 选择题主键id |
| | | */ |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 选择题ID |
| | | */ |
| | | @TableField("subject_choices_id") |
| | | private Long subjectChoicesId; |
| | | |
| | | /** |
| | | * 选项名称 |
| | | */ |
| | | @TableField("option_name") |
| | | private String optionName; |
| | | |
| | | /** |
| | | * 选项内容 |
| | | */ |
| | | @TableField("option_content") |
| | | private String optionContent; |
| | | |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private String creator; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_date") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | private String modifier; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @TableField("modify_date") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date modifyDate; |
| | | |
| | | /** |
| | | * 删除标记 0:正常;1:删除 |
| | | */ |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | /** |
| | | * 系统编号 |
| | | */ |
| | | @TableField("application_code") |
| | | private String applicationCode; |
| | | |
| | | /** |
| | | * 租户编号 |
| | | */ |
| | | @TableField("tenant_code") |
| | | private String tenantCode; |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.exam.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 选择题Mapper 接口 |
| | | * @author zhongrj |
| | | */ |
| | | public interface ExamSubjectChoicesMapper extends BaseMapper<ExamSubjectChoices> { |
| | | |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page 分页 |
| | | * @param examSubjectChoices 实体 |
| | | * @return |
| | | */ |
| | | List<ExamSubjectChoicesVO> selectExamSubjectChoicesPage(IPage page, @Param("examSubjectChoices") ExamSubjectChoicesVO examSubjectChoices); |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | ExamSubjectChoicesVO selectExamSubjectChoicesInfo(@Param("examSubjectChoices") ExamSubjectChoices examSubjectChoices); |
| | | |
| | | } |
| New file |
| | |
| | | <?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="org.springblade.modules.exam.mapper.ExamSubjectChoicesMapper"> |
| | | |
| | | <!--选择题分页信息--> |
| | | <select id="selectExamSubjectChoicesPage" resultMap="ExamSubjectChoicesInfoMap"> |
| | | SELECT |
| | | esc.*, |
| | | eso.id eso_id,eso.subject_choices_id,eso.option_name,eso.option_content,eso.creator, |
| | | eso.create_date,eso.modifier,eso.modify_date,eso.del_flag,eso.application_code,eso.tenant_code |
| | | FROM |
| | | exam_subject_choices esc |
| | | left join |
| | | exam_subject_option eso |
| | | on |
| | | esc.id = eso.subject_choices_id |
| | | WHERE |
| | | 1=1 |
| | | <if test="examSubjectChoices.subjectName!=null and examSubjectChoices.subjectName!=''"> |
| | | and esc.subject_name like concat('%', #{examSubjectChoices.subjectName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!--ExamSubjectChoicesInfoMap 多表联查 一对多查询 --> |
| | | <resultMap id="ExamSubjectChoicesInfoMap" type="org.springblade.modules.exam.vo.ExamSubjectChoicesVO" autoMapping="true"> |
| | | <id property="id" column="id"/> |
| | | <collection property="examSubjectOptions" javaType="java.util.List" ofType="org.springblade.modules.exam.entity.ExamSubjectOption" autoMapping="true"> |
| | | <id property="id" column="eso_id"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | |
| | | <!--选择题详情信息--> |
| | | <select id="selectExamSubjectChoicesInfo" resultMap="ExamSubjectChoicesInfoMap"> |
| | | SELECT |
| | | esc.*, |
| | | eso.id eso_id,eso.subject_choices_id,eso.option_name,eso.option_content,eso.creator, |
| | | eso.create_date,eso.modifier,eso.modify_date,eso.del_flag,eso.application_code,eso.tenant_code |
| | | FROM |
| | | exam_subject_choices esc |
| | | left join |
| | | exam_subject_option eso |
| | | on |
| | | esc.id = eso.subject_choices_id |
| | | WHERE |
| | | 1=1 |
| | | <if test="examSubjectChoices.id!=null"> |
| | | and esc.id = #{examSubjectChoices.id} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | package org.springblade.modules.exam.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.exam.entity.ExamSubjectOption; |
| | | import org.springblade.modules.exam.vo.ExamSubjectOptionVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 选择题选项Mapper 接口 |
| | | * @author zhongrj |
| | | */ |
| | | public interface ExamSubjectOptionMapper extends BaseMapper<ExamSubjectOption> { |
| | | |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page 分页 |
| | | * @param examSubjectOption 实体 |
| | | * @return |
| | | */ |
| | | List<ExamSubjectOptionVO> selectExamSubjectOptionPage(IPage page, @Param("examSubjectOption") ExamSubjectOptionVO examSubjectOption); |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param examSubjectOption 选择题选项信息对象 |
| | | */ |
| | | ExamSubjectOptionVO selectExamSubjectOptionInfo(@Param("examSubjectOption") ExamSubjectOption examSubjectOption); |
| | | |
| | | } |
| New file |
| | |
| | | <?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="org.springblade.modules.exam.mapper.ExamSubjectOptionMapper"> |
| | | |
| | | <!--选择题选项分页信息--> |
| | | <select id="selectExamSubjectOptionPage" resultType="org.springblade.modules.exam.vo.ExamSubjectOptionVO"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | exam_subject_option |
| | | WHERE |
| | | 1=1 |
| | | <if test="examSubjectOption.optionName!=null and examSubjectOption.optionName!=''"> |
| | | and option_name like concat('%', #{examSubjectOption.optionName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!--选择题选项详情信息--> |
| | | <select id="selectExamSubjectOptionInfo" resultType="org.springblade.modules.exam.vo.ExamSubjectOptionVO"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | exam_subject_option |
| | | WHERE |
| | | 1=1 |
| | | <if test="examSubjectOption.id!=null"> |
| | | and id = #{examSubjectOption.id} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | package org.springblade.modules.exam.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | |
| | | /** |
| | | * 选择题服务类 |
| | | * @author zhongrj |
| | | */ |
| | | public interface ExamSubjectChoicesService extends IService<ExamSubjectChoices> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * @param page |
| | | * @param examSubjectChoices |
| | | * @return |
| | | */ |
| | | IPage<ExamSubjectChoicesVO> selectExamSubjectChoicesPage(IPage<ExamSubjectChoicesVO> page, ExamSubjectChoicesVO examSubjectChoices); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | ExamSubjectChoicesVO selectExamSubjectChoicesInfo(ExamSubjectChoices examSubjectChoices); |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.exam.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.exam.entity.ExamSubjectOption; |
| | | import org.springblade.modules.exam.vo.ExamSubjectOptionVO; |
| | | |
| | | /** |
| | | * 选择题选项服务类 |
| | | * @author zhongrj |
| | | */ |
| | | public interface ExamSubjectOptionService extends IService<ExamSubjectOption> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * @param page |
| | | * @param examSubjectOption |
| | | * @return |
| | | */ |
| | | IPage<ExamSubjectOptionVO> selectExamSubjectOptionPage(IPage<ExamSubjectOptionVO> page, ExamSubjectOptionVO examSubjectOption); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param examSubjectOption 选择题选项信息对象 |
| | | */ |
| | | ExamSubjectOptionVO selectExamSubjectOptionInfo(ExamSubjectOption examSubjectOption); |
| | | } |
| New file |
| | |
| | | |
| | | package org.springblade.modules.exam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.mapper.ExamSubjectChoicesMapper; |
| | | import org.springblade.modules.exam.service.ExamSubjectChoicesService; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 选择题服务实现类 |
| | | * @author zhongrj |
| | | */ |
| | | @Service |
| | | public class ExamSubjectChoicesServiceImpl extends ServiceImpl<ExamSubjectChoicesMapper, ExamSubjectChoices> implements ExamSubjectChoicesService { |
| | | |
| | | @Override |
| | | public IPage<ExamSubjectChoicesVO> selectExamSubjectChoicesPage(IPage<ExamSubjectChoicesVO> page, ExamSubjectChoicesVO examSubjectChoices) { |
| | | return page.setRecords(baseMapper.selectExamSubjectChoicesPage(page, examSubjectChoices)); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @Override |
| | | public ExamSubjectChoicesVO selectExamSubjectChoicesInfo(ExamSubjectChoices examSubjectChoices) { |
| | | return baseMapper.selectExamSubjectChoicesInfo(examSubjectChoices); |
| | | } |
| | | } |
| New file |
| | |
| | | |
| | | package org.springblade.modules.exam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.exam.entity.ExamSubjectOption; |
| | | import org.springblade.modules.exam.mapper.ExamSubjectOptionMapper; |
| | | import org.springblade.modules.exam.service.ExamSubjectOptionService; |
| | | import org.springblade.modules.exam.vo.ExamSubjectOptionVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 选择题选项服务实现类 |
| | | * @author zhongrj |
| | | */ |
| | | @Service |
| | | public class ExamSubjectOptionServiceImpl extends ServiceImpl<ExamSubjectOptionMapper, ExamSubjectOption> implements ExamSubjectOptionService { |
| | | |
| | | @Override |
| | | public IPage<ExamSubjectOptionVO> selectExamSubjectOptionPage(IPage<ExamSubjectOptionVO> page, ExamSubjectOptionVO examSubjectOption) { |
| | | return page.setRecords(baseMapper.selectExamSubjectOptionPage(page, examSubjectOption)); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param examSubjectOption 选择题选项信息对象 |
| | | */ |
| | | @Override |
| | | public ExamSubjectOptionVO selectExamSubjectOptionInfo(ExamSubjectOption examSubjectOption) { |
| | | return baseMapper.selectExamSubjectOptionInfo(examSubjectOption); |
| | | } |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.exam.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.entity.ExamSubjectOption; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 选择题实体类vo |
| | | * @author zhongrj |
| | | * @time 2021-07-16 |
| | | */ |
| | | @Data |
| | | public class ExamSubjectChoicesVO extends ExamSubjectChoices implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private List<ExamSubjectOption> examSubjectOptions; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.exam.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springblade.modules.exam.entity.ExamSubjectOption; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 选择题选项实体类vo |
| | | * @author zhongrj |
| | | * @time 2021-07-16 |
| | | */ |
| | | @Data |
| | | public class ExamSubjectOptionVO extends ExamSubjectOption implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | } |
| | |
| | | - /gun/** |
| | | - /trainingRegistration/** |
| | | - /workReport/** |
| | | - /examSubjectChoices/** |
| | | #授权认证配置 |
| | | auth: |
| | | - method: ALL |