|
@@ -3,7 +3,9 @@ package com.sooka.sponest.event.centereventteventcatalogue.controller;
|
|
|
import com.ruoyi.common.core.domain.R;
|
|
|
import com.ruoyi.common.core.utils.SpringUtils;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
+import com.ruoyi.common.core.utils.uuid.IdUtils;
|
|
|
import com.ruoyi.common.core.web.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
import com.ruoyi.system.api.RemoteDeptService;
|
|
@@ -11,6 +13,8 @@ import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCl
|
|
|
import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestEventTodayEventListBO;
|
|
|
import com.sooka.sponest.event.centereventteventcatalogue.domain.vo.VisuForestCloudMapVO;
|
|
|
import com.sooka.sponest.event.centereventteventcatalogue.service.ICenterEventViewService;
|
|
|
+import com.sooka.sponest.event.centereventteventcollect.domain.CentereventTEventCollect;
|
|
|
+import com.sooka.sponest.event.centereventteventcollect.service.ICentereventTEventCollectService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
@@ -37,6 +41,9 @@ public class CenterEventViewController extends BaseController {
|
|
|
@Autowired
|
|
|
private ICenterEventViewService centerEventViewService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ICentereventTEventCollectService centereventTEventCollectService;
|
|
|
+
|
|
|
@ApiOperation("事件状态、来源统计")
|
|
|
@PostMapping("/selectTodayEvents")
|
|
|
public R<VisuForestCloudTodayEventsBO> selectTodayEvents(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
|
|
@@ -166,4 +173,30 @@ public class CenterEventViewController extends BaseController {
|
|
|
public R getHousingConstructionEventList(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
|
|
|
return R.ok(centerEventViewService.getHousingConstructionEventList(visuForestCloudMapVO));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/getCollectList")
|
|
|
+ public TableDataInfo getCollectList(CentereventTEventCollect centereventTEventCollect){
|
|
|
+ startPage();
|
|
|
+ List<CentereventTEventCollect> list = centereventTEventCollectService.selectCentereventTEventCollectList(centereventTEventCollect);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/addCollect")
|
|
|
+ public AjaxResult addCollect(@RequestBody CentereventTEventCollect centereventTEventCollect){
|
|
|
+ centereventTEventCollect.setId(IdUtils.simpleUUID());
|
|
|
+ centereventTEventCollect.setSort("0");
|
|
|
+ if(StringUtils.isBlank(centereventTEventCollect.getUserId())){
|
|
|
+ centereventTEventCollect.setUserId(SecurityUtils.getUserId().toString());
|
|
|
+ }
|
|
|
+ if(centereventTEventCollectService.isCollect(centereventTEventCollect)){
|
|
|
+ return AjaxResult.error("您已收藏该事件");
|
|
|
+ }
|
|
|
+ return toAjax(centereventTEventCollectService.insertCentereventTEventCollect(centereventTEventCollect));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/deleteCollect")
|
|
|
+ public AjaxResult deleteCollect(@RequestBody CentereventTEventCollect centereventTEventCollect){
|
|
|
+ return toAjax(centereventTEventCollectService.deleteCentereventTEventCollectById(centereventTEventCollect.getId()));
|
|
|
+ }
|
|
|
}
|