|
@@ -681,6 +681,12 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
|
|
|
@Override
|
|
|
public Boolean shareByUrl(ShareParam shareParam) {
|
|
|
+ //校验主绑人
|
|
|
+ DevInfo devInfo = devInfoService.getById(shareParam.getDevId());
|
|
|
+ if (!Objects.equals(shareParam.getSharerUserId(), devInfo.getUserId())) {
|
|
|
+ throw new BizException(ErrorEnum.USER_NO_PERMISSION.getErrorCode(), ErrorEnum.USER_NO_PERMISSION.getErrorMessage());
|
|
|
+ }
|
|
|
+
|
|
|
// 1. 验证是否存在未处理的分享
|
|
|
DevShare notDealShare = devShareService.queryNotDeal(shareParam.getSharerUserId(), shareParam.getSharedUserId(), shareParam.getDevId());
|
|
|
if (notDealShare != null) {
|