Przeglądaj źródła

考场信息接口

小么熊🐻 2 lat temu
rodzic
commit
d49172fc1a
20 zmienionych plików z 982 dodań i 0 usunięć
  1. 58 0
      jsjp-admin/src/main/java/com/miaxis/app/controller/exam/ExamInfoController.java
  2. 59 0
      jsjp-admin/src/main/java/com/miaxis/app/controller/exam/VipExamVideoController.java
  3. 47 0
      jsjp-admin/src/main/java/com/miaxis/app/controller/exam/VipUserExamController.java
  4. 76 0
      jsjp-service/src/main/java/com/miaxis/exam/domain/ExamInfo.java
  5. 36 0
      jsjp-service/src/main/java/com/miaxis/exam/mapper/ExamInfoMapper.java
  6. 25 0
      jsjp-service/src/main/java/com/miaxis/exam/service/IExamInfoService.java
  7. 37 0
      jsjp-service/src/main/java/com/miaxis/exam/service/impl/ExamInfoServiceImpl.java
  8. 26 0
      jsjp-service/src/main/java/com/miaxis/exam/vo/ExamInfoCityVo.java
  9. 27 0
      jsjp-service/src/main/java/com/miaxis/exam/vo/ExamInfoProviceVo.java
  10. 214 0
      jsjp-service/src/main/java/com/miaxis/examvip/domain/VipExamVideo.java
  11. 70 0
      jsjp-service/src/main/java/com/miaxis/examvip/domain/VipUserExam.java
  12. 23 0
      jsjp-service/src/main/java/com/miaxis/examvip/mapper/VipExamVideoMapper.java
  13. 28 0
      jsjp-service/src/main/java/com/miaxis/examvip/mapper/VipUserExamMapper.java
  14. 22 0
      jsjp-service/src/main/java/com/miaxis/examvip/service/IVipExamVideoService.java
  15. 26 0
      jsjp-service/src/main/java/com/miaxis/examvip/service/IVipUserExamService.java
  16. 33 0
      jsjp-service/src/main/java/com/miaxis/examvip/service/impl/VipExamVideoServiceImpl.java
  17. 43 0
      jsjp-service/src/main/java/com/miaxis/examvip/service/impl/VipUserExamServiceImpl.java
  18. 39 0
      jsjp-service/src/main/resources/mapper/exam/ExamInfoMapper.xml
  19. 47 0
      jsjp-service/src/main/resources/mapper/examvip/VipExamVideoMapper.xml
  20. 46 0
      jsjp-service/src/main/resources/mapper/examvip/VipUserExamMapper.xml

+ 58 - 0
jsjp-admin/src/main/java/com/miaxis/app/controller/exam/ExamInfoController.java

@@ -0,0 +1,58 @@
+package com.miaxis.app.controller.exam;
+
+import com.miaxis.common.constant.Constants;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.exam.domain.ExamInfo;
+import com.miaxis.exam.service.IExamInfoService;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 【考场信息】Controller
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@RestController
+@RequestMapping(Constants.OPEN_PREFIX + "/exam/info")
+@Api(tags = {"【APP-考场信息】"})
+public class ExamInfoController extends BaseController {
+    @Autowired
+    private IExamInfoService examInfoService;
+
+
+    /**
+     * 查询考场信息列表
+     */
+    @GetMapping("/list")
+    @ApiOperation("查询考场信息列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<ExamInfo> list(@ModelAttribute ExamInfo examInfo) {
+        startPage();
+        List<ExamInfo> list = examInfoService.selectExamInfoList(examInfo);
+        return toResponsePageInfo(list);
+    }
+
+    /**
+     * 获取考场信息详细信息
+     */
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取考场信息详细信息")
+    public Response<ExamInfo> getInfo(
+            @ApiParam(name = "id", value = "考场信息参数", required = true)
+            @PathVariable("id") Long id
+    ) {
+        return Response.success(examInfoService.getById(id));
+    }
+
+
+
+}

+ 59 - 0
jsjp-admin/src/main/java/com/miaxis/app/controller/exam/VipExamVideoController.java

