fix(wms/attendance-schedule): 调整批量删除接口参数类型与逻辑

1. 接口参数调整:将批量删除接口的路径参数从Long数组改为接收逗号分隔的字符串,并修改为@RequestBody接收
2. 服务层逻辑重构:将deleteWithValidByIds方法参数从Collection<Long>改为String,内部实现字符串解析与转换
3. 新增参数校验:在服务层添加字符串解析逻辑,过滤空值并转换为Long列表,避免空列表操作

调整前,批量删除依赖路径参数数组,存在URL长度限制且类型转换复杂;调整后,通过请求体接收字符串参数,服务层统一解析处理,提升接口健壮性与兼容性。
This commit is contained in:
2026-06-05 16:46:23 +08:00
parent d8498728ee
commit 1947a5c2d5
3 changed files with 17 additions and 6 deletions

View File

@@ -94,10 +94,10 @@ public class WmsAttendanceScheduleController extends BaseController {
* @param scheduleIds 主键串
*/
@Log(title = "排班(谁在哪天上班)", businessType = BusinessType.DELETE)
@DeleteMapping("/{scheduleIds}")
@DeleteMapping("/remove")
public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] scheduleIds) {
return toAjax(iWmsAttendanceScheduleService.deleteWithValidByIds(Arrays.asList(scheduleIds), true));
@RequestBody String scheduleIds) {
return toAjax(iWmsAttendanceScheduleService.deleteWithValidByIds(scheduleIds, true));
}
/**