mirror of
https://github.com/dataease/dataease.git
synced 2026-06-17 21:08:31 +08:00
fix: 【ID1004129】【仪表板】一个用户取消收藏后其他收藏的用户也没有了
This commit is contained in:
@@ -26,12 +26,7 @@ public class StoreServer implements StoreApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(String storeId) {
|
||||
try {
|
||||
Long id = Long.parseLong(storeId);
|
||||
storeService.remove(id);
|
||||
} catch (Exception e) {
|
||||
storeService.removeByPanelId(storeId);
|
||||
}
|
||||
public void remove(String panelId) {
|
||||
storeService.removeByPanelId(panelId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,14 +34,15 @@ public class StoreService {
|
||||
}
|
||||
|
||||
public void removeByPanelId(String panelId) {
|
||||
Long userId = AuthUtils.getUser().getUserId();
|
||||
PanelStoreExample panelStoreExample = new PanelStoreExample();
|
||||
panelStoreExample.createCriteria().andPanelGroupIdEqualTo(panelId);
|
||||
panelStoreExample.createCriteria().andPanelGroupIdEqualTo(panelId).andUserIdEqualTo(userId);
|
||||
panelStoreMapper.deleteByExample(panelStoreExample);
|
||||
}
|
||||
|
||||
public void remove(Long storeId) {
|
||||
/*public void remove(Long storeId) {
|
||||
panelStoreMapper.deleteByPrimaryKey(storeId);
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 按照当前用户ID查询收藏仪表板
|
||||
|
||||
Reference in New Issue
Block a user