修复【修改自提点信息时页面跳转到登录页】bug

master
sjl 5 years ago
parent 81212358c0
commit 0c938e5ef0

@ -94,7 +94,8 @@ public class PickAddrController {
@PreAuthorize("@pms.hasPermission('shop:pickAddr:update')")
public ResponseEntity<Void> update(@Valid @RequestBody PickAddr pickAddr){
PickAddr dbPickAddr = pickAddrService.getById(pickAddr.getAddrId());
if (!Objects.equals(dbPickAddr.getShopId(),pickAddr.getShopId())) {
if (!Objects.equals(dbPickAddr.getShopId(),SecurityUtils.getSysUser().getShopId())) {
throw new YamiShopBindException(YamiHttpStatus.UNAUTHORIZED);
}
pickAddrService.updateById(pickAddr);

Loading…
Cancel
Save