From 70adfe8fe5bf9e62021a0677c2f86ddb2a02dc31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=9A=E6=B4=B2?= <1317439587@qq.com> Date: Fri, 3 Jun 2022 09:42:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=B7=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/ruoyi-vue-pro.sql | 1093 ++++++++++++++--- .../module/mp/enums/ErrorCodeConstants.java | 1 + .../yudao/module/mp/config/WxMpConfig.java | 44 +- .../module/mp/config/WxMpProperties.java | 47 + .../admin/account/WxAccountController.java | 4 +- .../admin/account/vo/WxAccountBaseVO.java | 4 +- .../account/vo/WxAccountCreateReqVO.java | 2 +- .../admin/account/vo/WxAccountExcelVO.java | 5 +- .../account/vo/WxAccountExportReqVO.java | 3 +- .../admin/account/vo/WxAccountPageReqVO.java | 2 +- .../admin/account/vo/WxAccountRespVO.java | 4 +- .../account/vo/WxAccountUpdateReqVO.java | 2 +- .../accountfans/WxAccountFansController.java | 4 +- .../accountfans/vo/WxAccountFansBaseVO.java | 3 +- .../vo/WxAccountFansCreateReqVO.java | 2 +- .../accountfans/vo/WxAccountFansExcelVO.java | 3 +- .../vo/WxAccountFansExportReqVO.java | 3 +- .../vo/WxAccountFansPageReqVO.java | 2 +- .../accountfans/vo/WxAccountFansRespVO.java | 2 +- .../vo/WxAccountFansUpdateReqVO.java | 2 +- .../WxAccountFansTagController.java | 103 ++ .../vo/WxAccountFansTagBaseVO.java | 22 + .../vo/WxAccountFansTagCreateReqVO.java | 12 + .../vo/WxAccountFansTagExcelVO.java | 32 + .../vo/WxAccountFansTagExportReqVO.java | 33 + .../vo/WxAccountFansTagPageReqVO.java | 36 + .../vo/WxAccountFansTagRespVO.java | 21 + .../vo/WxAccountFansTagUpdateReqVO.java | 18 + .../admin/fansmsg/WxFansMsgController.java | 103 ++ .../admin/fansmsg/vo/WxFansMsgBaseVO.java | 46 + .../fansmsg/vo/WxFansMsgCreateReqVO.java | 12 + .../admin/fansmsg/vo/WxFansMsgExcelVO.java | 56 + .../fansmsg/vo/WxFansMsgExportReqVO.java | 57 + .../admin/fansmsg/vo/WxFansMsgPageReqVO.java | 60 + .../admin/fansmsg/vo/WxFansMsgRespVO.java | 21 + .../fansmsg/vo/WxFansMsgUpdateReqVO.java | 18 + .../fansmsgres/WxFansMsgResController.java | 103 ++ .../fansmsgres/vo/WxFansMsgResBaseVO.java | 19 + .../vo/WxFansMsgResCreateReqVO.java | 12 + .../fansmsgres/vo/WxFansMsgResExcelVO.java | 29 + .../vo/WxFansMsgResExportReqVO.java | 30 + .../fansmsgres/vo/WxFansMsgResPageReqVO.java | 33 + .../fansmsgres/vo/WxFansMsgResRespVO.java | 21 + .../vo/WxFansMsgResUpdateReqVO.java | 18 + .../admin/fanstag/WxFansTagController.java | 103 ++ .../admin/fanstag/vo/WxFansTagBaseVO.java | 22 + .../fanstag/vo/WxFansTagCreateReqVO.java | 12 + .../admin/fanstag/vo/WxFansTagExcelVO.java | 32 + .../fanstag/vo/WxFansTagExportReqVO.java | 33 + .../admin/fanstag/vo/WxFansTagPageReqVO.java | 36 + .../admin/fanstag/vo/WxFansTagRespVO.java | 21 + .../fanstag/vo/WxFansTagUpdateReqVO.java | 18 + .../mediaupload/WxMediaUploadController.java | 103 ++ .../mediaupload/vo/WxMediaUploadBaseVO.java | 28 + .../vo/WxMediaUploadCreateReqVO.java | 12 + .../mediaupload/vo/WxMediaUploadExcelVO.java | 38 + .../vo/WxMediaUploadExportReqVO.java | 39 + .../vo/WxMediaUploadPageReqVO.java | 42 + .../mediaupload/vo/WxMediaUploadRespVO.java | 21 + .../vo/WxMediaUploadUpdateReqVO.java | 18 + .../admin/menu/WxMenuController.java | 103 ++ .../admin/menu/vo/WxMenuBaseVO.java | 43 + .../admin/menu/vo/WxMenuCreateReqVO.java | 12 + .../admin/menu/vo/WxMenuExcelVO.java | 53 + .../admin/menu/vo/WxMenuExportReqVO.java | 54 + .../admin/menu/vo/WxMenuPageReqVO.java | 57 + .../admin/menu/vo/WxMenuRespVO.java | 21 + .../admin/menu/vo/WxMenuUpdateReqVO.java | 18 + .../WxNewsArticleItemController.java | 103 ++ .../vo/WxNewsArticleItemBaseVO.java | 52 + .../vo/WxNewsArticleItemCreateReqVO.java | 12 + .../vo/WxNewsArticleItemExcelVO.java | 62 + .../vo/WxNewsArticleItemExportReqVO.java | 63 + .../vo/WxNewsArticleItemPageReqVO.java | 66 + .../vo/WxNewsArticleItemRespVO.java | 21 + .../vo/WxNewsArticleItemUpdateReqVO.java | 18 + .../WxNewsTemplateController.java | 103 ++ .../newstemplate/vo/WxNewsTemplateBaseVO.java | 25 + .../vo/WxNewsTemplateCreateReqVO.java | 12 + .../vo/WxNewsTemplateExcelVO.java | 35 + .../vo/WxNewsTemplateExportReqVO.java | 36 + .../vo/WxNewsTemplatePageReqVO.java | 39 + .../newstemplate/vo/WxNewsTemplateRespVO.java | 21 + .../vo/WxNewsTemplateUpdateReqVO.java | 18 + .../receivetext/WxReceiveTextController.java | 103 ++ .../receivetext/vo/WxReceiveTextBaseVO.java | 25 + .../vo/WxReceiveTextCreateReqVO.java | 12 + .../receivetext/vo/WxReceiveTextExcelVO.java | 35 + .../vo/WxReceiveTextExportReqVO.java | 36 + .../vo/WxReceiveTextPageReqVO.java | 39 + .../receivetext/vo/WxReceiveTextRespVO.java | 21 + .../vo/WxReceiveTextUpdateReqVO.java | 18 + .../WxSubscribeTextController.java | 103 ++ .../vo/WxSubscribeTextBaseVO.java | 22 + .../vo/WxSubscribeTextCreateReqVO.java | 12 + .../vo/WxSubscribeTextExcelVO.java | 32 + .../vo/WxSubscribeTextExportReqVO.java | 33 + .../vo/WxSubscribeTextPageReqVO.java | 36 + .../vo/WxSubscribeTextRespVO.java | 21 + .../vo/WxSubscribeTextUpdateReqVO.java | 18 + .../WxTextTemplateController.java | 103 ++ .../texttemplate/vo/WxTextTemplateBaseVO.java | 19 + .../vo/WxTextTemplateCreateReqVO.java | 12 + .../vo/WxTextTemplateExcelVO.java | 29 + .../vo/WxTextTemplateExportReqVO.java | 30 + .../vo/WxTextTemplatePageReqVO.java | 33 + .../texttemplate/vo/WxTextTemplateRespVO.java | 21 + .../vo/WxTextTemplateUpdateReqVO.java | 18 + .../mp/convert/account/WxAccountConvert.java | 8 +- .../accountfans/WxAccountFansConvert.java | 8 +- .../WxAccountFansTagConvert.java | 34 + .../mp/convert/fansmsg/WxFansMsgConvert.java | 34 + .../fansmsgres/WxFansMsgResConvert.java | 34 + .../mp/convert/fanstag/WxFansTagConvert.java | 34 + .../mediaupload/WxMediaUploadConvert.java | 34 + .../module/mp/convert/menu/WxMenuConvert.java | 34 + .../WxNewsArticleItemConvert.java | 34 + .../newstemplate/WxNewsTemplateConvert.java | 34 + .../receivetext/WxReceiveTextConvert.java | 34 + .../subscribetext/WxSubscribeTextConvert.java | 34 + .../texttemplate/WxTextTemplateConvert.java | 34 + .../dal/dataobject/account/WxAccountDO.java | 12 +- .../accountfanstag/WxAccountFansTagDO.java | 43 + .../dal/dataobject/fansmsg/WxFansMsgDO.java | 75 ++ .../dataobject/fansmsgres/WxFansMsgResDO.java | 39 + .../dal/dataobject/fanstag/WxFansTagDO.java | 43 + .../mediaupload/WxMediaUploadDO.java | 51 + .../mp/dal/dataobject/menu/WxMenuDO.java | 71 ++ .../newsarticleitem/WxNewsArticleItemDO.java | 83 ++ .../newstemplate/WxNewsTemplateDO.java | 47 + .../receivetext/WxReceiveTextDO.java | 47 + .../subscribetext/WxSubscribeTextDO.java | 43 + .../texttemplate/WxTextTemplateDO.java | 39 + .../mp/dal/mysql/account/WxAccountMapper.java | 8 +- .../accountfans/WxAccountFansMapper.java | 4 +- .../WxAccountFansTagMapper.java | 38 + .../mp/dal/mysql/fansmsg/WxFansMsgMapper.java | 54 + .../mysql/fansmsgres/WxFansMsgResMapper.java | 36 + .../mp/dal/mysql/fanstag/WxFansTagMapper.java | 38 + .../mediaupload/WxMediaUploadMapper.java | 42 + .../mp/dal/mysql/menu/WxMenuMapper.java | 52 + .../WxNewsArticleItemMapper.java | 58 + .../newstemplate/WxNewsTemplateMapper.java | 40 + .../receivetext/WxReceiveTextMapper.java | 40 + .../subscribetext/WxSubscribeTextMapper.java | 38 + .../texttemplate/WxTextTemplateMapper.java | 36 + .../yudao/module/mp/handler/MsgHandler.java | 134 +- .../module/mp/handler/SubscribeHandler.java | 39 +- .../module/mp/handler/UnsubscribeHandler.java | 2 +- .../WxConfigDataRefreshConsumer.java | 0 .../WxConfigDataRefreshMessage.java | 0 .../{dict => }/WxMpConfigDataProducer.java | 0 .../mp/service/account/WxAccountService.java | 8 +- .../service/account/WxAccountServiceImpl.java | 8 +- .../accountfans/WxAccountFansService.java | 8 +- .../accountfans/WxAccountFansServiceImpl.java | 8 +- .../WxAccountFansTagService.java | 74 ++ .../WxAccountFansTagServiceImpl.java | 106 ++ .../mp/service/fansmsg/WxFansMsgService.java | 71 ++ .../service/fansmsg/WxFansMsgServiceImpl.java | 85 ++ .../fansmsgres/WxFansMsgResService.java | 71 ++ .../fansmsgres/WxFansMsgResServiceImpl.java | 85 ++ .../mp/service/fanstag/WxFansTagService.java | 71 ++ .../service/fanstag/WxFansTagServiceImpl.java | 85 ++ .../mediaupload/WxMediaUploadService.java | 71 ++ .../mediaupload/WxMediaUploadServiceImpl.java | 85 ++ .../module/mp/service/menu/WxMenuService.java | 71 ++ .../mp/service/menu/WxMenuServiceImpl.java | 85 ++ .../WxNewsArticleItemService.java | 71 ++ .../WxNewsArticleItemServiceImpl.java | 85 ++ .../newstemplate/WxNewsTemplateService.java | 71 ++ .../WxNewsTemplateServiceImpl.java | 85 ++ .../receivetext/WxReceiveTextService.java | 71 ++ .../receivetext/WxReceiveTextServiceImpl.java | 85 ++ .../subscribetext/WxSubscribeTextService.java | 81 ++ .../WxSubscribeTextServiceImpl.java | 90 ++ .../texttemplate/WxTextTemplateService.java | 71 ++ .../WxTextTemplateServiceImpl.java | 85 ++ .../src/main/resources/application-dev.yaml | 8 + .../src/api/wechatMp/wxAccountFansTag.js | 54 + yudao-ui-admin/src/api/wechatMp/wxFansMsg.js | 54 + .../src/api/wechatMp/wxFansMsgRes.js | 54 + yudao-ui-admin/src/api/wechatMp/wxFansTag.js | 54 + .../src/api/wechatMp/wxMediaUpload.js | 54 + yudao-ui-admin/src/api/wechatMp/wxMenu.js | 54 + .../src/api/wechatMp/wxNewsArticleItem.js | 54 + .../src/api/wechatMp/wxNewsTemplate.js | 54 + .../src/api/wechatMp/wxReceiveText.js | 54 + .../src/api/wechatMp/wxSubscribeText.js | 54 + .../src/api/wechatMp/wxTextTemplate.js | 54 + .../src/views/wechatMp/wxAccount/index.vue | 32 +- .../views/wechatMp/wxAccountFansTag/index.vue | 245 ++++ .../src/views/wechatMp/wxFansMsg/index.vue | 318 +++++ .../src/views/wechatMp/wxFansMsgRes/index.vue | 235 ++++ .../src/views/wechatMp/wxFansTag/index.vue | 245 ++++ .../views/wechatMp/wxMediaUpload/index.vue | 268 ++++ .../src/views/wechatMp/wxMenu/index.vue | 314 +++++ .../wechatMp/wxNewsArticleItem/index.vue | 340 +++++ .../views/wechatMp/wxNewsTemplate/index.vue | 254 ++++ .../views/wechatMp/wxReceiveText/index.vue | 258 ++++ .../views/wechatMp/wxSubscribeText/index.vue | 249 ++++ .../views/wechatMp/wxTextTemplate/index.vue | 235 ++++ 202 files changed, 11279 insertions(+), 348 deletions(-) create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/config/WxMpProperties.java rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/account/WxAccountController.java (97%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/account/vo/WxAccountBaseVO.java (87%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/account/vo/WxAccountCreateReqVO.java (79%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/account/vo/WxAccountExcelVO.java (88%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/account/vo/WxAccountExportReqVO.java (89%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/account/vo/WxAccountPageReqVO.java (94%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/account/vo/WxAccountRespVO.java (85%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/account/vo/WxAccountUpdateReqVO.java (86%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/accountfans/WxAccountFansController.java (97%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/accountfans/vo/WxAccountFansBaseVO.java (94%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/accountfans/vo/WxAccountFansCreateReqVO.java (79%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/accountfans/vo/WxAccountFansExcelVO.java (93%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/accountfans/vo/WxAccountFansExportReqVO.java (94%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/accountfans/vo/WxAccountFansPageReqVO.java (96%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/accountfans/vo/WxAccountFansRespVO.java (86%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/{ => controller}/admin/accountfans/vo/WxAccountFansUpdateReqVO.java (86%) create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/WxAccountFansTagController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/WxFansMsgController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/WxFansMsgResController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/WxFansTagController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/WxMediaUploadController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/WxMenuController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/WxNewsArticleItemController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/WxNewsTemplateController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplatePageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/WxReceiveTextController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/WxSubscribeTextController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextPageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/WxTextTemplateController.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateBaseVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateCreateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExcelVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExportReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplatePageReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateRespVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateUpdateReqVO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/accountfanstag/WxAccountFansTagConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fansmsg/WxFansMsgConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fansmsgres/WxFansMsgResConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fanstag/WxFansTagConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/mediaupload/WxMediaUploadConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/menu/WxMenuConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/newsarticleitem/WxNewsArticleItemConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/newstemplate/WxNewsTemplateConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/receivetext/WxReceiveTextConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/subscribetext/WxSubscribeTextConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/texttemplate/WxTextTemplateConvert.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/accountfanstag/WxAccountFansTagDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fansmsg/WxFansMsgDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fansmsgres/WxFansMsgResDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fanstag/WxFansTagDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/mediaupload/WxMediaUploadDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/menu/WxMenuDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/newsarticleitem/WxNewsArticleItemDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/newstemplate/WxNewsTemplateDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/receivetext/WxReceiveTextDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/subscribetext/WxSubscribeTextDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/texttemplate/WxTextTemplateDO.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/accountfanstag/WxAccountFansTagMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fansmsg/WxFansMsgMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fansmsgres/WxFansMsgResMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fanstag/WxFansTagMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/mediaupload/WxMediaUploadMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/menu/WxMenuMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/newsarticleitem/WxNewsArticleItemMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/newstemplate/WxNewsTemplateMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/receivetext/WxReceiveTextMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/subscribetext/WxSubscribeTextMapper.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/texttemplate/WxTextTemplateMapper.java rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/costomer/{dict => }/WxConfigDataRefreshConsumer.java (100%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/message/{dict => }/WxConfigDataRefreshMessage.java (100%) rename yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/producer/{dict => }/WxMpConfigDataProducer.java (100%) create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfanstag/WxAccountFansTagService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfanstag/WxAccountFansTagServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsg/WxFansMsgService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsg/WxFansMsgServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsgres/WxFansMsgResService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsgres/WxFansMsgResServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fanstag/WxFansTagService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fanstag/WxFansTagServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/menu/WxMenuService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/menu/WxMenuServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newsarticleitem/WxNewsArticleItemService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newsarticleitem/WxNewsArticleItemServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newstemplate/WxNewsTemplateService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newstemplate/WxNewsTemplateServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/subscribetext/WxSubscribeTextService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/subscribetext/WxSubscribeTextServiceImpl.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateService.java create mode 100644 yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateServiceImpl.java create mode 100644 yudao-ui-admin/src/api/wechatMp/wxAccountFansTag.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxFansMsg.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxFansMsgRes.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxFansTag.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxMediaUpload.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxMenu.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxNewsArticleItem.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxNewsTemplate.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxReceiveText.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxSubscribeText.js create mode 100644 yudao-ui-admin/src/api/wechatMp/wxTextTemplate.js create mode 100644 yudao-ui-admin/src/views/wechatMp/wxAccountFansTag/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxFansMsg/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxFansMsgRes/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxFansTag/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxMediaUpload/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxMenu/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxNewsArticleItem/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxNewsTemplate/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxReceiveText/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxSubscribeText/index.vue create mode 100644 yudao-ui-admin/src/views/wechatMp/wxTextTemplate/index.vue diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index c92842bde..4ca773bd9 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -1707,6 +1707,729 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1265, '客户端创建', 'system:oauth2-client:create', 3, 2, 1263, '', '', '', 0, b'1', b'1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:23', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1266, '客户端更新', 'system:oauth2-client:update', 3, 3, 1263, '', '', '', 0, b'1', b'1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:28', b'0'); INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1267, '客户端删除', 'system:oauth2-client:delete', 3, 4, 1263, '', '', '', 0, b'1', b'1', '', '2022-05-10 16:26:33', '1', '2022-05-11 00:31:33', b'0'); +--微信公众号-- +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信公众号粉丝管理', '', 2, 0, 1268, + 'wx-account-fans', '', 'wechatMp/wxAccountFans/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信公众号粉丝查询', 'wechatMp:wx-account-fans:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信公众号粉丝创建', 'wechatMp:wx-account-fans:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信公众号粉丝更新', 'wechatMp:wx-account-fans:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信公众号粉丝删除', 'wechatMp:wx-account-fans:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信公众号粉丝导出', 'wechatMp:wx-account-fans:export', 3, 5, @parentId, + '', '', '', 0 +); + +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '公众号账户管理', '', 2, 0, 1268, + 'wx-account', '', 'wechatMp/wxAccount/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '公众号账户查询', 'wechatMp:wx-account:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '公众号账户创建', 'wechatMp:wx-account:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '公众号账户更新', 'wechatMp:wx-account:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '公众号账户删除', 'wechatMp:wx-account:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '公众号账户导出', 'wechatMp:wx-account:export', 3, 5, @parentId, + '', '', '', 0 +); + + +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '文本模板管理', '', 2, 0, 1268, + 'wx-text-template', '', 'wechatMp/wxTextTemplate/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '文本模板查询', 'wechatMp:wx-text-template:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '文本模板创建', 'wechatMp:wx-text-template:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '文本模板更新', 'wechatMp:wx-text-template:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '文本模板删除', 'wechatMp:wx-text-template:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '文本模板导出', 'wechatMp:wx-text-template:export', 3, 5, @parentId, + '', '', '', 0 +); + +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签关联管理', '', 2, 0, 1268, + 'wx-account-fans-tag', '', 'wechatMp/wxAccountFansTag/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签关联查询', 'wechatMp:wx-account-fans-tag:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签关联创建', 'wechatMp:wx-account-fans-tag:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签关联更新', 'wechatMp:wx-account-fans-tag:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签关联删除', 'wechatMp:wx-account-fans-tag:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签关联导出', 'wechatMp:wx-account-fans-tag:export', 3, 5, @parentId, + '', '', '', 0 +); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝消息表 管理', '', 2, 0, 1268, + 'wx-fans-msg', '', 'wechatMp/wxFansMsg/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝消息表 查询', 'wechatMp:wx-fans-msg:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝消息表 创建', 'wechatMp:wx-fans-msg:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝消息表 更新', 'wechatMp:wx-fans-msg:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝消息表 删除', 'wechatMp:wx-fans-msg:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝消息表 导出', 'wechatMp:wx-fans-msg:export', 3, 5, @parentId, + '', '', '', 0 +); + +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复粉丝消息历史表 管理', '', 2, 0, 1268, + 'wx-fans-msg-res', '', 'wechatMp/wxFansMsgRes/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复粉丝消息历史表 查询', 'wechatMp:wx-fans-msg-res:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复粉丝消息历史表 创建', 'wechatMp:wx-fans-msg-res:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复粉丝消息历史表 更新', 'wechatMp:wx-fans-msg-res:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复粉丝消息历史表 删除', 'wechatMp:wx-fans-msg-res:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复粉丝消息历史表 导出', 'wechatMp:wx-fans-msg-res:export', 3, 5, @parentId, + '', '', '', 0 +); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签管理', '', 2, 0, 1268, + 'wx-fans-tag', '', 'wechatMp/wxFansTag/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签查询', 'wechatMp:wx-fans-tag:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签创建', 'wechatMp:wx-fans-tag:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签更新', 'wechatMp:wx-fans-tag:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签删除', 'wechatMp:wx-fans-tag:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '粉丝标签导出', 'wechatMp:wx-fans-tag:export', 3, 5, @parentId, + '', '', '', 0 +); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信素材上传表 管理', '', 2, 0, 1268, + 'wx-media-upload', '', 'wechatMp/wxMediaUpload/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信素材上传表 查询', 'wechatMp:wx-media-upload:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信素材上传表 创建', 'wechatMp:wx-media-upload:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信素材上传表 更新', 'wechatMp:wx-media-upload:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信素材上传表 删除', 'wechatMp:wx-media-upload:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信素材上传表 导出', 'wechatMp:wx-media-upload:export', 3, 5, @parentId, + '', '', '', 0 +); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信菜单管理', '', 2, 0, 1268, + 'wx-menu', '', 'wechatMp/wxMenu/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信菜单查询', 'wechatMp:wx-menu:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信菜单创建', 'wechatMp:wx-menu:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信菜单更新', 'wechatMp:wx-menu:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信菜单删除', 'wechatMp:wx-menu:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '微信菜单导出', 'wechatMp:wx-menu:export', 3, 5, @parentId, + '', '', '', 0 +); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息文章列表表 管理', '', 2, 0, 1268, + 'wx-news-article-item', '', 'wechatMp/wxNewsArticleItem/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息文章列表表 查询', 'wechatMp:wx-news-article-item:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息文章列表表 创建', 'wechatMp:wx-news-article-item:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息文章列表表 更新', 'wechatMp:wx-news-article-item:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息文章列表表 删除', 'wechatMp:wx-news-article-item:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息文章列表表 导出', 'wechatMp:wx-news-article-item:export', 3, 5, @parentId, + '', '', '', 0 +); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息模板管理', '', 2, 0, 1268, + 'wx-news-template', '', 'wechatMp/wxNewsTemplate/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息模板查询', 'wechatMp:wx-news-template:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息模板创建', 'wechatMp:wx-news-template:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息模板更新', 'wechatMp:wx-news-template:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息模板删除', 'wechatMp:wx-news-template:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '图文消息模板导出', 'wechatMp:wx-news-template:export', 3, 5, @parentId, + '', '', '', 0 +); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复关键字管理', '', 2, 0, 1268, + 'wx-receive-text', '', 'wechatMp/wxReceiveText/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复关键字查询', 'wechatMp:wx-receive-text:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复关键字创建', 'wechatMp:wx-receive-text:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复关键字更新', 'wechatMp:wx-receive-text:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复关键字删除', 'wechatMp:wx-receive-text:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '回复关键字导出', 'wechatMp:wx-receive-text:export', 3, 5, @parentId, + '', '', '', 0 +); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '关注欢迎语管理', '', 2, 0, 1268, + 'wx-subscribe-text', '', 'wechatMp/wxSubscribeText/index', 0 +); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '关注欢迎语查询', 'wechatMp:wx-subscribe-text:query', 3, 1, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '关注欢迎语创建', 'wechatMp:wx-subscribe-text:create', 3, 2, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '关注欢迎语更新', 'wechatMp:wx-subscribe-text:update', 3, 3, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '关注欢迎语删除', 'wechatMp:wx-subscribe-text:delete', 3, 4, @parentId, + '', '', '', 0 +); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '关注欢迎语导出', 'wechatMp:wx-subscribe-text:export', 3, 5, @parentId, + '', '', '', 0 +); + + COMMIT; -- ---------------------------- @@ -2651,25 +3374,25 @@ SET FOREIGN_KEY_CHECKS = 1; -- 公众号 DROP TABLE IF EXISTS `wx_account`; -CREATE TABLE `wx_account` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', - `name` varchar(100) DEFAULT NULL COMMENT '公众号名称', - `account` varchar(100) DEFAULT NULL COMMENT '公众号账户', - `appid` varchar(100) DEFAULT NULL COMMENT '公众号appid', - `appsecret` varchar(100) DEFAULT NULL COMMENT '公众号密钥', - `url` varchar(100) DEFAULT NULL COMMENT '公众号url', - `token` varchar(100) DEFAULT NULL COMMENT '公众号token', - `aeskey` varchar(300) DEFAULT NULL COMMENT '加密密钥', - `qr_url` varchar(200) DEFAULT NULL COMMENT '二维码图片URL', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', +CREATE TABLE `wx_account` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号', + `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '公众号名称', + `account` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '公众号账户', + `app_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '公众号appid', + `app_secret` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '公众号密钥', + `url` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '公众号url', + `token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '公众号token', + `aes_key` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '加密密钥', + `qr_code_url` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '二维码图片URL', + `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注', + `creator` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `updater` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', + `tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '公众号账户表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='公众号账户表'; DROP TABLE IF EXISTS `wx_account_fans`; CREATE TABLE `wx_account_fans` ( @@ -2696,199 +3419,199 @@ CREATE TABLE `wx_account_fans` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信公众号粉丝表'; - DROP TABLE IF EXISTS `wx_account_fans_tag`; - CREATE TABLE `wx_account_fans_tag` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `openid` varchar(100) DEFAULT NULL COMMENT '用户标识', - `tag_id` varchar(32) DEFAULT NULL COMMENT '标签ID', - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_account_fans_tag`; +CREATE TABLE `wx_account_fans_tag` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `openid` varchar(100) DEFAULT NULL COMMENT '用户标识', + `tag_id` varchar(32) DEFAULT NULL COMMENT '标签ID', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='粉丝标签关联表'; - DROP TABLE IF EXISTS `wx_fans_msg`; - CREATE TABLE `wx_fans_msg` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `openid` varchar(100) DEFAULT NULL COMMENT '用户标识', - `nickname` varbinary(2000) DEFAULT NULL COMMENT '昵称', - `headimg_url` varchar(500) DEFAULT NULL COMMENT '头像地址', - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型', - `content` varchar(500) DEFAULT NULL COMMENT '内容', - `res_content` text COMMENT '最近一条回复内容', - `is_res` varchar(32) DEFAULT NULL COMMENT '是否已回复', - `media_id` varchar(100) DEFAULT NULL COMMENT '微信素材ID', - `pic_url` varchar(500) DEFAULT NULL COMMENT '微信图片URL', - `pic_path` varchar(500) DEFAULT NULL COMMENT '本地图片路径', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_fans_msg`; +CREATE TABLE `wx_fans_msg` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `openid` varchar(100) DEFAULT NULL COMMENT '用户标识', + `nickname` varbinary(2000) DEFAULT NULL COMMENT '昵称', + `headimg_url` varchar(500) DEFAULT NULL COMMENT '头像地址', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型', + `content` varchar(500) DEFAULT NULL COMMENT '内容', + `res_content` text COMMENT '最近一条回复内容', + `is_res` varchar(32) DEFAULT NULL COMMENT '是否已回复', + `media_id` varchar(100) DEFAULT NULL COMMENT '微信素材ID', + `pic_url` varchar(500) DEFAULT NULL COMMENT '微信图片URL', + `pic_path` varchar(500) DEFAULT NULL COMMENT '本地图片路径', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COMMENT='粉丝消息表 '; - DROP TABLE IF EXISTS `wx_fans_msg_res`; - CREATE TABLE `wx_fans_msg_res` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `fans_msg_id` varchar(32) DEFAULT NULL COMMENT '粉丝消息ID', - `res_content` text COMMENT '回复内容', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_fans_msg_res`; +CREATE TABLE `wx_fans_msg_res` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `fans_msg_id` varchar(32) DEFAULT NULL COMMENT '粉丝消息ID', + `res_content` text COMMENT '回复内容', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='回复粉丝消息历史表 '; - DROP TABLE IF EXISTS `wx_fans_tag`; - CREATE TABLE `wx_fans_tag` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `name` varchar(32) DEFAULT NULL COMMENT '标签名称', - `count` int(11) DEFAULT NULL COMMENT '粉丝数量', - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_fans_tag`; +CREATE TABLE `wx_fans_tag` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `name` varchar(32) DEFAULT NULL COMMENT '标签名称', + `count` int(11) DEFAULT NULL COMMENT '粉丝数量', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='粉丝标签表'; - DROP TABLE IF EXISTS `wx_media_upload`; - CREATE TABLE `wx_media_upload` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `type` varchar(32) DEFAULT NULL COMMENT '类型', - `url` varchar(500) DEFAULT NULL COMMENT '图片URL', - `media_id` varchar(32) DEFAULT NULL COMMENT '素材ID', - `thumb_media_id` varchar(32) DEFAULT NULL COMMENT '缩略图素材ID', - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_media_upload`; +CREATE TABLE `wx_media_upload` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `type` varchar(32) DEFAULT NULL COMMENT '类型', + `url` varchar(500) DEFAULT NULL COMMENT '图片URL', + `media_id` varchar(32) DEFAULT NULL COMMENT '素材ID', + `thumb_media_id` varchar(32) DEFAULT NULL COMMENT '缩略图素材ID', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信素材上传表 '; - DROP TABLE IF EXISTS `wx_menu`; - CREATE TABLE `wx_menu` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `parent_id` varchar(32) DEFAULT NULL COMMENT '父ID', - `menu_name` varchar(32) DEFAULT NULL COMMENT '菜单名称', - `menu_type` varchar(32) DEFAULT NULL COMMENT '菜单类型 1文本消息;2图文消息;3网址链接;4小程序', - `menu_level` varchar(32) DEFAULT NULL COMMENT '菜单等级', - `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID', - `menu_url` varchar(255) DEFAULT NULL COMMENT '菜单URL', - `menu_sort` varchar(32) DEFAULT NULL COMMENT '排序', - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `miniprogram_appid` varchar(32) DEFAULT NULL COMMENT '小程序appid', - `miniprogram_pagepath` varchar(200) DEFAULT NULL COMMENT '小程序页面路径', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_menu`; +CREATE TABLE `wx_menu` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `parent_id` varchar(32) DEFAULT NULL COMMENT '父ID', + `menu_name` varchar(32) DEFAULT NULL COMMENT '菜单名称', + `menu_type` varchar(32) DEFAULT NULL COMMENT '菜单类型 1文本消息;2图文消息;3网址链接;4小程序', + `menu_level` varchar(32) DEFAULT NULL COMMENT '菜单等级', + `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID', + `menu_url` varchar(255) DEFAULT NULL COMMENT '菜单URL', + `menu_sort` varchar(32) DEFAULT NULL COMMENT '排序', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `miniprogram_appid` varchar(32) DEFAULT NULL COMMENT '小程序appid', + `miniprogram_pagepath` varchar(200) DEFAULT NULL COMMENT '小程序页面路径', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COMMENT='微信菜单表'; - DROP TABLE IF EXISTS `wx_news_article_item`; - CREATE TABLE `wx_news_article_item` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `title` varchar(32) DEFAULT NULL COMMENT '标题', - `digest` varchar(50) DEFAULT NULL COMMENT '摘要', - `author` varchar(32) DEFAULT NULL COMMENT '作者', - `show_cover_pic` char(1) DEFAULT NULL COMMENT '是否展示封面图片(0/1)', - `thumb_media_id` varchar(50) DEFAULT NULL COMMENT '上传微信,封面图片标识', - `content` text COMMENT '内容', - `content_source_url` varchar(50) DEFAULT NULL COMMENT '内容链接', - `order_no` int(11) DEFAULT NULL COMMENT '文章排序', - `pic_path` varchar(255) DEFAULT NULL COMMENT '图片路径', - `need_open_comment` varchar(32) DEFAULT NULL COMMENT '是否可以留言', - `only_fans_can_comment` varchar(32) DEFAULT NULL COMMENT '是否仅粉丝可以留言', - `news_id` varchar(32) DEFAULT NULL COMMENT '图文ID', - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_news_article_item`; +CREATE TABLE `wx_news_article_item` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `title` varchar(32) DEFAULT NULL COMMENT '标题', + `digest` varchar(50) DEFAULT NULL COMMENT '摘要', + `author` varchar(32) DEFAULT NULL COMMENT '作者', + `show_cover_pic` char(1) DEFAULT NULL COMMENT '是否展示封面图片(0/1)', + `thumb_media_id` varchar(50) DEFAULT NULL COMMENT '上传微信,封面图片标识', + `content` text COMMENT '内容', + `content_source_url` varchar(50) DEFAULT NULL COMMENT '内容链接', + `order_no` int(11) DEFAULT NULL COMMENT '文章排序', + `pic_path` varchar(255) DEFAULT NULL COMMENT '图片路径', + `need_open_comment` varchar(32) DEFAULT NULL COMMENT '是否可以留言', + `only_fans_can_comment` varchar(32) DEFAULT NULL COMMENT '是否仅粉丝可以留言', + `news_id` varchar(32) DEFAULT NULL COMMENT '图文ID', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='图文消息文章列表表 '; - DROP TABLE IF EXISTS `wx_news_template`; - CREATE TABLE `wx_news_template` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键 主键ID', - `tpl_name` varchar(32) DEFAULT NULL COMMENT '模板名称', - `is_upload` varchar(32) DEFAULT NULL COMMENT '是否已上传微信', - `media_id` varchar(50) DEFAULT NULL, - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_news_template`; +CREATE TABLE `wx_news_template` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键 主键ID', + `tpl_name` varchar(32) DEFAULT NULL COMMENT '模板名称', + `is_upload` varchar(32) DEFAULT NULL COMMENT '是否已上传微信', + `media_id` varchar(50) DEFAULT NULL COMMENT '微信素材ID', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='图文消息模板表'; - DROP TABLE IF EXISTS `wx_receive_text`; - CREATE TABLE `wx_receive_text` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `receive_text` varchar(32) DEFAULT NULL COMMENT '关键字', - `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型 1文本消息;2图文消息;', - `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID', - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_receive_text`; +CREATE TABLE `wx_receive_text` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `receive_text` varchar(32) DEFAULT NULL COMMENT '关键字', + `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型 1文本消息;2图文消息;', + `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='回复关键字表'; - DROP TABLE IF EXISTS `wx_subscribe_text`; - CREATE TABLE `wx_subscribe_text` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型 1文本消息;2图文消息;', - `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID', - `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_subscribe_text`; +CREATE TABLE `wx_subscribe_text` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `msg_type` varchar(32) DEFAULT NULL COMMENT '消息类型 1文本消息;2图文消息;', + `tpl_id` varchar(32) DEFAULT NULL COMMENT '模板ID', + `wx_account_id` varchar(32) DEFAULT NULL COMMENT '微信账号ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='关注欢迎语表'; - DROP TABLE IF EXISTS `wx_text_template`; - CREATE TABLE `wx_text_template` ( - `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', - `tpl_name` varchar(32) DEFAULT NULL COMMENT '模板名字', - `content` varchar(255) DEFAULT NULL COMMENT '模板内容', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `wx_text_template`; +CREATE TABLE `wx_text_template` ( + `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', + `tpl_name` varchar(32) DEFAULT NULL COMMENT '模板名字', + `content` varchar(255) DEFAULT NULL COMMENT '模板内容', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', +PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='文本模板表'; diff --git a/yudao-module-wechat/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/ErrorCodeConstants.java b/yudao-module-wechat/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/ErrorCodeConstants.java index 2454ecf0d..7d9d876a3 100644 --- a/yudao-module-wechat/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/ErrorCodeConstants.java +++ b/yudao-module-wechat/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/ErrorCodeConstants.java @@ -12,5 +12,6 @@ public interface ErrorCodeConstants { // ========== 用户相关 1004001000============ ErrorCode WX_ACCOUNT_NOT_EXISTS = new ErrorCode(1004001000, "用户不存在"); ErrorCode WX_ACCOUNT_FANS_NOT_EXISTS = new ErrorCode(1004001000, "用户不存在"); + ErrorCode COMMON_NOT_EXISTS = new ErrorCode(1004001000, "用户不存在"); } diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/config/WxMpConfig.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/config/WxMpConfig.java index 2afb91e61..b1b4a3b1b 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/config/WxMpConfig.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/config/WxMpConfig.java @@ -2,22 +2,28 @@ package cn.iocoder.yudao.module.mp.config; import cn.hutool.extra.spring.SpringUtil; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountExportReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountExportReqVO; import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; import cn.iocoder.yudao.module.mp.handler.*; import cn.iocoder.yudao.module.mp.service.account.WxAccountService; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.redis.JedisWxRedisOps; import me.chanjar.weixin.mp.api.WxMpMessageRouter; import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; +import me.chanjar.weixin.mp.config.impl.WxMpRedisConfigImpl; import me.chanjar.weixin.mp.constant.WxMpEventConstants; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; import java.util.List; import java.util.Map; @@ -25,6 +31,7 @@ import java.util.stream.Collectors; // TODO @芋艿:思考有没更好的处理方式 @Component +@EnableConfigurationProperties(WxMpProperties.class) @Slf4j public class WxMpConfig implements InitializingBean { @@ -33,6 +40,10 @@ public class WxMpConfig implements InitializingBean { @Autowired private WxAccountService wxAccountService; + @Autowired + private WxMpProperties wxMpProperties; + + private static final long SCHEDULER_PERIOD = 5 * 60 * 1000L; /** * 初始化公众号配置 @@ -43,22 +54,39 @@ public class WxMpConfig implements InitializingBean { if (CollectionUtils.isEmpty(wxAccountList)) { return; } - WxMpConfig.init(wxAccountList); + WxMpConfig.init(wxAccountList, wxMpProperties); log.info("加载公众号配置成功"); } - public static void init(List wxAccountDOS) { + + @Scheduled(fixedDelay = SCHEDULER_PERIOD, initialDelay = SCHEDULER_PERIOD) + public void schedulePeriodicRefresh() { + initWxConfig(); + } + + public static void init(List wxAccountDOS, WxMpProperties properties) { mpServices = wxAccountDOS.stream().map(wxAccountDO -> { // TODO 亚洲:使用 WxMpInMemoryConfigStorage 的话,多节点会不会存在 accessToken 冲突 - WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl(); - configStorage.setAppId(wxAccountDO.getAppid()); - configStorage.setSecret(wxAccountDO.getAppsecret()); + + WxMpDefaultConfigImpl configStorage; + if (properties.isUseRedis()) { + final WxMpProperties.RedisConfig redisConfig = properties.getRedisConfig(); + JedisPoolConfig poolConfig = new JedisPoolConfig(); + JedisPool jedisPool = new JedisPool(poolConfig, redisConfig.getHost(), redisConfig.getPort(), + redisConfig.getTimeout(), redisConfig.getPassword()); + configStorage = new WxMpRedisConfigImpl(new JedisWxRedisOps(jedisPool), wxAccountDO.getAppId()); + } else { + configStorage = new WxMpDefaultConfigImpl(); + } + + configStorage.setAppId(wxAccountDO.getAppId()); + configStorage.setSecret(wxAccountDO.getAppSecret()); configStorage.setToken(wxAccountDO.getToken()); - configStorage.setAesKey(wxAccountDO.getAeskey()); + configStorage.setAesKey(wxAccountDO.getAesKey()); WxMpService service = new WxMpServiceImpl(); service.setWxMpConfigStorage(configStorage); - routers.put(wxAccountDO.getAppid(), newRouter(service)); + routers.put(wxAccountDO.getAppId(), newRouter(service)); return service; }).collect(Collectors.toMap(s -> s.getWxMpConfigStorage().getAppId(), a -> a, (o, n) -> o)); } diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/config/WxMpProperties.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/config/WxMpProperties.java new file mode 100644 index 000000000..63adbc305 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/config/WxMpProperties.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.mp.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * wechat mp properties + */ +@Data +@ConfigurationProperties(prefix = "wx.mp") +public class WxMpProperties { + /** + * 是否使用redis存储access token + */ + private boolean useRedis; + + private String defaultContent; + + /** + * redis 配置 + */ + private RedisConfig redisConfig; + + @Data + public static class RedisConfig { + /** + * redis服务器 主机地址 + */ + private String host; + + /** + * redis服务器 端口号 + */ + private Integer port; + + /** + * redis服务器 密码 + */ + private String password; + + /** + * redis 服务连接超时时间 + */ + private Integer timeout; + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/WxAccountController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/WxAccountController.java similarity index 97% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/WxAccountController.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/WxAccountController.java index af3e3fc97..acea38372 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/WxAccountController.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/WxAccountController.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.module.mp.admin.account; +package cn.iocoder.yudao.module.mp.controller.admin.account; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.mp.admin.account.vo.*; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.*; import cn.iocoder.yudao.module.mp.convert.account.WxAccountConvert; import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; import cn.iocoder.yudao.module.mp.service.account.WxAccountService; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountBaseVO.java similarity index 87% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountBaseVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountBaseVO.java index e9ab4f452..29d4fe436 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountBaseVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountBaseVO.java @@ -1,9 +1,7 @@ -package cn.iocoder.yudao.module.mp.admin.account.vo; +package cn.iocoder.yudao.module.mp.controller.admin.account.vo; import lombok.*; -import java.util.*; import io.swagger.annotations.*; -import javax.validation.constraints.*; /** * 公众号账户 Base VO,提供给添加、修改、详细的子 VO 使用 diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountCreateReqVO.java similarity index 79% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountCreateReqVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountCreateReqVO.java index 9797c5942..1d449bee6 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountCreateReqVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.mp.admin.account.vo; +package cn.iocoder.yudao.module.mp.controller.admin.account.vo; import lombok.*; import io.swagger.annotations.*; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountExcelVO.java similarity index 88% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountExcelVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountExcelVO.java index c9df5de3b..b2c0bba37 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountExcelVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountExcelVO.java @@ -1,8 +1,7 @@ -package cn.iocoder.yudao.module.mp.admin.account.vo; +package cn.iocoder.yudao.module.mp.controller.admin.account.vo; import lombok.*; import java.util.*; -import io.swagger.annotations.*; import com.alibaba.excel.annotation.ExcelProperty; @@ -39,7 +38,7 @@ public class WxAccountExcelVO { private String aeskey; @ExcelProperty("二维码图片URL") - private String qrUrl; + private String qrCodeUrl; @ExcelProperty("备注") private String remark; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountExportReqVO.java similarity index 89% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountExportReqVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountExportReqVO.java index dc5334092..87ad1c5fc 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountExportReqVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountExportReqVO.java @@ -1,9 +1,8 @@ -package cn.iocoder.yudao.module.mp.admin.account.vo; +package cn.iocoder.yudao.module.mp.controller.admin.account.vo; import lombok.*; import java.util.*; import io.swagger.annotations.*; -import cn.iocoder.yudao.framework.common.pojo.PageParam; import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountPageReqVO.java similarity index 94% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountPageReqVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountPageReqVO.java index 35f22f1f9..bb1b789a7 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountPageReqVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.mp.admin.account.vo; +package cn.iocoder.yudao.module.mp.controller.admin.account.vo; import lombok.*; import java.util.*; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountRespVO.java similarity index 85% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountRespVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountRespVO.java index 847502985..326ebfa0b 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountRespVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.mp.admin.account.vo; +package cn.iocoder.yudao.module.mp.controller.admin.account.vo; import lombok.*; import java.util.*; @@ -17,7 +17,7 @@ public class WxAccountRespVO extends WxAccountBaseVO { private String url; @ApiModelProperty(value = "二维码图片URL") - private String qrUrl; + private String qrCodeUrl; @ApiModelProperty(value = "创建时间", required = true) private Date createTime; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountUpdateReqVO.java similarity index 86% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountUpdateReqVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountUpdateReqVO.java index d55c0e45e..63f0b6c1e 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/account/vo/WxAccountUpdateReqVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/account/vo/WxAccountUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.mp.admin.account.vo; +package cn.iocoder.yudao.module.mp.controller.admin.account.vo; import lombok.*; import io.swagger.annotations.*; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/WxAccountFansController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/WxAccountFansController.java similarity index 97% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/WxAccountFansController.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/WxAccountFansController.java index dde714e17..c39c8cca6 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/WxAccountFansController.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/WxAccountFansController.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.module.mp.admin.accountfans; +package cn.iocoder.yudao.module.mp.controller.admin.accountfans; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.*; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.*; import cn.iocoder.yudao.module.mp.convert.accountfans.WxAccountFansConvert; import cn.iocoder.yudao.module.mp.dal.dataobject.accountfans.WxAccountFansDO; import cn.iocoder.yudao.module.mp.service.accountfans.WxAccountFansService; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansBaseVO.java similarity index 94% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansBaseVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansBaseVO.java index eca46e864..d030c1661 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansBaseVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansBaseVO.java @@ -1,9 +1,8 @@ -package cn.iocoder.yudao.module.mp.admin.accountfans.vo; +package cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo; import lombok.*; import java.util.*; import io.swagger.annotations.*; -import javax.validation.constraints.*; import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansCreateReqVO.java similarity index 79% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansCreateReqVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansCreateReqVO.java index f1f8a9fde..2243b979f 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansCreateReqVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.mp.admin.accountfans.vo; +package cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo; import lombok.*; import io.swagger.annotations.*; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansExcelVO.java similarity index 93% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansExcelVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansExcelVO.java index e4561cb04..c5114a730 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansExcelVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansExcelVO.java @@ -1,8 +1,7 @@ -package cn.iocoder.yudao.module.mp.admin.accountfans.vo; +package cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo; import lombok.*; import java.util.*; -import io.swagger.annotations.*; import com.alibaba.excel.annotation.ExcelProperty; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansExportReqVO.java similarity index 94% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansExportReqVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansExportReqVO.java index 9de273f26..82f4bc723 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansExportReqVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansExportReqVO.java @@ -1,9 +1,8 @@ -package cn.iocoder.yudao.module.mp.admin.accountfans.vo; +package cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo; import lombok.*; import java.util.*; import io.swagger.annotations.*; -import cn.iocoder.yudao.framework.common.pojo.PageParam; import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansPageReqVO.java similarity index 96% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansPageReqVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansPageReqVO.java index 7a47127fb..2437ce644 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansPageReqVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.mp.admin.accountfans.vo; +package cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo; import lombok.*; import java.util.*; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansRespVO.java similarity index 86% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansRespVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansRespVO.java index 9548dcac6..f1704ee44 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansRespVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.mp.admin.accountfans.vo; +package cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo; import lombok.*; import java.util.*; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansUpdateReqVO.java similarity index 86% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansUpdateReqVO.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansUpdateReqVO.java index e60ce479d..9b04e47e1 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/admin/accountfans/vo/WxAccountFansUpdateReqVO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfans/vo/WxAccountFansUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.mp.admin.accountfans.vo; +package cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo; import lombok.*; import io.swagger.annotations.*; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/WxAccountFansTagController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/WxAccountFansTagController.java new file mode 100644 index 000000000..aa4a0e311 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/WxAccountFansTagController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.accountfanstag; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.accountfanstag.WxAccountFansTagDO; +import cn.iocoder.yudao.module.mp.convert.accountfanstag.WxAccountFansTagConvert; +import cn.iocoder.yudao.module.mp.service.accountfanstag.WxAccountFansTagService; + +@Api(tags = "管理后台 - 粉丝标签关联") +@RestController +@RequestMapping("/wechatMp/wx-account-fans-tag") +@Validated +public class WxAccountFansTagController { + + @Resource + private WxAccountFansTagService wxAccountFansTagService; + + @PostMapping("/create") + @ApiOperation("创建粉丝标签关联") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans-tag:create')") + public CommonResult createWxAccountFansTag(@Valid @RequestBody WxAccountFansTagCreateReqVO createReqVO) { + return success(wxAccountFansTagService.createWxAccountFansTag(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新粉丝标签关联") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans-tag:update')") + public CommonResult updateWxAccountFansTag(@Valid @RequestBody WxAccountFansTagUpdateReqVO updateReqVO) { + wxAccountFansTagService.updateWxAccountFansTag(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除粉丝标签关联") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans-tag:delete')") + public CommonResult deleteWxAccountFansTag(@RequestParam("id") Integer id) { + wxAccountFansTagService.deleteWxAccountFansTag(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得粉丝标签关联") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans-tag:query')") + public CommonResult getWxAccountFansTag(@RequestParam("id") Integer id) { + WxAccountFansTagDO wxAccountFansTag = wxAccountFansTagService.getWxAccountFansTag(id); + return success(WxAccountFansTagConvert.INSTANCE.convert(wxAccountFansTag)); + } + + @GetMapping("/list") + @ApiOperation("获得粉丝标签关联列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans-tag:query')") + public CommonResult> getWxAccountFansTagList(@RequestParam("ids") Collection ids) { + List list = wxAccountFansTagService.getWxAccountFansTagList(ids); + return success(WxAccountFansTagConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得粉丝标签关联分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans-tag:query')") + public CommonResult> getWxAccountFansTagPage(@Valid WxAccountFansTagPageReqVO pageVO) { + PageResult pageResult = wxAccountFansTagService.getWxAccountFansTagPage(pageVO); + return success(WxAccountFansTagConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出粉丝标签关联 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-account-fans-tag:export')") + @OperateLog(type = EXPORT) + public void exportWxAccountFansTagExcel(@Valid WxAccountFansTagExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxAccountFansTagService.getWxAccountFansTagList(exportReqVO); + // 导出 Excel + List datas = WxAccountFansTagConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "粉丝标签关联.xls", "数据", WxAccountFansTagExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagBaseVO.java new file mode 100644 index 000000000..2e952e424 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagBaseVO.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 粉丝标签关联 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxAccountFansTagBaseVO { + + @ApiModelProperty(value = "用户标识") + private String openid; + + @ApiModelProperty(value = "标签ID") + private String tagId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagCreateReqVO.java new file mode 100644 index 000000000..e386d4035 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 粉丝标签关联创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxAccountFansTagCreateReqVO extends WxAccountFansTagBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagExcelVO.java new file mode 100644 index 000000000..ffaa4742e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagExcelVO.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 粉丝标签关联 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxAccountFansTagExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("用户标识") + private String openid; + + @ExcelProperty("标签ID") + private String tagId; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagExportReqVO.java new file mode 100644 index 000000000..2185e061e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagExportReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 粉丝标签关联 Excel 导出 Request VO", description = "参数和 WxAccountFansTagPageReqVO 是一致的") +@Data +public class WxAccountFansTagExportReqVO { + + @ApiModelProperty(value = "用户标识") + private String openid; + + @ApiModelProperty(value = "标签ID") + private String tagId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagPageReqVO.java new file mode 100644 index 000000000..142cab338 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagPageReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 粉丝标签关联分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxAccountFansTagPageReqVO extends PageParam { + + @ApiModelProperty(value = "用户标识") + private String openid; + + @ApiModelProperty(value = "标签ID") + private String tagId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagRespVO.java new file mode 100644 index 000000000..804ac8e70 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 粉丝标签关联 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxAccountFansTagRespVO extends WxAccountFansTagBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagUpdateReqVO.java new file mode 100644 index 000000000..7ef3f4c61 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/accountfanstag/vo/WxAccountFansTagUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 粉丝标签关联更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxAccountFansTagUpdateReqVO extends WxAccountFansTagBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/WxFansMsgController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/WxFansMsgController.java new file mode 100644 index 000000000..ff3466c2f --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/WxFansMsgController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsg; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsg.WxFansMsgDO; +import cn.iocoder.yudao.module.mp.convert.fansmsg.WxFansMsgConvert; +import cn.iocoder.yudao.module.mp.service.fansmsg.WxFansMsgService; + +@Api(tags = "管理后台 - 粉丝消息表 ") +@RestController +@RequestMapping("/wechatMp/wx-fans-msg") +@Validated +public class WxFansMsgController { + + @Resource + private WxFansMsgService wxFansMsgService; + + @PostMapping("/create") + @ApiOperation("创建粉丝消息表 ") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg:create')") + public CommonResult createWxFansMsg(@Valid @RequestBody WxFansMsgCreateReqVO createReqVO) { + return success(wxFansMsgService.createWxFansMsg(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新粉丝消息表 ") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg:update')") + public CommonResult updateWxFansMsg(@Valid @RequestBody WxFansMsgUpdateReqVO updateReqVO) { + wxFansMsgService.updateWxFansMsg(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除粉丝消息表 ") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg:delete')") + public CommonResult deleteWxFansMsg(@RequestParam("id") Integer id) { + wxFansMsgService.deleteWxFansMsg(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得粉丝消息表 ") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg:query')") + public CommonResult getWxFansMsg(@RequestParam("id") Integer id) { + WxFansMsgDO wxFansMsg = wxFansMsgService.getWxFansMsg(id); + return success(WxFansMsgConvert.INSTANCE.convert(wxFansMsg)); + } + + @GetMapping("/list") + @ApiOperation("获得粉丝消息表 列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg:query')") + public CommonResult> getWxFansMsgList(@RequestParam("ids") Collection ids) { + List list = wxFansMsgService.getWxFansMsgList(ids); + return success(WxFansMsgConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得粉丝消息表 分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg:query')") + public CommonResult> getWxFansMsgPage(@Valid WxFansMsgPageReqVO pageVO) { + PageResult pageResult = wxFansMsgService.getWxFansMsgPage(pageVO); + return success(WxFansMsgConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出粉丝消息表 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg:export')") + @OperateLog(type = EXPORT) + public void exportWxFansMsgExcel(@Valid WxFansMsgExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxFansMsgService.getWxFansMsgList(exportReqVO); + // 导出 Excel + List datas = WxFansMsgConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "粉丝消息表 .xls", "数据", WxFansMsgExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgBaseVO.java new file mode 100644 index 000000000..8527d4124 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgBaseVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 粉丝消息表 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxFansMsgBaseVO { + + @ApiModelProperty(value = "用户标识") + private String openid; + + @ApiModelProperty(value = "昵称") + private byte[] nickname; + + @ApiModelProperty(value = "头像地址") + private String headimgUrl; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @ApiModelProperty(value = "消息类型") + private String msgType; + + @ApiModelProperty(value = "内容") + private String content; + + @ApiModelProperty(value = "最近一条回复内容") + private String resContent; + + @ApiModelProperty(value = "是否已回复") + private String isRes; + + @ApiModelProperty(value = "微信素材ID") + private String mediaId; + + @ApiModelProperty(value = "微信图片URL") + private String picUrl; + + @ApiModelProperty(value = "本地图片路径") + private String picPath; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgCreateReqVO.java new file mode 100644 index 000000000..22b293b4a --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 粉丝消息表 创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansMsgCreateReqVO extends WxFansMsgBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgExcelVO.java new file mode 100644 index 000000000..2d35d3788 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgExcelVO.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 粉丝消息表 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxFansMsgExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("用户标识") + private String openid; + + @ExcelProperty("昵称") + private byte[] nickname; + + @ExcelProperty("头像地址") + private String headimgUrl; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("消息类型") + private String msgType; + + @ExcelProperty("内容") + private String content; + + @ExcelProperty("最近一条回复内容") + private String resContent; + + @ExcelProperty("是否已回复") + private String isRes; + + @ExcelProperty("微信素材ID") + private String mediaId; + + @ExcelProperty("微信图片URL") + private String picUrl; + + @ExcelProperty("本地图片路径") + private String picPath; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgExportReqVO.java new file mode 100644 index 000000000..dba5d407e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgExportReqVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 粉丝消息表 Excel 导出 Request VO", description = "参数和 WxFansMsgPageReqVO 是一致的") +@Data +public class WxFansMsgExportReqVO { + + @ApiModelProperty(value = "用户标识") + private String openid; + + @ApiModelProperty(value = "昵称") + private String nickname; + + @ApiModelProperty(value = "头像地址") + private String headimgUrl; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @ApiModelProperty(value = "消息类型") + private String msgType; + + @ApiModelProperty(value = "内容") + private String content; + + @ApiModelProperty(value = "最近一条回复内容") + private String resContent; + + @ApiModelProperty(value = "是否已回复") + private String isRes; + + @ApiModelProperty(value = "微信素材ID") + private String mediaId; + + @ApiModelProperty(value = "微信图片URL") + private String picUrl; + + @ApiModelProperty(value = "本地图片路径") + private String picPath; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgPageReqVO.java new file mode 100644 index 000000000..d80a883d0 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgPageReqVO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 粉丝消息表 分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansMsgPageReqVO extends PageParam { + + @ApiModelProperty(value = "用户标识") + private String openid; + + @ApiModelProperty(value = "昵称") + private String nickname; + + @ApiModelProperty(value = "头像地址") + private String headimgUrl; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @ApiModelProperty(value = "消息类型") + private String msgType; + + @ApiModelProperty(value = "内容") + private String content; + + @ApiModelProperty(value = "最近一条回复内容") + private String resContent; + + @ApiModelProperty(value = "是否已回复") + private String isRes; + + @ApiModelProperty(value = "微信素材ID") + private String mediaId; + + @ApiModelProperty(value = "微信图片URL") + private String picUrl; + + @ApiModelProperty(value = "本地图片路径") + private String picPath; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgRespVO.java new file mode 100644 index 000000000..62845b489 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 粉丝消息表 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansMsgRespVO extends WxFansMsgBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgUpdateReqVO.java new file mode 100644 index 000000000..eedad7899 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsg/vo/WxFansMsgUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 粉丝消息表 更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansMsgUpdateReqVO extends WxFansMsgBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/WxFansMsgResController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/WxFansMsgResController.java new file mode 100644 index 000000000..19a9140f0 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/WxFansMsgResController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsgres; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsgres.WxFansMsgResDO; +import cn.iocoder.yudao.module.mp.convert.fansmsgres.WxFansMsgResConvert; +import cn.iocoder.yudao.module.mp.service.fansmsgres.WxFansMsgResService; + +@Api(tags = "管理后台 - 回复粉丝消息历史表 ") +@RestController +@RequestMapping("/wechatMp/wx-fans-msg-res") +@Validated +public class WxFansMsgResController { + + @Resource + private WxFansMsgResService wxFansMsgResService; + + @PostMapping("/create") + @ApiOperation("创建回复粉丝消息历史表 ") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg-res:create')") + public CommonResult createWxFansMsgRes(@Valid @RequestBody WxFansMsgResCreateReqVO createReqVO) { + return success(wxFansMsgResService.createWxFansMsgRes(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新回复粉丝消息历史表 ") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg-res:update')") + public CommonResult updateWxFansMsgRes(@Valid @RequestBody WxFansMsgResUpdateReqVO updateReqVO) { + wxFansMsgResService.updateWxFansMsgRes(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除回复粉丝消息历史表 ") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg-res:delete')") + public CommonResult deleteWxFansMsgRes(@RequestParam("id") Integer id) { + wxFansMsgResService.deleteWxFansMsgRes(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得回复粉丝消息历史表 ") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg-res:query')") + public CommonResult getWxFansMsgRes(@RequestParam("id") Integer id) { + WxFansMsgResDO wxFansMsgRes = wxFansMsgResService.getWxFansMsgRes(id); + return success(WxFansMsgResConvert.INSTANCE.convert(wxFansMsgRes)); + } + + @GetMapping("/list") + @ApiOperation("获得回复粉丝消息历史表 列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg-res:query')") + public CommonResult> getWxFansMsgResList(@RequestParam("ids") Collection ids) { + List list = wxFansMsgResService.getWxFansMsgResList(ids); + return success(WxFansMsgResConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得回复粉丝消息历史表 分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg-res:query')") + public CommonResult> getWxFansMsgResPage(@Valid WxFansMsgResPageReqVO pageVO) { + PageResult pageResult = wxFansMsgResService.getWxFansMsgResPage(pageVO); + return success(WxFansMsgResConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出回复粉丝消息历史表 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg-res:export')") + @OperateLog(type = EXPORT) + public void exportWxFansMsgResExcel(@Valid WxFansMsgResExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxFansMsgResService.getWxFansMsgResList(exportReqVO); + // 导出 Excel + List datas = WxFansMsgResConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "回复粉丝消息历史表 .xls", "数据", WxFansMsgResExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResBaseVO.java new file mode 100644 index 000000000..0f02b0bf4 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResBaseVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 回复粉丝消息历史表 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxFansMsgResBaseVO { + + @ApiModelProperty(value = "粉丝消息ID") + private String fansMsgId; + + @ApiModelProperty(value = "回复内容") + private String resContent; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResCreateReqVO.java new file mode 100644 index 000000000..8016f555e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 回复粉丝消息历史表 创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansMsgResCreateReqVO extends WxFansMsgResBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResExcelVO.java new file mode 100644 index 000000000..067e95b32 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResExcelVO.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 回复粉丝消息历史表 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxFansMsgResExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("粉丝消息ID") + private String fansMsgId; + + @ExcelProperty("回复内容") + private String resContent; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResExportReqVO.java new file mode 100644 index 000000000..741aa6996 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResExportReqVO.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 回复粉丝消息历史表 Excel 导出 Request VO", description = "参数和 WxFansMsgResPageReqVO 是一致的") +@Data +public class WxFansMsgResExportReqVO { + + @ApiModelProperty(value = "粉丝消息ID") + private String fansMsgId; + + @ApiModelProperty(value = "回复内容") + private String resContent; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResPageReqVO.java new file mode 100644 index 000000000..c888bc4b6 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResPageReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 回复粉丝消息历史表 分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansMsgResPageReqVO extends PageParam { + + @ApiModelProperty(value = "粉丝消息ID") + private String fansMsgId; + + @ApiModelProperty(value = "回复内容") + private String resContent; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResRespVO.java new file mode 100644 index 000000000..3fc4b0700 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 回复粉丝消息历史表 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansMsgResRespVO extends WxFansMsgResBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResUpdateReqVO.java new file mode 100644 index 000000000..71ac11cd6 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fansmsgres/vo/WxFansMsgResUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 回复粉丝消息历史表 更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansMsgResUpdateReqVO extends WxFansMsgResBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/WxFansTagController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/WxFansTagController.java new file mode 100644 index 000000000..9b20ecc97 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/WxFansTagController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fanstag; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fanstag.WxFansTagDO; +import cn.iocoder.yudao.module.mp.convert.fanstag.WxFansTagConvert; +import cn.iocoder.yudao.module.mp.service.fanstag.WxFansTagService; + +@Api(tags = "管理后台 - 粉丝标签") +@RestController +@RequestMapping("/wechatMp/wx-fans-tag") +@Validated +public class WxFansTagController { + + @Resource + private WxFansTagService wxFansTagService; + + @PostMapping("/create") + @ApiOperation("创建粉丝标签") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-tag:create')") + public CommonResult createWxFansTag(@Valid @RequestBody WxFansTagCreateReqVO createReqVO) { + return success(wxFansTagService.createWxFansTag(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新粉丝标签") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-tag:update')") + public CommonResult updateWxFansTag(@Valid @RequestBody WxFansTagUpdateReqVO updateReqVO) { + wxFansTagService.updateWxFansTag(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除粉丝标签") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-tag:delete')") + public CommonResult deleteWxFansTag(@RequestParam("id") Integer id) { + wxFansTagService.deleteWxFansTag(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得粉丝标签") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-tag:query')") + public CommonResult getWxFansTag(@RequestParam("id") Integer id) { + WxFansTagDO wxFansTag = wxFansTagService.getWxFansTag(id); + return success(WxFansTagConvert.INSTANCE.convert(wxFansTag)); + } + + @GetMapping("/list") + @ApiOperation("获得粉丝标签列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-tag:query')") + public CommonResult> getWxFansTagList(@RequestParam("ids") Collection ids) { + List list = wxFansTagService.getWxFansTagList(ids); + return success(WxFansTagConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得粉丝标签分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-tag:query')") + public CommonResult> getWxFansTagPage(@Valid WxFansTagPageReqVO pageVO) { + PageResult pageResult = wxFansTagService.getWxFansTagPage(pageVO); + return success(WxFansTagConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出粉丝标签 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-tag:export')") + @OperateLog(type = EXPORT) + public void exportWxFansTagExcel(@Valid WxFansTagExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxFansTagService.getWxFansTagList(exportReqVO); + // 导出 Excel + List datas = WxFansTagConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "粉丝标签.xls", "数据", WxFansTagExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagBaseVO.java new file mode 100644 index 000000000..139a9b95a --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagBaseVO.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 粉丝标签 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxFansTagBaseVO { + + @ApiModelProperty(value = "标签名称") + private String name; + + @ApiModelProperty(value = "粉丝数量") + private Integer count; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagCreateReqVO.java new file mode 100644 index 000000000..a9ff3a8e8 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 粉丝标签创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansTagCreateReqVO extends WxFansTagBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagExcelVO.java new file mode 100644 index 000000000..26ecdeb25 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagExcelVO.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 粉丝标签 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxFansTagExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("标签名称") + private String name; + + @ExcelProperty("粉丝数量") + private Integer count; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagExportReqVO.java new file mode 100644 index 000000000..f5ba4be2f --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagExportReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 粉丝标签 Excel 导出 Request VO", description = "参数和 WxFansTagPageReqVO 是一致的") +@Data +public class WxFansTagExportReqVO { + + @ApiModelProperty(value = "标签名称") + private String name; + + @ApiModelProperty(value = "粉丝数量") + private Integer count; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagPageReqVO.java new file mode 100644 index 000000000..94690e909 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagPageReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 粉丝标签分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansTagPageReqVO extends PageParam { + + @ApiModelProperty(value = "标签名称") + private String name; + + @ApiModelProperty(value = "粉丝数量") + private Integer count; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagRespVO.java new file mode 100644 index 000000000..601353583 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 粉丝标签 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansTagRespVO extends WxFansTagBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagUpdateReqVO.java new file mode 100644 index 000000000..155f263dd --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/fanstag/vo/WxFansTagUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 粉丝标签更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxFansTagUpdateReqVO extends WxFansTagBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/WxMediaUploadController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/WxMediaUploadController.java new file mode 100644 index 000000000..3a6b941fb --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/WxMediaUploadController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.mediaupload; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; +import cn.iocoder.yudao.module.mp.convert.mediaupload.WxMediaUploadConvert; +import cn.iocoder.yudao.module.mp.service.mediaupload.WxMediaUploadService; + +@Api(tags = "管理后台 - 微信素材上传表 ") +@RestController +@RequestMapping("/wechatMp/wx-media-upload") +@Validated +public class WxMediaUploadController { + + @Resource + private WxMediaUploadService wxMediaUploadService; + + @PostMapping("/create") + @ApiOperation("创建微信素材上传表 ") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:create')") + public CommonResult createWxMediaUpload(@Valid @RequestBody WxMediaUploadCreateReqVO createReqVO) { + return success(wxMediaUploadService.createWxMediaUpload(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新微信素材上传表 ") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:update')") + public CommonResult updateWxMediaUpload(@Valid @RequestBody WxMediaUploadUpdateReqVO updateReqVO) { + wxMediaUploadService.updateWxMediaUpload(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除微信素材上传表 ") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:delete')") + public CommonResult deleteWxMediaUpload(@RequestParam("id") Integer id) { + wxMediaUploadService.deleteWxMediaUpload(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得微信素材上传表 ") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:query')") + public CommonResult getWxMediaUpload(@RequestParam("id") Integer id) { + WxMediaUploadDO wxMediaUpload = wxMediaUploadService.getWxMediaUpload(id); + return success(WxMediaUploadConvert.INSTANCE.convert(wxMediaUpload)); + } + + @GetMapping("/list") + @ApiOperation("获得微信素材上传表 列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:query')") + public CommonResult> getWxMediaUploadList(@RequestParam("ids") Collection ids) { + List list = wxMediaUploadService.getWxMediaUploadList(ids); + return success(WxMediaUploadConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得微信素材上传表 分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:query')") + public CommonResult> getWxMediaUploadPage(@Valid WxMediaUploadPageReqVO pageVO) { + PageResult pageResult = wxMediaUploadService.getWxMediaUploadPage(pageVO); + return success(WxMediaUploadConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出微信素材上传表 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:export')") + @OperateLog(type = EXPORT) + public void exportWxMediaUploadExcel(@Valid WxMediaUploadExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxMediaUploadService.getWxMediaUploadList(exportReqVO); + // 导出 Excel + List datas = WxMediaUploadConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "微信素材上传表 .xls", "数据", WxMediaUploadExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadBaseVO.java new file mode 100644 index 000000000..c00af4f2f --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadBaseVO.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 微信素材上传表 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxMediaUploadBaseVO { + + @ApiModelProperty(value = "类型") + private String type; + + @ApiModelProperty(value = "图片URL") + private String url; + + @ApiModelProperty(value = "素材ID") + private String mediaId; + + @ApiModelProperty(value = "缩略图素材ID") + private String thumbMediaId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadCreateReqVO.java new file mode 100644 index 000000000..e26be6eb2 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 微信素材上传表 创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxMediaUploadCreateReqVO extends WxMediaUploadBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExcelVO.java new file mode 100644 index 000000000..26e4597da --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExcelVO.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 微信素材上传表 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxMediaUploadExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("类型") + private String type; + + @ExcelProperty("图片URL") + private String url; + + @ExcelProperty("素材ID") + private String mediaId; + + @ExcelProperty("缩略图素材ID") + private String thumbMediaId; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExportReqVO.java new file mode 100644 index 000000000..a5d412eb2 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExportReqVO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 微信素材上传表 Excel 导出 Request VO", description = "参数和 WxMediaUploadPageReqVO 是一致的") +@Data +public class WxMediaUploadExportReqVO { + + @ApiModelProperty(value = "类型") + private String type; + + @ApiModelProperty(value = "图片URL") + private String url; + + @ApiModelProperty(value = "素材ID") + private String mediaId; + + @ApiModelProperty(value = "缩略图素材ID") + private String thumbMediaId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadPageReqVO.java new file mode 100644 index 000000000..32a4c17a1 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadPageReqVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 微信素材上传表 分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxMediaUploadPageReqVO extends PageParam { + + @ApiModelProperty(value = "类型") + private String type; + + @ApiModelProperty(value = "图片URL") + private String url; + + @ApiModelProperty(value = "素材ID") + private String mediaId; + + @ApiModelProperty(value = "缩略图素材ID") + private String thumbMediaId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadRespVO.java new file mode 100644 index 000000000..e2e173081 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 微信素材上传表 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxMediaUploadRespVO extends WxMediaUploadBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadUpdateReqVO.java new file mode 100644 index 000000000..a094a1481 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 微信素材上传表 更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxMediaUploadUpdateReqVO extends WxMediaUploadBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/WxMenuController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/WxMenuController.java new file mode 100644 index 000000000..d8472fb5d --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/WxMenuController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.menu; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.menu.WxMenuDO; +import cn.iocoder.yudao.module.mp.convert.menu.WxMenuConvert; +import cn.iocoder.yudao.module.mp.service.menu.WxMenuService; + +@Api(tags = "管理后台 - 微信菜单") +@RestController +@RequestMapping("/wechatMp/wx-menu") +@Validated +public class WxMenuController { + + @Resource + private WxMenuService wxMenuService; + + @PostMapping("/create") + @ApiOperation("创建微信菜单") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-menu:create')") + public CommonResult createWxMenu(@Valid @RequestBody WxMenuCreateReqVO createReqVO) { + return success(wxMenuService.createWxMenu(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新微信菜单") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-menu:update')") + public CommonResult updateWxMenu(@Valid @RequestBody WxMenuUpdateReqVO updateReqVO) { + wxMenuService.updateWxMenu(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除微信菜单") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-menu:delete')") + public CommonResult deleteWxMenu(@RequestParam("id") Integer id) { + wxMenuService.deleteWxMenu(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得微信菜单") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-menu:query')") + public CommonResult getWxMenu(@RequestParam("id") Integer id) { + WxMenuDO wxMenu = wxMenuService.getWxMenu(id); + return success(WxMenuConvert.INSTANCE.convert(wxMenu)); + } + + @GetMapping("/list") + @ApiOperation("获得微信菜单列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-menu:query')") + public CommonResult> getWxMenuList(@RequestParam("ids") Collection ids) { + List list = wxMenuService.getWxMenuList(ids); + return success(WxMenuConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得微信菜单分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-menu:query')") + public CommonResult> getWxMenuPage(@Valid WxMenuPageReqVO pageVO) { + PageResult pageResult = wxMenuService.getWxMenuPage(pageVO); + return success(WxMenuConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出微信菜单 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-menu:export')") + @OperateLog(type = EXPORT) + public void exportWxMenuExcel(@Valid WxMenuExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxMenuService.getWxMenuList(exportReqVO); + // 导出 Excel + List datas = WxMenuConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "微信菜单.xls", "数据", WxMenuExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuBaseVO.java new file mode 100644 index 000000000..303d4a818 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuBaseVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.mp.controller.admin.menu.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 微信菜单 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxMenuBaseVO { + + @ApiModelProperty(value = "父ID") + private String parentId; + + @ApiModelProperty(value = "菜单名称") + private String menuName; + + @ApiModelProperty(value = "菜单类型 1文本消息;2图文消息;3网址链接;4小程序") + private String menuType; + + @ApiModelProperty(value = "菜单等级") + private String menuLevel; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "菜单URL") + private String menuUrl; + + @ApiModelProperty(value = "排序") + private String menuSort; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @ApiModelProperty(value = "小程序appid") + private String miniprogramAppid; + + @ApiModelProperty(value = "小程序页面路径") + private String miniprogramPagepath; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuCreateReqVO.java new file mode 100644 index 000000000..1f5e52749 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.menu.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 微信菜单创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxMenuCreateReqVO extends WxMenuBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuExcelVO.java new file mode 100644 index 000000000..89302f2d2 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuExcelVO.java @@ -0,0 +1,53 @@ +package cn.iocoder.yudao.module.mp.controller.admin.menu.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 微信菜单 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxMenuExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("父ID") + private String parentId; + + @ExcelProperty("菜单名称") + private String menuName; + + @ExcelProperty("菜单类型 1文本消息;2图文消息;3网址链接;4小程序") + private String menuType; + + @ExcelProperty("菜单等级") + private String menuLevel; + + @ExcelProperty("模板ID") + private String tplId; + + @ExcelProperty("菜单URL") + private String menuUrl; + + @ExcelProperty("排序") + private String menuSort; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("小程序appid") + private String miniprogramAppid; + + @ExcelProperty("小程序页面路径") + private String miniprogramPagepath; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuExportReqVO.java new file mode 100644 index 000000000..4faa5338f --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuExportReqVO.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.mp.controller.admin.menu.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 微信菜单 Excel 导出 Request VO", description = "参数和 WxMenuPageReqVO 是一致的") +@Data +public class WxMenuExportReqVO { + + @ApiModelProperty(value = "父ID") + private String parentId; + + @ApiModelProperty(value = "菜单名称") + private String menuName; + + @ApiModelProperty(value = "菜单类型 1文本消息;2图文消息;3网址链接;4小程序") + private String menuType; + + @ApiModelProperty(value = "菜单等级") + private String menuLevel; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "菜单URL") + private String menuUrl; + + @ApiModelProperty(value = "排序") + private String menuSort; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @ApiModelProperty(value = "小程序appid") + private String miniprogramAppid; + + @ApiModelProperty(value = "小程序页面路径") + private String miniprogramPagepath; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuPageReqVO.java new file mode 100644 index 000000000..5fe1cbe0f --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuPageReqVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.mp.controller.admin.menu.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 微信菜单分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxMenuPageReqVO extends PageParam { + + @ApiModelProperty(value = "父ID") + private String parentId; + + @ApiModelProperty(value = "菜单名称") + private String menuName; + + @ApiModelProperty(value = "菜单类型 1文本消息;2图文消息;3网址链接;4小程序") + private String menuType; + + @ApiModelProperty(value = "菜单等级") + private String menuLevel; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "菜单URL") + private String menuUrl; + + @ApiModelProperty(value = "排序") + private String menuSort; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @ApiModelProperty(value = "小程序appid") + private String miniprogramAppid; + + @ApiModelProperty(value = "小程序页面路径") + private String miniprogramPagepath; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuRespVO.java new file mode 100644 index 000000000..21ccf9834 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.menu.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 微信菜单 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxMenuRespVO extends WxMenuBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuUpdateReqVO.java new file mode 100644 index 000000000..5603624a4 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/menu/vo/WxMenuUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.menu.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 微信菜单更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxMenuUpdateReqVO extends WxMenuBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/WxNewsArticleItemController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/WxNewsArticleItemController.java new file mode 100644 index 000000000..652c56c78 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/WxNewsArticleItemController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.newsarticleitem.WxNewsArticleItemDO; +import cn.iocoder.yudao.module.mp.convert.newsarticleitem.WxNewsArticleItemConvert; +import cn.iocoder.yudao.module.mp.service.newsarticleitem.WxNewsArticleItemService; + +@Api(tags = "管理后台 - 图文消息文章列表表 ") +@RestController +@RequestMapping("/wechatMp/wx-news-article-item") +@Validated +public class WxNewsArticleItemController { + + @Resource + private WxNewsArticleItemService wxNewsArticleItemService; + + @PostMapping("/create") + @ApiOperation("创建图文消息文章列表表 ") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-article-item:create')") + public CommonResult createWxNewsArticleItem(@Valid @RequestBody WxNewsArticleItemCreateReqVO createReqVO) { + return success(wxNewsArticleItemService.createWxNewsArticleItem(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新图文消息文章列表表 ") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-article-item:update')") + public CommonResult updateWxNewsArticleItem(@Valid @RequestBody WxNewsArticleItemUpdateReqVO updateReqVO) { + wxNewsArticleItemService.updateWxNewsArticleItem(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除图文消息文章列表表 ") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-article-item:delete')") + public CommonResult deleteWxNewsArticleItem(@RequestParam("id") Integer id) { + wxNewsArticleItemService.deleteWxNewsArticleItem(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得图文消息文章列表表 ") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-article-item:query')") + public CommonResult getWxNewsArticleItem(@RequestParam("id") Integer id) { + WxNewsArticleItemDO wxNewsArticleItem = wxNewsArticleItemService.getWxNewsArticleItem(id); + return success(WxNewsArticleItemConvert.INSTANCE.convert(wxNewsArticleItem)); + } + + @GetMapping("/list") + @ApiOperation("获得图文消息文章列表表 列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-article-item:query')") + public CommonResult> getWxNewsArticleItemList(@RequestParam("ids") Collection ids) { + List list = wxNewsArticleItemService.getWxNewsArticleItemList(ids); + return success(WxNewsArticleItemConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得图文消息文章列表表 分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-article-item:query')") + public CommonResult> getWxNewsArticleItemPage(@Valid WxNewsArticleItemPageReqVO pageVO) { + PageResult pageResult = wxNewsArticleItemService.getWxNewsArticleItemPage(pageVO); + return success(WxNewsArticleItemConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出图文消息文章列表表 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-article-item:export')") + @OperateLog(type = EXPORT) + public void exportWxNewsArticleItemExcel(@Valid WxNewsArticleItemExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxNewsArticleItemService.getWxNewsArticleItemList(exportReqVO); + // 导出 Excel + List datas = WxNewsArticleItemConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "图文消息文章列表表 .xls", "数据", WxNewsArticleItemExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemBaseVO.java new file mode 100644 index 000000000..78a5e96e9 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemBaseVO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 图文消息文章列表表 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxNewsArticleItemBaseVO { + + @ApiModelProperty(value = "标题") + private String title; + + @ApiModelProperty(value = "摘要") + private String digest; + + @ApiModelProperty(value = "作者") + private String author; + + @ApiModelProperty(value = "是否展示封面图片(0/1)") + private String showCoverPic; + + @ApiModelProperty(value = "上传微信,封面图片标识") + private String thumbMediaId; + + @ApiModelProperty(value = "内容") + private String content; + + @ApiModelProperty(value = "内容链接") + private String contentSourceUrl; + + @ApiModelProperty(value = "文章排序") + private Integer orderNo; + + @ApiModelProperty(value = "图片路径") + private String picPath; + + @ApiModelProperty(value = "是否可以留言") + private String needOpenComment; + + @ApiModelProperty(value = "是否仅粉丝可以留言") + private String onlyFansCanComment; + + @ApiModelProperty(value = "图文ID") + private String newsId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemCreateReqVO.java new file mode 100644 index 000000000..8dba64c05 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 图文消息文章列表表 创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxNewsArticleItemCreateReqVO extends WxNewsArticleItemBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemExcelVO.java new file mode 100644 index 000000000..d1172e539 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemExcelVO.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 图文消息文章列表表 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxNewsArticleItemExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("标题") + private String title; + + @ExcelProperty("摘要") + private String digest; + + @ExcelProperty("作者") + private String author; + + @ExcelProperty("是否展示封面图片(0/1)") + private String showCoverPic; + + @ExcelProperty("上传微信,封面图片标识") + private String thumbMediaId; + + @ExcelProperty("内容") + private String content; + + @ExcelProperty("内容链接") + private String contentSourceUrl; + + @ExcelProperty("文章排序") + private Integer orderNo; + + @ExcelProperty("图片路径") + private String picPath; + + @ExcelProperty("是否可以留言") + private String needOpenComment; + + @ExcelProperty("是否仅粉丝可以留言") + private String onlyFansCanComment; + + @ExcelProperty("图文ID") + private String newsId; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemExportReqVO.java new file mode 100644 index 000000000..90571a766 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemExportReqVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 图文消息文章列表表 Excel 导出 Request VO", description = "参数和 WxNewsArticleItemPageReqVO 是一致的") +@Data +public class WxNewsArticleItemExportReqVO { + + @ApiModelProperty(value = "标题") + private String title; + + @ApiModelProperty(value = "摘要") + private String digest; + + @ApiModelProperty(value = "作者") + private String author; + + @ApiModelProperty(value = "是否展示封面图片(0/1)") + private String showCoverPic; + + @ApiModelProperty(value = "上传微信,封面图片标识") + private String thumbMediaId; + + @ApiModelProperty(value = "内容") + private String content; + + @ApiModelProperty(value = "内容链接") + private String contentSourceUrl; + + @ApiModelProperty(value = "文章排序") + private Integer orderNo; + + @ApiModelProperty(value = "图片路径") + private String picPath; + + @ApiModelProperty(value = "是否可以留言") + private String needOpenComment; + + @ApiModelProperty(value = "是否仅粉丝可以留言") + private String onlyFansCanComment; + + @ApiModelProperty(value = "图文ID") + private String newsId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemPageReqVO.java new file mode 100644 index 000000000..52b6af862 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemPageReqVO.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 图文消息文章列表表 分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxNewsArticleItemPageReqVO extends PageParam { + + @ApiModelProperty(value = "标题") + private String title; + + @ApiModelProperty(value = "摘要") + private String digest; + + @ApiModelProperty(value = "作者") + private String author; + + @ApiModelProperty(value = "是否展示封面图片(0/1)") + private String showCoverPic; + + @ApiModelProperty(value = "上传微信,封面图片标识") + private String thumbMediaId; + + @ApiModelProperty(value = "内容") + private String content; + + @ApiModelProperty(value = "内容链接") + private String contentSourceUrl; + + @ApiModelProperty(value = "文章排序") + private Integer orderNo; + + @ApiModelProperty(value = "图片路径") + private String picPath; + + @ApiModelProperty(value = "是否可以留言") + private String needOpenComment; + + @ApiModelProperty(value = "是否仅粉丝可以留言") + private String onlyFansCanComment; + + @ApiModelProperty(value = "图文ID") + private String newsId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemRespVO.java new file mode 100644 index 000000000..7ed2c33df --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 图文消息文章列表表 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxNewsArticleItemRespVO extends WxNewsArticleItemBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemUpdateReqVO.java new file mode 100644 index 000000000..72f235185 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newsarticleitem/vo/WxNewsArticleItemUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 图文消息文章列表表 更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxNewsArticleItemUpdateReqVO extends WxNewsArticleItemBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/WxNewsTemplateController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/WxNewsTemplateController.java new file mode 100644 index 000000000..c6c7220cb --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/WxNewsTemplateController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newstemplate; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.newstemplate.WxNewsTemplateDO; +import cn.iocoder.yudao.module.mp.convert.newstemplate.WxNewsTemplateConvert; +import cn.iocoder.yudao.module.mp.service.newstemplate.WxNewsTemplateService; + +@Api(tags = "管理后台 - 图文消息模板") +@RestController +@RequestMapping("/wechatMp/wx-news-template") +@Validated +public class WxNewsTemplateController { + + @Resource + private WxNewsTemplateService wxNewsTemplateService; + + @PostMapping("/create") + @ApiOperation("创建图文消息模板") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-template:create')") + public CommonResult createWxNewsTemplate(@Valid @RequestBody WxNewsTemplateCreateReqVO createReqVO) { + return success(wxNewsTemplateService.createWxNewsTemplate(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新图文消息模板") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-template:update')") + public CommonResult updateWxNewsTemplate(@Valid @RequestBody WxNewsTemplateUpdateReqVO updateReqVO) { + wxNewsTemplateService.updateWxNewsTemplate(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除图文消息模板") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-template:delete')") + public CommonResult deleteWxNewsTemplate(@RequestParam("id") Integer id) { + wxNewsTemplateService.deleteWxNewsTemplate(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得图文消息模板") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-template:query')") + public CommonResult getWxNewsTemplate(@RequestParam("id") Integer id) { + WxNewsTemplateDO wxNewsTemplate = wxNewsTemplateService.getWxNewsTemplate(id); + return success(WxNewsTemplateConvert.INSTANCE.convert(wxNewsTemplate)); + } + + @GetMapping("/list") + @ApiOperation("获得图文消息模板列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-template:query')") + public CommonResult> getWxNewsTemplateList(@RequestParam("ids") Collection ids) { + List list = wxNewsTemplateService.getWxNewsTemplateList(ids); + return success(WxNewsTemplateConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得图文消息模板分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-template:query')") + public CommonResult> getWxNewsTemplatePage(@Valid WxNewsTemplatePageReqVO pageVO) { + PageResult pageResult = wxNewsTemplateService.getWxNewsTemplatePage(pageVO); + return success(WxNewsTemplateConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出图文消息模板 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-news-template:export')") + @OperateLog(type = EXPORT) + public void exportWxNewsTemplateExcel(@Valid WxNewsTemplateExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxNewsTemplateService.getWxNewsTemplateList(exportReqVO); + // 导出 Excel + List datas = WxNewsTemplateConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "图文消息模板.xls", "数据", WxNewsTemplateExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateBaseVO.java new file mode 100644 index 000000000..387243ed8 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateBaseVO.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 图文消息模板 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxNewsTemplateBaseVO { + + @ApiModelProperty(value = "模板名称") + private String tplName; + + @ApiModelProperty(value = "是否已上传微信") + private String isUpload; + + @ApiModelProperty(value = "素材ID") + private String mediaId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateCreateReqVO.java new file mode 100644 index 000000000..0e4996b92 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 图文消息模板创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxNewsTemplateCreateReqVO extends WxNewsTemplateBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateExcelVO.java new file mode 100644 index 000000000..0d0823249 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateExcelVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 图文消息模板 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxNewsTemplateExcelVO { + + @ExcelProperty("主键 主键ID") + private Integer id; + + @ExcelProperty("模板名称") + private String tplName; + + @ExcelProperty("是否已上传微信") + private String isUpload; + + @ExcelProperty("素材ID") + private String mediaId; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateExportReqVO.java new file mode 100644 index 000000000..12c30ab94 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateExportReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 图文消息模板 Excel 导出 Request VO", description = "参数和 WxNewsTemplatePageReqVO 是一致的") +@Data +public class WxNewsTemplateExportReqVO { + + @ApiModelProperty(value = "模板名称") + private String tplName; + + @ApiModelProperty(value = "是否已上传微信") + private String isUpload; + + @ApiModelProperty(value = "素材ID") + private String mediaId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplatePageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplatePageReqVO.java new file mode 100644 index 000000000..f0e85c0aa --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplatePageReqVO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 图文消息模板分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxNewsTemplatePageReqVO extends PageParam { + + @ApiModelProperty(value = "模板名称") + private String tplName; + + @ApiModelProperty(value = "是否已上传微信") + private String isUpload; + + @ApiModelProperty(value = "素材ID") + private String mediaId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateRespVO.java new file mode 100644 index 000000000..697ff642c --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 图文消息模板 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxNewsTemplateRespVO extends WxNewsTemplateBaseVO { + + @ApiModelProperty(value = "主键 主键ID", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateUpdateReqVO.java new file mode 100644 index 000000000..e8ae49a8a --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/newstemplate/vo/WxNewsTemplateUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 图文消息模板更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxNewsTemplateUpdateReqVO extends WxNewsTemplateBaseVO { + + @ApiModelProperty(value = "主键 主键ID", required = true) + @NotNull(message = "主键 主键ID不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/WxReceiveTextController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/WxReceiveTextController.java new file mode 100644 index 000000000..a1a0aa51e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/WxReceiveTextController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.receivetext; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; +import cn.iocoder.yudao.module.mp.convert.receivetext.WxReceiveTextConvert; +import cn.iocoder.yudao.module.mp.service.receivetext.WxReceiveTextService; + +@Api(tags = "管理后台 - 回复关键字") +@RestController +@RequestMapping("/wechatMp/wx-receive-text") +@Validated +public class WxReceiveTextController { + + @Resource + private WxReceiveTextService wxReceiveTextService; + + @PostMapping("/create") + @ApiOperation("创建回复关键字") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:create')") + public CommonResult createWxReceiveText(@Valid @RequestBody WxReceiveTextCreateReqVO createReqVO) { + return success(wxReceiveTextService.createWxReceiveText(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新回复关键字") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:update')") + public CommonResult updateWxReceiveText(@Valid @RequestBody WxReceiveTextUpdateReqVO updateReqVO) { + wxReceiveTextService.updateWxReceiveText(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除回复关键字") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:delete')") + public CommonResult deleteWxReceiveText(@RequestParam("id") Integer id) { + wxReceiveTextService.deleteWxReceiveText(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得回复关键字") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:query')") + public CommonResult getWxReceiveText(@RequestParam("id") Integer id) { + WxReceiveTextDO wxReceiveText = wxReceiveTextService.getWxReceiveText(id); + return success(WxReceiveTextConvert.INSTANCE.convert(wxReceiveText)); + } + + @GetMapping("/list") + @ApiOperation("获得回复关键字列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:query')") + public CommonResult> getWxReceiveTextList(@RequestParam("ids") Collection ids) { + List list = wxReceiveTextService.getWxReceiveTextList(ids); + return success(WxReceiveTextConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得回复关键字分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:query')") + public CommonResult> getWxReceiveTextPage(@Valid WxReceiveTextPageReqVO pageVO) { + PageResult pageResult = wxReceiveTextService.getWxReceiveTextPage(pageVO); + return success(WxReceiveTextConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出回复关键字 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:export')") + @OperateLog(type = EXPORT) + public void exportWxReceiveTextExcel(@Valid WxReceiveTextExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxReceiveTextService.getWxReceiveTextList(exportReqVO); + // 导出 Excel + List datas = WxReceiveTextConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "回复关键字.xls", "数据", WxReceiveTextExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextBaseVO.java new file mode 100644 index 000000000..0eaf5976c --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextBaseVO.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 回复关键字 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxReceiveTextBaseVO { + + @ApiModelProperty(value = "关键字") + private String receiveText; + + @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") + private String msgType; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextCreateReqVO.java new file mode 100644 index 000000000..ca654b3eb --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 回复关键字创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxReceiveTextCreateReqVO extends WxReceiveTextBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExcelVO.java new file mode 100644 index 000000000..407029afc --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExcelVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 回复关键字 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxReceiveTextExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("关键字") + private String receiveText; + + @ExcelProperty("消息类型 1文本消息;2图文消息;") + private String msgType; + + @ExcelProperty("模板ID") + private String tplId; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExportReqVO.java new file mode 100644 index 000000000..b511b0aef --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExportReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 回复关键字 Excel 导出 Request VO", description = "参数和 WxReceiveTextPageReqVO 是一致的") +@Data +public class WxReceiveTextExportReqVO { + + @ApiModelProperty(value = "关键字") + private String receiveText; + + @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") + private String msgType; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextPageReqVO.java new file mode 100644 index 000000000..373a8cd51 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextPageReqVO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 回复关键字分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxReceiveTextPageReqVO extends PageParam { + + @ApiModelProperty(value = "关键字") + private String receiveText; + + @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") + private String msgType; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextRespVO.java new file mode 100644 index 000000000..12c36056e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 回复关键字 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxReceiveTextRespVO extends WxReceiveTextBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextUpdateReqVO.java new file mode 100644 index 000000000..6abc53551 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 回复关键字更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxReceiveTextUpdateReqVO extends WxReceiveTextBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/WxSubscribeTextController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/WxSubscribeTextController.java new file mode 100644 index 000000000..a98913d06 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/WxSubscribeTextController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.subscribetext; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.subscribetext.WxSubscribeTextDO; +import cn.iocoder.yudao.module.mp.convert.subscribetext.WxSubscribeTextConvert; +import cn.iocoder.yudao.module.mp.service.subscribetext.WxSubscribeTextService; + +@Api(tags = "管理后台 - 关注欢迎语") +@RestController +@RequestMapping("/wechatMp/wx-subscribe-text") +@Validated +public class WxSubscribeTextController { + + @Resource + private WxSubscribeTextService wxSubscribeTextService; + + @PostMapping("/create") + @ApiOperation("创建关注欢迎语") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-subscribe-text:create')") + public CommonResult createWxSubscribeText(@Valid @RequestBody WxSubscribeTextCreateReqVO createReqVO) { + return success(wxSubscribeTextService.createWxSubscribeText(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新关注欢迎语") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-subscribe-text:update')") + public CommonResult updateWxSubscribeText(@Valid @RequestBody WxSubscribeTextUpdateReqVO updateReqVO) { + wxSubscribeTextService.updateWxSubscribeText(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除关注欢迎语") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-subscribe-text:delete')") + public CommonResult deleteWxSubscribeText(@RequestParam("id") Integer id) { + wxSubscribeTextService.deleteWxSubscribeText(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得关注欢迎语") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-subscribe-text:query')") + public CommonResult getWxSubscribeText(@RequestParam("id") Integer id) { + WxSubscribeTextDO wxSubscribeText = wxSubscribeTextService.getWxSubscribeText(id); + return success(WxSubscribeTextConvert.INSTANCE.convert(wxSubscribeText)); + } + + @GetMapping("/list") + @ApiOperation("获得关注欢迎语列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-subscribe-text:query')") + public CommonResult> getWxSubscribeTextList(@RequestParam("ids") Collection ids) { + List list = wxSubscribeTextService.getWxSubscribeTextList(ids); + return success(WxSubscribeTextConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得关注欢迎语分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-subscribe-text:query')") + public CommonResult> getWxSubscribeTextPage(@Valid WxSubscribeTextPageReqVO pageVO) { + PageResult pageResult = wxSubscribeTextService.getWxSubscribeTextPage(pageVO); + return success(WxSubscribeTextConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出关注欢迎语 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-subscribe-text:export')") + @OperateLog(type = EXPORT) + public void exportWxSubscribeTextExcel(@Valid WxSubscribeTextExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxSubscribeTextService.getWxSubscribeTextList(exportReqVO); + // 导出 Excel + List datas = WxSubscribeTextConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "关注欢迎语.xls", "数据", WxSubscribeTextExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextBaseVO.java new file mode 100644 index 000000000..de1b51e25 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextBaseVO.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 关注欢迎语 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxSubscribeTextBaseVO { + + @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") + private String msgType; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextCreateReqVO.java new file mode 100644 index 000000000..7ade450c0 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 关注欢迎语创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxSubscribeTextCreateReqVO extends WxSubscribeTextBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextExcelVO.java new file mode 100644 index 000000000..e4772a06d --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextExcelVO.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 关注欢迎语 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxSubscribeTextExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("消息类型 1文本消息;2图文消息;") + private String msgType; + + @ExcelProperty("模板ID") + private String tplId; + + @ExcelProperty("微信账号ID") + private String wxAccountId; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextExportReqVO.java new file mode 100644 index 000000000..fee0e5887 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextExportReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 关注欢迎语 Excel 导出 Request VO", description = "参数和 WxSubscribeTextPageReqVO 是一致的") +@Data +public class WxSubscribeTextExportReqVO { + + @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") + private String msgType; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextPageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextPageReqVO.java new file mode 100644 index 000000000..22a2adb92 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextPageReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 关注欢迎语分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxSubscribeTextPageReqVO extends PageParam { + + @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") + private String msgType; + + @ApiModelProperty(value = "模板ID") + private String tplId; + + @ApiModelProperty(value = "微信账号ID") + private String wxAccountId; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextRespVO.java new file mode 100644 index 000000000..f9d61ea6e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 关注欢迎语 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxSubscribeTextRespVO extends WxSubscribeTextBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextUpdateReqVO.java new file mode 100644 index 000000000..b314c5cdb --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/subscribetext/vo/WxSubscribeTextUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 关注欢迎语更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxSubscribeTextUpdateReqVO extends WxSubscribeTextBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/WxTextTemplateController.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/WxTextTemplateController.java new file mode 100644 index 000000000..c6428a03f --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/WxTextTemplateController.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.mp.controller.admin.texttemplate; + +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; + +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; +import cn.iocoder.yudao.module.mp.convert.texttemplate.WxTextTemplateConvert; +import cn.iocoder.yudao.module.mp.service.texttemplate.WxTextTemplateService; + +@Api(tags = "管理后台 - 文本模板") +@RestController +@RequestMapping("/wechatMp/wx-text-template") +@Validated +public class WxTextTemplateController { + + @Resource + private WxTextTemplateService wxTextTemplateService; + + @PostMapping("/create") + @ApiOperation("创建文本模板") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:create')") + public CommonResult createWxTextTemplate(@Valid @RequestBody WxTextTemplateCreateReqVO createReqVO) { + return success(wxTextTemplateService.createWxTextTemplate(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新文本模板") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:update')") + public CommonResult updateWxTextTemplate(@Valid @RequestBody WxTextTemplateUpdateReqVO updateReqVO) { + wxTextTemplateService.updateWxTextTemplate(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除文本模板") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:delete')") + public CommonResult deleteWxTextTemplate(@RequestParam("id") Integer id) { + wxTextTemplateService.deleteWxTextTemplate(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得文本模板") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:query')") + public CommonResult getWxTextTemplate(@RequestParam("id") Integer id) { + WxTextTemplateDO wxTextTemplate = wxTextTemplateService.getWxTextTemplate(id); + return success(WxTextTemplateConvert.INSTANCE.convert(wxTextTemplate)); + } + + @GetMapping("/list") + @ApiOperation("获得文本模板列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:query')") + public CommonResult> getWxTextTemplateList(@RequestParam("ids") Collection ids) { + List list = wxTextTemplateService.getWxTextTemplateList(ids); + return success(WxTextTemplateConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得文本模板分页") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:query')") + public CommonResult> getWxTextTemplatePage(@Valid WxTextTemplatePageReqVO pageVO) { + PageResult pageResult = wxTextTemplateService.getWxTextTemplatePage(pageVO); + return success(WxTextTemplateConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出文本模板 Excel") + @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:export')") + @OperateLog(type = EXPORT) + public void exportWxTextTemplateExcel(@Valid WxTextTemplateExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = wxTextTemplateService.getWxTextTemplateList(exportReqVO); + // 导出 Excel + List datas = WxTextTemplateConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "文本模板.xls", "数据", WxTextTemplateExcelVO.class, datas); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateBaseVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateBaseVO.java new file mode 100644 index 000000000..38b9cd9d2 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateBaseVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; + +import lombok.*; +import io.swagger.annotations.*; + +/** + * 文本模板 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class WxTextTemplateBaseVO { + + @ApiModelProperty(value = "模板名字") + private String tplName; + + @ApiModelProperty(value = "模板内容") + private String content; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateCreateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateCreateReqVO.java new file mode 100644 index 000000000..1ec6c0268 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 文本模板创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxTextTemplateCreateReqVO extends WxTextTemplateBaseVO { + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExcelVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExcelVO.java new file mode 100644 index 000000000..4d0389059 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExcelVO.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; + +import lombok.*; + +import java.util.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 文本模板 Excel VO + * + * @author 芋道源码 + */ +@Data +public class WxTextTemplateExcelVO { + + @ExcelProperty("主键") + private Integer id; + + @ExcelProperty("模板名字") + private String tplName; + + @ExcelProperty("模板内容") + private String content; + + @ExcelProperty("创建时间") + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExportReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExportReqVO.java new file mode 100644 index 000000000..0bc6467da --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExportReqVO.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - 文本模板 Excel 导出 Request VO", description = "参数和 WxTextTemplatePageReqVO 是一致的") +@Data +public class WxTextTemplateExportReqVO { + + @ApiModelProperty(value = "模板名字") + private String tplName; + + @ApiModelProperty(value = "模板内容") + private String content; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplatePageReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplatePageReqVO.java new file mode 100644 index 000000000..0bcbaf468 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplatePageReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 文本模板分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxTextTemplatePageReqVO extends PageParam { + + @ApiModelProperty(value = "模板名字") + private String tplName; + + @ApiModelProperty(value = "模板内容") + private String content; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始创建时间") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束创建时间") + private Date endCreateTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateRespVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateRespVO.java new file mode 100644 index 000000000..b12c5a23c --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; + +import lombok.*; + +import java.util.*; + +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 文本模板 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxTextTemplateRespVO extends WxTextTemplateBaseVO { + + @ApiModelProperty(value = "主键", required = true) + private Integer id; + + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateUpdateReqVO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateUpdateReqVO.java new file mode 100644 index 000000000..0de0a2c5b --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; + +import lombok.*; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 文本模板更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WxTextTemplateUpdateReqVO extends WxTextTemplateBaseVO { + + @ApiModelProperty(value = "主键", required = true) + @NotNull(message = "主键不能为空") + private Integer id; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/account/WxAccountConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/account/WxAccountConvert.java index ce4c79ab8..4646722b8 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/account/WxAccountConvert.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/account/WxAccountConvert.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.mp.convert.account; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountCreateReqVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountExcelVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountRespVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountUpdateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountCreateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountExcelVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountRespVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountUpdateReqVO; import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/accountfans/WxAccountFansConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/accountfans/WxAccountFansConvert.java index 6bf995713..190cc9c8f 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/accountfans/WxAccountFansConvert.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/accountfans/WxAccountFansConvert.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.mp.convert.accountfans; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansCreateReqVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansExcelVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansRespVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansUpdateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansCreateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansExcelVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansRespVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansUpdateReqVO; import cn.iocoder.yudao.module.mp.dal.dataobject.accountfans.WxAccountFansDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/accountfanstag/WxAccountFansTagConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/accountfanstag/WxAccountFansTagConvert.java new file mode 100644 index 000000000..ea7723c8b --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/accountfanstag/WxAccountFansTagConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.accountfanstag; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.accountfanstag.WxAccountFansTagDO; + +/** + * 粉丝标签关联 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxAccountFansTagConvert { + + WxAccountFansTagConvert INSTANCE = Mappers.getMapper(WxAccountFansTagConvert.class); + + WxAccountFansTagDO convert(WxAccountFansTagCreateReqVO bean); + + WxAccountFansTagDO convert(WxAccountFansTagUpdateReqVO bean); + + WxAccountFansTagRespVO convert(WxAccountFansTagDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fansmsg/WxFansMsgConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fansmsg/WxFansMsgConvert.java new file mode 100644 index 000000000..8848bf927 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fansmsg/WxFansMsgConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.fansmsg; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsg.WxFansMsgDO; + +/** + * 粉丝消息表 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxFansMsgConvert { + + WxFansMsgConvert INSTANCE = Mappers.getMapper(WxFansMsgConvert.class); + + WxFansMsgDO convert(WxFansMsgCreateReqVO bean); + + WxFansMsgDO convert(WxFansMsgUpdateReqVO bean); + + WxFansMsgRespVO convert(WxFansMsgDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fansmsgres/WxFansMsgResConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fansmsgres/WxFansMsgResConvert.java new file mode 100644 index 000000000..fab15bf77 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fansmsgres/WxFansMsgResConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.fansmsgres; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsgres.WxFansMsgResDO; + +/** + * 回复粉丝消息历史表 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxFansMsgResConvert { + + WxFansMsgResConvert INSTANCE = Mappers.getMapper(WxFansMsgResConvert.class); + + WxFansMsgResDO convert(WxFansMsgResCreateReqVO bean); + + WxFansMsgResDO convert(WxFansMsgResUpdateReqVO bean); + + WxFansMsgResRespVO convert(WxFansMsgResDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fanstag/WxFansTagConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fanstag/WxFansTagConvert.java new file mode 100644 index 000000000..948199677 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/fanstag/WxFansTagConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.fanstag; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fanstag.WxFansTagDO; + +/** + * 粉丝标签 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxFansTagConvert { + + WxFansTagConvert INSTANCE = Mappers.getMapper(WxFansTagConvert.class); + + WxFansTagDO convert(WxFansTagCreateReqVO bean); + + WxFansTagDO convert(WxFansTagUpdateReqVO bean); + + WxFansTagRespVO convert(WxFansTagDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/mediaupload/WxMediaUploadConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/mediaupload/WxMediaUploadConvert.java new file mode 100644 index 000000000..ba2855d8b --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/mediaupload/WxMediaUploadConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.mediaupload; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; + +/** + * 微信素材上传表 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxMediaUploadConvert { + + WxMediaUploadConvert INSTANCE = Mappers.getMapper(WxMediaUploadConvert.class); + + WxMediaUploadDO convert(WxMediaUploadCreateReqVO bean); + + WxMediaUploadDO convert(WxMediaUploadUpdateReqVO bean); + + WxMediaUploadRespVO convert(WxMediaUploadDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/menu/WxMenuConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/menu/WxMenuConvert.java new file mode 100644 index 000000000..38d0c516e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/menu/WxMenuConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.menu; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.menu.WxMenuDO; + +/** + * 微信菜单 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxMenuConvert { + + WxMenuConvert INSTANCE = Mappers.getMapper(WxMenuConvert.class); + + WxMenuDO convert(WxMenuCreateReqVO bean); + + WxMenuDO convert(WxMenuUpdateReqVO bean); + + WxMenuRespVO convert(WxMenuDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/newsarticleitem/WxNewsArticleItemConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/newsarticleitem/WxNewsArticleItemConvert.java new file mode 100644 index 000000000..b20717d3e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/newsarticleitem/WxNewsArticleItemConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.newsarticleitem; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.newsarticleitem.WxNewsArticleItemDO; + +/** + * 图文消息文章列表表 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxNewsArticleItemConvert { + + WxNewsArticleItemConvert INSTANCE = Mappers.getMapper(WxNewsArticleItemConvert.class); + + WxNewsArticleItemDO convert(WxNewsArticleItemCreateReqVO bean); + + WxNewsArticleItemDO convert(WxNewsArticleItemUpdateReqVO bean); + + WxNewsArticleItemRespVO convert(WxNewsArticleItemDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/newstemplate/WxNewsTemplateConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/newstemplate/WxNewsTemplateConvert.java new file mode 100644 index 000000000..e6cf754fd --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/newstemplate/WxNewsTemplateConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.newstemplate; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.newstemplate.WxNewsTemplateDO; + +/** + * 图文消息模板 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxNewsTemplateConvert { + + WxNewsTemplateConvert INSTANCE = Mappers.getMapper(WxNewsTemplateConvert.class); + + WxNewsTemplateDO convert(WxNewsTemplateCreateReqVO bean); + + WxNewsTemplateDO convert(WxNewsTemplateUpdateReqVO bean); + + WxNewsTemplateRespVO convert(WxNewsTemplateDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/receivetext/WxReceiveTextConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/receivetext/WxReceiveTextConvert.java new file mode 100644 index 000000000..24b9dc505 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/receivetext/WxReceiveTextConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.receivetext; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; + +/** + * 回复关键字 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxReceiveTextConvert { + + WxReceiveTextConvert INSTANCE = Mappers.getMapper(WxReceiveTextConvert.class); + + WxReceiveTextDO convert(WxReceiveTextCreateReqVO bean); + + WxReceiveTextDO convert(WxReceiveTextUpdateReqVO bean); + + WxReceiveTextRespVO convert(WxReceiveTextDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/subscribetext/WxSubscribeTextConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/subscribetext/WxSubscribeTextConvert.java new file mode 100644 index 000000000..15df4a84b --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/subscribetext/WxSubscribeTextConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.subscribetext; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.subscribetext.WxSubscribeTextDO; + +/** + * 关注欢迎语 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxSubscribeTextConvert { + + WxSubscribeTextConvert INSTANCE = Mappers.getMapper(WxSubscribeTextConvert.class); + + WxSubscribeTextDO convert(WxSubscribeTextCreateReqVO bean); + + WxSubscribeTextDO convert(WxSubscribeTextUpdateReqVO bean); + + WxSubscribeTextRespVO convert(WxSubscribeTextDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/texttemplate/WxTextTemplateConvert.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/texttemplate/WxTextTemplateConvert.java new file mode 100644 index 000000000..6c71f80d8 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/texttemplate/WxTextTemplateConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.mp.convert.texttemplate; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; + +/** + * 文本模板 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface WxTextTemplateConvert { + + WxTextTemplateConvert INSTANCE = Mappers.getMapper(WxTextTemplateConvert.class); + + WxTextTemplateDO convert(WxTextTemplateCreateReqVO bean); + + WxTextTemplateDO convert(WxTextTemplateUpdateReqVO bean); + + WxTextTemplateRespVO convert(WxTextTemplateDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/account/WxAccountDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/account/WxAccountDO.java index 673749527..9e8764cf0 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/account/WxAccountDO.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/account/WxAccountDO.java @@ -35,16 +35,14 @@ public class WxAccountDO extends BaseDO { * 公众号账户 */ private String account; - // TODO 亚洲:appId /** * 公众号 appid */ - private String appid; - // TODO 亚洲:appSecret + private String appId; /** * 公众号密钥 */ - private String appsecret; + private String appSecret; /** * 公众号url */ @@ -56,13 +54,11 @@ public class WxAccountDO extends BaseDO { /** * 加密密钥 */ - // TODO 亚洲:aesKey - private String aeskey; + private String aesKey; /** * 二维码图片 URL */ - // TODO 亚洲:qrCodeUrl - private String qrUrl; + private String qrCodeUrl; /** * 备注 */ diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/accountfanstag/WxAccountFansTagDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/accountfanstag/WxAccountFansTagDO.java new file mode 100644 index 000000000..71e253a40 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/accountfanstag/WxAccountFansTagDO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.accountfanstag; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 粉丝标签关联 DO + * + * @author 芋道源码 + */ +@TableName("wx_account_fans_tag") +@KeySequence("wx_account_fans_tag_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxAccountFansTagDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 用户标识 + */ + private String openid; + /** + * 标签ID + */ + private String tagId; + /** + * 微信账号ID + */ + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fansmsg/WxFansMsgDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fansmsg/WxFansMsgDO.java new file mode 100644 index 000000000..2427a4f48 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fansmsg/WxFansMsgDO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.fansmsg; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 粉丝消息表 DO + * + * @author 芋道源码 + */ +@TableName("wx_fans_msg") +@KeySequence("wx_fans_msg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxFansMsgDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 用户标识 + */ + private String openid; + /** + * 昵称 + */ + private byte[] nickname; + /** + * 头像地址 + */ + private String headimgUrl; + /** + * 微信账号ID + */ + private String wxAccountId; + /** + * 消息类型 + */ + private String msgType; + /** + * 内容 + */ + private String content; + /** + * 最近一条回复内容 + */ + private String resContent; + /** + * 是否已回复 + */ + private String isRes; + /** + * 微信素材ID + */ + private String mediaId; + /** + * 微信图片URL + */ + private String picUrl; + /** + * 本地图片路径 + */ + private String picPath; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fansmsgres/WxFansMsgResDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fansmsgres/WxFansMsgResDO.java new file mode 100644 index 000000000..2a5ffc45c --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fansmsgres/WxFansMsgResDO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.fansmsgres; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 回复粉丝消息历史表 DO + * + * @author 芋道源码 + */ +@TableName("wx_fans_msg_res") +@KeySequence("wx_fans_msg_res_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxFansMsgResDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 粉丝消息ID + */ + private String fansMsgId; + /** + * 回复内容 + */ + private String resContent; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fanstag/WxFansTagDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fanstag/WxFansTagDO.java new file mode 100644 index 000000000..a98f009b5 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/fanstag/WxFansTagDO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.fanstag; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 粉丝标签 DO + * + * @author 芋道源码 + */ +@TableName("wx_fans_tag") +@KeySequence("wx_fans_tag_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxFansTagDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 标签名称 + */ + private String name; + /** + * 粉丝数量 + */ + private Integer count; + /** + * 微信账号ID + */ + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/mediaupload/WxMediaUploadDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/mediaupload/WxMediaUploadDO.java new file mode 100644 index 000000000..41e8be32d --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/mediaupload/WxMediaUploadDO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 微信素材上传表 DO + * + * @author 芋道源码 + */ +@TableName("wx_media_upload") +@KeySequence("wx_media_upload_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxMediaUploadDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 类型 + */ + private String type; + /** + * 图片URL + */ + private String url; + /** + * 素材ID + */ + private String mediaId; + /** + * 缩略图素材ID + */ + private String thumbMediaId; + /** + * 微信账号ID + */ + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/menu/WxMenuDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/menu/WxMenuDO.java new file mode 100644 index 000000000..d5b0b9c3d --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/menu/WxMenuDO.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.menu; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 微信菜单 DO + * + * @author 芋道源码 + */ +@TableName("wx_menu") +@KeySequence("wx_menu_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxMenuDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 父ID + */ + private String parentId; + /** + * 菜单名称 + */ + private String menuName; + /** + * 菜单类型 1文本消息;2图文消息;3网址链接;4小程序 + */ + private String menuType; + /** + * 菜单等级 + */ + private String menuLevel; + /** + * 模板ID + */ + private String tplId; + /** + * 菜单URL + */ + private String menuUrl; + /** + * 排序 + */ + private String menuSort; + /** + * 微信账号ID + */ + private String wxAccountId; + /** + * 小程序appid + */ + private String miniprogramAppid; + /** + * 小程序页面路径 + */ + private String miniprogramPagepath; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/newsarticleitem/WxNewsArticleItemDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/newsarticleitem/WxNewsArticleItemDO.java new file mode 100644 index 000000000..7cb9b6ac9 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/newsarticleitem/WxNewsArticleItemDO.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.newsarticleitem; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 图文消息文章列表表 DO + * + * @author 芋道源码 + */ +@TableName("wx_news_article_item") +@KeySequence("wx_news_article_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxNewsArticleItemDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 标题 + */ + private String title; + /** + * 摘要 + */ + private String digest; + /** + * 作者 + */ + private String author; + /** + * 是否展示封面图片(0/1) + */ + private String showCoverPic; + /** + * 上传微信,封面图片标识 + */ + private String thumbMediaId; + /** + * 内容 + */ + private String content; + /** + * 内容链接 + */ + private String contentSourceUrl; + /** + * 文章排序 + */ + private Integer orderNo; + /** + * 图片路径 + */ + private String picPath; + /** + * 是否可以留言 + */ + private String needOpenComment; + /** + * 是否仅粉丝可以留言 + */ + private String onlyFansCanComment; + /** + * 图文ID + */ + private String newsId; + /** + * 微信账号ID + */ + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/newstemplate/WxNewsTemplateDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/newstemplate/WxNewsTemplateDO.java new file mode 100644 index 000000000..524bb19d2 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/newstemplate/WxNewsTemplateDO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.newstemplate; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 图文消息模板 DO + * + * @author 芋道源码 + */ +@TableName("wx_news_template") +@KeySequence("wx_news_template_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxNewsTemplateDO extends BaseDO { + + /** + * 主键 主键ID + */ + @TableId + private Integer id; + /** + * 模板名称 + */ + private String tplName; + /** + * 是否已上传微信 + */ + private String isUpload; + /** + * 素材ID + */ + private String mediaId; + /** + * 微信账号ID + */ + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/receivetext/WxReceiveTextDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/receivetext/WxReceiveTextDO.java new file mode 100644 index 000000000..49fd62905 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/receivetext/WxReceiveTextDO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.receivetext; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 回复关键字 DO + * + * @author 芋道源码 + */ +@TableName("wx_receive_text") +@KeySequence("wx_receive_text_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxReceiveTextDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 关键字 + */ + private String receiveText; + /** + * 消息类型 1文本消息;2图文消息; + */ + private String msgType; + /** + * 模板ID + */ + private String tplId; + /** + * 微信账号ID + */ + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/subscribetext/WxSubscribeTextDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/subscribetext/WxSubscribeTextDO.java new file mode 100644 index 000000000..7fcec0a9c --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/subscribetext/WxSubscribeTextDO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.subscribetext; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 关注欢迎语 DO + * + * @author 芋道源码 + */ +@TableName("wx_subscribe_text") +@KeySequence("wx_subscribe_text_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxSubscribeTextDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 消息类型 1文本消息;2图文消息; + */ + private String msgType; + /** + * 模板ID + */ + private String tplId; + /** + * 微信账号ID + */ + private String wxAccountId; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/texttemplate/WxTextTemplateDO.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/texttemplate/WxTextTemplateDO.java new file mode 100644 index 000000000..afa46f9f7 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/texttemplate/WxTextTemplateDO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate; + +import lombok.*; + +import java.util.*; + +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 文本模板 DO + * + * @author 芋道源码 + */ +@TableName("wx_text_template") +@KeySequence("wx_text_template_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxTextTemplateDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 模板名字 + */ + private String tplName; + /** + * 模板内容 + */ + private String content; + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/account/WxAccountMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/account/WxAccountMapper.java index bfcaed42f..fe3e8e211 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/account/WxAccountMapper.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/account/WxAccountMapper.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.mp.dal.mysql.account; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountExportReqVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountPageReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountExportReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountPageReqVO; import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; import org.apache.ibatis.annotations.Mapper; @@ -22,7 +22,7 @@ public interface WxAccountMapper extends BaseMapperX { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(WxAccountDO::getName, reqVO.getName()) .eqIfPresent(WxAccountDO::getAccount, reqVO.getAccount()) - .eqIfPresent(WxAccountDO::getAppid, reqVO.getAppid()) + .eqIfPresent(WxAccountDO::getAppId, reqVO.getAppid()) .betweenIfPresent(WxAccountDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) .orderByDesc(WxAccountDO::getId)); } @@ -31,7 +31,7 @@ public interface WxAccountMapper extends BaseMapperX { return selectList(new LambdaQueryWrapperX() .likeIfPresent(WxAccountDO::getName, reqVO.getName()) .eqIfPresent(WxAccountDO::getAccount, reqVO.getAccount()) - .eqIfPresent(WxAccountDO::getAppid, reqVO.getAppid()) + .eqIfPresent(WxAccountDO::getAppId, reqVO.getAppid()) .betweenIfPresent(WxAccountDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) .orderByDesc(WxAccountDO::getId)); } diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/accountfans/WxAccountFansMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/accountfans/WxAccountFansMapper.java index c79eb316c..dc0cd781d 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/accountfans/WxAccountFansMapper.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/accountfans/WxAccountFansMapper.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.mp.dal.mysql.accountfans; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansExportReqVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansPageReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansExportReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansPageReqVO; import cn.iocoder.yudao.module.mp.dal.dataobject.accountfans.WxAccountFansDO; import org.apache.ibatis.annotations.Mapper; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/accountfanstag/WxAccountFansTagMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/accountfanstag/WxAccountFansTagMapper.java new file mode 100644 index 000000000..8df37b1a1 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/accountfanstag/WxAccountFansTagMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.accountfanstag; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.accountfanstag.WxAccountFansTagDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo.*; + +/** + * 粉丝标签关联 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxAccountFansTagMapper extends BaseMapperX { + + default PageResult selectPage(WxAccountFansTagPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WxAccountFansTagDO::getOpenid, reqVO.getOpenid()) + .eqIfPresent(WxAccountFansTagDO::getTagId, reqVO.getTagId()) + .eqIfPresent(WxAccountFansTagDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxAccountFansTagDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxAccountFansTagDO::getId)); + } + + default List selectList(WxAccountFansTagExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WxAccountFansTagDO::getOpenid, reqVO.getOpenid()) + .eqIfPresent(WxAccountFansTagDO::getTagId, reqVO.getTagId()) + .eqIfPresent(WxAccountFansTagDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxAccountFansTagDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxAccountFansTagDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fansmsg/WxFansMsgMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fansmsg/WxFansMsgMapper.java new file mode 100644 index 000000000..7e5db276d --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fansmsg/WxFansMsgMapper.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.fansmsg; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsg.WxFansMsgDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo.*; + +/** + * 粉丝消息表 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxFansMsgMapper extends BaseMapperX { + + default PageResult selectPage(WxFansMsgPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WxFansMsgDO::getOpenid, reqVO.getOpenid()) + .likeIfPresent(WxFansMsgDO::getNickname, reqVO.getNickname()) + .eqIfPresent(WxFansMsgDO::getHeadimgUrl, reqVO.getHeadimgUrl()) + .eqIfPresent(WxFansMsgDO::getWxAccountId, reqVO.getWxAccountId()) + .eqIfPresent(WxFansMsgDO::getMsgType, reqVO.getMsgType()) + .eqIfPresent(WxFansMsgDO::getContent, reqVO.getContent()) + .eqIfPresent(WxFansMsgDO::getResContent, reqVO.getResContent()) + .eqIfPresent(WxFansMsgDO::getIsRes, reqVO.getIsRes()) + .eqIfPresent(WxFansMsgDO::getMediaId, reqVO.getMediaId()) + .eqIfPresent(WxFansMsgDO::getPicUrl, reqVO.getPicUrl()) + .eqIfPresent(WxFansMsgDO::getPicPath, reqVO.getPicPath()) + .betweenIfPresent(WxFansMsgDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxFansMsgDO::getId)); + } + + default List selectList(WxFansMsgExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WxFansMsgDO::getOpenid, reqVO.getOpenid()) + .likeIfPresent(WxFansMsgDO::getNickname, reqVO.getNickname()) + .eqIfPresent(WxFansMsgDO::getHeadimgUrl, reqVO.getHeadimgUrl()) + .eqIfPresent(WxFansMsgDO::getWxAccountId, reqVO.getWxAccountId()) + .eqIfPresent(WxFansMsgDO::getMsgType, reqVO.getMsgType()) + .eqIfPresent(WxFansMsgDO::getContent, reqVO.getContent()) + .eqIfPresent(WxFansMsgDO::getResContent, reqVO.getResContent()) + .eqIfPresent(WxFansMsgDO::getIsRes, reqVO.getIsRes()) + .eqIfPresent(WxFansMsgDO::getMediaId, reqVO.getMediaId()) + .eqIfPresent(WxFansMsgDO::getPicUrl, reqVO.getPicUrl()) + .eqIfPresent(WxFansMsgDO::getPicPath, reqVO.getPicPath()) + .betweenIfPresent(WxFansMsgDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxFansMsgDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fansmsgres/WxFansMsgResMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fansmsgres/WxFansMsgResMapper.java new file mode 100644 index 000000000..86423a119 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fansmsgres/WxFansMsgResMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.fansmsgres; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsgres.WxFansMsgResDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo.*; + +/** + * 回复粉丝消息历史表 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxFansMsgResMapper extends BaseMapperX { + + default PageResult selectPage(WxFansMsgResPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WxFansMsgResDO::getFansMsgId, reqVO.getFansMsgId()) + .eqIfPresent(WxFansMsgResDO::getResContent, reqVO.getResContent()) + .betweenIfPresent(WxFansMsgResDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxFansMsgResDO::getId)); + } + + default List selectList(WxFansMsgResExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WxFansMsgResDO::getFansMsgId, reqVO.getFansMsgId()) + .eqIfPresent(WxFansMsgResDO::getResContent, reqVO.getResContent()) + .betweenIfPresent(WxFansMsgResDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxFansMsgResDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fanstag/WxFansTagMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fanstag/WxFansTagMapper.java new file mode 100644 index 000000000..5ec73ffcf --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/fanstag/WxFansTagMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.fanstag; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.fanstag.WxFansTagDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo.*; + +/** + * 粉丝标签 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxFansTagMapper extends BaseMapperX { + + default PageResult selectPage(WxFansTagPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(WxFansTagDO::getName, reqVO.getName()) + .eqIfPresent(WxFansTagDO::getCount, reqVO.getCount()) + .eqIfPresent(WxFansTagDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxFansTagDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxFansTagDO::getId)); + } + + default List selectList(WxFansTagExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .likeIfPresent(WxFansTagDO::getName, reqVO.getName()) + .eqIfPresent(WxFansTagDO::getCount, reqVO.getCount()) + .eqIfPresent(WxFansTagDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxFansTagDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxFansTagDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/mediaupload/WxMediaUploadMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/mediaupload/WxMediaUploadMapper.java new file mode 100644 index 000000000..64d6db6ca --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/mediaupload/WxMediaUploadMapper.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.mediaupload; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; + +/** + * 微信素材上传表 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxMediaUploadMapper extends BaseMapperX { + + default PageResult selectPage(WxMediaUploadPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WxMediaUploadDO::getType, reqVO.getType()) + .eqIfPresent(WxMediaUploadDO::getUrl, reqVO.getUrl()) + .eqIfPresent(WxMediaUploadDO::getMediaId, reqVO.getMediaId()) + .eqIfPresent(WxMediaUploadDO::getThumbMediaId, reqVO.getThumbMediaId()) + .eqIfPresent(WxMediaUploadDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxMediaUploadDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxMediaUploadDO::getId)); + } + + default List selectList(WxMediaUploadExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WxMediaUploadDO::getType, reqVO.getType()) + .eqIfPresent(WxMediaUploadDO::getUrl, reqVO.getUrl()) + .eqIfPresent(WxMediaUploadDO::getMediaId, reqVO.getMediaId()) + .eqIfPresent(WxMediaUploadDO::getThumbMediaId, reqVO.getThumbMediaId()) + .eqIfPresent(WxMediaUploadDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxMediaUploadDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxMediaUploadDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/menu/WxMenuMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/menu/WxMenuMapper.java new file mode 100644 index 000000000..2966bac6b --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/menu/WxMenuMapper.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.menu; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.menu.WxMenuDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*; + +/** + * 微信菜单 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxMenuMapper extends BaseMapperX { + + default PageResult selectPage(WxMenuPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WxMenuDO::getParentId, reqVO.getParentId()) + .likeIfPresent(WxMenuDO::getMenuName, reqVO.getMenuName()) + .eqIfPresent(WxMenuDO::getMenuType, reqVO.getMenuType()) + .eqIfPresent(WxMenuDO::getMenuLevel, reqVO.getMenuLevel()) + .eqIfPresent(WxMenuDO::getTplId, reqVO.getTplId()) + .eqIfPresent(WxMenuDO::getMenuUrl, reqVO.getMenuUrl()) + .eqIfPresent(WxMenuDO::getMenuSort, reqVO.getMenuSort()) + .eqIfPresent(WxMenuDO::getWxAccountId, reqVO.getWxAccountId()) + .eqIfPresent(WxMenuDO::getMiniprogramAppid, reqVO.getMiniprogramAppid()) + .eqIfPresent(WxMenuDO::getMiniprogramPagepath, reqVO.getMiniprogramPagepath()) + .betweenIfPresent(WxMenuDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxMenuDO::getId)); + } + + default List selectList(WxMenuExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WxMenuDO::getParentId, reqVO.getParentId()) + .likeIfPresent(WxMenuDO::getMenuName, reqVO.getMenuName()) + .eqIfPresent(WxMenuDO::getMenuType, reqVO.getMenuType()) + .eqIfPresent(WxMenuDO::getMenuLevel, reqVO.getMenuLevel()) + .eqIfPresent(WxMenuDO::getTplId, reqVO.getTplId()) + .eqIfPresent(WxMenuDO::getMenuUrl, reqVO.getMenuUrl()) + .eqIfPresent(WxMenuDO::getMenuSort, reqVO.getMenuSort()) + .eqIfPresent(WxMenuDO::getWxAccountId, reqVO.getWxAccountId()) + .eqIfPresent(WxMenuDO::getMiniprogramAppid, reqVO.getMiniprogramAppid()) + .eqIfPresent(WxMenuDO::getMiniprogramPagepath, reqVO.getMiniprogramPagepath()) + .betweenIfPresent(WxMenuDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxMenuDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/newsarticleitem/WxNewsArticleItemMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/newsarticleitem/WxNewsArticleItemMapper.java new file mode 100644 index 000000000..2b072097e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/newsarticleitem/WxNewsArticleItemMapper.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.newsarticleitem; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.newsarticleitem.WxNewsArticleItemDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo.*; + +/** + * 图文消息文章列表表 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxNewsArticleItemMapper extends BaseMapperX { + + default PageResult selectPage(WxNewsArticleItemPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WxNewsArticleItemDO::getTitle, reqVO.getTitle()) + .eqIfPresent(WxNewsArticleItemDO::getDigest, reqVO.getDigest()) + .eqIfPresent(WxNewsArticleItemDO::getAuthor, reqVO.getAuthor()) + .eqIfPresent(WxNewsArticleItemDO::getShowCoverPic, reqVO.getShowCoverPic()) + .eqIfPresent(WxNewsArticleItemDO::getThumbMediaId, reqVO.getThumbMediaId()) + .eqIfPresent(WxNewsArticleItemDO::getContent, reqVO.getContent()) + .eqIfPresent(WxNewsArticleItemDO::getContentSourceUrl, reqVO.getContentSourceUrl()) + .eqIfPresent(WxNewsArticleItemDO::getOrderNo, reqVO.getOrderNo()) + .eqIfPresent(WxNewsArticleItemDO::getPicPath, reqVO.getPicPath()) + .eqIfPresent(WxNewsArticleItemDO::getNeedOpenComment, reqVO.getNeedOpenComment()) + .eqIfPresent(WxNewsArticleItemDO::getOnlyFansCanComment, reqVO.getOnlyFansCanComment()) + .eqIfPresent(WxNewsArticleItemDO::getNewsId, reqVO.getNewsId()) + .eqIfPresent(WxNewsArticleItemDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxNewsArticleItemDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxNewsArticleItemDO::getId)); + } + + default List selectList(WxNewsArticleItemExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WxNewsArticleItemDO::getTitle, reqVO.getTitle()) + .eqIfPresent(WxNewsArticleItemDO::getDigest, reqVO.getDigest()) + .eqIfPresent(WxNewsArticleItemDO::getAuthor, reqVO.getAuthor()) + .eqIfPresent(WxNewsArticleItemDO::getShowCoverPic, reqVO.getShowCoverPic()) + .eqIfPresent(WxNewsArticleItemDO::getThumbMediaId, reqVO.getThumbMediaId()) + .eqIfPresent(WxNewsArticleItemDO::getContent, reqVO.getContent()) + .eqIfPresent(WxNewsArticleItemDO::getContentSourceUrl, reqVO.getContentSourceUrl()) + .eqIfPresent(WxNewsArticleItemDO::getOrderNo, reqVO.getOrderNo()) + .eqIfPresent(WxNewsArticleItemDO::getPicPath, reqVO.getPicPath()) + .eqIfPresent(WxNewsArticleItemDO::getNeedOpenComment, reqVO.getNeedOpenComment()) + .eqIfPresent(WxNewsArticleItemDO::getOnlyFansCanComment, reqVO.getOnlyFansCanComment()) + .eqIfPresent(WxNewsArticleItemDO::getNewsId, reqVO.getNewsId()) + .eqIfPresent(WxNewsArticleItemDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxNewsArticleItemDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxNewsArticleItemDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/newstemplate/WxNewsTemplateMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/newstemplate/WxNewsTemplateMapper.java new file mode 100644 index 000000000..f5c03b848 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/newstemplate/WxNewsTemplateMapper.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.newstemplate; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.newstemplate.WxNewsTemplateDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo.*; + +/** + * 图文消息模板 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxNewsTemplateMapper extends BaseMapperX { + + default PageResult selectPage(WxNewsTemplatePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(WxNewsTemplateDO::getTplName, reqVO.getTplName()) + .eqIfPresent(WxNewsTemplateDO::getIsUpload, reqVO.getIsUpload()) + .eqIfPresent(WxNewsTemplateDO::getMediaId, reqVO.getMediaId()) + .eqIfPresent(WxNewsTemplateDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxNewsTemplateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxNewsTemplateDO::getId)); + } + + default List selectList(WxNewsTemplateExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .likeIfPresent(WxNewsTemplateDO::getTplName, reqVO.getTplName()) + .eqIfPresent(WxNewsTemplateDO::getIsUpload, reqVO.getIsUpload()) + .eqIfPresent(WxNewsTemplateDO::getMediaId, reqVO.getMediaId()) + .eqIfPresent(WxNewsTemplateDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxNewsTemplateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxNewsTemplateDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/receivetext/WxReceiveTextMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/receivetext/WxReceiveTextMapper.java new file mode 100644 index 000000000..3cf1f7478 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/receivetext/WxReceiveTextMapper.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.receivetext; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; + +/** + * 回复关键字 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxReceiveTextMapper extends BaseMapperX { + + default PageResult selectPage(WxReceiveTextPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WxReceiveTextDO::getReceiveText, reqVO.getReceiveText()) + .eqIfPresent(WxReceiveTextDO::getMsgType, reqVO.getMsgType()) + .eqIfPresent(WxReceiveTextDO::getTplId, reqVO.getTplId()) + .eqIfPresent(WxReceiveTextDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxReceiveTextDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxReceiveTextDO::getId)); + } + + default List selectList(WxReceiveTextExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WxReceiveTextDO::getReceiveText, reqVO.getReceiveText()) + .eqIfPresent(WxReceiveTextDO::getMsgType, reqVO.getMsgType()) + .eqIfPresent(WxReceiveTextDO::getTplId, reqVO.getTplId()) + .eqIfPresent(WxReceiveTextDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxReceiveTextDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxReceiveTextDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/subscribetext/WxSubscribeTextMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/subscribetext/WxSubscribeTextMapper.java new file mode 100644 index 000000000..fff0c24b0 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/subscribetext/WxSubscribeTextMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.subscribetext; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.subscribetext.WxSubscribeTextDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo.*; + +/** + * 关注欢迎语 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxSubscribeTextMapper extends BaseMapperX { + + default PageResult selectPage(WxSubscribeTextPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WxSubscribeTextDO::getMsgType, reqVO.getMsgType()) + .eqIfPresent(WxSubscribeTextDO::getTplId, reqVO.getTplId()) + .eqIfPresent(WxSubscribeTextDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxSubscribeTextDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxSubscribeTextDO::getId)); + } + + default List selectList(WxSubscribeTextExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WxSubscribeTextDO::getMsgType, reqVO.getMsgType()) + .eqIfPresent(WxSubscribeTextDO::getTplId, reqVO.getTplId()) + .eqIfPresent(WxSubscribeTextDO::getWxAccountId, reqVO.getWxAccountId()) + .betweenIfPresent(WxSubscribeTextDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxSubscribeTextDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/texttemplate/WxTextTemplateMapper.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/texttemplate/WxTextTemplateMapper.java new file mode 100644 index 000000000..14c3eb305 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/texttemplate/WxTextTemplateMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.mp.dal.mysql.texttemplate; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; + +/** + * 文本模板 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WxTextTemplateMapper extends BaseMapperX { + + default PageResult selectPage(WxTextTemplatePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(WxTextTemplateDO::getTplName, reqVO.getTplName()) + .eqIfPresent(WxTextTemplateDO::getContent, reqVO.getContent()) + .betweenIfPresent(WxTextTemplateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxTextTemplateDO::getId)); + } + + default List selectList(WxTextTemplateExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .likeIfPresent(WxTextTemplateDO::getTplName, reqVO.getTplName()) + .eqIfPresent(WxTextTemplateDO::getContent, reqVO.getContent()) + .betweenIfPresent(WxTextTemplateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(WxTextTemplateDO::getId)); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/MsgHandler.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/MsgHandler.java index 6dc84c6ec..544af9439 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/MsgHandler.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/MsgHandler.java @@ -1,42 +1,66 @@ package cn.iocoder.yudao.module.mp.handler; +import cn.hutool.core.io.FileUtil; +import cn.hutool.http.HtmlUtil; +import cn.hutool.http.HttpUtil; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +import cn.iocoder.yudao.module.infra.api.file.FileApi; +import cn.iocoder.yudao.module.mp.builder.TextBuilder; +import cn.iocoder.yudao.module.mp.config.WxMpProperties; +import cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo.WxFansMsgCreateReqVO; +import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; +import cn.iocoder.yudao.module.mp.service.account.WxAccountService; +import cn.iocoder.yudao.module.mp.service.fansmsg.WxFansMsgService; +import cn.iocoder.yudao.module.mp.service.receivetext.WxReceiveTextService; +import cn.iocoder.yudao.module.mp.service.texttemplate.WxTextTemplateService; import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.session.WxSessionManager; import me.chanjar.weixin.mp.api.WxMpMessageHandler; import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage; +import me.chanjar.weixin.mp.bean.result.WxMpUser; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import javax.annotation.Resource; +import java.io.File; +import java.io.UnsupportedEncodingException; import java.util.Map; @Component @Slf4j public class MsgHandler implements WxMpMessageHandler { -/* @Autowired - WxReceiveTextService wxReceiveTextService; + private WxReceiveTextService wxReceiveTextService; @Autowired - WxTextTemplateService wxTextTemplateService; + private WxTextTemplateService wxTextTemplateService; @Autowired - WxAccountService wxAccountService; + private WxAccountService wxAccountService; @Autowired - WxFansMsgService wxFansMsgService; -*/ + private WxFansMsgService wxFansMsgService; + @Resource + private FileApi fileApi; + + @Autowired + private WxMpProperties wxMpProperties; @Override public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage, Map context, WxMpService weixinService, WxSessionManager sessionManager) { - /* log.info( "收到信息内容:{}", JsonUtils.toJsonString(wxMessage) ); - log.info( "关键字:{}", wxMessage.getContent() ); + log.info("收到信息内容:{}", JsonUtils.toJsonString(wxMessage)); + log.info("关键字:{}", wxMessage.getContent()); - if (!wxMessage.getMsgType().equals(XmlMsgType.EVENT)) { + if (!wxMessage.getMsgType().equals(WxConsts.XmlMsgType.EVENT)) { //可以选择将消息保存到本地 // 获取微信用户基本信息 @@ -44,61 +68,57 @@ public class MsgHandler implements WxMpMessageHandler { WxMpUser wxmpUser = weixinService.getUserService() .userInfo(wxMessage.getFromUser(), null); if (wxmpUser != null) { - WxAccountDO wxAccount = wxAccountService.findBy( WxAccountDO::getAccount,wxMessage.getToUser()); - if(wxAccount != null){ + WxAccountDO wxAccount = wxAccountService.findBy(WxAccountDO::getAccount, wxMessage.getToUser()); + if (wxAccount != null) { - if(wxMessage.getMsgType().equals( XmlMsgType.TEXT )){ - WxFansMsg wxFansMsg = new WxFansMsg(); - wxFansMsg.setOpenid( wxmpUser.getOpenId() ); + if (wxMessage.getMsgType().equals(WxConsts.XmlMsgType.TEXT)) { + WxFansMsgCreateReqVO wxFansMsg = new WxFansMsgCreateReqVO(); + wxFansMsg.setOpenid(wxmpUser.getOpenId()); try { wxFansMsg.setNickname(wxmpUser.getNickname().getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } - wxFansMsg.setHeadimgUrl( wxmpUser.getHeadImgUrl() ); - wxFansMsg.setWxAccountId( String.valueOf( wxAccount.getId() ) ); - wxFansMsg.setMsgType( wxMessage.getMsgType()); - wxFansMsg.setContent( wxMessage.getContent() ); - wxFansMsg.setIsRes( "1" ); - wxFansMsg.setCreateTime( DateUtil.date() ); - wxFansMsg.setUpdateTime( DateUtil.date() ); + wxFansMsg.setHeadimgUrl(wxmpUser.getHeadImgUrl()); + wxFansMsg.setWxAccountId(String.valueOf(wxAccount.getId())); + wxFansMsg.setMsgType(wxMessage.getMsgType()); + wxFansMsg.setContent(wxMessage.getContent()); + wxFansMsg.setIsRes("1"); //组装回复消息 String content = processContent(wxMessage); - content = HtmlUtil.escape( content ); - wxFansMsg.setResContent( content ); + content = HtmlUtil.escape(content); + wxFansMsg.setResContent(content); - wxFansMsgService.save( wxFansMsg ); + wxFansMsgService.createWxFansMsg(wxFansMsg); return new TextBuilder().build(content, wxMessage, weixinService); } - if(wxMessage.getMsgType().equals( XmlMsgType.IMAGE )){ - WxFansMsg wxFansMsg = new WxFansMsg(); - wxFansMsg.setOpenid( wxmpUser.getOpenId() ); + if (wxMessage.getMsgType().equals(WxConsts.XmlMsgType.IMAGE)) { + WxFansMsgCreateReqVO wxFansMsg = new WxFansMsgCreateReqVO(); + wxFansMsg.setOpenid(wxmpUser.getOpenId()); try { wxFansMsg.setNickname(wxmpUser.getNickname().getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } - wxFansMsg.setHeadimgUrl( wxmpUser.getHeadImgUrl() ); - wxFansMsg.setWxAccountId( String.valueOf( wxAccount.getId() ) ); - wxFansMsg.setMsgType( wxMessage.getMsgType()); - wxFansMsg.setMediaId( wxMessage.getMediaId() ); - wxFansMsg.setPicUrl( wxMessage.getPicUrl() ); - + wxFansMsg.setHeadimgUrl(wxmpUser.getHeadImgUrl()); + wxFansMsg.setWxAccountId(String.valueOf(wxAccount.getId())); + wxFansMsg.setMsgType(wxMessage.getMsgType()); + wxFansMsg.setMediaId(wxMessage.getMediaId()); + wxFansMsg.setPicUrl(wxMessage.getPicUrl()); + String downloadDirStr = fileApi.createFile(HttpUtil.downloadBytes(wxMessage.getPicUrl())); File downloadDir = new File(downloadDirStr); if (!downloadDir.exists()) { downloadDir.mkdirs(); } - String filepath = downloadDirStr + String.valueOf( System.currentTimeMillis() ) + ".png"; + String filepath = downloadDirStr + String.valueOf(System.currentTimeMillis()) + ".png"; //微信pic url下载到本地,防止失效 long size = HttpUtil.downloadFile(wxMessage.getPicUrl(), FileUtil.file(filepath)); - log.info("download pic size : {}",size); - wxFansMsg.setPicPath( filepath ); - wxFansMsg.setIsRes( "0" ); - wxFansMsg.setCreateTime( DateUtil.date() ); - wxFansMsg.setUpdateTime( DateUtil.date() ); - wxFansMsgService.save( wxFansMsg ); + log.info("download pic size : {}", size); + wxFansMsg.setPicPath(filepath); + wxFansMsg.setIsRes("0"); + wxFansMsgService.createWxFansMsg(wxFansMsg); } } @@ -107,32 +127,33 @@ public class MsgHandler implements WxMpMessageHandler { if (e.getError().getErrorCode() == 48001) { log.info("该公众号没有获取用户信息权限!"); } + } catch (Exception e) { + e.printStackTrace(); } } //当用户输入关键词如“你好”,“客服”等,并且有客服在线时,把消息转发给在线客服 -// try { -// if (StringUtils.startsWithAny(wxMessage.getContent(), "你好", "客服") -// && weixinService.getKefuService().kfOnlineList() -// .getKfOnlineList().size() > 0) { -// return WxMpXmlOutMessage.TRANSFER_CUSTOMER_SERVICE() -// .fromUser(wxMessage.getToUser()) -// .toUser(wxMessage.getFromUser()).build(); -// } -// } catch (WxErrorException e) { -// e.printStackTrace(); -// } + try { + if (StringUtils.startsWithAny(wxMessage.getContent(), "你好", "客服") + && weixinService.getKefuService().kfOnlineList() + .getKfOnlineList().size() > 0) { + return WxMpXmlOutMessage.TRANSFER_CUSTOMER_SERVICE() + .fromUser(wxMessage.getToUser()) + .toUser(wxMessage.getFromUser()).build(); + } + } catch (WxErrorException e) { + e.printStackTrace(); + } //组装默认回复消息 - String content = defaultResponseContent;//默认 + String content = wxMpProperties.getDefaultContent();//默认 return new TextBuilder().build(content, wxMessage, weixinService); - */ - return null; } + //处理回复信息,优先级,关键字、智能机器人、默认值 - String processContent(WxMpXmlMessage wxMessage){ + String processContent(WxMpXmlMessage wxMessage) { String content = ""; /* content = processReceiveTextContent(wxMessage); if(StringUtils.isNotBlank( content )){ @@ -144,7 +165,7 @@ public class MsgHandler implements WxMpMessageHandler { } //处理关键字 - String processReceiveTextContent(WxMpXmlMessage wxMessage){ + String processReceiveTextContent(WxMpXmlMessage wxMessage) { String content = ""; /* WxAccountDO wxAccount = wxAccountService.findBy( WxAccountDO::getAccount,wxMessage.getToUser()); if(wxAccount != null){ @@ -162,5 +183,4 @@ public class MsgHandler implements WxMpMessageHandler { } - } diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/SubscribeHandler.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/SubscribeHandler.java index 6979e033a..a25372dcc 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/SubscribeHandler.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/SubscribeHandler.java @@ -1,5 +1,19 @@ package cn.iocoder.yudao.module.mp.handler; +import cn.hutool.core.date.DateUtil; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +import cn.iocoder.yudao.module.mp.builder.TextBuilder; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansCreateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansUpdateReqVO; +import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; +import cn.iocoder.yudao.module.mp.dal.dataobject.accountfans.WxAccountFansDO; +import cn.iocoder.yudao.module.mp.dal.dataobject.subscribetext.WxSubscribeTextDO; +import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; +import cn.iocoder.yudao.module.mp.service.account.WxAccountService; +import cn.iocoder.yudao.module.mp.service.accountfans.WxAccountFansService; +import cn.iocoder.yudao.module.mp.service.accountfanstag.WxAccountFansTagService; +import cn.iocoder.yudao.module.mp.service.subscribetext.WxSubscribeTextService; +import cn.iocoder.yudao.module.mp.service.texttemplate.WxTextTemplateService; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.session.WxSessionManager; @@ -7,15 +21,18 @@ import me.chanjar.weixin.mp.api.WxMpMessageHandler; import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage; +import me.chanjar.weixin.mp.bean.result.WxMpUser; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import java.io.UnsupportedEncodingException; import java.util.Map; @Component @Slf4j public class SubscribeHandler implements WxMpMessageHandler { - /* @Autowired + @Autowired private WxTextTemplateService wxTextTemplateService; @Autowired @@ -28,7 +45,7 @@ public class SubscribeHandler implements WxMpMessageHandler { private WxAccountFansService wxAccountFansService; @Autowired - private WxAccountFansTagService wxAccountFansTagService;*/ + private WxAccountFansTagService wxAccountFansTagService; @Override public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage, @@ -36,7 +53,6 @@ public class SubscribeHandler implements WxMpMessageHandler { WxSessionManager sessionManager) throws WxErrorException { log.info("新关注用户 OPENID: " + wxMessage.getFromUser()); -/* // 获取微信用户基本信息 try { @@ -57,15 +73,11 @@ public class SubscribeHandler implements WxMpMessageHandler { } catch (UnsupportedEncodingException e) { e.printStackTrace(); } - wxAccountFansCreateReqVO.setGender(String.valueOf(wxmpUser.getSex())); wxAccountFansCreateReqVO.setLanguage(wxmpUser.getLanguage()); - wxAccountFansCreateReqVO.setCountry(wxmpUser.getCountry()); - wxAccountFansCreateReqVO.setProvince(wxmpUser.getProvince()); - wxAccountFansCreateReqVO.setCity(wxmpUser.getCity()); wxAccountFansCreateReqVO.setHeadimgUrl(wxmpUser.getHeadImgUrl()); wxAccountFansCreateReqVO.setRemark(wxmpUser.getRemark()); wxAccountFansCreateReqVO.setWxAccountId(String.valueOf(wxAccount.getId())); - wxAccountFansCreateReqVO.setWxAccountAppid(wxAccount.getAppid()); + wxAccountFansCreateReqVO.setWxAccountAppid(wxAccount.getAppId()); wxAccountFansService.createWxAccountFans(wxAccountFansCreateReqVO); //process tags @@ -82,15 +94,11 @@ public class SubscribeHandler implements WxMpMessageHandler { } catch (UnsupportedEncodingException e) { e.printStackTrace(); } - wxAccountFansUpdateReqVO.setGender(String.valueOf(wxmpUser.getSex())); wxAccountFansUpdateReqVO.setLanguage(wxmpUser.getLanguage()); - wxAccountFansUpdateReqVO.setCountry(wxmpUser.getCountry()); - wxAccountFansUpdateReqVO.setProvince(wxmpUser.getProvince()); - wxAccountFansUpdateReqVO.setCity(wxmpUser.getCity()); wxAccountFansUpdateReqVO.setHeadimgUrl(wxmpUser.getHeadImgUrl()); wxAccountFansUpdateReqVO.setRemark(wxmpUser.getRemark()); wxAccountFansUpdateReqVO.setWxAccountId(String.valueOf(wxAccount.getId())); - wxAccountFansUpdateReqVO.setWxAccountAppid(wxAccount.getAppid()); + wxAccountFansUpdateReqVO.setWxAccountAppid(wxAccount.getAppId()); wxAccountFansService.updateWxAccountFans(wxAccountFansUpdateReqVO); //process tags @@ -122,9 +130,9 @@ public class SubscribeHandler implements WxMpMessageHandler { String content = "感谢关注!";//默认 WxAccountDO wxAccount = wxAccountService.findBy(WxAccountDO::getAccount, wxMessage.getToUser()); if (wxAccount != null) { - WxSubscribeText wxSubscribeText = wxSubscribeTextService.findBy("wxAccountId", String.valueOf(wxAccount.getId())); + WxSubscribeTextDO wxSubscribeText = wxSubscribeTextService.findBy(WxSubscribeTextDO::getWxAccountId, String.valueOf(wxAccount.getId())); if (wxSubscribeText != null) { - WxTextTemplate wxTextTemplate = wxTextTemplateService.findById(Integer.parseInt(wxSubscribeText.getTplId())); + WxTextTemplateDO wxTextTemplate = wxTextTemplateService.getWxTextTemplate(Integer.parseInt(wxSubscribeText.getTplId())); if (wxTextTemplate != null) { content = wxTextTemplate.getContent(); } @@ -135,7 +143,6 @@ public class SubscribeHandler implements WxMpMessageHandler { } catch (Exception e) { log.error(e.getMessage(), e); } -*/ return null; } diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/UnsubscribeHandler.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/UnsubscribeHandler.java index b7b3aa7d3..825834fdf 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/UnsubscribeHandler.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/handler/UnsubscribeHandler.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.mp.handler; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansUpdateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansUpdateReqVO; import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; import cn.iocoder.yudao.module.mp.dal.dataobject.accountfans.WxAccountFansDO; import cn.iocoder.yudao.module.mp.service.account.WxAccountService; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/costomer/dict/WxConfigDataRefreshConsumer.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/costomer/WxConfigDataRefreshConsumer.java similarity index 100% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/costomer/dict/WxConfigDataRefreshConsumer.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/costomer/WxConfigDataRefreshConsumer.java diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/message/dict/WxConfigDataRefreshMessage.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/message/WxConfigDataRefreshMessage.java similarity index 100% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/message/dict/WxConfigDataRefreshMessage.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/message/WxConfigDataRefreshMessage.java diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/producer/dict/WxMpConfigDataProducer.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/producer/WxMpConfigDataProducer.java similarity index 100% rename from yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/producer/dict/WxMpConfigDataProducer.java rename to yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/mq/producer/WxMpConfigDataProducer.java diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/account/WxAccountService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/account/WxAccountService.java index 0ad1048cb..57e3b4225 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/account/WxAccountService.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/account/WxAccountService.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.mp.service.account; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountCreateReqVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountExportReqVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountPageReqVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountUpdateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountCreateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountExportReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountPageReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountUpdateReqVO; import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; import com.baomidou.mybatisplus.core.toolkit.support.SFunction; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/account/WxAccountServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/account/WxAccountServiceImpl.java index 494595ad7..e8153233f 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/account/WxAccountServiceImpl.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/account/WxAccountServiceImpl.java @@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.mp.service.account; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountCreateReqVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountExportReqVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountPageReqVO; -import cn.iocoder.yudao.module.mp.admin.account.vo.WxAccountUpdateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountCreateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountExportReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountPageReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.account.vo.WxAccountUpdateReqVO; import cn.iocoder.yudao.module.mp.convert.account.WxAccountConvert; import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; import cn.iocoder.yudao.module.mp.dal.mysql.account.WxAccountMapper; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfans/WxAccountFansService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfans/WxAccountFansService.java index fcd08a842..b4dbe29e8 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfans/WxAccountFansService.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfans/WxAccountFansService.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.mp.service.accountfans; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansCreateReqVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansExportReqVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansPageReqVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansUpdateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansCreateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansExportReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansPageReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansUpdateReqVO; import cn.iocoder.yudao.module.mp.dal.dataobject.accountfans.WxAccountFansDO; import com.baomidou.mybatisplus.core.toolkit.support.SFunction; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfans/WxAccountFansServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfans/WxAccountFansServiceImpl.java index 7fd31cfdc..21568b940 100644 --- a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfans/WxAccountFansServiceImpl.java +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfans/WxAccountFansServiceImpl.java @@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.mp.service.accountfans; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansCreateReqVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansExportReqVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansPageReqVO; -import cn.iocoder.yudao.module.mp.admin.accountfans.vo.WxAccountFansUpdateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansCreateReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansExportReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansPageReqVO; +import cn.iocoder.yudao.module.mp.controller.admin.accountfans.vo.WxAccountFansUpdateReqVO; import cn.iocoder.yudao.module.mp.convert.accountfans.WxAccountFansConvert; import cn.iocoder.yudao.module.mp.dal.dataobject.accountfans.WxAccountFansDO; import cn.iocoder.yudao.module.mp.dal.mysql.accountfans.WxAccountFansMapper; diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfanstag/WxAccountFansTagService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfanstag/WxAccountFansTagService.java new file mode 100644 index 000000000..6247069a4 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfanstag/WxAccountFansTagService.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.mp.service.accountfanstag; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; +import cn.iocoder.yudao.module.mp.dal.dataobject.accountfanstag.WxAccountFansTagDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import me.chanjar.weixin.mp.bean.result.WxMpUser; + +/** + * 粉丝标签关联 Service 接口 + * + * @author 芋道源码 + */ +public interface WxAccountFansTagService { + + /** + * 创建粉丝标签关联 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxAccountFansTag(@Valid WxAccountFansTagCreateReqVO createReqVO); + + /** + * 更新粉丝标签关联 + * + * @param updateReqVO 更新信息 + */ + void updateWxAccountFansTag(@Valid WxAccountFansTagUpdateReqVO updateReqVO); + + /** + * 删除粉丝标签关联 + * + * @param id 编号 + */ + void deleteWxAccountFansTag(Integer id); + + /** + * 获得粉丝标签关联 + * + * @param id 编号 + * @return 粉丝标签关联 + */ + WxAccountFansTagDO getWxAccountFansTag(Integer id); + + /** + * 获得粉丝标签关联列表 + * + * @param ids 编号 + * @return 粉丝标签关联列表 + */ + List getWxAccountFansTagList(Collection ids); + + /** + * 获得粉丝标签关联分页 + * + * @param pageReqVO 分页查询 + * @return 粉丝标签关联分页 + */ + PageResult getWxAccountFansTagPage(WxAccountFansTagPageReqVO pageReqVO); + + /** + * 获得粉丝标签关联列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 粉丝标签关联列表 + */ + List getWxAccountFansTagList(WxAccountFansTagExportReqVO exportReqVO); + + void processFansTags(WxAccountDO wxAccount, WxMpUser wxmpUser); +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfanstag/WxAccountFansTagServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfanstag/WxAccountFansTagServiceImpl.java new file mode 100644 index 000000000..436856178 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/accountfanstag/WxAccountFansTagServiceImpl.java @@ -0,0 +1,106 @@ +package cn.iocoder.yudao.module.mp.service.accountfanstag; + +import cn.hutool.core.date.DateUtil; +import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; +import me.chanjar.weixin.mp.bean.result.WxMpUser; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.accountfanstag.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.accountfanstag.WxAccountFansTagDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.accountfanstag.WxAccountFansTagConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.accountfanstag.WxAccountFansTagMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 粉丝标签关联 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxAccountFansTagServiceImpl implements WxAccountFansTagService { + + @Resource + private WxAccountFansTagMapper wxAccountFansTagMapper; + + @Override + public Integer createWxAccountFansTag(WxAccountFansTagCreateReqVO createReqVO) { + // 插入 + WxAccountFansTagDO wxAccountFansTag = WxAccountFansTagConvert.INSTANCE.convert(createReqVO); + wxAccountFansTagMapper.insert(wxAccountFansTag); + // 返回 + return wxAccountFansTag.getId(); + } + + @Override + public void updateWxAccountFansTag(WxAccountFansTagUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxAccountFansTagExists(updateReqVO.getId()); + // 更新 + WxAccountFansTagDO updateObj = WxAccountFansTagConvert.INSTANCE.convert(updateReqVO); + wxAccountFansTagMapper.updateById(updateObj); + } + + @Override + public void deleteWxAccountFansTag(Integer id) { + // 校验存在 + this.validateWxAccountFansTagExists(id); + // 删除 + wxAccountFansTagMapper.deleteById(id); + } + + private void validateWxAccountFansTagExists(Integer id) { + if (wxAccountFansTagMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxAccountFansTagDO getWxAccountFansTag(Integer id) { + return wxAccountFansTagMapper.selectById(id); + } + + @Override + public List getWxAccountFansTagList(Collection ids) { + return wxAccountFansTagMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxAccountFansTagPage(WxAccountFansTagPageReqVO pageReqVO) { + return wxAccountFansTagMapper.selectPage(pageReqVO); + } + + @Override + public List getWxAccountFansTagList(WxAccountFansTagExportReqVO exportReqVO) { + return wxAccountFansTagMapper.selectList(exportReqVO); + } + + @Override + public void processFansTags(WxAccountDO wxAccountDO, WxMpUser wxmpUser) { + WxAccountFansTagExportReqVO wxAccountFansTagTpl = new WxAccountFansTagExportReqVO(); + wxAccountFansTagTpl.setOpenid(wxmpUser.getOpenId()); + List wxAccountFansTagList = this.getWxAccountFansTagList(wxAccountFansTagTpl); + wxAccountFansTagList.forEach(temp -> this.deleteWxAccountFansTag(temp.getId())); + + Long[] tagIds = wxmpUser.getTagIds(); + for (Long tagId : tagIds) { + WxAccountFansTagCreateReqVO wxAccountFansTag = new WxAccountFansTagCreateReqVO(); + wxAccountFansTag.setOpenid(wxmpUser.getOpenId()); + wxAccountFansTag.setTagId(String.valueOf(tagId)); + wxAccountFansTag.setWxAccountId(String.valueOf(wxAccountDO.getId())); + this.createWxAccountFansTag(wxAccountFansTag); + } + } + + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsg/WxFansMsgService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsg/WxFansMsgService.java new file mode 100644 index 000000000..658a89a64 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsg/WxFansMsgService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.fansmsg; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsg.WxFansMsgDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 粉丝消息表 Service 接口 + * + * @author 芋道源码 + */ +public interface WxFansMsgService { + + /** + * 创建粉丝消息表 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxFansMsg(@Valid WxFansMsgCreateReqVO createReqVO); + + /** + * 更新粉丝消息表 + * + * @param updateReqVO 更新信息 + */ + void updateWxFansMsg(@Valid WxFansMsgUpdateReqVO updateReqVO); + + /** + * 删除粉丝消息表 + * + * @param id 编号 + */ + void deleteWxFansMsg(Integer id); + + /** + * 获得粉丝消息表 + * + * @param id 编号 + * @return 粉丝消息表 + */ + WxFansMsgDO getWxFansMsg(Integer id); + + /** + * 获得粉丝消息表 列表 + * + * @param ids 编号 + * @return 粉丝消息表 列表 + */ + List getWxFansMsgList(Collection ids); + + /** + * 获得粉丝消息表 分页 + * + * @param pageReqVO 分页查询 + * @return 粉丝消息表 分页 + */ + PageResult getWxFansMsgPage(WxFansMsgPageReqVO pageReqVO); + + /** + * 获得粉丝消息表 列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 粉丝消息表 列表 + */ + List getWxFansMsgList(WxFansMsgExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsg/WxFansMsgServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsg/WxFansMsgServiceImpl.java new file mode 100644 index 000000000..3c533c305 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsg/WxFansMsgServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.fansmsg; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fansmsg.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsg.WxFansMsgDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.fansmsg.WxFansMsgConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.fansmsg.WxFansMsgMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 粉丝消息表 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxFansMsgServiceImpl implements WxFansMsgService { + + @Resource + private WxFansMsgMapper wxFansMsgMapper; + + @Override + public Integer createWxFansMsg(WxFansMsgCreateReqVO createReqVO) { + // 插入 + WxFansMsgDO wxFansMsg = WxFansMsgConvert.INSTANCE.convert(createReqVO); + wxFansMsgMapper.insert(wxFansMsg); + // 返回 + return wxFansMsg.getId(); + } + + @Override + public void updateWxFansMsg(WxFansMsgUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxFansMsgExists(updateReqVO.getId()); + // 更新 + WxFansMsgDO updateObj = WxFansMsgConvert.INSTANCE.convert(updateReqVO); + wxFansMsgMapper.updateById(updateObj); + } + + @Override + public void deleteWxFansMsg(Integer id) { + // 校验存在 + this.validateWxFansMsgExists(id); + // 删除 + wxFansMsgMapper.deleteById(id); + } + + private void validateWxFansMsgExists(Integer id) { + if (wxFansMsgMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxFansMsgDO getWxFansMsg(Integer id) { + return wxFansMsgMapper.selectById(id); + } + + @Override + public List getWxFansMsgList(Collection ids) { + return wxFansMsgMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxFansMsgPage(WxFansMsgPageReqVO pageReqVO) { + return wxFansMsgMapper.selectPage(pageReqVO); + } + + @Override + public List getWxFansMsgList(WxFansMsgExportReqVO exportReqVO) { + return wxFansMsgMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsgres/WxFansMsgResService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsgres/WxFansMsgResService.java new file mode 100644 index 000000000..203c362e3 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsgres/WxFansMsgResService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.fansmsgres; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsgres.WxFansMsgResDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 回复粉丝消息历史表 Service 接口 + * + * @author 芋道源码 + */ +public interface WxFansMsgResService { + + /** + * 创建回复粉丝消息历史表 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxFansMsgRes(@Valid WxFansMsgResCreateReqVO createReqVO); + + /** + * 更新回复粉丝消息历史表 + * + * @param updateReqVO 更新信息 + */ + void updateWxFansMsgRes(@Valid WxFansMsgResUpdateReqVO updateReqVO); + + /** + * 删除回复粉丝消息历史表 + * + * @param id 编号 + */ + void deleteWxFansMsgRes(Integer id); + + /** + * 获得回复粉丝消息历史表 + * + * @param id 编号 + * @return 回复粉丝消息历史表 + */ + WxFansMsgResDO getWxFansMsgRes(Integer id); + + /** + * 获得回复粉丝消息历史表 列表 + * + * @param ids 编号 + * @return 回复粉丝消息历史表 列表 + */ + List getWxFansMsgResList(Collection ids); + + /** + * 获得回复粉丝消息历史表 分页 + * + * @param pageReqVO 分页查询 + * @return 回复粉丝消息历史表 分页 + */ + PageResult getWxFansMsgResPage(WxFansMsgResPageReqVO pageReqVO); + + /** + * 获得回复粉丝消息历史表 列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 回复粉丝消息历史表 列表 + */ + List getWxFansMsgResList(WxFansMsgResExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsgres/WxFansMsgResServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsgres/WxFansMsgResServiceImpl.java new file mode 100644 index 000000000..964c0ed4b --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fansmsgres/WxFansMsgResServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.fansmsgres; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fansmsgres.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fansmsgres.WxFansMsgResDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.fansmsgres.WxFansMsgResConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.fansmsgres.WxFansMsgResMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 回复粉丝消息历史表 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxFansMsgResServiceImpl implements WxFansMsgResService { + + @Resource + private WxFansMsgResMapper wxFansMsgResMapper; + + @Override + public Integer createWxFansMsgRes(WxFansMsgResCreateReqVO createReqVO) { + // 插入 + WxFansMsgResDO wxFansMsgRes = WxFansMsgResConvert.INSTANCE.convert(createReqVO); + wxFansMsgResMapper.insert(wxFansMsgRes); + // 返回 + return wxFansMsgRes.getId(); + } + + @Override + public void updateWxFansMsgRes(WxFansMsgResUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxFansMsgResExists(updateReqVO.getId()); + // 更新 + WxFansMsgResDO updateObj = WxFansMsgResConvert.INSTANCE.convert(updateReqVO); + wxFansMsgResMapper.updateById(updateObj); + } + + @Override + public void deleteWxFansMsgRes(Integer id) { + // 校验存在 + this.validateWxFansMsgResExists(id); + // 删除 + wxFansMsgResMapper.deleteById(id); + } + + private void validateWxFansMsgResExists(Integer id) { + if (wxFansMsgResMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxFansMsgResDO getWxFansMsgRes(Integer id) { + return wxFansMsgResMapper.selectById(id); + } + + @Override + public List getWxFansMsgResList(Collection ids) { + return wxFansMsgResMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxFansMsgResPage(WxFansMsgResPageReqVO pageReqVO) { + return wxFansMsgResMapper.selectPage(pageReqVO); + } + + @Override + public List getWxFansMsgResList(WxFansMsgResExportReqVO exportReqVO) { + return wxFansMsgResMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fanstag/WxFansTagService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fanstag/WxFansTagService.java new file mode 100644 index 000000000..da5ec220c --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fanstag/WxFansTagService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.fanstag; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fanstag.WxFansTagDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 粉丝标签 Service 接口 + * + * @author 芋道源码 + */ +public interface WxFansTagService { + + /** + * 创建粉丝标签 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxFansTag(@Valid WxFansTagCreateReqVO createReqVO); + + /** + * 更新粉丝标签 + * + * @param updateReqVO 更新信息 + */ + void updateWxFansTag(@Valid WxFansTagUpdateReqVO updateReqVO); + + /** + * 删除粉丝标签 + * + * @param id 编号 + */ + void deleteWxFansTag(Integer id); + + /** + * 获得粉丝标签 + * + * @param id 编号 + * @return 粉丝标签 + */ + WxFansTagDO getWxFansTag(Integer id); + + /** + * 获得粉丝标签列表 + * + * @param ids 编号 + * @return 粉丝标签列表 + */ + List getWxFansTagList(Collection ids); + + /** + * 获得粉丝标签分页 + * + * @param pageReqVO 分页查询 + * @return 粉丝标签分页 + */ + PageResult getWxFansTagPage(WxFansTagPageReqVO pageReqVO); + + /** + * 获得粉丝标签列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 粉丝标签列表 + */ + List getWxFansTagList(WxFansTagExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fanstag/WxFansTagServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fanstag/WxFansTagServiceImpl.java new file mode 100644 index 000000000..f1ae773f8 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/fanstag/WxFansTagServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.fanstag; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.fanstag.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.fanstag.WxFansTagDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.fanstag.WxFansTagConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.fanstag.WxFansTagMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 粉丝标签 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxFansTagServiceImpl implements WxFansTagService { + + @Resource + private WxFansTagMapper wxFansTagMapper; + + @Override + public Integer createWxFansTag(WxFansTagCreateReqVO createReqVO) { + // 插入 + WxFansTagDO wxFansTag = WxFansTagConvert.INSTANCE.convert(createReqVO); + wxFansTagMapper.insert(wxFansTag); + // 返回 + return wxFansTag.getId(); + } + + @Override + public void updateWxFansTag(WxFansTagUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxFansTagExists(updateReqVO.getId()); + // 更新 + WxFansTagDO updateObj = WxFansTagConvert.INSTANCE.convert(updateReqVO); + wxFansTagMapper.updateById(updateObj); + } + + @Override + public void deleteWxFansTag(Integer id) { + // 校验存在 + this.validateWxFansTagExists(id); + // 删除 + wxFansTagMapper.deleteById(id); + } + + private void validateWxFansTagExists(Integer id) { + if (wxFansTagMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxFansTagDO getWxFansTag(Integer id) { + return wxFansTagMapper.selectById(id); + } + + @Override + public List getWxFansTagList(Collection ids) { + return wxFansTagMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxFansTagPage(WxFansTagPageReqVO pageReqVO) { + return wxFansTagMapper.selectPage(pageReqVO); + } + + @Override + public List getWxFansTagList(WxFansTagExportReqVO exportReqVO) { + return wxFansTagMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadService.java new file mode 100644 index 000000000..c6c57bb4a --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.mediaupload; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 微信素材上传表 Service 接口 + * + * @author 芋道源码 + */ +public interface WxMediaUploadService { + + /** + * 创建微信素材上传表 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxMediaUpload(@Valid WxMediaUploadCreateReqVO createReqVO); + + /** + * 更新微信素材上传表 + * + * @param updateReqVO 更新信息 + */ + void updateWxMediaUpload(@Valid WxMediaUploadUpdateReqVO updateReqVO); + + /** + * 删除微信素材上传表 + * + * @param id 编号 + */ + void deleteWxMediaUpload(Integer id); + + /** + * 获得微信素材上传表 + * + * @param id 编号 + * @return 微信素材上传表 + */ + WxMediaUploadDO getWxMediaUpload(Integer id); + + /** + * 获得微信素材上传表 列表 + * + * @param ids 编号 + * @return 微信素材上传表 列表 + */ + List getWxMediaUploadList(Collection ids); + + /** + * 获得微信素材上传表 分页 + * + * @param pageReqVO 分页查询 + * @return 微信素材上传表 分页 + */ + PageResult getWxMediaUploadPage(WxMediaUploadPageReqVO pageReqVO); + + /** + * 获得微信素材上传表 列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 微信素材上传表 列表 + */ + List getWxMediaUploadList(WxMediaUploadExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadServiceImpl.java new file mode 100644 index 000000000..84332756f --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.mediaupload; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.mediaupload.WxMediaUploadConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.mediaupload.WxMediaUploadMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 微信素材上传表 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxMediaUploadServiceImpl implements WxMediaUploadService { + + @Resource + private WxMediaUploadMapper wxMediaUploadMapper; + + @Override + public Integer createWxMediaUpload(WxMediaUploadCreateReqVO createReqVO) { + // 插入 + WxMediaUploadDO wxMediaUpload = WxMediaUploadConvert.INSTANCE.convert(createReqVO); + wxMediaUploadMapper.insert(wxMediaUpload); + // 返回 + return wxMediaUpload.getId(); + } + + @Override + public void updateWxMediaUpload(WxMediaUploadUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxMediaUploadExists(updateReqVO.getId()); + // 更新 + WxMediaUploadDO updateObj = WxMediaUploadConvert.INSTANCE.convert(updateReqVO); + wxMediaUploadMapper.updateById(updateObj); + } + + @Override + public void deleteWxMediaUpload(Integer id) { + // 校验存在 + this.validateWxMediaUploadExists(id); + // 删除 + wxMediaUploadMapper.deleteById(id); + } + + private void validateWxMediaUploadExists(Integer id) { + if (wxMediaUploadMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxMediaUploadDO getWxMediaUpload(Integer id) { + return wxMediaUploadMapper.selectById(id); + } + + @Override + public List getWxMediaUploadList(Collection ids) { + return wxMediaUploadMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxMediaUploadPage(WxMediaUploadPageReqVO pageReqVO) { + return wxMediaUploadMapper.selectPage(pageReqVO); + } + + @Override + public List getWxMediaUploadList(WxMediaUploadExportReqVO exportReqVO) { + return wxMediaUploadMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/menu/WxMenuService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/menu/WxMenuService.java new file mode 100644 index 000000000..0876db274 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/menu/WxMenuService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.menu; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.menu.WxMenuDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 微信菜单 Service 接口 + * + * @author 芋道源码 + */ +public interface WxMenuService { + + /** + * 创建微信菜单 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxMenu(@Valid WxMenuCreateReqVO createReqVO); + + /** + * 更新微信菜单 + * + * @param updateReqVO 更新信息 + */ + void updateWxMenu(@Valid WxMenuUpdateReqVO updateReqVO); + + /** + * 删除微信菜单 + * + * @param id 编号 + */ + void deleteWxMenu(Integer id); + + /** + * 获得微信菜单 + * + * @param id 编号 + * @return 微信菜单 + */ + WxMenuDO getWxMenu(Integer id); + + /** + * 获得微信菜单列表 + * + * @param ids 编号 + * @return 微信菜单列表 + */ + List getWxMenuList(Collection ids); + + /** + * 获得微信菜单分页 + * + * @param pageReqVO 分页查询 + * @return 微信菜单分页 + */ + PageResult getWxMenuPage(WxMenuPageReqVO pageReqVO); + + /** + * 获得微信菜单列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 微信菜单列表 + */ + List getWxMenuList(WxMenuExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/menu/WxMenuServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/menu/WxMenuServiceImpl.java new file mode 100644 index 000000000..6f8fc377a --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/menu/WxMenuServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.menu; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.menu.WxMenuDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.menu.WxMenuConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.menu.WxMenuMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 微信菜单 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxMenuServiceImpl implements WxMenuService { + + @Resource + private WxMenuMapper wxMenuMapper; + + @Override + public Integer createWxMenu(WxMenuCreateReqVO createReqVO) { + // 插入 + WxMenuDO wxMenu = WxMenuConvert.INSTANCE.convert(createReqVO); + wxMenuMapper.insert(wxMenu); + // 返回 + return wxMenu.getId(); + } + + @Override + public void updateWxMenu(WxMenuUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxMenuExists(updateReqVO.getId()); + // 更新 + WxMenuDO updateObj = WxMenuConvert.INSTANCE.convert(updateReqVO); + wxMenuMapper.updateById(updateObj); + } + + @Override + public void deleteWxMenu(Integer id) { + // 校验存在 + this.validateWxMenuExists(id); + // 删除 + wxMenuMapper.deleteById(id); + } + + private void validateWxMenuExists(Integer id) { + if (wxMenuMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxMenuDO getWxMenu(Integer id) { + return wxMenuMapper.selectById(id); + } + + @Override + public List getWxMenuList(Collection ids) { + return wxMenuMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxMenuPage(WxMenuPageReqVO pageReqVO) { + return wxMenuMapper.selectPage(pageReqVO); + } + + @Override + public List getWxMenuList(WxMenuExportReqVO exportReqVO) { + return wxMenuMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newsarticleitem/WxNewsArticleItemService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newsarticleitem/WxNewsArticleItemService.java new file mode 100644 index 000000000..c18076858 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newsarticleitem/WxNewsArticleItemService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.newsarticleitem; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.newsarticleitem.WxNewsArticleItemDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 图文消息文章列表表 Service 接口 + * + * @author 芋道源码 + */ +public interface WxNewsArticleItemService { + + /** + * 创建图文消息文章列表表 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxNewsArticleItem(@Valid WxNewsArticleItemCreateReqVO createReqVO); + + /** + * 更新图文消息文章列表表 + * + * @param updateReqVO 更新信息 + */ + void updateWxNewsArticleItem(@Valid WxNewsArticleItemUpdateReqVO updateReqVO); + + /** + * 删除图文消息文章列表表 + * + * @param id 编号 + */ + void deleteWxNewsArticleItem(Integer id); + + /** + * 获得图文消息文章列表表 + * + * @param id 编号 + * @return 图文消息文章列表表 + */ + WxNewsArticleItemDO getWxNewsArticleItem(Integer id); + + /** + * 获得图文消息文章列表表 列表 + * + * @param ids 编号 + * @return 图文消息文章列表表 列表 + */ + List getWxNewsArticleItemList(Collection ids); + + /** + * 获得图文消息文章列表表 分页 + * + * @param pageReqVO 分页查询 + * @return 图文消息文章列表表 分页 + */ + PageResult getWxNewsArticleItemPage(WxNewsArticleItemPageReqVO pageReqVO); + + /** + * 获得图文消息文章列表表 列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 图文消息文章列表表 列表 + */ + List getWxNewsArticleItemList(WxNewsArticleItemExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newsarticleitem/WxNewsArticleItemServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newsarticleitem/WxNewsArticleItemServiceImpl.java new file mode 100644 index 000000000..52b6b6b99 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newsarticleitem/WxNewsArticleItemServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.newsarticleitem; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.newsarticleitem.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.newsarticleitem.WxNewsArticleItemDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.newsarticleitem.WxNewsArticleItemConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.newsarticleitem.WxNewsArticleItemMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 图文消息文章列表表 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxNewsArticleItemServiceImpl implements WxNewsArticleItemService { + + @Resource + private WxNewsArticleItemMapper wxNewsArticleItemMapper; + + @Override + public Integer createWxNewsArticleItem(WxNewsArticleItemCreateReqVO createReqVO) { + // 插入 + WxNewsArticleItemDO wxNewsArticleItem = WxNewsArticleItemConvert.INSTANCE.convert(createReqVO); + wxNewsArticleItemMapper.insert(wxNewsArticleItem); + // 返回 + return wxNewsArticleItem.getId(); + } + + @Override + public void updateWxNewsArticleItem(WxNewsArticleItemUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxNewsArticleItemExists(updateReqVO.getId()); + // 更新 + WxNewsArticleItemDO updateObj = WxNewsArticleItemConvert.INSTANCE.convert(updateReqVO); + wxNewsArticleItemMapper.updateById(updateObj); + } + + @Override + public void deleteWxNewsArticleItem(Integer id) { + // 校验存在 + this.validateWxNewsArticleItemExists(id); + // 删除 + wxNewsArticleItemMapper.deleteById(id); + } + + private void validateWxNewsArticleItemExists(Integer id) { + if (wxNewsArticleItemMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxNewsArticleItemDO getWxNewsArticleItem(Integer id) { + return wxNewsArticleItemMapper.selectById(id); + } + + @Override + public List getWxNewsArticleItemList(Collection ids) { + return wxNewsArticleItemMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxNewsArticleItemPage(WxNewsArticleItemPageReqVO pageReqVO) { + return wxNewsArticleItemMapper.selectPage(pageReqVO); + } + + @Override + public List getWxNewsArticleItemList(WxNewsArticleItemExportReqVO exportReqVO) { + return wxNewsArticleItemMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newstemplate/WxNewsTemplateService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newstemplate/WxNewsTemplateService.java new file mode 100644 index 000000000..fb854b97b --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newstemplate/WxNewsTemplateService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.newstemplate; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.newstemplate.WxNewsTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 图文消息模板 Service 接口 + * + * @author 芋道源码 + */ +public interface WxNewsTemplateService { + + /** + * 创建图文消息模板 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxNewsTemplate(@Valid WxNewsTemplateCreateReqVO createReqVO); + + /** + * 更新图文消息模板 + * + * @param updateReqVO 更新信息 + */ + void updateWxNewsTemplate(@Valid WxNewsTemplateUpdateReqVO updateReqVO); + + /** + * 删除图文消息模板 + * + * @param id 编号 + */ + void deleteWxNewsTemplate(Integer id); + + /** + * 获得图文消息模板 + * + * @param id 编号 + * @return 图文消息模板 + */ + WxNewsTemplateDO getWxNewsTemplate(Integer id); + + /** + * 获得图文消息模板列表 + * + * @param ids 编号 + * @return 图文消息模板列表 + */ + List getWxNewsTemplateList(Collection ids); + + /** + * 获得图文消息模板分页 + * + * @param pageReqVO 分页查询 + * @return 图文消息模板分页 + */ + PageResult getWxNewsTemplatePage(WxNewsTemplatePageReqVO pageReqVO); + + /** + * 获得图文消息模板列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 图文消息模板列表 + */ + List getWxNewsTemplateList(WxNewsTemplateExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newstemplate/WxNewsTemplateServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newstemplate/WxNewsTemplateServiceImpl.java new file mode 100644 index 000000000..ac20950d0 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/newstemplate/WxNewsTemplateServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.newstemplate; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.newstemplate.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.newstemplate.WxNewsTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.newstemplate.WxNewsTemplateConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.newstemplate.WxNewsTemplateMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 图文消息模板 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxNewsTemplateServiceImpl implements WxNewsTemplateService { + + @Resource + private WxNewsTemplateMapper wxNewsTemplateMapper; + + @Override + public Integer createWxNewsTemplate(WxNewsTemplateCreateReqVO createReqVO) { + // 插入 + WxNewsTemplateDO wxNewsTemplate = WxNewsTemplateConvert.INSTANCE.convert(createReqVO); + wxNewsTemplateMapper.insert(wxNewsTemplate); + // 返回 + return wxNewsTemplate.getId(); + } + + @Override + public void updateWxNewsTemplate(WxNewsTemplateUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxNewsTemplateExists(updateReqVO.getId()); + // 更新 + WxNewsTemplateDO updateObj = WxNewsTemplateConvert.INSTANCE.convert(updateReqVO); + wxNewsTemplateMapper.updateById(updateObj); + } + + @Override + public void deleteWxNewsTemplate(Integer id) { + // 校验存在 + this.validateWxNewsTemplateExists(id); + // 删除 + wxNewsTemplateMapper.deleteById(id); + } + + private void validateWxNewsTemplateExists(Integer id) { + if (wxNewsTemplateMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxNewsTemplateDO getWxNewsTemplate(Integer id) { + return wxNewsTemplateMapper.selectById(id); + } + + @Override + public List getWxNewsTemplateList(Collection ids) { + return wxNewsTemplateMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxNewsTemplatePage(WxNewsTemplatePageReqVO pageReqVO) { + return wxNewsTemplateMapper.selectPage(pageReqVO); + } + + @Override + public List getWxNewsTemplateList(WxNewsTemplateExportReqVO exportReqVO) { + return wxNewsTemplateMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextService.java new file mode 100644 index 000000000..a27e62000 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.receivetext; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 回复关键字 Service 接口 + * + * @author 芋道源码 + */ +public interface WxReceiveTextService { + + /** + * 创建回复关键字 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxReceiveText(@Valid WxReceiveTextCreateReqVO createReqVO); + + /** + * 更新回复关键字 + * + * @param updateReqVO 更新信息 + */ + void updateWxReceiveText(@Valid WxReceiveTextUpdateReqVO updateReqVO); + + /** + * 删除回复关键字 + * + * @param id 编号 + */ + void deleteWxReceiveText(Integer id); + + /** + * 获得回复关键字 + * + * @param id 编号 + * @return 回复关键字 + */ + WxReceiveTextDO getWxReceiveText(Integer id); + + /** + * 获得回复关键字列表 + * + * @param ids 编号 + * @return 回复关键字列表 + */ + List getWxReceiveTextList(Collection ids); + + /** + * 获得回复关键字分页 + * + * @param pageReqVO 分页查询 + * @return 回复关键字分页 + */ + PageResult getWxReceiveTextPage(WxReceiveTextPageReqVO pageReqVO); + + /** + * 获得回复关键字列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 回复关键字列表 + */ + List getWxReceiveTextList(WxReceiveTextExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextServiceImpl.java new file mode 100644 index 000000000..07c4b7503 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.receivetext; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.receivetext.WxReceiveTextConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.receivetext.WxReceiveTextMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 回复关键字 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxReceiveTextServiceImpl implements WxReceiveTextService { + + @Resource + private WxReceiveTextMapper wxReceiveTextMapper; + + @Override + public Integer createWxReceiveText(WxReceiveTextCreateReqVO createReqVO) { + // 插入 + WxReceiveTextDO wxReceiveText = WxReceiveTextConvert.INSTANCE.convert(createReqVO); + wxReceiveTextMapper.insert(wxReceiveText); + // 返回 + return wxReceiveText.getId(); + } + + @Override + public void updateWxReceiveText(WxReceiveTextUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxReceiveTextExists(updateReqVO.getId()); + // 更新 + WxReceiveTextDO updateObj = WxReceiveTextConvert.INSTANCE.convert(updateReqVO); + wxReceiveTextMapper.updateById(updateObj); + } + + @Override + public void deleteWxReceiveText(Integer id) { + // 校验存在 + this.validateWxReceiveTextExists(id); + // 删除 + wxReceiveTextMapper.deleteById(id); + } + + private void validateWxReceiveTextExists(Integer id) { + if (wxReceiveTextMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxReceiveTextDO getWxReceiveText(Integer id) { + return wxReceiveTextMapper.selectById(id); + } + + @Override + public List getWxReceiveTextList(Collection ids) { + return wxReceiveTextMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxReceiveTextPage(WxReceiveTextPageReqVO pageReqVO) { + return wxReceiveTextMapper.selectPage(pageReqVO); + } + + @Override + public List getWxReceiveTextList(WxReceiveTextExportReqVO exportReqVO) { + return wxReceiveTextMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/subscribetext/WxSubscribeTextService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/subscribetext/WxSubscribeTextService.java new file mode 100644 index 000000000..a4294494e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/subscribetext/WxSubscribeTextService.java @@ -0,0 +1,81 @@ +package cn.iocoder.yudao.module.mp.service.subscribetext; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.account.WxAccountDO; +import cn.iocoder.yudao.module.mp.dal.dataobject.subscribetext.WxSubscribeTextDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import com.baomidou.mybatisplus.core.toolkit.support.SFunction; + +/** + * 关注欢迎语 Service 接口 + * + * @author 芋道源码 + */ +public interface WxSubscribeTextService { + + /** + * 创建关注欢迎语 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxSubscribeText(@Valid WxSubscribeTextCreateReqVO createReqVO); + + /** + * 更新关注欢迎语 + * + * @param updateReqVO 更新信息 + */ + void updateWxSubscribeText(@Valid WxSubscribeTextUpdateReqVO updateReqVO); + + /** + * 删除关注欢迎语 + * + * @param id 编号 + */ + void deleteWxSubscribeText(Integer id); + + /** + * 获得关注欢迎语 + * + * @param id 编号 + * @return 关注欢迎语 + */ + WxSubscribeTextDO getWxSubscribeText(Integer id); + + /** + * 获得关注欢迎语列表 + * + * @param ids 编号 + * @return 关注欢迎语列表 + */ + List getWxSubscribeTextList(Collection ids); + + /** + * 获得关注欢迎语分页 + * + * @param pageReqVO 分页查询 + * @return 关注欢迎语分页 + */ + PageResult getWxSubscribeTextPage(WxSubscribeTextPageReqVO pageReqVO); + + /** + * 获得关注欢迎语列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 关注欢迎语列表 + */ + List getWxSubscribeTextList(WxSubscribeTextExportReqVO exportReqVO); + + /** + * 关注欢迎语分页 + * + * @param column + * @param obj + * @return + */ + WxSubscribeTextDO findBy(SFunction column, Object obj); +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/subscribetext/WxSubscribeTextServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/subscribetext/WxSubscribeTextServiceImpl.java new file mode 100644 index 000000000..0e6d0765e --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/subscribetext/WxSubscribeTextServiceImpl.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.mp.service.subscribetext; + +import com.baomidou.mybatisplus.core.toolkit.support.SFunction; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.subscribetext.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.subscribetext.WxSubscribeTextDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.subscribetext.WxSubscribeTextConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.subscribetext.WxSubscribeTextMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 关注欢迎语 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxSubscribeTextServiceImpl implements WxSubscribeTextService { + + @Resource + private WxSubscribeTextMapper wxSubscribeTextMapper; + + @Override + public Integer createWxSubscribeText(WxSubscribeTextCreateReqVO createReqVO) { + // 插入 + WxSubscribeTextDO wxSubscribeText = WxSubscribeTextConvert.INSTANCE.convert(createReqVO); + wxSubscribeTextMapper.insert(wxSubscribeText); + // 返回 + return wxSubscribeText.getId(); + } + + @Override + public void updateWxSubscribeText(WxSubscribeTextUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxSubscribeTextExists(updateReqVO.getId()); + // 更新 + WxSubscribeTextDO updateObj = WxSubscribeTextConvert.INSTANCE.convert(updateReqVO); + wxSubscribeTextMapper.updateById(updateObj); + } + + @Override + public void deleteWxSubscribeText(Integer id) { + // 校验存在 + this.validateWxSubscribeTextExists(id); + // 删除 + wxSubscribeTextMapper.deleteById(id); + } + + private void validateWxSubscribeTextExists(Integer id) { + if (wxSubscribeTextMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxSubscribeTextDO getWxSubscribeText(Integer id) { + return wxSubscribeTextMapper.selectById(id); + } + + @Override + public List getWxSubscribeTextList(Collection ids) { + return wxSubscribeTextMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxSubscribeTextPage(WxSubscribeTextPageReqVO pageReqVO) { + return wxSubscribeTextMapper.selectPage(pageReqVO); + } + + @Override + public List getWxSubscribeTextList(WxSubscribeTextExportReqVO exportReqVO) { + return wxSubscribeTextMapper.selectList(exportReqVO); + } + + @Override + public WxSubscribeTextDO findBy(SFunction column, Object obj) { + return wxSubscribeTextMapper.selectOne(column, obj); + } +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateService.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateService.java new file mode 100644 index 000000000..51dcf7d38 --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.mp.service.texttemplate; + +import java.util.*; +import javax.validation.*; + +import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 文本模板 Service 接口 + * + * @author 芋道源码 + */ +public interface WxTextTemplateService { + + /** + * 创建文本模板 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWxTextTemplate(@Valid WxTextTemplateCreateReqVO createReqVO); + + /** + * 更新文本模板 + * + * @param updateReqVO 更新信息 + */ + void updateWxTextTemplate(@Valid WxTextTemplateUpdateReqVO updateReqVO); + + /** + * 删除文本模板 + * + * @param id 编号 + */ + void deleteWxTextTemplate(Integer id); + + /** + * 获得文本模板 + * + * @param id 编号 + * @return 文本模板 + */ + WxTextTemplateDO getWxTextTemplate(Integer id); + + /** + * 获得文本模板列表 + * + * @param ids 编号 + * @return 文本模板列表 + */ + List getWxTextTemplateList(Collection ids); + + /** + * 获得文本模板分页 + * + * @param pageReqVO 分页查询 + * @return 文本模板分页 + */ + PageResult getWxTextTemplatePage(WxTextTemplatePageReqVO pageReqVO); + + /** + * 获得文本模板列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 文本模板列表 + */ + List getWxTextTemplateList(WxTextTemplateExportReqVO exportReqVO); + +} diff --git a/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateServiceImpl.java b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateServiceImpl.java new file mode 100644 index 000000000..74347ae3a --- /dev/null +++ b/yudao-module-wechat/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.mp.service.texttemplate; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; +import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.mp.convert.texttemplate.WxTextTemplateConvert; +import cn.iocoder.yudao.module.mp.dal.mysql.texttemplate.WxTextTemplateMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; + +/** + * 文本模板 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WxTextTemplateServiceImpl implements WxTextTemplateService { + + @Resource + private WxTextTemplateMapper wxTextTemplateMapper; + + @Override + public Integer createWxTextTemplate(WxTextTemplateCreateReqVO createReqVO) { + // 插入 + WxTextTemplateDO wxTextTemplate = WxTextTemplateConvert.INSTANCE.convert(createReqVO); + wxTextTemplateMapper.insert(wxTextTemplate); + // 返回 + return wxTextTemplate.getId(); + } + + @Override + public void updateWxTextTemplate(WxTextTemplateUpdateReqVO updateReqVO) { + // 校验存在 + this.validateWxTextTemplateExists(updateReqVO.getId()); + // 更新 + WxTextTemplateDO updateObj = WxTextTemplateConvert.INSTANCE.convert(updateReqVO); + wxTextTemplateMapper.updateById(updateObj); + } + + @Override + public void deleteWxTextTemplate(Integer id) { + // 校验存在 + this.validateWxTextTemplateExists(id); + // 删除 + wxTextTemplateMapper.deleteById(id); + } + + private void validateWxTextTemplateExists(Integer id) { + if (wxTextTemplateMapper.selectById(id) == null) { + throw exception(COMMON_NOT_EXISTS); + } + } + + @Override + public WxTextTemplateDO getWxTextTemplate(Integer id) { + return wxTextTemplateMapper.selectById(id); + } + + @Override + public List getWxTextTemplateList(Collection ids) { + return wxTextTemplateMapper.selectBatchIds(ids); + } + + @Override + public PageResult getWxTextTemplatePage(WxTextTemplatePageReqVO pageReqVO) { + return wxTextTemplateMapper.selectPage(pageReqVO); + } + + @Override + public List getWxTextTemplateList(WxTextTemplateExportReqVO exportReqVO) { + return wxTextTemplateMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index 4989a6146..0b9e5d2b5 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -202,3 +202,11 @@ justauth: type: REDIS prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 +wx: + mp: + useRedis: false + defaultContent: \u60A8\u597D\uFF0C\u6709\u4EC0\u4E48\u95EE\u9898\uFF1F + redisConfig: + host: 127.0.0.1 + port: 6379 + password: diff --git a/yudao-ui-admin/src/api/wechatMp/wxAccountFansTag.js b/yudao-ui-admin/src/api/wechatMp/wxAccountFansTag.js new file mode 100644 index 000000000..dff041ee9 --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxAccountFansTag.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建粉丝标签关联 +export function createWxAccountFansTag(data) { + return request({ + url: '/wechatMp/wx-account-fans-tag/create', + method: 'post', + data: data + }) +} + +// 更新粉丝标签关联 +export function updateWxAccountFansTag(data) { + return request({ + url: '/wechatMp/wx-account-fans-tag/update', + method: 'put', + data: data + }) +} + +// 删除粉丝标签关联 +export function deleteWxAccountFansTag(id) { + return request({ + url: '/wechatMp/wx-account-fans-tag/delete?id=' + id, + method: 'delete' + }) +} + +// 获得粉丝标签关联 +export function getWxAccountFansTag(id) { + return request({ + url: '/wechatMp/wx-account-fans-tag/get?id=' + id, + method: 'get' + }) +} + +// 获得粉丝标签关联分页 +export function getWxAccountFansTagPage(query) { + return request({ + url: '/wechatMp/wx-account-fans-tag/page', + method: 'get', + params: query + }) +} + +// 导出粉丝标签关联 Excel +export function exportWxAccountFansTagExcel(query) { + return request({ + url: '/wechatMp/wx-account-fans-tag/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxFansMsg.js b/yudao-ui-admin/src/api/wechatMp/wxFansMsg.js new file mode 100644 index 000000000..39cd932e7 --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxFansMsg.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建粉丝消息表 +export function createWxFansMsg(data) { + return request({ + url: '/wechatMp/wx-fans-msg/create', + method: 'post', + data: data + }) +} + +// 更新粉丝消息表 +export function updateWxFansMsg(data) { + return request({ + url: '/wechatMp/wx-fans-msg/update', + method: 'put', + data: data + }) +} + +// 删除粉丝消息表 +export function deleteWxFansMsg(id) { + return request({ + url: '/wechatMp/wx-fans-msg/delete?id=' + id, + method: 'delete' + }) +} + +// 获得粉丝消息表 +export function getWxFansMsg(id) { + return request({ + url: '/wechatMp/wx-fans-msg/get?id=' + id, + method: 'get' + }) +} + +// 获得粉丝消息表 分页 +export function getWxFansMsgPage(query) { + return request({ + url: '/wechatMp/wx-fans-msg/page', + method: 'get', + params: query + }) +} + +// 导出粉丝消息表 Excel +export function exportWxFansMsgExcel(query) { + return request({ + url: '/wechatMp/wx-fans-msg/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxFansMsgRes.js b/yudao-ui-admin/src/api/wechatMp/wxFansMsgRes.js new file mode 100644 index 000000000..d0f36f410 --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxFansMsgRes.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建回复粉丝消息历史表 +export function createWxFansMsgRes(data) { + return request({ + url: '/wechatMp/wx-fans-msg-res/create', + method: 'post', + data: data + }) +} + +// 更新回复粉丝消息历史表 +export function updateWxFansMsgRes(data) { + return request({ + url: '/wechatMp/wx-fans-msg-res/update', + method: 'put', + data: data + }) +} + +// 删除回复粉丝消息历史表 +export function deleteWxFansMsgRes(id) { + return request({ + url: '/wechatMp/wx-fans-msg-res/delete?id=' + id, + method: 'delete' + }) +} + +// 获得回复粉丝消息历史表 +export function getWxFansMsgRes(id) { + return request({ + url: '/wechatMp/wx-fans-msg-res/get?id=' + id, + method: 'get' + }) +} + +// 获得回复粉丝消息历史表 分页 +export function getWxFansMsgResPage(query) { + return request({ + url: '/wechatMp/wx-fans-msg-res/page', + method: 'get', + params: query + }) +} + +// 导出回复粉丝消息历史表 Excel +export function exportWxFansMsgResExcel(query) { + return request({ + url: '/wechatMp/wx-fans-msg-res/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxFansTag.js b/yudao-ui-admin/src/api/wechatMp/wxFansTag.js new file mode 100644 index 000000000..b8ea5c172 --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxFansTag.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建粉丝标签 +export function createWxFansTag(data) { + return request({ + url: '/wechatMp/wx-fans-tag/create', + method: 'post', + data: data + }) +} + +// 更新粉丝标签 +export function updateWxFansTag(data) { + return request({ + url: '/wechatMp/wx-fans-tag/update', + method: 'put', + data: data + }) +} + +// 删除粉丝标签 +export function deleteWxFansTag(id) { + return request({ + url: '/wechatMp/wx-fans-tag/delete?id=' + id, + method: 'delete' + }) +} + +// 获得粉丝标签 +export function getWxFansTag(id) { + return request({ + url: '/wechatMp/wx-fans-tag/get?id=' + id, + method: 'get' + }) +} + +// 获得粉丝标签分页 +export function getWxFansTagPage(query) { + return request({ + url: '/wechatMp/wx-fans-tag/page', + method: 'get', + params: query + }) +} + +// 导出粉丝标签 Excel +export function exportWxFansTagExcel(query) { + return request({ + url: '/wechatMp/wx-fans-tag/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxMediaUpload.js b/yudao-ui-admin/src/api/wechatMp/wxMediaUpload.js new file mode 100644 index 000000000..d2f17ebbf --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxMediaUpload.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建微信素材上传表 +export function createWxMediaUpload(data) { + return request({ + url: '/wechatMp/wx-media-upload/create', + method: 'post', + data: data + }) +} + +// 更新微信素材上传表 +export function updateWxMediaUpload(data) { + return request({ + url: '/wechatMp/wx-media-upload/update', + method: 'put', + data: data + }) +} + +// 删除微信素材上传表 +export function deleteWxMediaUpload(id) { + return request({ + url: '/wechatMp/wx-media-upload/delete?id=' + id, + method: 'delete' + }) +} + +// 获得微信素材上传表 +export function getWxMediaUpload(id) { + return request({ + url: '/wechatMp/wx-media-upload/get?id=' + id, + method: 'get' + }) +} + +// 获得微信素材上传表 分页 +export function getWxMediaUploadPage(query) { + return request({ + url: '/wechatMp/wx-media-upload/page', + method: 'get', + params: query + }) +} + +// 导出微信素材上传表 Excel +export function exportWxMediaUploadExcel(query) { + return request({ + url: '/wechatMp/wx-media-upload/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxMenu.js b/yudao-ui-admin/src/api/wechatMp/wxMenu.js new file mode 100644 index 000000000..59d3794d6 --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxMenu.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建微信菜单 +export function createWxMenu(data) { + return request({ + url: '/wechatMp/wx-menu/create', + method: 'post', + data: data + }) +} + +// 更新微信菜单 +export function updateWxMenu(data) { + return request({ + url: '/wechatMp/wx-menu/update', + method: 'put', + data: data + }) +} + +// 删除微信菜单 +export function deleteWxMenu(id) { + return request({ + url: '/wechatMp/wx-menu/delete?id=' + id, + method: 'delete' + }) +} + +// 获得微信菜单 +export function getWxMenu(id) { + return request({ + url: '/wechatMp/wx-menu/get?id=' + id, + method: 'get' + }) +} + +// 获得微信菜单分页 +export function getWxMenuPage(query) { + return request({ + url: '/wechatMp/wx-menu/page', + method: 'get', + params: query + }) +} + +// 导出微信菜单 Excel +export function exportWxMenuExcel(query) { + return request({ + url: '/wechatMp/wx-menu/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxNewsArticleItem.js b/yudao-ui-admin/src/api/wechatMp/wxNewsArticleItem.js new file mode 100644 index 000000000..02461d830 --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxNewsArticleItem.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建图文消息文章列表表 +export function createWxNewsArticleItem(data) { + return request({ + url: '/wechatMp/wx-news-article-item/create', + method: 'post', + data: data + }) +} + +// 更新图文消息文章列表表 +export function updateWxNewsArticleItem(data) { + return request({ + url: '/wechatMp/wx-news-article-item/update', + method: 'put', + data: data + }) +} + +// 删除图文消息文章列表表 +export function deleteWxNewsArticleItem(id) { + return request({ + url: '/wechatMp/wx-news-article-item/delete?id=' + id, + method: 'delete' + }) +} + +// 获得图文消息文章列表表 +export function getWxNewsArticleItem(id) { + return request({ + url: '/wechatMp/wx-news-article-item/get?id=' + id, + method: 'get' + }) +} + +// 获得图文消息文章列表表 分页 +export function getWxNewsArticleItemPage(query) { + return request({ + url: '/wechatMp/wx-news-article-item/page', + method: 'get', + params: query + }) +} + +// 导出图文消息文章列表表 Excel +export function exportWxNewsArticleItemExcel(query) { + return request({ + url: '/wechatMp/wx-news-article-item/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxNewsTemplate.js b/yudao-ui-admin/src/api/wechatMp/wxNewsTemplate.js new file mode 100644 index 000000000..32636c062 --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxNewsTemplate.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建图文消息模板 +export function createWxNewsTemplate(data) { + return request({ + url: '/wechatMp/wx-news-template/create', + method: 'post', + data: data + }) +} + +// 更新图文消息模板 +export function updateWxNewsTemplate(data) { + return request({ + url: '/wechatMp/wx-news-template/update', + method: 'put', + data: data + }) +} + +// 删除图文消息模板 +export function deleteWxNewsTemplate(id) { + return request({ + url: '/wechatMp/wx-news-template/delete?id=' + id, + method: 'delete' + }) +} + +// 获得图文消息模板 +export function getWxNewsTemplate(id) { + return request({ + url: '/wechatMp/wx-news-template/get?id=' + id, + method: 'get' + }) +} + +// 获得图文消息模板分页 +export function getWxNewsTemplatePage(query) { + return request({ + url: '/wechatMp/wx-news-template/page', + method: 'get', + params: query + }) +} + +// 导出图文消息模板 Excel +export function exportWxNewsTemplateExcel(query) { + return request({ + url: '/wechatMp/wx-news-template/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxReceiveText.js b/yudao-ui-admin/src/api/wechatMp/wxReceiveText.js new file mode 100644 index 000000000..8fae193bc --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxReceiveText.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建回复关键字 +export function createWxReceiveText(data) { + return request({ + url: '/wechatMp/wx-receive-text/create', + method: 'post', + data: data + }) +} + +// 更新回复关键字 +export function updateWxReceiveText(data) { + return request({ + url: '/wechatMp/wx-receive-text/update', + method: 'put', + data: data + }) +} + +// 删除回复关键字 +export function deleteWxReceiveText(id) { + return request({ + url: '/wechatMp/wx-receive-text/delete?id=' + id, + method: 'delete' + }) +} + +// 获得回复关键字 +export function getWxReceiveText(id) { + return request({ + url: '/wechatMp/wx-receive-text/get?id=' + id, + method: 'get' + }) +} + +// 获得回复关键字分页 +export function getWxReceiveTextPage(query) { + return request({ + url: '/wechatMp/wx-receive-text/page', + method: 'get', + params: query + }) +} + +// 导出回复关键字 Excel +export function exportWxReceiveTextExcel(query) { + return request({ + url: '/wechatMp/wx-receive-text/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxSubscribeText.js b/yudao-ui-admin/src/api/wechatMp/wxSubscribeText.js new file mode 100644 index 000000000..2dbd8fa2d --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxSubscribeText.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建关注欢迎语 +export function createWxSubscribeText(data) { + return request({ + url: '/wechatMp/wx-subscribe-text/create', + method: 'post', + data: data + }) +} + +// 更新关注欢迎语 +export function updateWxSubscribeText(data) { + return request({ + url: '/wechatMp/wx-subscribe-text/update', + method: 'put', + data: data + }) +} + +// 删除关注欢迎语 +export function deleteWxSubscribeText(id) { + return request({ + url: '/wechatMp/wx-subscribe-text/delete?id=' + id, + method: 'delete' + }) +} + +// 获得关注欢迎语 +export function getWxSubscribeText(id) { + return request({ + url: '/wechatMp/wx-subscribe-text/get?id=' + id, + method: 'get' + }) +} + +// 获得关注欢迎语分页 +export function getWxSubscribeTextPage(query) { + return request({ + url: '/wechatMp/wx-subscribe-text/page', + method: 'get', + params: query + }) +} + +// 导出关注欢迎语 Excel +export function exportWxSubscribeTextExcel(query) { + return request({ + url: '/wechatMp/wx-subscribe-text/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/api/wechatMp/wxTextTemplate.js b/yudao-ui-admin/src/api/wechatMp/wxTextTemplate.js new file mode 100644 index 000000000..4c558b12a --- /dev/null +++ b/yudao-ui-admin/src/api/wechatMp/wxTextTemplate.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建文本模板 +export function createWxTextTemplate(data) { + return request({ + url: '/wechatMp/wx-text-template/create', + method: 'post', + data: data + }) +} + +// 更新文本模板 +export function updateWxTextTemplate(data) { + return request({ + url: '/wechatMp/wx-text-template/update', + method: 'put', + data: data + }) +} + +// 删除文本模板 +export function deleteWxTextTemplate(id) { + return request({ + url: '/wechatMp/wx-text-template/delete?id=' + id, + method: 'delete' + }) +} + +// 获得文本模板 +export function getWxTextTemplate(id) { + return request({ + url: '/wechatMp/wx-text-template/get?id=' + id, + method: 'get' + }) +} + +// 获得文本模板分页 +export function getWxTextTemplatePage(query) { + return request({ + url: '/wechatMp/wx-text-template/page', + method: 'get', + params: query + }) +} + +// 导出文本模板 Excel +export function exportWxTextTemplateExcel(query) { + return request({ + url: '/wechatMp/wx-text-template/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/views/wechatMp/wxAccount/index.vue b/yudao-ui-admin/src/views/wechatMp/wxAccount/index.vue index 78ca4f7c8..4449ba74d 100644 --- a/yudao-ui-admin/src/views/wechatMp/wxAccount/index.vue +++ b/yudao-ui-admin/src/views/wechatMp/wxAccount/index.vue @@ -9,8 +9,8 @@ - - + + - - + + - - + +