class PublicStrategyController {

    @RequestMapping(value = "/update", method = RequestMethod.PUT)
    public ServiceResult<String> update(@Validated(UpdatePublicStrategy.class) @RequestBody PublicStrategy publicStrategy, @CurrentUser LoginUser user, Errors errors) throws Exception {
        publicStrategy.setUpdate_user_no(user.getUserNo());
        ValidateResult validateRes = publicStrategyService.validatePermision(user, errors)
                .addAssert(() -> publicStrategyService.isNotExistByName(publicStrategy), publicStrategy.getName() + " 已存在！")
                .addAssert(() -> publicStrategyDao.updatePublicStrategy(publicStrategy) > 0, message.db_message_update_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
        // TODO return apolloPublicStrategy.replace(user, publicStrategy);
    }

}