|
@ -1,7 +1,11 @@ |
|
|
package com.zc.business.controller; |
|
|
package com.zc.business.controller; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
@ -38,8 +42,8 @@ public class DcPublishingChannelsController extends BaseController |
|
|
* 查询发布渠道列表 |
|
|
* 查询发布渠道列表 |
|
|
*/ |
|
|
*/ |
|
|
@PreAuthorize("@ss.hasPermi('business:channels:list')") |
|
|
@PreAuthorize("@ss.hasPermi('business:channels:list')") |
|
|
@GetMapping("/list") |
|
|
@PostMapping("/list") |
|
|
public TableDataInfo list(DcPublishingChannels dcPublishingChannels) |
|
|
public TableDataInfo list(@RequestBody DcPublishingChannels dcPublishingChannels) |
|
|
{ |
|
|
{ |
|
|
startPage(); |
|
|
startPage(); |
|
|
List<DcPublishingChannels> list = dcPublishingChannelsService.selectDcPublishingChannelsList(dcPublishingChannels); |
|
|
List<DcPublishingChannels> list = dcPublishingChannelsService.selectDcPublishingChannelsList(dcPublishingChannels); |
|
@ -114,4 +118,32 @@ public class DcPublishingChannelsController extends BaseController |
|
|
{ |
|
|
{ |
|
|
return toAjax(dcPublishingChannelsService.deleteDcPublishingChannelsByIds(ids)); |
|
|
return toAjax(dcPublishingChannelsService.deleteDcPublishingChannelsByIds(ids)); |
|
|
} |
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
* 修改启用停用 |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("/updateEnabled") |
|
|
|
|
|
public AjaxResult updateEnabled(@RequestBody DcPublishingChannels dcPublishingChannels) |
|
|
|
|
|
{ |
|
|
|
|
|
Integer enabled = dcPublishingChannels.getEnabled();//状态
|
|
|
|
|
|
if (enabled==null){ |
|
|
|
|
|
return AjaxResult.error("参数错误"); |
|
|
|
|
|
} |
|
|
|
|
|
if (enabled==2){ //启用状态,修改启用时间
|
|
|
|
|
|
dcPublishingChannels.setEnableDate(DateUtils.getNowDate()); |
|
|
|
|
|
} |
|
|
|
|
|
return toAjax(dcPublishingChannelsService.updateEnabled(dcPublishingChannels)); |
|
|
|
|
|
} |
|
|
|
|
|
//事件调度处置事件推送发布渠道
|
|
|
|
|
|
@PostMapping("/eventPublishChannels") |
|
|
|
|
|
public AjaxResult eventPublishChannels(@RequestBody HashMap map) |
|
|
|
|
|
{ |
|
|
|
|
|
if (map==null||map.size()==0){ |
|
|
|
|
|
return AjaxResult.error("参数错误"); |
|
|
|
|
|
} |
|
|
|
|
|
String eventId = map.get("eventId").toString(); |
|
|
|
|
|
if (StringUtils.isBlank(eventId)){ |
|
|
|
|
|
return AjaxResult.error("参数错误"); |
|
|
|
|
|
} |
|
|
|
|
|
return AjaxResult.success(dcPublishingChannelsService.eventPublishChannels(eventId)); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|