| | |
| | | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| | | import cn.iocoder.yudao.module.system.api.social.SocialClientApi; |
| | | import cn.iocoder.yudao.module.system.api.social.dto.SocialWxaSubscribeMessageSendReqDTO; |
| | | import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientPageReqVO; |
| | | import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientRespVO; |
| | | import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialClientSaveReqVO; |
| | |
| | | |
| | | @Resource |
| | | private SocialClientService socialClientService; |
| | | @Resource |
| | | private SocialClientApi socialClientApi; |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建社交客户端") |
| | |
| | | public CommonResult<PageResult<SocialClientRespVO>> getSocialClientPage(@Valid SocialClientPageReqVO pageVO) { |
| | | PageResult<SocialClientDO> pageResult = socialClientService.getSocialClientPage(pageVO); |
| | | return success(BeanUtils.toBean(pageResult, SocialClientRespVO.class)); |
| | | } |
| | | |
| | | @PostMapping("/send-subscribe-message") |
| | | @Operation(summary = "发送订阅消息") // 用于测试 |
| | | @PreAuthorize("@ss.hasPermission('system:social-client:query')") |
| | | public void sendSubscribeMessage(@RequestBody SocialWxaSubscribeMessageSendReqDTO reqDTO) { |
| | | socialClientApi.sendWxaSubscribeMessage(reqDTO); |
| | | } |
| | | |
| | | } |