修改删除卡记录接口

This commit is contained in:
蒾酒
2024-12-31 19:40:27 +08:00
parent f1b42d1f4d
commit f3b9e04be9
2 changed files with 11 additions and 4 deletions

View File

@ -3,6 +3,7 @@ package com.fastbee.data.controller.cardSwipeRecords;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.iot.mapper.NgCardSwipeRecordsMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@ -38,6 +39,9 @@ public class NgCardSwipeRecordsController extends BaseController
@Autowired
private INgCardSwipeRecordsService ngCardSwipeRecordsService;
@Autowired
private NgCardSwipeRecordsMapper ngCardSwipeRecordsMapper;
/**
* 用户查询刷卡记录列表
*/
@ -109,10 +113,11 @@ public class NgCardSwipeRecordsController extends BaseController
/**
* 删除刷卡记录
*/
@DeleteMapping("/{ids}")
@DeleteMapping("/{id}")
@ApiOperation("删除刷卡记录")
public AjaxResult remove(@PathVariable Long[] ids)
public AjaxResult remove(@PathVariable Long id)
{
return toAjax(ngCardSwipeRecordsService.deleteNgCardSwipeRecordsByIds(ids));
int i = ngCardSwipeRecordsMapper.deleteById(id);
return toAjax(i);
}
}