Blame view

VodSubjectTreeMappingController.java 1.89 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
package com.meishu.controller;


import com.meishu.common.ResponseData;
import com.meishu.common.ResponseVO;
import com.meishu.common.interceptor.LoginRequired;
import com.meishu.dto.subject.BatchStatusOprDTO;
import com.meishu.dto.subject.GetAllVodsStatusDTO;
import com.meishu.service.VodSubjectTreeMappingService;
import com.meishu.util.ConstantUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

/**
 * <p>
 * 视频知识点映射表 前端控制器
 * </p>
 *
 * @author Tuyp
 * @since 2021-04-27
 */
@RestController
@Api(tags = "视频知识点映射表")
@RequestMapping("/vodTreeMapping")
public class VodSubjectTreeMappingController {


    @Autowired
    private VodSubjectTreeMappingService vodSubjectTreeMappingService;

    @PostMapping("getAllVodsStatus")
    @ApiOperation("获取所有未授权的视频  subjectId  status 0:未授权 1:已授权")
    @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
    public ResponseVO getAllVodsStatus(@RequestBody GetAllVodsStatusDTO getAllNoAuthenVodsDTO){
        return ResponseData.generateCreatedResponse(0,vodSubjectTreeMappingService.getAllNoAuthenVods(getAllNoAuthenVodsDTO));
    }

    @PostMapping("batchStatusOpr")
    @ApiOperation("批量操作视频审核状态  {ids 多个视频id[]   status 1:通过 0:驳回}")
    @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
    public ResponseVO batchStatusOpr(@RequestBody BatchStatusOprDTO batchStatusOprDTO){
        return ResponseData.generateCreatedResponse(0,vodSubjectTreeMappingService.batchStatusOpr(batchStatusOprDTO));
    }


}