li-keguo commented on issue #3412:
URL:
https://github.com/apache/incubator-shenyu/issues/3412#issuecomment-1136041248
hi ,maybe is not bug,
see:
``` org.apache.shenyu.admin.controller.AppAuthController#updateDetailPath```
```java
/**
* Update detail path.
*
* @param authPathWarpDTO the auth path warp dto
* @return the shenyu result
*/
@PostMapping("/updateDetailPath")
@RequiresPermissions("system:authen:editResourceDetails")
public ShenyuAdminResult updateDetailPath(@RequestBody @Valid final
AuthPathWarpDTO authPathWarpDTO) {
return appAuthService.updateDetailPath(authPathWarpDTO);
}
```
```
org.apache.shenyu.admin.service.impl.AppAuthServiceImpl#updateDetailPath```
```java
public ShenyuAdminResult updateDetailPath(final AuthPathWarpDTO
authPathWarpDTO) {
AppAuthDO appAuthDO =
appAuthMapper.selectById(authPathWarpDTO.getId());
if (Objects.isNull(appAuthDO)) {
return ShenyuAdminResult.error(AdminConstants.ID_NOT_EXIST);
}
List<AuthPathDTO> authPathDTOList =
authPathWarpDTO.getAuthPathDTOList();
if (CollectionUtils.isNotEmpty(authPathDTOList)) {
authPathMapper.deleteByAuthId(authPathWarpDTO.getId());
List<AuthPathDO> collect = authPathDTOList.stream()
.filter(Objects::nonNull)
.map(authPathDTO ->
AuthPathDO.create(authPathDTO.getPath(), appAuthDO.getId(),
authPathDTO.getAppName()))
.collect(Collectors.toList());
authPathMapper.batchSave(collect);
}
eventPublisher.publishEvent(new
DataChangedEvent(ConfigGroupEnum.APP_AUTH,
DataEventTypeEnum.UPDATE,
Lists.newArrayList(buildByEntity(appAuthDO))));
return ShenyuAdminResult.success();
}
```
```AuthPathWarpDTO#id``` is ``` AppAuthDO#id```,
It's just a naming error that doesn't make sense to read, can you optimize
it?
Your contributions are welcome~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]