| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.smartor.domain.SvyLibTitleReq; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | /** |
| | | * 问卷Controller |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2023-03-02 |
| | | */ |
| | | @Api(description = "问卷") |
| | | @RestController |
| | | @RequestMapping("/smartor/svytitle") |
| | | public class SvyLibTitleController extends BaseController |
| | | { |
| | | public class SvyLibTitleController extends BaseController { |
| | | @Autowired |
| | | private ISvyLibTitleService svyLibTitleService; |
| | | |
| | | /** |
| | | * 查询问卷列表 |
| | | */ |
| | | @ApiOperation("查询问卷列表") |
| | | @PreAuthorize("@ss.hasPermi('smartor:svytitle:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SvyLibTitle svyLibTitle) |
| | | { |
| | | @GetMapping("/selectSvyLibTitlelist") |
| | | public TableDataInfo selectSvyLibTitlelist(SvyLibTitleReq svyLibTitleReq) { |
| | | startPage(); |
| | | List<SvyLibTitle> list = svyLibTitleService.selectSvyLibTitleList(svyLibTitle); |
| | | List<SvyLibTitle> list = svyLibTitleService.selectSvyLibTitleList(svyLibTitleReq); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出问卷列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:svytitle:export')") |
| | | @Log(title = "问卷", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SvyLibTitle svyLibTitle) |
| | | { |
| | | List<SvyLibTitle> list = svyLibTitleService.selectSvyLibTitleList(svyLibTitle); |
| | | ExcelUtil<SvyLibTitle> util = new ExcelUtil<SvyLibTitle>(SvyLibTitle.class); |
| | | util.exportExcel(response, list, "问卷数据"); |
| | | } |
| | | // /** |
| | | // * 导出问卷列表 |
| | | // */ |
| | | // @PreAuthorize("@ss.hasPermi('smartor:svytitle:export')") |
| | | // @Log(title = "问卷", businessType = BusinessType.EXPORT) |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SvyLibTitle svyLibTitle) |
| | | // { |
| | | // List<SvyLibTitle> list = svyLibTitleService.selectSvyLibTitleList(svyLibTitle); |
| | | // ExcelUtil<SvyLibTitle> util = new ExcelUtil<SvyLibTitle>(SvyLibTitle.class); |
| | | // util.exportExcel(response, list, "问卷数据"); |
| | | // } |
| | | |
| | | /** |
| | | * 获取问卷详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:svytitle:query')") |
| | | @GetMapping(value = "/{svyid}") |
| | | public AjaxResult getInfo(@PathVariable("svyid") Long svyid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("svyid") Long svyid) { |
| | | return success(svyLibTitleService.selectSvyLibTitleBySvyid(svyid)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:svytitle:add')") |
| | | @Log(title = "问卷", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody SvyLibTitle svyLibTitle) |
| | | { |
| | | public AjaxResult add(@RequestBody SvyLibTitle svyLibTitle) { |
| | | return toAjax(svyLibTitleService.insertSvyLibTitle(svyLibTitle)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:svytitle:edit')") |
| | | @Log(title = "问卷", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody SvyLibTitle svyLibTitle) |
| | | { |
| | | public AjaxResult edit(@RequestBody SvyLibTitle svyLibTitle) { |
| | | return toAjax(svyLibTitleService.updateSvyLibTitle(svyLibTitle)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:svytitle:remove')") |
| | | @Log(title = "问卷", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{svyids}") |
| | | public AjaxResult remove(@PathVariable Long[] svyids) |
| | | { |
| | | @DeleteMapping("/{svyids}") |
| | | public AjaxResult remove(@PathVariable Long[] svyids) { |
| | | return toAjax(svyLibTitleService.deleteSvyLibTitleBySvyids(svyids)); |
| | | } |
| | | } |