| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | // type=2(寄存说明)detail不必填,其他类型必填 |
| | | if (!Constants.equalsInteger(category.getType(), Constants.TWO) && StringUtils.isBlank(category.getDetail())) { |
| | | if (!Constants.equalsInteger(category.getType(), Constants.TWO)&& !Constants.equalsInteger(category.getType(), Constants.FIVE) && StringUtils.isBlank(category.getDetail())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | validateByType(category); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | // type=2(寄存说明)detail不必填,其他类型必填 |
| | | if (!Constants.equalsInteger(category.getType(), Constants.TWO) && StringUtils.isBlank(category.getDetail())) { |
| | | if (!Constants.equalsInteger(category.getType(), Constants.TWO) && !Constants.equalsInteger(category.getType(), Constants.FIVE) && StringUtils.isBlank(category.getDetail())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | validateByType(category); |
| | |
| | | pageWrap.getModel().setDeleted(Constants.ZERO); |
| | | queryWrapper.selectAll(Category.class) |
| | | .selectAs(SystemUser::getUsername, Category::getUpdateUserName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,Category::getUpdateUser); |
| | | .select("c2.name", Category::getRelationName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,Category::getUpdateUser) |
| | | .leftJoin("category c2 on c2.id = t.relation_id"); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.eq(Category::getId, pageWrap.getModel().getId()); |
| | | } |