|
@@ -234,22 +234,24 @@ public class SysUserController extends AbstractController {
|
|
Long currentUserId = getUserId();
|
|
Long currentUserId = getUserId();
|
|
|
|
|
|
List<SceneEntity> scenes = sceneService.queryByUserId(currentUserId);
|
|
List<SceneEntity> scenes = sceneService.queryByUserId(currentUserId);
|
|
- scenes.parallelStream().filter(scene -> scene.getSceneUrl().contains("www.4dkankan.com")
|
|
|
|
- || scene.getSceneUrl().contains("test.4dkankan.com")).forEach(scene -> {
|
|
|
|
- // 四维看看场景数据解绑
|
|
|
|
- scene.setCreateUserId(null);
|
|
|
|
- sceneService.update(scene, false);
|
|
|
|
- // 四维看看场景直播间数据解绑
|
|
|
|
- BrandEntity brandEntity = brandService.queryByScene(scene.getSceneNum());
|
|
|
|
- if(ObjectUtils.isEmpty(brandEntity)){
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- brandService.unbindUser(null,brandEntity.getId().intValue());
|
|
|
|
- // 删除直播间
|
|
|
|
- brandService.delete(brandEntity.getId().intValue());
|
|
|
|
- // 直播间商品删除
|
|
|
|
- goodsService.deleteByBrandId(brandEntity.getId());
|
|
|
|
- });
|
|
|
|
|
|
+ scenes.parallelStream().filter(scene -> !ObjectUtils.isEmpty(scene.getSceneUrl()))
|
|
|
|
+ .filter(scene -> scene.getSceneUrl().contains("www.4dkankan.com")
|
|
|
|
+ || scene.getSceneUrl().contains("test.4dkankan.com"))
|
|
|
|
+ .forEach(scene -> {
|
|
|
|
+ // 四维看看场景数据解绑
|
|
|
|
+ scene.setCreateUserId(null);
|
|
|
|
+ sceneService.update(scene, false);
|
|
|
|
+ // 四维看看场景直播间数据解绑
|
|
|
|
+ BrandEntity brandEntity = brandService.queryByScene(scene.getSceneNum());
|
|
|
|
+ if (ObjectUtils.isEmpty(brandEntity)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ brandService.unbindUser(null, brandEntity.getId().intValue());
|
|
|
|
+ // 删除直播间
|
|
|
|
+ brandService.delete(brandEntity.getId().intValue());
|
|
|
|
+ // 直播间商品删除
|
|
|
|
+ goodsService.deleteByBrandId(brandEntity.getId());
|
|
|
|
+ });
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
|
|
|