上传关联

dev_no_inv
zane 9 months ago
parent d45ef6a53e
commit e93c8bfb25

@ -51,11 +51,17 @@ public class RelCodeBatchController extends BaseController {
}
@GetMapping("/udiwms/relCode/batch/get")
public BaseResponse get(Long id) {
public BaseResponse get(@RequestParam("id") Long id) {
RelCodeBatch relCodeBatch = relCodeBatchService.getById(id);
return ResultVOUtils.success(relCodeBatch);
}
@GetMapping("/udiwms/relCode/batch/delete")
public BaseResponse delete(@RequestParam("id") Long id) {
relCodeBatchService.delete(id);
return ResultVOUtils.success("删除成功");
}
@PostMapping("/udiwms/relCode/batch/update")
public BaseResponse update(@RequestBody @Valid RelCodeBatch relCodeBatch) {

@ -3,6 +3,7 @@ package com.glxp.api.service.collect;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.XmlUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.entity.collect.RelCodeDetail;
import com.glxp.api.exception.JsonException;
@ -132,4 +133,11 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode
return this.baseMapper.filterList(relCodeBatchRequest);
}
public void delete(Long id) {
if(id == null){
throw new JsonException("id 不能为空");
}
relCodeDetailService.remove(new LambdaQueryWrapper<RelCodeDetail>().eq(RelCodeDetail::getBatchIdFk,id));
this.removeById(id);
}
}

Loading…
Cancel
Save