forked from github/dataease
fix: 【ID1004129】【仪表板】一个用户取消收藏后其他收藏的用户也没有了
This commit is contained in:
parent
d2ac09d60e
commit
03f43fde95
@ -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查询收藏仪表板
|
||||
|
@ -67,7 +67,7 @@ export default {
|
||||
return data
|
||||
},
|
||||
remove(row) {
|
||||
deleteEnshrine(row.storeId).then(res => {
|
||||
deleteEnshrine(row.panelGroupId).then(res => {
|
||||
this.initData()
|
||||
this.panelInfo && this.panelInfo.id && row.panelGroupId === this.panelInfo.id && this.setMainNull()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user