@@ -0,0 +1,59 @@
+package com.miaxis.app.controller.exam;
+
+import com.miaxis.common.constant.Constants;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.examvip.domain.VipExamVideo;
+import com.miaxis.examvip.service.IVipExamVideoService;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 【考场视频】Controller
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@RestController
+@RequestMapping(Constants.OPEN_PREFIX+"/vip/video")
+@Api(tags={"【APP-考场视频】"})
+public class VipExamVideoController extends BaseController {
+    @Autowired
+    private IVipExamVideoService vipExamVideoService;
+
+    /**
+     * 查询考场视频列表
+     */
+    @GetMapping("/list")
+    @ApiOperation("查询考场视频列表")
+        @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<VipExamVideo> list(@ModelAttribute VipExamVideo vipExamVideo){
+        startPage();
+        List<VipExamVideo> list = vipExamVideoService.selectVipExamVideoList(vipExamVideo);
+        return toResponsePageInfo(list);
+    }
+    
+
+
+    /**
+     * 获取考场视频详细信息
+     */
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取考场视频详细信息")
+    public Response<VipExamVideo> getInfo(
+            @ApiParam(name = "id", value = "考场视频参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(vipExamVideoService.getById(id));
+    }
+
+
+
+}

+ 47 - 0
jsjp-admin/src/main/java/com/miaxis/app/controller/exam/VipUserExamController.java

@@ -0,0 +1,47 @@
+package com.miaxis.app.controller.exam;
+
+import com.miaxis.common.constant.Constants;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.entity.UserInfo;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.common.utils.SecurityUtils;
+import com.miaxis.examvip.domain.VipUserExam;
+import com.miaxis.examvip.service.IVipUserExamService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 【考场会员】Controller
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@RestController
+@RequestMapping(Constants.OPEN_PREFIX+"/vip/exam")
+@Api(tags={"【APP-考场会员】"})
+public class VipUserExamController extends BaseController {
+    @Autowired
+    private IVipUserExamService vipUserExamService;
+
+    /**
+     * 查询当前用户考试会员列表
+     */
+    @GetMapping("/list")
+    @ApiOperation("查询当前用户考试会员列表")
+    public ResponsePageInfo<VipUserExam> list(Long userId){
+        VipUserExam vipUserExam = new VipUserExam();
+        vipUserExam.setUserId(userId);
+        List<VipUserExam> list = vipUserExamService.selectVipUserExamList(vipUserExam);
+        return toResponsePageInfo(list);
+    }
+    
+
+
+
+}

+ 76 - 0
jsjp-service/src/main/java/com/miaxis/exam/domain/ExamInfo.java

@@ -0,0 +1,76 @@
+package com.miaxis.exam.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 考场信息对象 exam_info
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@Data
+@TableName("exam_info")
+@ApiModel(value = "ExamInfo", description = "考场信息对象 exam_info")
+public class ExamInfo extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "$column.columnComment")
+    private Long id;
+
+    /** 考场名称 */
+    @Excel(name = "考场名称")
+    @TableField("name")
+    @ApiModelProperty(value = "考场名称")
+    private String name;
+
+    /** 考场图片 */
+    @Excel(name = "考场图片")
+    @TableField("image")
+    @ApiModelProperty(value = "考场图片")
+    private String image;
+
+    /** 省份ID */
+    @Excel(name = "省份ID")
+    @TableField("province_id")
+    @ApiModelProperty(value = "省份ID")
+    private String provinceId;
+
+    /** 省份名称 */
+    @Excel(name = "省份名称")
+    @TableField("province")
+    @ApiModelProperty(value = "省份名称")
+    private String province;
+
+    /** 城市ID */
+    @Excel(name = "城市ID")
+    @TableField("city_id")
+    @ApiModelProperty(value = "城市ID")
+    private String cityId;
+
+    /** 城市名称 */
+    @Excel(name = "城市名称")
+    @TableField("city")
+    @ApiModelProperty(value = "城市名称")
+    private String city;
+
+
+    /** 城市名称 */
+    @Excel(name = "价格")
+    @TableField("price")
+    @ApiModelProperty(value = "价格")
+    private Integer price;
+
+    /** 课程数 */
+    private transient Integer videoCount;
+
+
+}

+ 36 - 0
jsjp-service/src/main/java/com/miaxis/exam/mapper/ExamInfoMapper.java

@@ -0,0 +1,36 @@
+package com.miaxis.exam.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.exam.domain.ExamInfo;
+import com.miaxis.exam.vo.ExamInfoCityVo;
+import com.miaxis.exam.vo.ExamInfoProviceVo;
+
+import java.util.List;
+
+/**
+ * 考场信息Mapper接口
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+public interface ExamInfoMapper extends BaseMapper<ExamInfo> {
+    /**
+     * 查询考场信息列表
+     *
+     * @param examInfo 考场信息
+     * @return 考场信息集合
+     */
+    public List<ExamInfo> selectExamInfoList(ExamInfo examInfo);
+
+    /**
+     * 获取考场存在的所有省份
+     * @return
+     */
+    List<ExamInfoProviceVo> getProvice();
+
+    /**
+     *
+     * @return
+     */
+    List<ExamInfoCityVo> getCity(String proviceId);
+}

+ 25 - 0
jsjp-service/src/main/java/com/miaxis/exam/service/IExamInfoService.java

@@ -0,0 +1,25 @@
+package com.miaxis.exam.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.exam.domain.ExamInfo;
+import com.miaxis.exam.vo.ExamInfoCityVo;
+import com.miaxis.exam.vo.ExamInfoProviceVo;
+
+import java.util.List;
+
+/**
+ * 考场信息Service接口
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+public interface IExamInfoService extends IService<ExamInfo>{
+    /**
+     * 查询考场信息列表
+     *
+     * @param examInfo 考场信息
+     * @return 考场信息集合
+     */
+    List<ExamInfo> selectExamInfoList(ExamInfo examInfo);
+
+}

+ 37 - 0
jsjp-service/src/main/java/com/miaxis/exam/service/impl/ExamInfoServiceImpl.java

@@ -0,0 +1,37 @@
+package com.miaxis.exam.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.exam.domain.ExamInfo;
+import com.miaxis.exam.mapper.ExamInfoMapper;
+import com.miaxis.exam.service.IExamInfoService;
+import com.miaxis.exam.vo.ExamInfoCityVo;
+import com.miaxis.exam.vo.ExamInfoProviceVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 考场信息Service业务层处理
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@Service
+public class ExamInfoServiceImpl extends ServiceImpl<ExamInfoMapper, ExamInfo> implements IExamInfoService {
+    @Autowired
+    private ExamInfoMapper examInfoMapper;
+
+    /**
+     * 查询考场信息列表
+     *
+     * @param examInfo 考场信息
+     * @return 考场信息
+     */
+    @Override
+    public List<ExamInfo> selectExamInfoList(ExamInfo examInfo){
+        return examInfoMapper.selectExamInfoList(examInfo);
+    }
+
+
+}

+ 26 - 0
jsjp-service/src/main/java/com/miaxis/exam/vo/ExamInfoCityVo.java

@@ -0,0 +1,26 @@
+package com.miaxis.exam.vo;
+
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 考场信息对象 exam_info
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@Data
+@ApiModel(value = "ExamInfoCityVo", description = "考场信息城市返回值")
+public class ExamInfoCityVo extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** 城市ID */
+    @ApiModelProperty(value = "城市ID")
+    private String cityId;
+
+    /** 城市名称 */
+    @ApiModelProperty(value = "城市名称")
+    private String city;
+}

+ 27 - 0
jsjp-service/src/main/java/com/miaxis/exam/vo/ExamInfoProviceVo.java

@@ -0,0 +1,27 @@
+package com.miaxis.exam.vo;
+
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 考场信息对象 exam_info
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@Data
+@ApiModel(value = "ExamInfoProviceVo", description = "考场信息省份返回值")
+public class ExamInfoProviceVo extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** 省份ID */
+    @ApiModelProperty(value = "省份ID")
+    private String provinceId;
+
+    /** 省份名称 */
+    @ApiModelProperty(value = "省份名称")
+    private String province;
+
+}

+ 214 - 0
jsjp-service/src/main/java/com/miaxis/examvip/domain/VipExamVideo.java

@@ -0,0 +1,214 @@
+package com.miaxis.examvip.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 考场视频对象 vip_exam_video
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@Data
+@TableName("vip_exam_video")
+@ApiModel(value = "VipExamVideo", description = "考场视频对象 vip_exam_video")
+public class VipExamVideo extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id")
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    /** 视频名称 */
+    @Excel(name = "视频名称")
+    @TableField("video_name")
+    @ApiModelProperty(value = "视频名称")
+    private String videoName;
+
+    /** 视频封面 */
+    @Excel(name = "视频封面")
+    @TableField("video_cover")
+    @ApiModelProperty(value = "视频封面")
+    private String videoCover;
+
+    /** 视频地址 */
+    @Excel(name = "视频地址")
+    @TableField("video_url")
+    @ApiModelProperty(value = "视频地址")
+    private String videoUrl;
+
+    /** 1:科目一 2:科目二 3:科目三 4:科目四 */
+    @Excel(name = "1:科目一 2:科目二 3:科目三 4:科目四")
+    @TableField("video_subject")
+    @ApiModelProperty(value = "1:科目一 2:科目二 3:科目三 4:科目四")
+    private Long videoSubject;
+
+    /** 0未开启 1已开启 */
+    @Excel(name = "0未开启 1已开启")
+    @TableField("state")
+    @ApiModelProperty(value = "0未开启 1已开启")
+    private Long state;
+
+    /** 0:竖  1:横 */
+    @Excel(name = "0:竖  1:横")
+    @TableField("horizontal")
+    @ApiModelProperty(value = "0:竖  1:横")
+    private Long horizontal;
+
+    /** 省份ID */
+    @Excel(name = "省份ID")
+    @TableField("province_id")
+    @ApiModelProperty(value = "省份ID")
+    private String provinceId;
+
+    /** 地区ID */
+    @Excel(name = "地区ID")
+    @TableField("city_id")
+    @ApiModelProperty(value = "地区ID")
+    private String cityId;
+
+    /** 省份名称 */
+    @Excel(name = "省份名称")
+    @TableField("province")
+    @ApiModelProperty(value = "省份名称")
+    private String province;
+
+    /** 地区名称 */
+    @Excel(name = "地区名称")
+    @TableField("city")
+    @ApiModelProperty(value = "地区名称")
+    private String city;
+
+    /** 考场编号 */
+    @Excel(name = "考场编号")
+    @TableField("exam_id")
+    @ApiModelProperty(value = "考场编号")
+    private Long examId;
+
+    /** 考场名称 */
+    @Excel(name = "考场名称")
+    @TableField("exam_name")
+    @ApiModelProperty(value = "考场名称")
+    private String examName;
+
+    public void setId(Long id){
+        this.id = id;
+    }
+
+    public Long getId(){
+        return id;
+    }
+    public void setVideoName(String videoName){
+        this.videoName = videoName;
+    }
+
+    public String getVideoName(){
+        return videoName;
+    }
+    public void setVideoCover(String videoCover){
+        this.videoCover = videoCover;
+    }
+
+    public String getVideoCover(){
+        return videoCover;
+    }
+    public void setVideoUrl(String videoUrl){
+        this.videoUrl = videoUrl;
+    }
+
+    public String getVideoUrl(){
+        return videoUrl;
+    }
+    public void setVideoSubject(Long videoSubject){
+        this.videoSubject = videoSubject;
+    }
+
+    public Long getVideoSubject(){
+        return videoSubject;
+    }
+    public void setState(Long state){
+        this.state = state;
+    }
+
+    public Long getState(){
+        return state;
+    }
+    public void setHorizontal(Long horizontal){
+        this.horizontal = horizontal;
+    }
+
+    public Long getHorizontal(){
+        return horizontal;
+    }
+    public void setProvinceId(String provinceId){
+        this.provinceId = provinceId;
+    }
+
+    public String getProvinceId(){
+        return provinceId;
+    }
+    public void setCityId(String cityId){
+        this.cityId = cityId;
+    }
+
+    public String getCityId(){
+        return cityId;
+    }
+    public void setProvince(String province){
+        this.province = province;
+    }
+
+    public String getProvince(){
+        return province;
+    }
+    public void setCity(String city){
+        this.city = city;
+    }
+
+    public String getCity(){
+        return city;
+    }
+    public void setExamId(Long examId){
+        this.examId = examId;
+    }
+
+    public Long getExamId(){
+        return examId;
+    }
+    public void setExamName(String examName){
+        this.examName = examName;
+    }
+
+    public String getExamName(){
+        return examName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("videoName", getVideoName())
+            .append("videoCover", getVideoCover())
+            .append("videoUrl", getVideoUrl())
+            .append("videoSubject", getVideoSubject())
+            .append("state", getState())
+            .append("horizontal", getHorizontal())
+            .append("provinceId", getProvinceId())
+            .append("cityId", getCityId())
+            .append("province", getProvince())
+            .append("city", getCity())
+            .append("createTime", getCreateTime())
+            .append("updateTime", getUpdateTime())
+            .append("examId", getExamId())
+            .append("examName", getExamName())
+            .toString();
+    }
+}

+ 70 - 0
jsjp-service/src/main/java/com/miaxis/examvip/domain/VipUserExam.java

@@ -0,0 +1,70 @@
+package com.miaxis.examvip.domain;
+
+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 com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 考场会员对象 vip_user_exam
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@Data
+@TableName("vip_user_exam")
+@ApiModel(value = "VipUserExam", description = "考场会员对象 vip_user_exam")
+public class VipUserExam extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id")
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    /** 用户ID */
+    @Excel(name = "用户ID")
+    @TableField("user_id")
+    @ApiModelProperty(value = "用户ID")
+    private Long userId;
+
+    /** 姓名 */
+    @Excel(name = "姓名")
+    @TableField("name")
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    @TableField("logincode")
+    @ApiModelProperty(value = "身份证号码")
+    private String logincode;
+
+
+    /** 考场ID */
+    @Excel(name = "考场ID")
+    @TableField("exam_id")
+    @ApiModelProperty(value = "考场ID")
+    private Long examId;
+
+    /** 考场名称 */
+    @Excel(name = "考场名称")
+    @TableField("exam_name")
+    @ApiModelProperty(value = "考场名称")
+    private String examName;
+
+    /** 到期时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "到期时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField("expiration_time")
+    @ApiModelProperty(value = "到期时间")
+    private Date expirationTime;
+
+
+}

+ 23 - 0
jsjp-service/src/main/java/com/miaxis/examvip/mapper/VipExamVideoMapper.java

@@ -0,0 +1,23 @@
+package com.miaxis.examvip.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.examvip.domain.VipExamVideo;
+
+import java.util.List;
+
+/**
+ * 考场视频Mapper接口
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+public interface VipExamVideoMapper extends BaseMapper<VipExamVideo> {
+    /**
+     * 查询考场视频列表
+     *
+     * @param vipExamVideo 考场视频
+     * @return 考场视频集合
+     */
+    public List<VipExamVideo> selectVipExamVideoList(VipExamVideo vipExamVideo);
+
+}

+ 28 - 0
jsjp-service/src/main/java/com/miaxis/examvip/mapper/VipUserExamMapper.java

@@ -0,0 +1,28 @@
+package com.miaxis.examvip.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.examvip.domain.VipUserExam;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 考场会员Mapper接口
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+public interface VipUserExamMapper extends BaseMapper<VipUserExam> {
+    /**
+     * 查询考场会员列表
+     *
+     * @param vipUserExam 考场会员
+     * @return 考场会员集合
+     */
+    List<VipUserExam> selectVipUserExamList(VipUserExam vipUserExam);
+
+    void deleteVipUserExamByUserIdAndGoodsId(@Param("userId")Long userId,@Param("goodsId") Long goodsId);
+
+    int getUserExamByUserIdAndGoodsId(@Param("userId")Long userId,@Param("goodsId") Long goodsId);
+
+}

+ 22 - 0
jsjp-service/src/main/java/com/miaxis/examvip/service/IVipExamVideoService.java

@@ -0,0 +1,22 @@
+package com.miaxis.examvip.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.examvip.domain.VipExamVideo;
+
+import java.util.List;
+
+/**
+ * 考场视频Service接口
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+public interface IVipExamVideoService extends IService<VipExamVideo>{
+    /**
+     * 查询考场视频列表
+     *
+     * @param vipExamVideo 考场视频
+     * @return 考场视频集合
+     */
+    public List<VipExamVideo> selectVipExamVideoList(VipExamVideo vipExamVideo);
+}

+ 26 - 0
jsjp-service/src/main/java/com/miaxis/examvip/service/IVipUserExamService.java

@@ -0,0 +1,26 @@
+package com.miaxis.examvip.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.examvip.domain.VipUserExam;
+
+import java.util.List;
+
+/**
+ * 考场会员Service接口
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+public interface IVipUserExamService extends IService<VipUserExam>{
+    /**
+     * 查询考场会员列表
+     *
+     * @param vipUserExam 考场会员
+     * @return 考场会员集合
+     */
+    List<VipUserExam> selectVipUserExamList(VipUserExam vipUserExam);
+
+    void deleteVipUserExamByUserIdAndGoodsId(Long userId, Long goodsId);
+
+    int getUserExamByUserIdAndGoodsId(Long userId, Long goodsId);
+}

+ 33 - 0
jsjp-service/src/main/java/com/miaxis/examvip/service/impl/VipExamVideoServiceImpl.java

@@ -0,0 +1,33 @@
+package com.miaxis.examvip.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.examvip.domain.VipExamVideo;
+import com.miaxis.examvip.mapper.VipExamVideoMapper;
+import com.miaxis.examvip.service.IVipExamVideoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 考场视频Service业务层处理
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@Service
+public class VipExamVideoServiceImpl extends ServiceImpl<VipExamVideoMapper, VipExamVideo> implements IVipExamVideoService {
+    @Autowired
+    private VipExamVideoMapper vipExamVideoMapper;
+
+    /**
+     * 查询考场视频列表
+     *
+     * @param vipExamVideo 考场视频
+     * @return 考场视频
+     */
+    @Override
+    public List<VipExamVideo> selectVipExamVideoList(VipExamVideo vipExamVideo){
+        return vipExamVideoMapper.selectVipExamVideoList(vipExamVideo);
+    }
+}

+ 43 - 0
jsjp-service/src/main/java/com/miaxis/examvip/service/impl/VipUserExamServiceImpl.java

@@ -0,0 +1,43 @@
+package com.miaxis.examvip.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.examvip.domain.VipUserExam;
+import com.miaxis.examvip.mapper.VipUserExamMapper;
+import com.miaxis.examvip.service.IVipUserExamService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 考场会员Service业务层处理
+ *
+ * @author miaxis
+ * @date 2023-03-20
+ */
+@Service
+public class VipUserExamServiceImpl extends ServiceImpl<VipUserExamMapper, VipUserExam> implements IVipUserExamService {
+    @Autowired
+    private VipUserExamMapper vipUserExamMapper;
+
+    /**
+     * 查询考场会员列表
+     *
+     * @param vipUserExam 考场会员
+     * @return 考场会员
+     */
+    @Override
+    public List<VipUserExam> selectVipUserExamList(VipUserExam vipUserExam){
+        return vipUserExamMapper.selectVipUserExamList(vipUserExam);
+    }
+
+    @Override
+    public void deleteVipUserExamByUserIdAndGoodsId(Long userId, Long goodsId) {
+        vipUserExamMapper.deleteVipUserExamByUserIdAndGoodsId(userId,goodsId);
+    }
+
+    @Override
+    public int getUserExamByUserIdAndGoodsId(Long userId, Long goodsId) {
+        return vipUserExamMapper.getUserExamByUserIdAndGoodsId(userId,goodsId);
+    }
+}

+ 39 - 0
jsjp-service/src/main/resources/mapper/exam/ExamInfoMapper.xml

@@ -0,0 +1,39 @@
+<?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.miaxis.exam.mapper.ExamInfoMapper">
+
+    <resultMap type="ExamInfo" id="ExamInfoResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="image"    column="image"    />
+        <result property="provinceId"    column="province_id"    />
+        <result property="province"    column="province"    />
+        <result property="cityId"    column="city_id"    />
+        <result property="city"    column="city"    />
+        <result property="price"    column="price"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectExamInfoVo">
+        select *,(select count(1) from vip_exam_video v where v.exam_id = e.id) as video_count from exam_info e
+    </sql>
+
+    <select id="selectExamInfoList" parameterType="ExamInfo" resultMap="ExamInfoResult">
+        <include refid="selectExamInfoVo"/>
+        <where>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="provinceId != null  and provinceId != ''"> and province_id = #{provinceId}</if>
+            <if test="province != null  and province != ''"> and province = #{province}</if>
+            <if test="cityId != null  and cityId != ''"> and city_id = #{cityId}</if>
+            <if test="city != null  and city != ''"> and city = #{city}</if>
+        </where>
+    </select>
+
+
+
+
+</mapper>

