Browse Source

PC考场视频列表

小么熊🐻 2 năm trước cách đây
mục cha
commit
96ae4f0c63

+ 27 - 2
nbjk-admin/src/main/java/com/miaxis/pc/controller/PcExamInfoController.java

@@ -29,8 +29,33 @@ public class PcExamInfoController extends BaseController{
     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);
+    }
+
+    /**
+     * 导出考场信息列表
+     */
+    @Log(title = "考场信息", businessType = BusinessTypeEnum.EXPORT)
+    @GetMapping("/export")
+    @ApiOperation("导出考场信息列表Excel")
+    public Response<String> export(@ModelAttribute ExamInfo examInfo){
+        List<ExamInfo> list = examInfoService.selectExamInfoList(examInfo);
+        ExcelUtil<ExamInfo> util = new ExcelUtil<ExamInfo>(ExamInfo.class);
+        return util.exportExcel(list, "info");
+    }
 
     /**
      * 获取考场信息详细信息
@@ -68,7 +93,7 @@ public class PcExamInfoController extends BaseController{
      * 删除考场信息
      */
     @Log(title = "考场信息", businessType = BusinessTypeEnum.DELETE)
-	@DeleteMapping("/{ids}")
+    @DeleteMapping("/{ids}")
     @ApiOperation("删除考场信息")
     public  Response<Integer> remove(
             @ApiParam(name = "ids", value = "考场信息ids参数", required = true)

+ 1 - 10
nbjk-admin/src/main/java/com/miaxis/pc/controller/PcVipExamVideoController.java

@@ -32,7 +32,6 @@ public class PcVipExamVideoController extends BaseController{
     /**
      * 查询考场视频列表
      */
-    @PreAuthorize("@ss.hasPermi('vip:video:list')")
     @GetMapping("/list")
     @ApiOperation("查询考场视频列表")
         @ApiImplicitParams({
@@ -48,8 +47,6 @@ public class PcVipExamVideoController extends BaseController{
     /**
      * 导出考场视频列表
      */
-    @PreAuthorize("@ss.hasPermi('vip:video:export')")
-    @Log(title = "考场视频", businessType = BusinessTypeEnum.EXPORT)
     @GetMapping("/export")
     @ApiOperation("导出考场视频列表Excel")
     public Response<String> export(@ModelAttribute VipExamVideo vipExamVideo){
@@ -61,7 +58,6 @@ public class PcVipExamVideoController extends BaseController{
     /**
      * 获取考场视频详细信息
      */
-    @PreAuthorize("@ss.hasPermi('vip:video:query')")
     @GetMapping(value = "/{id}")
     @ApiOperation("获取考场视频详细信息")
     public Response<VipExamVideo> getInfo(
@@ -74,8 +70,7 @@ public class PcVipExamVideoController extends BaseController{
     /**
      * 新增考场视频
      */
-    @PreAuthorize("@ss.hasPermi('vip:video:add')")
-    @Log(title = "考场视频", businessType = BusinessTypeEnum.INSERT)
+
     @PostMapping
     @ApiOperation("新增考场视频")
     public Response<Integer> add(@RequestBody VipExamVideo vipExamVideo){
@@ -85,8 +80,6 @@ public class PcVipExamVideoController extends BaseController{
     /**
      * 修改考场视频
      */
-    @PreAuthorize("@ss.hasPermi('vip:video:edit')")
-    @Log(title = "考场视频", businessType = BusinessTypeEnum.UPDATE)
     @PutMapping
     @ApiOperation("修改考场视频")
     public Response<Integer> edit(@RequestBody VipExamVideo vipExamVideo){
@@ -96,8 +89,6 @@ public class PcVipExamVideoController extends BaseController{
     /**
      * 删除考场视频
      */
-    @PreAuthorize("@ss.hasPermi('vip:video:remove')")
-    @Log(title = "考场视频", businessType = BusinessTypeEnum.DELETE)
 	@DeleteMapping("/{ids}")
     @ApiOperation("删除考场视频")
     public  Response<Integer> remove(

+ 0 - 10
nbjk-admin/src/main/java/com/miaxis/pc/controller/PcVipUserExamController.java

@@ -32,7 +32,6 @@ public class PcVipUserExamController extends BaseController{
     /**
      * 查询考场会员列表
      */
-    @PreAuthorize("@ss.hasPermi('vip:exam:list')")
     @GetMapping("/list")
     @ApiOperation("查询考场会员列表")
         @ApiImplicitParams({
@@ -48,8 +47,6 @@ public class PcVipUserExamController extends BaseController{
     /**
      * 导出考场会员列表
      */
-    @PreAuthorize("@ss.hasPermi('vip:exam:export')")
-    @Log(title = "考场会员", businessType = BusinessTypeEnum.EXPORT)
     @GetMapping("/export")
     @ApiOperation("导出考场会员列表Excel")
     public Response<String> export(@ModelAttribute VipUserExam vipUserExam){
@@ -61,7 +58,6 @@ public class PcVipUserExamController extends BaseController{
     /**
      * 获取考场会员详细信息
      */
-    @PreAuthorize("@ss.hasPermi('vip:exam:query')")
     @GetMapping(value = "/{id}")
     @ApiOperation("获取考场会员详细信息")
     public Response<VipUserExam> getInfo(
@@ -74,8 +70,6 @@ public class PcVipUserExamController extends BaseController{
     /**
      * 新增考场会员
      */
-    @PreAuthorize("@ss.hasPermi('vip:exam:add')")
-    @Log(title = "考场会员", businessType = BusinessTypeEnum.INSERT)
     @PostMapping
     @ApiOperation("新增考场会员")
     public Response<Integer> add(@RequestBody VipUserExam vipUserExam){
@@ -85,8 +79,6 @@ public class PcVipUserExamController extends BaseController{
     /**
      * 修改考场会员
      */
-    @PreAuthorize("@ss.hasPermi('vip:exam:edit')")
-    @Log(title = "考场会员", businessType = BusinessTypeEnum.UPDATE)
     @PutMapping
     @ApiOperation("修改考场会员")
     public Response<Integer> edit(@RequestBody VipUserExam vipUserExam){
@@ -96,8 +88,6 @@ public class PcVipUserExamController extends BaseController{
     /**
      * 删除考场会员
      */
-    @PreAuthorize("@ss.hasPermi('vip:exam:remove')")
-    @Log(title = "考场会员", businessType = BusinessTypeEnum.DELETE)
 	@DeleteMapping("/{ids}")
     @ApiOperation("删除考场会员")
     public  Response<Integer> remove(

+ 4 - 0
nbjk-service/src/main/java/com/miaxis/exam/mapper/ExamInfoMapper.java

@@ -23,6 +23,10 @@ public interface ExamInfoMapper extends BaseMapper<ExamInfo> {
      */
     List<ExamInfoVipVo> selectExamInfoList(ExamInfoDto examInfoDto);
 
+
+
+    List<ExamInfo> selectExamInfoList(ExamInfo examInfo);
+
     /**
      * 获取考场存在的所有省份
      * @return

+ 2 - 0
nbjk-service/src/main/java/com/miaxis/exam/service/IExamInfoService.java

@@ -23,6 +23,8 @@ public interface IExamInfoService extends IService<ExamInfo>{
      */
     List<ExamInfoVipVo> selectExamInfoList(ExamInfoDto examInfo);
 
+    List<ExamInfo> selectExamInfoList(ExamInfo examInfo);
+
     List<ExamInfoProviceVo> getProvice();
 
     List<ExamInfoCityVo> getCity(String proviceId);

+ 5 - 0
nbjk-service/src/main/java/com/miaxis/exam/service/impl/ExamInfoServiceImpl.java

@@ -34,6 +34,11 @@ public class ExamInfoServiceImpl extends ServiceImpl<ExamInfoMapper, ExamInfo> i
         return examInfoMapper.selectExamInfoList(examInfoDto);
     }
 
+    @Override
+    public List<ExamInfo> selectExamInfoList(ExamInfo examInfo) {
+        return examInfoMapper.selectExamInfoList(examInfo);
+    }
+
     @Override
     public List<ExamInfoProviceVo> getProvice() {
         return examInfoMapper.getProvice();

+ 18 - 0
nbjk-service/src/main/resources/mapper/exam/ExamInfoMapper.xml

@@ -17,6 +17,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"    column="update_time"    />
     </resultMap>
 
+
+
+
+    <select id="selectExamInfoList" parameterType="ExamInfo" resultMap="ExamInfoResult">
+        select * from exam_info
+        <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>
+
+
+
+
     <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>