class DatabaseSetController {

    @RequestMapping(value = "/syncdb")
    public ServiceResult<String> syncdb(@Validated(AddDbSet.class) @RequestBody DatabaseSet dbset, @CurrentUser LoginUser user, Errors errors) throws Exception {
        DasGroup dasGroup = groupDao.getGroupByName(dbset.getGroupName());
        if (dasGroup == null) {
            return ServiceResult.fail("请先同步组！" + dbset.getGroupName());
        }
        dbset.setGroupId(dasGroup.getId());
        return addDbSet(dbset, user, errors);
    }

}