|  |  |  | package com.zc.business.controller; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 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:export')") | 
					
						
							|  |  |  |     @Log(title = "信息发布管理记录", businessType = BusinessType.EXPORT) | 
					
						
							|  |  |  |     @PostMapping("/export") | 
					
						
							|  |  |  |     public void export(HttpServletResponse response, DcPublishManage dcPublishManage) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         List<DcPublishManage> list = dcPublishManageService.selectDcPublishManageList(dcPublishManage); | 
					
						
							|  |  |  |         ExcelUtil<DcPublishManage> util = new ExcelUtil<>(DcPublishManage.class); | 
					
						
							|  |  |  |         util.exportExcel(response, list, "信息发布管理记录数据"); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * 获取信息发布管理记录详细信息 | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     @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)); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |