BizObjPpAgentController.java 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. package com.jjt.biz.controller;
  2. import java.util.List;
  3. import javax.annotation.Resource;
  4. import javax.servlet.http.HttpServletResponse;
  5. import io.swagger.annotations.Api;
  6. import io.swagger.annotations.ApiOperation;
  7. import org.springframework.security.access.prepost.PreAuthorize;
  8. import org.springframework.web.bind.annotation.GetMapping;
  9. import org.springframework.web.bind.annotation.PostMapping;
  10. import org.springframework.web.bind.annotation.PutMapping;
  11. import org.springframework.web.bind.annotation.DeleteMapping;
  12. import org.springframework.web.bind.annotation.PathVariable;
  13. import org.springframework.web.bind.annotation.RequestBody;
  14. import org.springframework.web.bind.annotation.RequestMapping;
  15. import org.springframework.web.bind.annotation.RestController;
  16. import com.jjt.common.annotation.Log;
  17. import com.jjt.common.core.controller.BaseController;
  18. import com.jjt.common.core.domain.AjaxResult;
  19. import com.jjt.common.enums.BusinessType;
  20. import com.jjt.biz.domain.BizObjPpAgent;
  21. import com.jjt.biz.service.IBizObjPpAgentService;
  22. import com.jjt.common.utils.poi.ExcelUtil;
  23. import com.jjt.common.core.page.TableDataInfo;
  24. /**
  25. * 业务对象pinpoint组成agentController
  26. *
  27. * @author jjt
  28. * @date 2024-10-14
  29. */
  30. @Api(tags="业务对象pinpoint组成agent")
  31. @RestController
  32. @RequestMapping("/obj/agent")
  33. public class BizObjPpAgentController extends BaseController
  34. {
  35. @Resource
  36. private IBizObjPpAgentService bizObjPpAgentService;
  37. /**
  38. * 查询业务对象pinpoint组成agent列表
  39. */
  40. @ApiOperation("查询业务对象pinpoint组成agent列表")
  41. @PreAuthorize("@ss.hasPermi('obj:agent:list')")
  42. @GetMapping("/list")
  43. public TableDataInfo list(BizObjPpAgent bizObjPpAgent)
  44. {
  45. startPage();
  46. List<BizObjPpAgent> list = bizObjPpAgentService.selectBizObjPpAgentList(bizObjPpAgent);
  47. return getDataTable(list);
  48. }
  49. /**
  50. * 导出业务对象pinpoint组成agent列表
  51. */
  52. @ApiOperation("导出业务对象pinpoint组成agent列表")
  53. @PreAuthorize("@ss.hasPermi('obj:agent:export')")
  54. @Log(title = "业务对象pinpoint组成agent", businessType = BusinessType.EXPORT)
  55. @PostMapping("/export")
  56. public void export(HttpServletResponse response, BizObjPpAgent bizObjPpAgent)
  57. {
  58. List<BizObjPpAgent> list = bizObjPpAgentService.selectBizObjPpAgentList(bizObjPpAgent);
  59. ExcelUtil<BizObjPpAgent> util = new ExcelUtil<BizObjPpAgent>(BizObjPpAgent.class);
  60. util.exportExcel(response, list, "业务对象pinpoint组成agent数据");
  61. }
  62. /**
  63. * 获取业务对象pinpoint组成agent详细信息
  64. */
  65. @ApiOperation("获取业务对象pinpoint组成agent详细信息")
  66. @PreAuthorize("@ss.hasPermi('obj:agent:query')")
  67. @GetMapping(value = "/{objPpAgentId}")
  68. public AjaxResult getInfo(@PathVariable("objPpAgentId") Long objPpAgentId)
  69. {
  70. return success(bizObjPpAgentService.selectBizObjPpAgentByObjPpAgentId(objPpAgentId));
  71. }
  72. /**
  73. * 新增业务对象pinpoint组成agent
  74. */
  75. @ApiOperation("新增业务对象pinpoint组成agent")
  76. @PreAuthorize("@ss.hasPermi('obj:agent:add')")
  77. @Log(title = "业务对象pinpoint组成agent", businessType = BusinessType.INSERT)
  78. @PostMapping
  79. public AjaxResult add(@RequestBody BizObjPpAgent bizObjPpAgent)
  80. {
  81. return toAjax(bizObjPpAgentService.insertBizObjPpAgent(bizObjPpAgent));
  82. }
  83. /**
  84. * 修改业务对象pinpoint组成agent
  85. */
  86. @ApiOperation("修改业务对象pinpoint组成agent")
  87. @PreAuthorize("@ss.hasPermi('obj:agent:edit')")
  88. @Log(title = "业务对象pinpoint组成agent", businessType = BusinessType.UPDATE)
  89. @PostMapping("/edit")
  90. public AjaxResult edit(@RequestBody BizObjPpAgent bizObjPpAgent)
  91. {
  92. return toAjax(bizObjPpAgentService.updateBizObjPpAgent(bizObjPpAgent));
  93. }
  94. /**
  95. * 删除业务对象pinpoint组成agent
  96. */
  97. @ApiOperation("删除业务对象pinpoint组成agent")
  98. @PreAuthorize("@ss.hasPermi('obj:agent:remove')")
  99. @Log(title = "业务对象pinpoint组成agent", businessType = BusinessType.DELETE)
  100. @GetMapping("/del/{objPpAgentIds}")
  101. public AjaxResult remove(@PathVariable Long[] objPpAgentIds)
  102. {
  103. return toAjax(bizObjPpAgentService.deleteBizObjPpAgentByObjPpAgentIds(objPpAgentIds));
  104. }
  105. }