济菏高速数据中心代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

172 lines
6.5 KiB

package com.zc.business.controller;
import java.util.HashMap;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.zc.business.domain.DcPublishManage;
import com.zc.business.service.IDcPublishManageService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 信息发布管理记录Controller
*
* @author ruoyi
* @date 2024-04-19
*/
@RestController
@RequestMapping("/business/manage")
public class DcPublishManageController extends BaseController
{
@Autowired
private IDcPublishManageService dcPublishManageService;
/**
* 查询信息发布管理记录列表
*/
@PreAuthorize("@ss.hasPermi('business:manage:list')")
@GetMapping("/list")
public TableDataInfo list(DcPublishManage dcPublishManage)
{
startPage();
List<DcPublishManage> list = dcPublishManageService.selectDcPublishManageList(dcPublishManage);
return getDataTable(list);
}
/**
* 查询事件发布详情,传参事件id
*/
@PreAuthorize("@ss.hasPermi('business:manage:list')")
@GetMapping("/listEvent")
public AjaxResult listEvent(DcPublishManage dcPublishManage)
{
if (dcPublishManage.getEventId()==null|| StringUtils.isBlank(dcPublishManage.getEventId())){
return AjaxResult.error("参数错误");
}
return AjaxResult.success(dcPublishManageService.selectEventDcPublishManageList(dcPublishManage));
}
/**
* 获取信息发布管理记录详细信息
*/
@PreAuthorize("@ss.hasPermi('business:manage:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(dcPublishManageService.selectDcPublishManageById(id));
}
/**
* 新增信息发布管理记录
*/
@PreAuthorize("@ss.hasPermi('business:manage:add')")
@Log(title = "信息发布管理记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcPublishManage dcPublishManage)
{
return toAjax(dcPublishManageService.insertDcPublishManage(dcPublishManage));
}
/**
* 修改信息发布管理记录
*/
@PreAuthorize("@ss.hasPermi('business:manage:edit')")
@Log(title = "信息发布管理记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcPublishManage dcPublishManage)
{
return toAjax(dcPublishManageService.updateDcPublishManage(dcPublishManage));
}
/**
* 删除信息发布管理记录
*/
@PreAuthorize("@ss.hasPermi('business:manage:remove')")
@Log(title = "信息发布管理记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcPublishManageService.deleteDcPublishManageByIds(ids));
}
//统计服务,今日发布渠道分析
@PostMapping("/statisticsPublishManage")
public AjaxResult statisticsPublishManage()
{
return AjaxResult.success(dcPublishManageService.statisticsPublishManage());
}
//统计服务,今日发布事件类型分析
@PostMapping("/eventTypePublishManage")
public AjaxResult eventTypePublishManage()
{
return AjaxResult.success(dcPublishManageService.eventTypePublishManage());
}
//统计服务,今日发布趋势分析
@PostMapping("/trendsPublishManage")
public AjaxResult releaseTrendsPublishManage()
{
return AjaxResult.success(dcPublishManageService.releaseTrendsPublishManage());
}
//统计服务,月发布渠道趋势分析
@PostMapping("/monthTrendsPublishManage")
public AjaxResult monthTrendsPublishManage(@RequestBody DcPublishManage dcPublishManage)
{
if (dcPublishManage==null||dcPublishManage.getPublishTime()==null){
return AjaxResult.error("参数错误");
}
return AjaxResult.success(dcPublishManageService.monthTrendsPublishManage(dcPublishManage));
}
//统计服务,事件类型对应的发布渠道发布的数量
@PostMapping("/eventTypePublishManageSum")
public AjaxResult eventTypePublishManageSum()
{
return AjaxResult.success(dcPublishManageService.eventTypePublishManageSum());
}
//统计服务,事件类型对应的发布渠道发布的数量按月统计
@PostMapping("/eventTypePublishManageMonth")
public AjaxResult eventTypePublishManageMonth(@RequestBody DcPublishManage dcPublishManage)
{
if (dcPublishManage==null||dcPublishManage.getPublishTime()==null){
return AjaxResult.error("参数错误");
}
return AjaxResult.success(dcPublishManageService.eventTypePublishManageMonth(dcPublishManage));
}
/**
* 公众服务统计查询
*/
@PostMapping("/statisticsList")
public TableDataInfo statisticsList(@RequestBody DcPublishManage dcPublishManage)
{
startPage();
List<DcPublishManage> list = dcPublishManageService.selectDcPublishManageStatistics(dcPublishManage);
return getDataTable(list);
}
/**
* 公众服务统计导出
*/
@PreAuthorize("@ss.hasPermi('business:manage:export')")
@Log(title = "信息发布管理记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcPublishManage dcPublishManage)
{
List<DcPublishManage> list = dcPublishManageService.selectDcPublishManageStatistics(dcPublishManage);
ExcelUtil<DcPublishManage> util = new ExcelUtil<>(DcPublishManage.class);
util.exportExcel(response, list, "信息发布管理记录数据");
}
}