Refine search
@PreAuthorize(value = "@permissionValidator.hasOperateNamespacePermission(#appId, #namespaceName, #env)") @PutMapping(value = "/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules") public void updateBranchRules(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName, @PathVariable String namespaceName, @PathVariable String branchName, @RequestBody GrayReleaseRuleDTO rules) { namespaceBranchService .updateBranchGrayRules(appId, Env.valueOf(env), clusterName, namespaceName, branchName, rules); }
@PutMapping("/{formId}/{id}") @ApiOperation("根据主键修改") @Authorize(action = Permission.ACTION_UPDATE) public ResponseMessage<Map<String, Object>> updateById(@PathVariable String formId, @PathVariable String id, @RequestBody Map<String, Object> param) { return ResponseMessage.ok(dynamicFormOperationService.updateById(formId, id, param)); }
@PutMapping("/user-token/token/{token}/{state}") @ApiOperation("根据令牌更新用户令牌状态") @Authorize(action = Permission.ACTION_UPDATE) public ResponseMessage<Void> changeTokenState(@PathVariable String token, @PathVariable TokenState state) { userTokenManager.changeTokenState(token, state); return ok(); }
@PutMapping(path = "/person/{id}", consumes = "application/xml") public void consumes(@RequestBody String text) { }
@PutMapping("/favorites/{favoriteId}") public void toTop(@PathVariable long favoriteId) { favoriteService.adjustFavoriteToFirst(favoriteId); }
@PutMapping @ApiOperation("保存用户自定义的仪表盘配置") public ResponseMessage<Void> saveUserDashBoardConfig(@RequestBody List<String> configIdList, Authentication authentication) { UserSettingEntity settingEntity = userSettingService.selectByUser(authentication.getUser().getId(), "dashboard-config", "current"); if (settingEntity == null) { settingEntity = userSettingService.createEntity(); settingEntity.setUserId(authentication.getUser().getId()); settingEntity.setKey("dashboard-config"); settingEntity.setSettingId("current"); } settingEntity.setSetting(JSON.toJSONString(configIdList)); userSettingService.saveOrUpdate(settingEntity); return ResponseMessage.ok(); } }
@PutMapping("/user-token/check") @ApiOperation("检查所有已过期的token并移除") @Authorize(action = Permission.ACTION_UPDATE) public ResponseMessage<Boolean> checkExpiredToken() { userTokenManager.checkExpiredToken(); return ok(true); }
@PutMapping(path = "/users") public void saveUser() { } }
@Override public void process(Object annotation, OperationGenerator operationGenerator) { PutMapping mappingAnnotation = (PutMapping) annotation; Operation operation = operationGenerator.getOperation(); // path/value是等同的 this.processPath(mappingAnnotation.path(), operationGenerator); this.processPath(mappingAnnotation.value(), operationGenerator); this.processMethod(RequestMethod.PUT, operationGenerator); this.processConsumes(mappingAnnotation.consumes(), operation); this.processProduces(mappingAnnotation.produces(), operation); if (StringUtils.isEmpty(operationGenerator.getHttpMethod()) && StringUtils.isEmpty(operationGenerator.getSwaggerGenerator().getHttpMethod())) { throw new Error("HttpMethod must not both be empty in class and method"); } } }
@PutMapping("/{formId}") @ApiOperation("动态修改") @Authorize(action = Permission.ACTION_UPDATE) public ResponseMessage<Integer> dynamicUpdate(@PathVariable String formId, @RequestBody UpdateParamEntity<Map<String, Object>> paramEntity) { return ResponseMessage.ok(dynamicFormOperationService.update(formId, paramEntity)); }
@PutMapping("/user-token/user/{userId}/{state}") @ApiOperation("根据用户id更新用户令牌状态") @Authorize(action = Permission.ACTION_UPDATE) public ResponseMessage<Void> changeUserState(@PathVariable String userId, @PathVariable TokenState state) { userTokenManager.changeUserState(userId, state); return ok(); }
@PutMapping("/foo") public void set(@RequestBody String value) { stringRedisTemplate.opsForValue().set("foo", value); }
@Transactional @PutMapping("/releases/{releaseId}/rollback") public void rollback(@PathVariable("releaseId") long releaseId, @RequestParam("operator") String operator) { Release release = releaseService.rollback(releaseId, operator); String appId = release.getAppId(); String clusterName = release.getClusterName(); String namespaceName = release.getNamespaceName(); //send release message messageSender.sendMessage(ReleaseMessageKeyGenerator.generate(appId, clusterName, namespaceName), Topics.APOLLO_RELEASE_TOPIC); }
@PutMapping("/me") @ApiOperation("修改个人信息") @Authorize(merge = false) public ResponseMessage<String> updateMePersonInfo(@RequestBody PersonAuthBindEntity bindEntity) { PersonnelAuthentication authorization = PersonnelAuthentication .current() .orElseThrow(NotFoundException::new); PersonAuthBindEntity old = personService .selectAuthBindByPk(authorization.getPersonnel().getId()); bindEntity.setUserId(old.getUserId()); bindEntity.setId(old.getId()); bindEntity.setPositionIds(null); if (bindEntity.getPersonUser() != null) { bindEntity.getPersonUser().setUsername(old.getPersonUser().getUsername()); } personService.updateByPk(bindEntity); return ResponseMessage.ok(); }
@Authorize(merge = false) @PutMapping(path = "/password") @ApiOperation("修改当前登录用户的密码") public ResponseMessage<Void> updateLoginUserPassword(@RequestParam String password, @RequestParam String oldPassword) { Authentication authentication = Authentication.current().orElseThrow(UnAuthorizedException::new); getService().updatePassword(authentication.getUser().getId(), oldPassword, password); return ok(); }
@PutMapping("/put") public void put() { }
@PutMapping("/apps/{appId:.+}") public void update(@PathVariable String appId, @RequestBody App app) { if (!Objects.equals(appId, app.getAppId())) { throw new BadRequestException("The App Id of path variable and request body is different"); } appService.update(app); }
@ApiOperation(value = "更新用户", notes = "根据用户id更新用户") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "用户id", required = true, dataType = "Long", paramType = "path"), @ApiImplicitParam(name = "user", value = "用户实体", required = true, dataType = "User") }) @PutMapping("/{id}") public @ResponseBody Map<String, Object> updateUser(@PathVariable(value = "id") Long id, @RequestBody User user) { Map<String, Object> map = new HashMap<>(); map.put("result", "success"); return map; }
@PutMapping("/{id}/disable") @Authorize(action = Permission.ACTION_DISABLE) @ApiOperation("禁用机构") public ResponseMessage<Boolean> disable(@PathVariable String id) { organizationalService.disable(id); return ResponseMessage.ok(); }
/** * 编辑 * * @param sysDept 实体 * @return success/false */ @PutMapping public Boolean edit(@RequestBody SysDept sysDept) { sysDept.setUpdateTime(new Date()); return sysDeptService.updateDeptById(sysDept); } }