From a7904e8510c5989da4658fec059364c17c3edd61 Mon Sep 17 00:00:00 2001 From: 18356073052 <274131322@qq.com> Date: Wed, 30 Dec 2020 00:08:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=A4=E5=8F=91=E6=B6=88=E6=81=AF=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E4=BB=A3=E7=A0=81=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WeCustomerMessagePushController.java | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java b/linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java index 8212c21e..f3973b4d 100644 --- a/linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java +++ b/linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java @@ -6,9 +6,9 @@ import com.linkwechat.common.core.controller.BaseController; import com.linkwechat.common.core.domain.AjaxResult; import com.linkwechat.common.core.page.TableDataInfo; import com.linkwechat.common.enums.BusinessType; -import com.linkwechat.wecom.domain.WeCustomer; import com.linkwechat.wecom.domain.dto.message.CustomerMessagePushDto; import com.linkwechat.wecom.domain.vo.CustomerMessagePushVo; +import com.linkwechat.wecom.service.IWeCustomerMessageOriginalService; import com.linkwechat.wecom.service.IWeCustomerMessagePushService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -31,13 +31,15 @@ public class WeCustomerMessagePushController extends BaseController { @Autowired private IWeCustomerMessagePushService weCustomerMessagePushService; + @Autowired + private IWeCustomerMessageOriginalService weCustomerMessageOriginalService; /** * 新增群发消息发送 */ - @PreAuthorize("@ss.hasPermi('system:push:add')") + @PreAuthorize("@ss.hasPermi('customerMessagePush:push:add')") @Log(title = "新增群发消息发送", businessType = BusinessType.INSERT) @PostMapping(value = "add") - public AjaxResult add(@RequestBody CustomerMessagePushDto customerMessagePushDto) { + public AjaxResult add(@RequestBody CustomerMessagePushDto customerMessagePushDto) { try { weCustomerMessagePushService.addWeCustomerMessagePush(customerMessagePushDto); } catch (JsonProcessingException e) { @@ -51,16 +53,26 @@ public class WeCustomerMessagePushController extends BaseController { /** * 群发消息列表 */ - @PreAuthorize("@ss.hasPermi('system:push:list')") + @PreAuthorize("@ss.hasPermi('customerMessagePush:push:list')") @GetMapping(value = "/list") - public TableDataInfo list(@RequestParam(value = "sender",required = false) String sender - ,@RequestParam(value = "content",required = false) String content - ,@RequestParam(value = "pushType",required = false) String pushType - ,@RequestParam(value = "beginTime",required = false) String beginTime - ,@RequestParam(value = "endTime",required = false) String endTime) { + public TableDataInfo list(@RequestParam(value = "sender", required = false) String sender + , @RequestParam(value = "content", required = false) String content + , @RequestParam(value = "pushType", required = false) String pushType + , @RequestParam(value = "beginTime", required = false) String beginTime + , @RequestParam(value = "endTime", required = false) String endTime) { startPage(); - List list = weCustomerMessagePushService.customerMessagePushs(sender,content,pushType,beginTime,endTime); + List list = weCustomerMessagePushService.customerMessagePushs(sender, content, pushType, beginTime, endTime); return getDataTable(list); } + /** + * 群发消息详情 + */ + @PreAuthorize("@ss.hasPermi('customerMessagePush:push:view')") + @GetMapping(value = "/getInfo") + public AjaxResult getInfo(@RequestParam(value = "messageId") Long messageId) { + CustomerMessagePushVo customerMessagePushVo = weCustomerMessageOriginalService.CustomerMessagePushDetail(messageId); + return AjaxResult.success(customerMessagePushVo); + } + } -- GitLab