根据套餐项目ID删除数据方法增加参数套餐ID

This commit is contained in:
lxd 2025-02-18 12:57:52 +08:00
parent 638a12176c
commit 4aaf99ea97
3 changed files with 6 additions and 5 deletions

View File

@ -81,10 +81,10 @@ public class ExammoduleController {
return success(true);
}
@DeleteMapping("/deleteitemcode")
@Operation(summary = "按照套餐项目ID删除体检套餐项目")
public CommonResult<Boolean> deleteExammoduleitemcode(@RequestParam("itemCode") Integer itemCode)
@Operation(summary = "按照套餐项目ID和套餐ID删除体检套餐项目")
public CommonResult<Boolean> deleteExammoduleitemcode(@RequestParam("itemCode") String itemCode,@RequestParam("examModuleID") Integer ModuleID)
{
exammoduleService.deleteExammoduleitemcode(itemCode);
exammoduleService.deleteExammoduleitemcode(itemCode,ModuleID);
return success(true);
}

View File

@ -52,7 +52,7 @@ public interface ExammoduleService {
/*
* 按照体检套餐里项目ID删除数据
* */
void deleteExammoduleitemcode(Integer itemcode);
void deleteExammoduleitemcode(String itemcode, Integer moduleid);
/**
* 获得体检套餐

View File

@ -84,10 +84,11 @@ public class ExammoduleServiceImpl implements ExammoduleService {
exammoduleMapper.delete(queryWrapper);
}
@Override
public void deleteExammoduleitemcode(Integer itemcode)
public void deleteExammoduleitemcode(String itemcode,Integer moduleid)
{
QueryWrapper<ExammoduleDO> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("itemCode", itemcode);
queryWrapper.eq("examModuleID", moduleid);
exammoduleMapper.delete(queryWrapper);
}
private void validateExammoduleExists(Integer id) {