class GroupController {

    @RequestMapping(value = {"", "/", "/add"}, method = RequestMethod.POST)
    public ServiceResult<String> add(@Validated(AddDalGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors) throws Exception {
        group.setUpdate_user_no(user.getUserNo());
        ValidateResult validateRes = groupService.validatePermision(user, errors)
                .addAssert(() -> groupService.isNotExistInProjectAndGroup(group.getGroup_name()), "已存在!且组名和项目名不能重复！")
                .addAssert(() -> groupService.addDalGroup(user, group), message.db_message_add_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}