class GroupController {

    @RequestMapping(value = {"", "/", "/update"}, method = RequestMethod.PUT)
    public ServiceResult<String> update(@Validated(UpdateDalGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors) throws Exception {
        group.setUpdate_user_no(user.getUserNo());
        ValidateResult validateRes = groupService.validatePermision(user, errors)
                .addAssert(() -> null != groupDao.getDalGroupById(group.getId()), "该组不存在!")
                .addAssert(() -> groupService.isNotExistByName(group), "组 : " + group.getGroup_name() + " 已存在!")
                .addAssert(() -> groupService.updateDalGroup(user, group), message.db_message_update_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}