wang-hao-jie
2022-03-10 ae32c3a7d77e2ed114555623c70e3fbd1d6aba59
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AreaController.java
@@ -62,11 +62,11 @@
    @ApiOperation(value = "编辑或更新数据")
    public Result<Area> saveOrUpdate(Area area) {
        QueryWrapper<Area> wrapper = new QueryWrapper<>();
        if (!area.getUserId().equals("0")){
            wrapper.eq("user_id",area.getUserId());
        if (StrUtil.isNotEmpty(area.getCarId())){
            wrapper.eq("car_id",area.getCarId());
            Area area1 = iAreaService.getOne(wrapper);
            if (area1 != null && !area.getId().equals(area1.getId())){
                return new ResultUtil<Area>().setErrorMsg("该配送员已被其他片区绑定,请先解绑");
                return new ResultUtil<Area>().setErrorMsg("该车辆已被其它片区绑定,请先解绑");
            }
        }