Browse Source

事件侧重要素接口

develop
lau572 8 months ago
parent
commit
3cc21970e7
  1. 18
      zc-business/src/main/java/com/zc/business/controller/DcEventImportantController.java
  2. 4
      zc-business/src/main/java/com/zc/business/mapper/DcEventImportantMapper.java
  3. 4
      zc-business/src/main/java/com/zc/business/service/IDcEventImportantService.java
  4. 6
      zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java

18
zc-business/src/main/java/com/zc/business/controller/DcEventImportantController.java

@ -2,6 +2,9 @@ package com.zc.business.controller;
import java.util.List;
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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -27,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi
* @date 2024-04-11
*/
@Api(tags = "事件侧重要素")
@RestController
@RequestMapping("/business/eventImportant")
public class DcEventImportantController extends BaseController
@ -37,6 +41,7 @@ public class DcEventImportantController extends BaseController
/**
* 查询事件侧重要素列表
*/
@ApiOperation("查询事件侧重要素列表")
@GetMapping("/list")
public TableDataInfo list(DcEventImportant dcEventImportant)
{
@ -48,6 +53,7 @@ public class DcEventImportantController extends BaseController
/**
* 导出事件侧重要素列表
*/
@ApiOperation("导出事件侧重要素列表")
@Log(title = "事件侧重要素", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcEventImportant dcEventImportant)
@ -58,17 +64,19 @@ public class DcEventImportantController extends BaseController
}
/**
* 获取事件侧重要素详细信息
* 根据事件id查询侧重要素信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
@ApiOperation("根据事件id查询侧重要素信息")
@GetMapping(value = "/{eventId}")
public AjaxResult getInfo(@PathVariable("eventId") String eventId)
{
return AjaxResult.success(dcEventImportantService.selectDcEventImportantByEventId(id));
return AjaxResult.success(dcEventImportantService.selectDcEventImportantByEventId(eventId));
}
/**
* 新增事件侧重要素
*/
@ApiOperation("新增事件侧重要素")
@Log(title = "事件侧重要素", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcEventImportant dcEventImportant)
@ -81,6 +89,7 @@ public class DcEventImportantController extends BaseController
*/
@Log(title = "事件侧重要素", businessType = BusinessType.UPDATE)
@PutMapping
@ApiOperation("修改事件侧重要素")
public AjaxResult edit(@RequestBody DcEventImportant dcEventImportant)
{
return toAjax(dcEventImportantService.updateDcEventImportant(dcEventImportant));
@ -89,6 +98,7 @@ public class DcEventImportantController extends BaseController
/**
* 删除事件侧重要素
*/
@ApiOperation("删除事件侧重要素")
@Log(title = "事件侧重要素", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)

4
zc-business/src/main/java/com/zc/business/mapper/DcEventImportantMapper.java

@ -14,10 +14,10 @@ public interface DcEventImportantMapper
/**
* 查询事件侧重要素
*
* @param id 事件侧重要素主键
* @param eventId 事件id
* @return 事件侧重要素
*/
public DcEventImportant selectDcEventImportantByEventId(String id);
public DcEventImportant selectDcEventImportantByEventId(String eventId);
/**
* 查询事件侧重要素列表

4
zc-business/src/main/java/com/zc/business/service/IDcEventImportantService.java

@ -14,10 +14,10 @@ public interface IDcEventImportantService
/**
* 查询事件侧重要素
*
* @param id 事件侧重要素主键
* @param eventId 事件id
* @return 事件侧重要素
*/
public DcEventImportant selectDcEventImportantByEventId(String id);
public DcEventImportant selectDcEventImportantByEventId(String eventId);
/**
* 查询事件侧重要素列表

6
zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java

@ -22,13 +22,13 @@ public class DcEventImportantServiceImpl implements IDcEventImportantService
/**
* 查询事件侧重要素
*
* @param id 事件侧重要素主键
* @param eventId 事件id
* @return 事件侧重要素
*/
@Override
public DcEventImportant selectDcEventImportantByEventId(String id)
public DcEventImportant selectDcEventImportantByEventId(String eventId)
{
return dcEventImportantMapper.selectDcEventImportantByEventId(id);
return dcEventImportantMapper.selectDcEventImportantByEventId(eventId);
}
/**

Loading…
Cancel
Save