package com.jjt.biz.controller; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; 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.jjt.common.annotation.Log; import com.jjt.common.core.controller.BaseController; import com.jjt.common.core.domain.AjaxResult; import com.jjt.common.enums.BusinessType; import com.jjt.biz.domain.BizObjPpAgent; import com.jjt.biz.service.IBizObjPpAgentService; import com.jjt.common.utils.poi.ExcelUtil; import com.jjt.common.core.page.TableDataInfo; /** * 业务对象pinpoint组成agentController * * @author jjt * @date 2024-10-14 */ @Api(tags="业务对象pinpoint组成agent") @RestController @RequestMapping("/obj/agent") public class BizObjPpAgentController extends BaseController { @Resource private IBizObjPpAgentService bizObjPpAgentService; /** * 查询业务对象pinpoint组成agent列表 */ @ApiOperation("查询业务对象pinpoint组成agent列表") @PreAuthorize("@ss.hasPermi('obj:agent:list')") @GetMapping("/list") public TableDataInfo list(BizObjPpAgent bizObjPpAgent) { startPage(); List list = bizObjPpAgentService.selectBizObjPpAgentList(bizObjPpAgent); return getDataTable(list); } /** * 导出业务对象pinpoint组成agent列表 */ @ApiOperation("导出业务对象pinpoint组成agent列表") @PreAuthorize("@ss.hasPermi('obj:agent:export')") @Log(title = "业务对象pinpoint组成agent", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, BizObjPpAgent bizObjPpAgent) { List list = bizObjPpAgentService.selectBizObjPpAgentList(bizObjPpAgent); ExcelUtil util = new ExcelUtil(BizObjPpAgent.class); util.exportExcel(response, list, "业务对象pinpoint组成agent数据"); } /** * 获取业务对象pinpoint组成agent详细信息 */ @ApiOperation("获取业务对象pinpoint组成agent详细信息") @PreAuthorize("@ss.hasPermi('obj:agent:query')") @GetMapping(value = "/{objPpAgentId}") public AjaxResult getInfo(@PathVariable("objPpAgentId") Long objPpAgentId) { return success(bizObjPpAgentService.selectBizObjPpAgentByObjPpAgentId(objPpAgentId)); } /** * 新增业务对象pinpoint组成agent */ @ApiOperation("新增业务对象pinpoint组成agent") @PreAuthorize("@ss.hasPermi('obj:agent:add')") @Log(title = "业务对象pinpoint组成agent", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody BizObjPpAgent bizObjPpAgent) { return toAjax(bizObjPpAgentService.insertBizObjPpAgent(bizObjPpAgent)); } /** * 修改业务对象pinpoint组成agent */ @ApiOperation("修改业务对象pinpoint组成agent") @PreAuthorize("@ss.hasPermi('obj:agent:edit')") @Log(title = "业务对象pinpoint组成agent", businessType = BusinessType.UPDATE) @PostMapping("/edit") public AjaxResult edit(@RequestBody BizObjPpAgent bizObjPpAgent) { return toAjax(bizObjPpAgentService.updateBizObjPpAgent(bizObjPpAgent)); } /** * 删除业务对象pinpoint组成agent */ @ApiOperation("删除业务对象pinpoint组成agent") @PreAuthorize("@ss.hasPermi('obj:agent:remove')") @Log(title = "业务对象pinpoint组成agent", businessType = BusinessType.DELETE) @GetMapping("/del/{objPpAgentIds}") public AjaxResult remove(@PathVariable Long[] objPpAgentIds) { return toAjax(bizObjPpAgentService.deleteBizObjPpAgentByObjPpAgentIds(objPpAgentIds)); } }