+ 47 - 0
jsjp-service/src/main/resources/mapper/examvip/VipExamVideoMapper.xml

@@ -0,0 +1,47 @@
+<?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.miaxis.examvip.mapper.VipExamVideoMapper">
+
+    <resultMap type="VipExamVideo" id="VipExamVideoResult">
+        <result property="id"    column="id"    />
+        <result property="videoName"    column="video_name"    />
+        <result property="videoCover"    column="video_cover"    />
+        <result property="videoUrl"    column="video_url"    />
+        <result property="videoSubject"    column="video_subject"    />
+        <result property="state"    column="state"    />
+        <result property="horizontal"    column="horizontal"    />
+        <result property="provinceId"    column="province_id"    />
+        <result property="cityId"    column="city_id"    />
+        <result property="province"    column="province"    />
+        <result property="city"    column="city"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="examId"    column="exam_id"    />
+        <result property="examName"    column="exam_name"    />
+    </resultMap>
+
+    <sql id="selectVipExamVideoVo">
+        select * from vip_exam_video
+    </sql>
+
+    <select id="selectVipExamVideoList" parameterType="VipExamVideo" resultMap="VipExamVideoResult">
+        <include refid="selectVipExamVideoVo"/>
+        <where>
+            <if test="videoName != null  and videoName != ''"> and video_name like concat('%', #{videoName}, '%')</if>
+            <if test="videoCover != null  and videoCover != ''"> and video_cover = #{videoCover}</if>
+            <if test="videoUrl != null  and videoUrl != ''"> and video_url = #{videoUrl}</if>
+            <if test="videoSubject != null "> and video_subject = #{videoSubject}</if>
+            <if test="state != null "> and state = #{state}</if>
+            <if test="horizontal != null "> and horizontal = #{horizontal}</if>
+            <if test="provinceId != null  and provinceId != ''"> and province_id = #{provinceId}</if>
+            <if test="cityId != null  and cityId != ''"> and city_id = #{cityId}</if>
+            <if test="province != null  and province != ''"> and province = #{province}</if>
+            <if test="city != null  and city != ''"> and city = #{city}</if>
+            <if test="examId != null "> and exam_id = #{examId}</if>
+            <if test="examName != null  and examName != ''"> and exam_name like concat('%', #{examName}, '%')</if>
+        </where>
+    </select>
+
+</mapper>

+ 46 - 0
jsjp-service/src/main/resources/mapper/examvip/VipUserExamMapper.xml

@@ -0,0 +1,46 @@
+<?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.miaxis.examvip.mapper.VipUserExamMapper">
+
+    <resultMap type="VipUserExam" id="VipUserExamResult">
+        <result property="id"    column="id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="name"    column="name"    />
+        <result property="logincode"    column="logincode"    />
+        <result property="examId"    column="exam_id"    />
+        <result property="examName"    column="exam_name"    />
+        <result property="expirationTime"    column="expiration_time"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectVipUserExamVo">
+        select * from vip_user_exam
+    </sql>
+
+    <select id="selectVipUserExamList" parameterType="VipUserExam" resultMap="VipUserExamResult">
+        <include refid="selectVipUserExamVo"/>
+        <where>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="examId != null  and examId != ''"> and exam_id = #{examId}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="examName != null  and examName != ''"> and exam_name like concat('%', #{examName}, '%')</if>
+            <if test="expirationTime != null "> and expiration_time = #{expirationTime}</if>
+        </where>
+    </select>
+
+
+    <delete id="deleteVipUserExamByUserIdAndGoodsId">
+        delete from vip_user_exam where exam_id = #{goodsId} and user_id = #{userId}
+    </delete>
+
+
+
+    <select id="getUserExamByUserIdAndGoodsId" resultType="int">
+        select count(1) from vip_user_exam where exam_id = #{goodsId} and user_id = #{userId}
+    </select>
+
+
+</mapper>