123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- package com.phm.manage.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.phm.common.annotation.Log;
- import com.phm.common.core.controller.BaseController;
- import com.phm.common.core.domain.AjaxResult;
- import com.phm.common.enums.BusinessType;
- import com.phm.manage.domain.AnalyzeCourseLog;
- import com.phm.manage.service.IAnalyzeCourseLogService;
- import com.phm.common.utils.poi.ExcelUtil;
- import com.phm.common.core.page.TableDataInfo;
- /**
- * 分析过程日志Controller
- *
- * @author phm
- * @date 2023-08-22
- */
- @RestController
- @RequestMapping("/manage/analyzeCourseLog")
- public class AnalyzeCourseLogController extends BaseController {
- @Autowired
- private IAnalyzeCourseLogService analyzeCourseLogService;
- /**
- * 查询分析过程日志列表
- */
- @PreAuthorize("@ss.hasPermi('manage:analyzeCourseLog:list')")
- @GetMapping("/list")
- public TableDataInfo list(AnalyzeCourseLog analyzeCourseLog) {
- startPage();
- List<AnalyzeCourseLog> list = analyzeCourseLogService.selectAnalyzeCourseLogList(analyzeCourseLog);
- return getDataTable(list);
- }
- /**
- * 导出分析过程日志列表
- */
- @PreAuthorize("@ss.hasPermi('manage:analyzeCourseLog:export')")
- @Log(title = "分析过程日志", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, AnalyzeCourseLog analyzeCourseLog) {
- List<AnalyzeCourseLog> list = analyzeCourseLogService.selectAnalyzeCourseLogList(analyzeCourseLog);
- ExcelUtil<AnalyzeCourseLog> util = new ExcelUtil<AnalyzeCourseLog>(AnalyzeCourseLog.class);
- util.exportExcel(response, list, "分析过程日志数据");
- }
- /**
- * 获取分析过程日志详细信息
- */
- @PreAuthorize("@ss.hasPermi('manage:analyzeCourseLog:query')")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id) {
- return success(analyzeCourseLogService.selectAnalyzeCourseLogById(id));
- }
- /**
- * 新增分析过程日志
- */
- @PreAuthorize("@ss.hasPermi('manage:analyzeCourseLog:add')")
- @Log(title = "分析过程日志", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody AnalyzeCourseLog analyzeCourseLog) {
- return toAjax(analyzeCourseLogService.insertAnalyzeCourseLog(analyzeCourseLog));
- }
- /**
- * 修改分析过程日志
- */
- @PreAuthorize("@ss.hasPermi('manage:analyzeCourseLog:edit')")
- @Log(title = "分析过程日志", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody AnalyzeCourseLog analyzeCourseLog) {
- return toAjax(analyzeCourseLogService.updateAnalyzeCourseLog(analyzeCourseLog));
- }
- /**
- * 删除分析过程日志
- */
- @PreAuthorize("@ss.hasPermi('manage:analyzeCourseLog:remove')")
- @Log(title = "分析过程日志", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids) {
- return toAjax(analyzeCourseLogService.deleteAnalyzeCourseLogByIds(ids));
- }
- }
|