| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.modules.farm.entity.Farm; |
| | | import org.springblade.modules.farm.vo.FarmVO; |
| | | import org.springblade.modules.resource.endpoint.OssEndpoint; |
| | |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | //先要判断该地块是否还有正在种植的作物,先结束才能删除地块 |
| | | List<LandVO> land= landService.findPlantInLand(ids); |
| | | if (land.size()<=0) { |
| | | return R.status(landService.deleteLogic(Func.toLongList(ids))); |
| | | }else { |
| | | throw new org.springblade.core.log.exception.ServiceException(StringUtil.format("请先结束该地块正在种养品种")); |
| | | } |
| | | } |
| | | |
| | | /** |