rk
7 小时以前 9f8b3700ffbcc616a97e7ee2ea283ef4df3d666a
server/services/src/main/java/com/doumee/service/business/impl/CategoryServiceImpl.java
@@ -61,7 +61,7 @@
            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);
@@ -107,7 +107,7 @@
            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);
@@ -172,7 +172,9 @@
        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());
        }