|
|
|
@ -94,7 +94,8 @@ public class PickAddrController {
|
|
|
|
@PreAuthorize("@pms.hasPermission('shop:pickAddr:update')")
|
|
|
|
@PreAuthorize("@pms.hasPermission('shop:pickAddr:update')")
|
|
|
|
public ResponseEntity<Void> update(@Valid @RequestBody PickAddr pickAddr){
|
|
|
|
public ResponseEntity<Void> update(@Valid @RequestBody PickAddr pickAddr){
|
|
|
|
PickAddr dbPickAddr = pickAddrService.getById(pickAddr.getAddrId());
|
|
|
|
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);
|
|
|
|
throw new YamiShopBindException(YamiHttpStatus.UNAUTHORIZED);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pickAddrService.updateById(pickAddr);
|
|
|
|
pickAddrService.updateById(pickAddr);
|
|
|
|
|