You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
3.4 KiB
104 lines
3.4 KiB
package com.ruoyi.system.controller; |
|
|
|
import java.util.List; |
|
import javax.servlet.http.HttpServletResponse; |
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
import org.springframework.beans.factory.annotation.Autowired; |
|
import org.springframework.web.bind.annotation.GetMapping; |
|
import org.springframework.web.bind.annotation.PostMapping; |
|
import org.springframework.web.bind.annotation.PutMapping; |
|
import org.springframework.web.bind.annotation.DeleteMapping; |
|
import org.springframework.web.bind.annotation.PathVariable; |
|
import org.springframework.web.bind.annotation.RequestBody; |
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
import org.springframework.web.bind.annotation.RestController; |
|
import com.ruoyi.common.annotation.Log; |
|
import com.ruoyi.common.core.controller.BaseController; |
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
import com.ruoyi.common.enums.BusinessType; |
|
import com.ruoyi.system.domain.BVideoAllow; |
|
import com.ruoyi.system.service.IBVideoAllowService; |
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
import com.ruoyi.common.core.page.TableDataInfo; |
|
|
|
/** |
|
* 允许列Controller |
|
* |
|
* @author ruoyi |
|
* @date 2022-03-10 |
|
*/ |
|
@RestController |
|
@RequestMapping("/system/allow") |
|
public class BVideoAllowController extends BaseController |
|
{ |
|
@Autowired |
|
private IBVideoAllowService bVideoAllowService; |
|
|
|
/** |
|
* 查询允许列列表 |
|
*/ |
|
@PreAuthorize("@ss.hasPermi('system:allow:list')") |
|
@GetMapping("/list") |
|
public TableDataInfo list(BVideoAllow bVideoAllow) |
|
{ |
|
startPage(); |
|
List<BVideoAllow> list = bVideoAllowService.selectBVideoAllowList(bVideoAllow); |
|
return getDataTable(list); |
|
} |
|
|
|
/** |
|
* 导出允许列列表 |
|
*/ |
|
@PreAuthorize("@ss.hasPermi('system:allow:export')") |
|
@Log(title = "允许列", businessType = BusinessType.EXPORT) |
|
@PostMapping("/export") |
|
public void export(HttpServletResponse response, BVideoAllow bVideoAllow) |
|
{ |
|
List<BVideoAllow> list = bVideoAllowService.selectBVideoAllowList(bVideoAllow); |
|
ExcelUtil<BVideoAllow> util = new ExcelUtil<BVideoAllow>(BVideoAllow.class); |
|
util.exportExcel(response, list, "允许列数据"); |
|
} |
|
|
|
/** |
|
* 获取允许列详细信息 |
|
*/ |
|
@PreAuthorize("@ss.hasPermi('system:allow:query')") |
|
@GetMapping(value = "/{id}") |
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
|
{ |
|
return AjaxResult.success(bVideoAllowService.selectBVideoAllowById(id)); |
|
} |
|
|
|
/** |
|
* 新增允许列 |
|
*/ |
|
@PreAuthorize("@ss.hasPermi('system:allow:add')") |
|
@Log(title = "允许列", businessType = BusinessType.INSERT) |
|
@PostMapping |
|
public AjaxResult add(@RequestBody BVideoAllow bVideoAllow) |
|
{ |
|
return toAjax(bVideoAllowService.insertBVideoAllow(bVideoAllow)); |
|
} |
|
|
|
/** |
|
* 修改允许列 |
|
*/ |
|
@PreAuthorize("@ss.hasPermi('system:allow:edit')") |
|
@Log(title = "允许列", businessType = BusinessType.UPDATE) |
|
@PutMapping |
|
public AjaxResult edit(@RequestBody BVideoAllow bVideoAllow) |
|
{ |
|
return toAjax(bVideoAllowService.updateBVideoAllow(bVideoAllow)); |
|
} |
|
|
|
/** |
|
* 删除允许列 |
|
*/ |
|
@PreAuthorize("@ss.hasPermi('system:allow:remove')") |
|
@Log(title = "允许列", businessType = BusinessType.DELETE) |
|
@DeleteMapping("/{ids}") |
|
public AjaxResult remove(@PathVariable Long[] ids) |
|
{ |
|
return toAjax(bVideoAllowService.deleteBVideoAllowByIds(ids)); |
|
} |
|
}
|
|
|