├── .gitee └── ISSUE_TEMPLATE.zh-CN.md ├── .github ├── ISSUE_TEMPLATE.md └── ISSUE_TEMPLATE.zh-CN.md ├── .gitignore ├── .idea └── icon.png ├── .travis.yml ├── LICENSE.txt ├── _config.yml ├── assets ├── files │ ├── download_links.json │ ├── introduce-wepush-qrcode.png │ ├── user_case.json │ └── wx-zanshang.jpg ├── linux │ └── WePush.png ├── mac │ └── WePush.icns ├── screen_shoot │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ └── theme.png └── windows │ └── WePush.ico ├── download.md ├── icons ├── .DS_Store ├── android │ ├── play_store_512.png │ └── res │ │ ├── mipmap-anydpi-v26 │ │ └── ic_launcher.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_monochrome.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_monochrome.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_monochrome.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_monochrome.png │ │ └── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_monochrome.png ├── ios │ ├── AppIcon-20@2x.png │ ├── AppIcon-20@2x~ipad.png │ ├── AppIcon-20@3x.png │ ├── AppIcon-20~ipad.png │ ├── AppIcon-29.png │ ├── AppIcon-29@2x.png │ ├── AppIcon-29@2x~ipad.png │ ├── AppIcon-29@3x.png │ ├── AppIcon-29~ipad.png │ ├── AppIcon-40@2x.png │ ├── AppIcon-40@2x~ipad.png │ ├── AppIcon-40@3x.png │ ├── AppIcon-40~ipad.png │ ├── AppIcon-60@2x~car.png │ ├── AppIcon-60@3x~car.png │ ├── AppIcon-83.5@2x~ipad.png │ ├── AppIcon@2x.png │ ├── AppIcon@2x~ipad.png │ ├── AppIcon@3x.png │ ├── AppIcon~ios-marketing.png │ ├── AppIcon~ipad.png │ └── Contents.json ├── macos │ └── AppIcon.icns └── web │ ├── README.txt │ ├── apple-touch-icon.png │ ├── favicon.ico │ ├── icon-192-maskable.png │ ├── icon-192.png │ ├── icon-512-maskable.png │ └── icon-512.png ├── install_local_jar_to_repo.bat ├── lib ├── antlr-2.7.4.jar ├── chardet-1.0.jar ├── cpdetector_1.0.10.jar ├── jargs-1.0.jar └── taobao-sdk-java-auto.jar ├── memo.md ├── pom.xml ├── psd └── WePush-logo.psd ├── readme.md ├── screen_shoot ├── Image003.png ├── Image1.png ├── csv-data-demo.png ├── logo-128.png ├── sshot-10.png ├── txt-data-demo.png ├── var-msg-1.png ├── var-msg-2.png ├── var-msg-3.png ├── var-msg-4.png ├── wepush-qq-group.png ├── wepush-sshot-5.png ├── wepush-sshot-6.png ├── wx-zanshang.jpg ├── 图像 198.png ├── 图像 199.png ├── 图像 200.png ├── 图像 202.png ├── 图像 204.png ├── 图像 205.png ├── 图像 206.png ├── 图像 207.png └── 图像 218.png └── src ├── main ├── java │ └── com │ │ └── fangxuele │ │ └── tool │ │ └── push │ │ ├── App.java │ │ ├── bean │ │ ├── TemplateData.java │ │ ├── UserCase.java │ │ ├── VersionSummary.java │ │ ├── account │ │ │ ├── AliYunAccountConfig.java │ │ │ ├── BdYunAccountConfig.java │ │ │ ├── DingAccountConfig.java │ │ │ ├── EmailAccountConfig.java │ │ │ ├── HttpAccountConfig.java │ │ │ ├── HwYunAccountConfig.java │ │ │ ├── QiniuYunAccountConfig.java │ │ │ ├── TxYun3AccountConfig.java │ │ │ ├── TxYunAccountConfig.java │ │ │ ├── UpYunAccountConfig.java │ │ │ ├── WxCpAccountConfig.java │ │ │ ├── WxMaAccountConfig.java │ │ │ ├── WxMpAccountConfig.java │ │ │ └── YunPianAccountConfig.java │ │ └── msg │ │ │ ├── HttpMsg.java │ │ │ └── MailMsg.java │ │ ├── dao │ │ ├── TAccountMapper.java │ │ ├── TMsgMapper.java │ │ ├── TPeopleDataMapper.java │ │ ├── TPeopleImportConfigMapper.java │ │ ├── TPeopleMapper.java │ │ ├── TTaskExtMapper.java │ │ ├── TTaskHisMapper.java │ │ ├── TTaskMapper.java │ │ └── TWxMpUserMapper.java │ │ ├── domain │ │ ├── TAccount.java │ │ ├── TMsg.java │ │ ├── TMsgDing.java │ │ ├── TMsgHttp.java │ │ ├── TMsgKefu.java │ │ ├── TMsgKefuPriority.java │ │ ├── TMsgMaSubscribe.java │ │ ├── TMsgMail.java │ │ ├── TMsgMpSubscribe.java │ │ ├── TMsgMpTemplate.java │ │ ├── TMsgSms.java │ │ ├── TMsgWxCp.java │ │ ├── TMsgWxUniform.java │ │ ├── TPeople.java │ │ ├── TPeopleData.java │ │ ├── TPeopleImportConfig.java │ │ ├── TTask.java │ │ ├── TTaskHis.java │ │ ├── TTemplateData.java │ │ └── TWxMpUser.java │ │ ├── logic │ │ ├── InfinityTaskRunThread.java │ │ ├── MessageTypeEnum.java │ │ ├── PeopleImportWayEnum.java │ │ ├── PeriodTypeEnum.java │ │ ├── PushControl.java │ │ ├── TaskModeEnum.java │ │ ├── TaskRunThread.java │ │ ├── TaskStatusEnum.java │ │ ├── TaskTypeEnum.java │ │ ├── msgmaker │ │ │ ├── AliyunMsgMaker.java │ │ │ ├── BaseMsgMaker.java │ │ │ ├── BdYunMsgMaker.java │ │ │ ├── DingMsgMaker.java │ │ │ ├── HttpMsgMaker.java │ │ │ ├── HwYunMsgMaker.java │ │ │ ├── IMsgMaker.java │ │ │ ├── MailMsgMaker.java │ │ │ ├── MsgMakerFactory.java │ │ │ ├── QiNiuYunMsgMaker.java │ │ │ ├── TxYun3MsgMaker.java │ │ │ ├── TxYunMsgMaker.java │ │ │ ├── UpYunMsgMaker.java │ │ │ ├── WxCpMsgMaker.java │ │ │ ├── WxKefuMsgMaker.java │ │ │ ├── WxMaSubscribeMsgMaker.java │ │ │ ├── WxMpSubscribeMsgMaker.java │ │ │ ├── WxMpTemplateMsgMaker.java │ │ │ └── YunPianMsgMaker.java │ │ ├── msgsender │ │ │ ├── AliYunMsgSender.java │ │ │ ├── BdYunMsgSender.java │ │ │ ├── DingMsgSender.java │ │ │ ├── HttpMsgSender.java │ │ │ ├── HttpSendResult.java │ │ │ ├── HwYunMsgSender.java │ │ │ ├── IMsgSender.java │ │ │ ├── MailMsgSender.java │ │ │ ├── MsgSenderFactory.java │ │ │ ├── QiNiuYunMsgSender.java │ │ │ ├── SendResult.java │ │ │ ├── TxYun3MsgSender.java │ │ │ ├── TxYunMsgSender.java │ │ │ ├── UpYunMsgSender.java │ │ │ ├── WxCpMsgSender.java │ │ │ ├── WxKefuMsgSender.java │ │ │ ├── WxKefuPriorMsgSender.java │ │ │ ├── WxMaSubscribeMsgSender.java │ │ │ ├── WxMpSubscribeMsgSender.java │ │ │ ├── WxMpTemplateMsgSender.java │ │ │ ├── WxUniformMsgSender.java │ │ │ └── YunPianMsgSender.java │ │ └── msgthread │ │ │ ├── BaseMsgThread.java │ │ │ ├── MsgInfinitySendThread.java │ │ │ └── MsgSendThread.java │ │ ├── ui │ │ ├── Init.java │ │ ├── UiConsts.java │ │ ├── component │ │ │ ├── TableInCellButtonColumn.java │ │ │ ├── TableInCellCheckBoxRenderer.java │ │ │ ├── TableInCellImageLabelRenderer.java │ │ │ ├── TableInCellProgressBarRenderer.java │ │ │ ├── TableInCellTaskDetailButtonColumn.java │ │ │ ├── TableInCellTaskExecuteButtonColumn.java │ │ │ ├── TableInCellTaskModifyButtonColumn.java │ │ │ └── TopMenuBar.java │ │ ├── dialog │ │ │ ├── AboutDialog.form │ │ │ ├── AboutDialog.java │ │ │ ├── AppreciateDialog.form │ │ │ ├── AppreciateDialog.java │ │ │ ├── CommonTipsDialog.form │ │ │ ├── CommonTipsDialog.java │ │ │ ├── ExportDialog.form │ │ │ ├── ExportDialog.java │ │ │ ├── FontSizeAdjustDialog.form │ │ │ ├── FontSizeAdjustDialog.java │ │ │ ├── InfinityTaskHisDetailDialog.form │ │ │ ├── InfinityTaskHisDetailDialog.java │ │ │ ├── MailTestDialog.form │ │ │ ├── MailTestDialog.java │ │ │ ├── NewPeopleDialog.form │ │ │ ├── NewPeopleDialog.java │ │ │ ├── NewTaskDialog.form │ │ │ ├── NewTaskDialog.java │ │ │ ├── SettingDialog.form │ │ │ ├── SettingDialog.java │ │ │ ├── Spinner.form │ │ │ ├── Spinner.java │ │ │ ├── SystemEnvResultDialog.form │ │ │ ├── SystemEnvResultDialog.java │ │ │ ├── TaskHisDetailDialog.form │ │ │ ├── TaskHisDetailDialog.java │ │ │ ├── UpdateDialog.form │ │ │ ├── UpdateDialog.java │ │ │ ├── UpdateInfoDialog.form │ │ │ ├── UpdateInfoDialog.java │ │ │ └── importway │ │ │ │ ├── ImportByDing.form │ │ │ │ ├── ImportByDing.java │ │ │ │ ├── ImportByFile.form │ │ │ │ ├── ImportByFile.java │ │ │ │ ├── ImportByNum.form │ │ │ │ ├── ImportByNum.java │ │ │ │ ├── ImportBySQL.form │ │ │ │ ├── ImportBySQL.java │ │ │ │ ├── ImportByWxCp.form │ │ │ │ ├── ImportByWxCp.java │ │ │ │ ├── ImportByWxMp.form │ │ │ │ ├── ImportByWxMp.java │ │ │ │ └── config │ │ │ │ ├── DingImportConfig.java │ │ │ │ ├── WxCpImportConfig.java │ │ │ │ └── WxMpImportConfig.java │ │ ├── form │ │ │ ├── AboutForm.form │ │ │ ├── AboutForm.java │ │ │ ├── AccountEditForm.form │ │ │ ├── AccountEditForm.java │ │ │ ├── AccountManageForm.form │ │ │ ├── AccountManageForm.java │ │ │ ├── HelpForm.form │ │ │ ├── HelpForm.java │ │ │ ├── HttpResultForm.form │ │ │ ├── HttpResultForm.java │ │ │ ├── LoadingForm.form │ │ │ ├── LoadingForm.java │ │ │ ├── MainWindow.form │ │ │ ├── MainWindow.java │ │ │ ├── MessageEditForm.form │ │ │ ├── MessageEditForm.java │ │ │ ├── MessageManageForm.form │ │ │ ├── MessageManageForm.java │ │ │ ├── MessageTypeForm.form │ │ │ ├── MessageTypeForm.java │ │ │ ├── PeopleEditForm.form │ │ │ ├── PeopleEditForm.java │ │ │ ├── PeopleManageForm.form │ │ │ ├── PeopleManageForm.java │ │ │ ├── TaskForm.form │ │ │ ├── TaskForm.java │ │ │ ├── UserCaseForm.form │ │ │ ├── UserCaseForm.java │ │ │ ├── account │ │ │ │ ├── AccountFormFactory.java │ │ │ │ ├── AliYunAccountForm.form │ │ │ │ ├── AliYunAccountForm.java │ │ │ │ ├── BdYunAccountForm.form │ │ │ │ ├── BdYunAccountForm.java │ │ │ │ ├── DingAccountForm.form │ │ │ │ ├── DingAccountForm.java │ │ │ │ ├── EmailAccountForm.form │ │ │ │ ├── EmailAccountForm.java │ │ │ │ ├── HttpAccountForm.form │ │ │ │ ├── HttpAccountForm.java │ │ │ │ ├── HwYunAccountForm.form │ │ │ │ ├── HwYunAccountForm.java │ │ │ │ ├── IAccountForm.java │ │ │ │ ├── QiniuYunAccountForm.form │ │ │ │ ├── QiniuYunAccountForm.java │ │ │ │ ├── TxYun3AccountForm.form │ │ │ │ ├── TxYun3AccountForm.java │ │ │ │ ├── TxYunAccountForm.form │ │ │ │ ├── TxYunAccountForm.java │ │ │ │ ├── UpYunAccountForm.form │ │ │ │ ├── UpYunAccountForm.java │ │ │ │ ├── WxCpAccountForm.form │ │ │ │ ├── WxCpAccountForm.java │ │ │ │ ├── WxMaAccountForm.form │ │ │ │ ├── WxMaAccountForm.java │ │ │ │ ├── WxMpAccountForm.form │ │ │ │ ├── WxMpAccountForm.java │ │ │ │ ├── YunPianAccountForm.form │ │ │ │ └── YunPianAccountForm.java │ │ │ └── msg │ │ │ │ ├── AliYunMsgForm.form │ │ │ │ ├── AliYunMsgForm.java │ │ │ │ ├── BdYunMsgForm.form │ │ │ │ ├── BdYunMsgForm.java │ │ │ │ ├── DingMsgForm.form │ │ │ │ ├── DingMsgForm.java │ │ │ │ ├── HttpMsgForm.form │ │ │ │ ├── HttpMsgForm.java │ │ │ │ ├── HwYunMsgForm.form │ │ │ │ ├── HwYunMsgForm.java │ │ │ │ ├── IMsgForm.java │ │ │ │ ├── KefuMsgForm.form │ │ │ │ ├── KefuMsgForm.java │ │ │ │ ├── KefuPriorityMsgForm.java │ │ │ │ ├── MaSubscribeMsgForm.form │ │ │ │ ├── MaSubscribeMsgForm.java │ │ │ │ ├── MailMsgForm.form │ │ │ │ ├── MailMsgForm.java │ │ │ │ ├── MpSubscribeMsgForm.form │ │ │ │ ├── MpSubscribeMsgForm.java │ │ │ │ ├── MpTemplateMsgForm.form │ │ │ │ ├── MpTemplateMsgForm.java │ │ │ │ ├── MsgFormFactory.java │ │ │ │ ├── QiNiuYunMsgForm.form │ │ │ │ ├── QiNiuYunMsgForm.java │ │ │ │ ├── TxYun3MsgForm.form │ │ │ │ ├── TxYun3MsgForm.java │ │ │ │ ├── TxYunMsgForm.form │ │ │ │ ├── TxYunMsgForm.java │ │ │ │ ├── UpYunMsgForm.form │ │ │ │ ├── UpYunMsgForm.java │ │ │ │ ├── WxCpMsgForm.form │ │ │ │ ├── WxCpMsgForm.java │ │ │ │ ├── WxUniformMsgForm.java │ │ │ │ ├── YunpianMsgForm.form │ │ │ │ └── YunpianMsgForm.java │ │ ├── frame │ │ │ ├── HttpResultFrame.java │ │ │ └── MainFrame.java │ │ ├── listener │ │ │ ├── AboutListener.java │ │ │ ├── AccountEditListener.java │ │ │ ├── AccountManageListener.java │ │ │ ├── FrameListener.java │ │ │ ├── HelpListener.java │ │ │ ├── MessageEditListener.java │ │ │ ├── MessageManageListener.java │ │ │ ├── MessageTypeListener.java │ │ │ ├── PeopleEditListener.java │ │ │ ├── PeopleManageListener.java │ │ │ ├── TabListener.java │ │ │ └── TaskListener.java │ │ └── panel │ │ │ └── .gitkeep │ │ └── util │ │ ├── ComponentUtil.java │ │ ├── ConfigBaseUtil.java │ │ ├── ConfigUtil.java │ │ ├── ConsoleUtil.java │ │ ├── FileCharSetUtil.java │ │ ├── HikariUtil.java │ │ ├── JTableUtil.java │ │ ├── MybatisUtil.java │ │ ├── ScrollUtil.java │ │ ├── SqliteUtil.java │ │ ├── SystemUtil.java │ │ ├── TemplateUtil.java │ │ ├── UIUtil.java │ │ ├── UndoUtil.java │ │ ├── UpgradeUtil.java │ │ └── WeWxMpServiceImpl.java ├── lib │ └── taobao-sdk-java-auto.jar └── resources │ ├── db_init.sql │ ├── generatorConfig.xml │ ├── icon │ ├── add.png │ ├── add.svg │ ├── add@2x.png │ ├── analyze.png │ ├── analyze@2x.png │ ├── arrow_left.png │ ├── arrow_left@2x.png │ ├── arrow_right.png │ ├── arrow_right@2x.png │ ├── clear.svg │ ├── clock.png │ ├── clock@2x.png │ ├── data_base.svg │ ├── debug.svg │ ├── detail.svg │ ├── dingding.svg │ ├── export.png │ ├── export.svg │ ├── export@2x.png │ ├── export@2x_dark.png │ ├── export_dark.png │ ├── favorite.png │ ├── favorite@2x.png │ ├── feature.png │ ├── feature@2x.png │ ├── file-open.svg │ ├── file.svg │ ├── find.png │ ├── find.svg │ ├── find@2x.png │ ├── find@2x_dark.png │ ├── findPlain.png │ ├── findPlain@2x.png │ ├── findWhite.png │ ├── findWhite@2x.png │ ├── find_dark.png │ ├── forceRefresh.png │ ├── forceRefresh@2x.png │ ├── fromVCS.png │ ├── fromVCS@2x.png │ ├── help-filling.svg │ ├── help.svg │ ├── helpButton.png │ ├── helpButton@2x.png │ ├── helpButtonFocused.png │ ├── helpButtonFocused@2x.png │ ├── icon_push.svg │ ├── import.png │ ├── import.svg │ ├── import@2x.png │ ├── import@2x_dark.png │ ├── import_dark.png │ ├── loading_dark.gif │ ├── logo-1024.png │ ├── logo-128.png │ ├── logo-16.png │ ├── logo-24.png │ ├── logo-256.png │ ├── logo-32.png │ ├── logo-48.png │ ├── logo-512.png │ ├── logo-64.png │ ├── menu-saveall.png │ ├── menu-saveall@2x.png │ ├── menu-saveall@2x_dark.png │ ├── menu-saveall_dark.png │ ├── modify.svg │ ├── number.svg │ ├── pause.png │ ├── pause@2x.png │ ├── people.svg │ ├── preview.png │ ├── preview@2x.png │ ├── preview@2x_dark.png │ ├── preview_dark.png │ ├── qiwei.svg │ ├── refresh.png │ ├── refresh.svg │ ├── refresh@2x.png │ ├── remove.png │ ├── remove.svg │ ├── remove@2x.png │ ├── remove@2x_dark.png │ ├── remove_dark.png │ ├── run.png │ ├── run@2x.png │ ├── save.svg │ ├── saveTempConfig.png │ ├── saveTempConfig@2x.png │ ├── schedule.svg │ ├── selectall.png │ ├── selectall@2x.png │ ├── selectall@2x_dark.png │ ├── selectall_dark.png │ ├── send.png │ ├── send.svg │ ├── stop.svg │ ├── suspend.png │ ├── suspend@2x.png │ ├── test.svg │ ├── wechat.svg │ ├── weixin-qrcode.png │ ├── winHelp.png │ ├── winHelp@2x.png │ └── wx-zanshang.jpg │ ├── logback.xml │ ├── mapper │ ├── TAccountMapper.xml │ ├── TMsgMapper.xml │ ├── TPeopleDataMapper.xml │ ├── TPeopleImportConfigMapper.xml │ ├── TPeopleMapper.xml │ ├── TTaskExtMapper.xml │ ├── TTaskHisMapper.xml │ ├── TTaskMapper.xml │ └── TWxMpUserMapper.xml │ ├── mybatis-config.xml │ ├── page │ ├── help.html │ └── img │ │ ├── csv-data-demo.png │ │ ├── txt-data-demo.png │ │ ├── var-msg-1.png │ │ ├── var-msg-2.png │ │ ├── var-msg-3.png │ │ └── var-msg-4.png │ ├── theme │ ├── Cyan.theme.json │ ├── DarkPurple.theme.json │ └── Light.theme.json │ ├── upgrade │ └── 4.sql │ ├── version_summary.json │ └── wepush_qrcode.json └── test └── java └── com └── fangxuele └── tool └── push └── util └── CommonTest.java /.gitee/ISSUE_TEMPLATE.zh-CN.md: -------------------------------------------------------------------------------- 1 | ### 现象描述 2 | 3 | [描述问题的现象,最好能够提供屏幕截图 或 gif 动画] 4 | 5 | ### 环境信息 6 | 7 | [在此填写操作系统名称+版本等与问题相关的环境信息] 8 | 9 | ### 重现步骤 10 | 11 | [在此填写能够重现该问题的操作步骤] 12 | 13 | - 步骤1,... 14 | - 步骤2,... 15 | - 步骤3,... 16 | 17 | ### 报错信息 18 | 19 | [在此填写WePush安装目录下logs文件夹内的报错信息] 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### 现象描述 2 | 3 | [描述问题的现象,最好能够提供屏幕截图 或 gif 动画] 4 | 5 | ### 环境信息 6 | 7 | [在此填写操作系统名称+版本等与问题相关的环境信息] 8 | 9 | ### 重现步骤 10 | 11 | [在此填写能够重现该问题的操作步骤] 12 | 13 | - 步骤1,... 14 | - 步骤2,... 15 | - 步骤3,... 16 | 17 | ### 报错信息 18 | 19 | [在此填写WePush安装目录下logs文件夹内的报错信息] 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.zh-CN.md: -------------------------------------------------------------------------------- 1 | ### 现象描述 2 | 3 | [描述问题的现象,最好能够提供屏幕截图 或 gif 动画] 4 | 5 | ### 环境信息 6 | 7 | [在此填写操作系统名称+版本等与问题相关的环境信息] 8 | 9 | ### 重现步骤 10 | 11 | [在此填写能够重现该问题的操作步骤] 12 | 13 | - 步骤1,... 14 | - 步骤2,... 15 | - 步骤3,... 16 | 17 | ### 报错信息 18 | 19 | [在此填写WePush安装目录下logs文件夹内的报错信息] 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Project exclude paths 2 | /target/ 3 | /.idea/ 4 | /logs/ 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /.idea/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/.idea/icon.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | before_install: 4 | - mvn install:install-file -Dfile=./lib/antlr-2.7.4.jar -DgroupId=net.sourceforge.cpdetector -DartifactId=antlr -Dpackaging=jar -Dversion=2.7.4 -DgeneratePom=true -DcreateChecksum=true 5 | - mvn install:install-file -Dfile=./lib/chardet-1.0.jar -DgroupId=net.sourceforge.cpdetector -DartifactId=chardet -Dpackaging=jar -Dversion=1.0.0 -DgeneratePom=true -DcreateChecksum=true 6 | - mvn install:install-file -Dfile=./lib/cpdetector_1.0.10.jar -DgroupId=net.sourceforge.cpdetector -DartifactId=cpdetector -Dpackaging=jar -Dversion=1.0.10 -DgeneratePom=true -DcreateChecksum=true 7 | - mvn install:install-file -Dfile=./lib/jargs-1.0.jar -DgroupId=net.sourceforge.cpdetector -DartifactId=jargs -Dpackaging=jar -Dversion=1.0.0 -DgeneratePom=true -DcreateChecksum=true 8 | - mvn install:install-file -Dfile=./lib/taobao-sdk-java-auto.jar -DgroupId=com.taobao -DartifactId=taobao-sdk-java-auto -Dpackaging=jar -Dversion=1.0.0 -DgeneratePom=true -DcreateChecksum=true 9 | 10 | jdk: 11 | - openjdk8 12 | script: "mvn clean package -Dmaven.test.skip=true" 13 | 14 | notifications: 15 | email: 16 | - rememberber@163.com -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [2017] [WePush] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-slate -------------------------------------------------------------------------------- /assets/files/download_links.json: -------------------------------------------------------------------------------- 1 | { 2 | "windows": "https://gitee.com/zhoubochina/WePush/releases/download/v5.0.4/WePush-5.0.4-windows.exe", 3 | "mac": "https://gitee.com/zhoubochina/WePush/releases/download/v5.0.4/WePush_5.0.4.dmg", 4 | "linux": "https://gitee.com/zhoubochina/WePush/releases/download/v5.0.4/WePush_5.0.4.deb" 5 | } -------------------------------------------------------------------------------- /assets/files/introduce-wepush-qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/files/introduce-wepush-qrcode.png -------------------------------------------------------------------------------- /assets/files/user_case.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "qrCodeUrl": "http://download.zhoubochina.com/qrcode/qrcode_for_fxl.jpg", 4 | "title": "放学了亲子精选", 5 | "desc": "放学了亲子精选,是汇聚了千余种3-12岁孩子好玩的亲子活动、
周边游、手工 DIY、户外体验、成长课堂等亲子精选的平台,
放学了亲子精选让孩子的童年更精彩!!!" 6 | }, 7 | { 8 | "qrCodeUrl": "http://download.zhoubochina.com/qrcode/qrcode_for_rb.jpg", 9 | "title": "云宝共享书", 10 | "desc": "云宝共享书,国内首家专注于儿童阅读的共享图书馆,
精选书单,分级阅读,让孩子多读好书;
199元阅读礼包,可借40本纸质绘本,24小时免费送到家。" 11 | }, 12 | { 13 | "qrCodeUrl": "http://download.zhoubochina.com/qrcode/foodTrustQrCode.jpeg", 14 | "title": "FOODTRUST®丰巢有机", 15 | "desc": "追求健康环保的家庭都在这里,做出每一天更安心的选择。" 16 | } 17 | ] -------------------------------------------------------------------------------- /assets/files/wx-zanshang.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/files/wx-zanshang.jpg -------------------------------------------------------------------------------- /assets/linux/WePush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/linux/WePush.png -------------------------------------------------------------------------------- /assets/mac/WePush.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/mac/WePush.icns -------------------------------------------------------------------------------- /assets/screen_shoot/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/screen_shoot/1.png -------------------------------------------------------------------------------- /assets/screen_shoot/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/screen_shoot/2.png -------------------------------------------------------------------------------- /assets/screen_shoot/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/screen_shoot/3.png -------------------------------------------------------------------------------- /assets/screen_shoot/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/screen_shoot/4.png -------------------------------------------------------------------------------- /assets/screen_shoot/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/screen_shoot/5.png -------------------------------------------------------------------------------- /assets/screen_shoot/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/screen_shoot/6.png -------------------------------------------------------------------------------- /assets/screen_shoot/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/screen_shoot/7.png -------------------------------------------------------------------------------- /assets/screen_shoot/theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/screen_shoot/theme.png -------------------------------------------------------------------------------- /assets/windows/WePush.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/assets/windows/WePush.ico -------------------------------------------------------------------------------- /icons/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/.DS_Store -------------------------------------------------------------------------------- /icons/android/play_store_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/play_store_512.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /icons/android/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-hdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-hdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-mdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-mdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xxhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xxhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /icons/android/res/mipmap-xxxhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/android/res/mipmap-xxxhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-20@2x.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-20@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-20@2x~ipad.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-20@3x.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-20~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-20~ipad.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-29.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-29@2x.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-29@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-29@2x~ipad.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-29@3x.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-29~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-29~ipad.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-40@2x.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-40@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-40@2x~ipad.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-40@3x.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-40~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-40~ipad.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-60@2x~car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-60@2x~car.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-60@3x~car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-60@3x~car.png -------------------------------------------------------------------------------- /icons/ios/AppIcon-83.5@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon-83.5@2x~ipad.png -------------------------------------------------------------------------------- /icons/ios/AppIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon@2x.png -------------------------------------------------------------------------------- /icons/ios/AppIcon@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon@2x~ipad.png -------------------------------------------------------------------------------- /icons/ios/AppIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon@3x.png -------------------------------------------------------------------------------- /icons/ios/AppIcon~ios-marketing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon~ios-marketing.png -------------------------------------------------------------------------------- /icons/ios/AppIcon~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/ios/AppIcon~ipad.png -------------------------------------------------------------------------------- /icons/macos/AppIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/macos/AppIcon.icns -------------------------------------------------------------------------------- /icons/web/README.txt: -------------------------------------------------------------------------------- 1 | Add this to your HTML : 2 | 3 | 4 | 5 | 6 | Add this to your app's manifest.json: 7 | 8 | ... 9 | { 10 | "icons": [ 11 | { "src": "/favicon.ico", "type": "image/x-icon", "sizes": "16x16 32x32" }, 12 | { "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" }, 13 | { "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }, 14 | { "src": "/icon-192-maskable.png", "type": "image/png", "sizes": "192x192", "purpose": "maskable" }, 15 | { "src": "/icon-512-maskable.png", "type": "image/png", "sizes": "512x512", "purpose": "maskable" } 16 | ] 17 | } 18 | ... 19 | -------------------------------------------------------------------------------- /icons/web/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/web/apple-touch-icon.png -------------------------------------------------------------------------------- /icons/web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/web/favicon.ico -------------------------------------------------------------------------------- /icons/web/icon-192-maskable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/web/icon-192-maskable.png -------------------------------------------------------------------------------- /icons/web/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/web/icon-192.png -------------------------------------------------------------------------------- /icons/web/icon-512-maskable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/web/icon-512-maskable.png -------------------------------------------------------------------------------- /icons/web/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/icons/web/icon-512.png -------------------------------------------------------------------------------- /install_local_jar_to_repo.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -Dfile=./src/main/lib/darcula.jar -DgroupId=com.darcula -DartifactId=darcula-lnf -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true 2 | mvn install:install-file -Dfile=./src/main/lib/beautyeye_lnf.jar -DgroupId=com.beautyeye -DartifactId=beautyeye-lnf -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true 3 | mvn install:install-file -Dfile=./src/main/lib/taobao-sdk-java.jar -DgroupId=com.taobao -DartifactId=top-auto-sdk -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true 4 | mvn install:install-file -Dfile=./src/main/lib/weblaf-1.29.jar -DgroupId=com.weblaf -DartifactId=weblaf-lnf -Dpackaging=jar -Dversion=1.2.9 -DgeneratePom=true -DcreateChecksum=true 5 | mvn install:install-file -Dfile=./src/main/lib/antlr-2.7.4.jar -DgroupId=net.sourceforge.cpdetector -DartifactId=antlr -Dpackaging=jar -Dversion=2.7.4 -DgeneratePom=true -DcreateChecksum=true 6 | mvn install:install-file -Dfile=./src/main/lib/chardet-1.0.jar -DgroupId=net.sourceforge.cpdetector -DartifactId=chardet -Dpackaging=jar -Dversion=1.0.0 -DgeneratePom=true -DcreateChecksum=true 7 | mvn install:install-file -Dfile=./src/main/lib/cpdetector_1.0.10.jar -DgroupId=net.sourceforge.cpdetector -DartifactId=cpdetector -Dpackaging=jar -Dversion=1.0.10 -DgeneratePom=true -DcreateChecksum=true 8 | mvn install:install-file -Dfile=./src/main/lib/jargs-1.0.jar -DgroupId=net.sourceforge.cpdetector -DartifactId=jargs -Dpackaging=jar -Dversion=1.0.0 -DgeneratePom=true -DcreateChecksum=true 9 | -------------------------------------------------------------------------------- /lib/antlr-2.7.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/lib/antlr-2.7.4.jar -------------------------------------------------------------------------------- /lib/chardet-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/lib/chardet-1.0.jar -------------------------------------------------------------------------------- /lib/cpdetector_1.0.10.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/lib/cpdetector_1.0.10.jar -------------------------------------------------------------------------------- /lib/jargs-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/lib/jargs-1.0.jar -------------------------------------------------------------------------------- /lib/taobao-sdk-java-auto.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/lib/taobao-sdk-java-auto.jar -------------------------------------------------------------------------------- /memo.md: -------------------------------------------------------------------------------- 1 | ### 安装darcula到本地仓库命令示例 ### 2 | ```shell 3 | mvn install:install-file -Dfile=E:\IdeaWorkspace\fangxuele-tool-wechat-push\src\main\lib\darcula.jar -DgroupId=com.darcula -DartifactId=darcula-lnf -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true 4 | ``` 5 | ### 安装beauty-eye到本地仓库命令示例 ### 6 | ```shell 7 | mvn install:install-file -Dfile=E:\IdeaWorkspace\fangxuele-tool-wechat-push\src\main\lib\beautyeye_lnf.jar -DgroupId=com.beautyeye -DartifactId=beautyeye-lnf -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true 8 | ``` 9 | 10 | ### 关于多线程并发下的原子操作 11 | > volatile解决多线程内存不可见问题。对于一写多读,是可以解决变量同步问题, 12 | 但是如果多写,同样无法解决线程安全问题。 13 | > 14 | > 如果是 count++操作,使用如下类实现: 15 | AtomicInteger count = new AtomicInteger(); 16 | count.addAndGet(1); 17 | 如果是 JDK8,推荐使用 LongAdder对象,比 AtomicLong性能更好(减少乐观锁的重试次数) -------------------------------------------------------------------------------- /psd/WePush-logo.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/psd/WePush-logo.psd -------------------------------------------------------------------------------- /screen_shoot/Image003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/Image003.png -------------------------------------------------------------------------------- /screen_shoot/Image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/Image1.png -------------------------------------------------------------------------------- /screen_shoot/csv-data-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/csv-data-demo.png -------------------------------------------------------------------------------- /screen_shoot/logo-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/logo-128.png -------------------------------------------------------------------------------- /screen_shoot/sshot-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/sshot-10.png -------------------------------------------------------------------------------- /screen_shoot/txt-data-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/txt-data-demo.png -------------------------------------------------------------------------------- /screen_shoot/var-msg-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/var-msg-1.png -------------------------------------------------------------------------------- /screen_shoot/var-msg-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/var-msg-2.png -------------------------------------------------------------------------------- /screen_shoot/var-msg-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/var-msg-3.png -------------------------------------------------------------------------------- /screen_shoot/var-msg-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/var-msg-4.png -------------------------------------------------------------------------------- /screen_shoot/wepush-qq-group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/wepush-qq-group.png -------------------------------------------------------------------------------- /screen_shoot/wepush-sshot-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/wepush-sshot-5.png -------------------------------------------------------------------------------- /screen_shoot/wepush-sshot-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/wepush-sshot-6.png -------------------------------------------------------------------------------- /screen_shoot/wx-zanshang.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/wx-zanshang.jpg -------------------------------------------------------------------------------- /screen_shoot/图像 198.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 198.png -------------------------------------------------------------------------------- /screen_shoot/图像 199.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 199.png -------------------------------------------------------------------------------- /screen_shoot/图像 200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 200.png -------------------------------------------------------------------------------- /screen_shoot/图像 202.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 202.png -------------------------------------------------------------------------------- /screen_shoot/图像 204.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 204.png -------------------------------------------------------------------------------- /screen_shoot/图像 205.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 205.png -------------------------------------------------------------------------------- /screen_shoot/图像 206.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 206.png -------------------------------------------------------------------------------- /screen_shoot/图像 207.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 207.png -------------------------------------------------------------------------------- /screen_shoot/图像 218.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/screen_shoot/图像 218.png -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/TemplateData.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | /** 7 | *
 8 |  * 模板数据
 9 |  * 
10 | * 11 | * @author Zhou Bo 12 | * @since 2019/6/13. 13 | */ 14 | @Getter 15 | @Setter 16 | public class TemplateData { 17 | 18 | private String name; 19 | 20 | private String value; 21 | 22 | private String color; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/UserCase.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *
 7 |  * 用户案例
 8 |  * 
9 | * 10 | * @author RememBerBer 11 | * @since 2019/4/20. 12 | */ 13 | @Data 14 | public class UserCase { 15 | 16 | private String qrCodeUrl; 17 | 18 | private String title; 19 | 20 | private String desc; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/VersionSummary.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | *
 9 |  * 版本概要
10 |  * 
11 | * 12 | * @author RememBerBer 13 | * @since 2019/4/20. 14 | */ 15 | @Data 16 | public class VersionSummary { 17 | 18 | /** 19 | * 当前版本 20 | */ 21 | private String currentVersion; 22 | 23 | /** 24 | * 版本索引 25 | */ 26 | private String versionIndex; 27 | 28 | /** 29 | * 历史版本列表 30 | */ 31 | private List versionDetailList; 32 | 33 | /** 34 | *
35 |      * 版本类
36 |      * 
37 | * 38 | * @author RememBerBer 39 | * @since 2019/4/20. 40 | */ 41 | @Data 42 | public static class Version { 43 | 44 | private String version; 45 | 46 | private String title; 47 | 48 | private String log; 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/AliYunAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 阿里云账号配置 7 | */ 8 | @Data 9 | public class AliYunAccountConfig { 10 | private String accessKeyId; 11 | private String accessKeySecret; 12 | private String sign; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/BdYunAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 百度云账号配置 7 | */ 8 | @Data 9 | public class BdYunAccountConfig { 10 | private String bdEndPoint; 11 | private String bdInvokeId; 12 | private String bdSecretAccessKey; 13 | private String bdAccessKeyId; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/DingAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 钉钉账号配置 7 | */ 8 | @Data 9 | public class DingAccountConfig { 10 | private String appSecret; 11 | private String appName; 12 | private String agentId; 13 | private String appKey; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/EmailAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Email账号配置 7 | */ 8 | @Data 9 | public class EmailAccountConfig { 10 | private boolean mailStartTLS; 11 | private boolean mailSSL; 12 | private String mailHost; 13 | private String mailPort; 14 | private String mailFrom; 15 | private String mailUser; 16 | private String mailPassword; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/HttpAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Http账号配置 7 | */ 8 | @Data 9 | public class HttpAccountConfig { 10 | private boolean useProxy; 11 | private String proxyHost; 12 | private String proxyPort; 13 | private String proxyUserName; 14 | private String proxyPassword; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/HwYunAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 华为云账号配置 7 | */ 8 | @Data 9 | public class HwYunAccountConfig { 10 | private String accessUrl; 11 | private String senderCode; 12 | private String signature; 13 | private String appSecret; 14 | private String appKey; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/QiniuYunAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 七牛云账号配置 7 | */ 8 | @Data 9 | public class QiniuYunAccountConfig { 10 | private String accessKey; 11 | private String secretKey; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/TxYun3AccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 腾讯云3.0账号配置 7 | */ 8 | @Data 9 | public class TxYun3AccountConfig { 10 | private String secretId; 11 | private String secretKey; 12 | private String endPoint; 13 | private String region; 14 | private String sign; 15 | private String sdkAppId; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/TxYunAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 腾讯云账号配置 7 | */ 8 | @Data 9 | public class TxYunAccountConfig { 10 | private String sign; 11 | private String appKey; 12 | private String appId; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/UpYunAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 又拍云账号配置 7 | */ 8 | @Data 9 | public class UpYunAccountConfig { 10 | private String authorizationToken; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/WxCpAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 微信企业号账号配置 7 | */ 8 | @Data 9 | public class WxCpAccountConfig { 10 | private String corpId; 11 | private String appName; 12 | private String agentId; 13 | private String secret; 14 | private Boolean privateDep; 15 | private String baseApiUrl; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/WxMaAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 微信小程序账号配置 7 | */ 8 | @Data 9 | public class WxMaAccountConfig { 10 | private String appId; 11 | private String appSecret; 12 | private String token; 13 | private String aesKey; 14 | private boolean maUseProxy; 15 | private String maProxyHost; 16 | private String maProxyPort; 17 | private String maProxyUserName; 18 | private String maProxyPassword; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/WxMpAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 微信公众号账号配置 7 | */ 8 | @Data 9 | public class WxMpAccountConfig { 10 | private String appId; 11 | private String appSecret; 12 | private String token; 13 | private String aesKey; 14 | private boolean mpUseProxy; 15 | private String mpProxyHost; 16 | private String mpProxyPort; 17 | private String mpProxyUserName; 18 | private String mpProxyPassword; 19 | private boolean mpUseOutSideAt; 20 | private boolean mpManualAt; 21 | private boolean mpApiAt; 22 | private String mpAt; 23 | private String mpAtExpiresIn; 24 | private String mpAtApiUrl; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/account/YunPianAccountConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.account; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 云片网账号配置 7 | */ 8 | @Data 9 | public class YunPianAccountConfig { 10 | private String apiKey; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/msg/HttpMsg.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.msg; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | 7 | import java.net.HttpCookie; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | /** 12 | *
13 |  * HttpMsg
14 |  * 
15 | * 16 | * @author Zhou Bo 17 | * @since 2019/7/18. 18 | */ 19 | @Getter 20 | @Setter 21 | @ToString 22 | public class HttpMsg { 23 | 24 | private String url; 25 | 26 | private String body; 27 | 28 | private Map paramMap; 29 | 30 | private Map headerMap; 31 | 32 | private List cookies; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/bean/msg/MailMsg.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.bean.msg; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | 7 | import java.io.File; 8 | import java.util.List; 9 | 10 | /** 11 | *
12 |  * 邮件消息体
13 |  * 
14 | * 15 | * @author RememBerBer 16 | * @since 2019/6/23. 17 | */ 18 | @Getter 19 | @Setter 20 | @ToString 21 | public class MailMsg { 22 | 23 | /** 24 | * 标题 25 | */ 26 | private String mailTitle; 27 | 28 | /** 29 | * 抄送 30 | */ 31 | private String mailCc; 32 | 33 | /** 34 | * 附件 35 | */ 36 | private List mailFiles; 37 | 38 | /** 39 | * 内容 40 | */ 41 | private String mailContent; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TAccountMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TAccount; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface TAccountMapper { 9 | int deleteByPrimaryKey(Integer id); 10 | 11 | int insert(TAccount record); 12 | 13 | int insertSelective(TAccount record); 14 | 15 | TAccount selectByPrimaryKey(Integer id); 16 | 17 | int updateByPrimaryKeySelective(TAccount record); 18 | 19 | int updateByPrimaryKey(TAccount record); 20 | 21 | List selectByMsgType(int msgType); 22 | 23 | int deleteByMsgTypeAndAccountName(@Param("msgType") int msgType, @Param("accountName") String accountName); 24 | 25 | TAccount selectByMsgTypeAndAccountName(@Param("msgType") int msgType, @Param("accountName") String accountName); 26 | 27 | int updateByMsgTypeAndAccountName(TAccount tAccount1); 28 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TMsgMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TMsg; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface TMsgMapper { 9 | int deleteByPrimaryKey(Integer id); 10 | 11 | int insert(TMsg record); 12 | 13 | int insertSelective(TMsg record); 14 | 15 | TMsg selectByPrimaryKey(Integer id); 16 | 17 | int updateByPrimaryKeySelective(TMsg record); 18 | 19 | int updateByPrimaryKey(TMsg record); 20 | 21 | TMsg selectByUnique(@Param("msgType") int msgType, @Param("accountId") Integer accountId, @Param("msgName") String msgName); 22 | 23 | List selectByMsgTypeAndAccountId(@Param("msgType") int msgType, @Param("accountId") Integer accountId); 24 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TPeopleDataMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TPeopleData; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface TPeopleDataMapper { 9 | int deleteByPrimaryKey(Integer id); 10 | 11 | int insert(TPeopleData record); 12 | 13 | int insertSelective(TPeopleData record); 14 | 15 | TPeopleData selectByPrimaryKey(Integer id); 16 | 17 | int updateByPrimaryKeySelective(TPeopleData record); 18 | 19 | int updateByPrimaryKey(TPeopleData record); 20 | 21 | List selectByPeopleIdLimit20(Integer peopleId); 22 | 23 | Long countByPeopleId(Integer peopleId); 24 | 25 | int deleteByPeopleId(Integer peopleId); 26 | 27 | List selectByPeopleId(Integer peopleId); 28 | 29 | List selectByPeopleIdAndKeyword(@Param("peopleId") Integer peopleId, @Param("keyWord") String keyWord); 30 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TPeopleImportConfigMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TPeopleImportConfig; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | public interface TPeopleImportConfigMapper { 7 | int deleteByPrimaryKey(Integer id); 8 | 9 | int insert(TPeopleImportConfig record); 10 | 11 | int insertSelective(TPeopleImportConfig record); 12 | 13 | TPeopleImportConfig selectByPrimaryKey(Integer id); 14 | 15 | int updateByPrimaryKeySelective(TPeopleImportConfig record); 16 | 17 | int updateByPrimaryKey(TPeopleImportConfig record); 18 | 19 | TPeopleImportConfig selectByPeopleId(@Param("peopleId") Integer selectedPeopleId); 20 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TPeopleMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TPeople; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface TPeopleMapper { 9 | int deleteByPrimaryKey(Integer id); 10 | 11 | int insert(TPeople record); 12 | 13 | int insertSelective(TPeople record); 14 | 15 | TPeople selectByPrimaryKey(Integer id); 16 | 17 | int updateByPrimaryKeySelective(TPeople record); 18 | 19 | int updateByPrimaryKey(TPeople record); 20 | 21 | TPeople selectByMsgTypeAndAccountIdAndName(@Param("msgType") String msgType, @Param("accountId") Integer selectedAccountId, @Param("peopleName") String peopleName); 22 | 23 | List selectByMsgTypeAndAccountId(@Param("msgType") String msgType, @Param("accountId") Integer selectedAccountId); 24 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TTaskExtMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TTask; 4 | 5 | import java.util.List; 6 | 7 | public interface TTaskExtMapper { 8 | 9 | TTask selectByTitle(String title); 10 | 11 | List selectAll(); 12 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TTaskHisMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TTaskHis; 4 | 5 | import java.util.List; 6 | 7 | public interface TTaskHisMapper { 8 | int deleteByPrimaryKey(Integer id); 9 | 10 | int insert(TTaskHis record); 11 | 12 | int insertSelective(TTaskHis record); 13 | 14 | TTaskHis selectByPrimaryKey(Integer id); 15 | 16 | int updateByPrimaryKeySelective(TTaskHis record); 17 | 18 | int updateByPrimaryKey(TTaskHis record); 19 | 20 | List selectByTaskId(Integer taskId); 21 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TTaskMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TTask; 4 | 5 | import java.util.List; 6 | 7 | public interface TTaskMapper { 8 | int deleteByPrimaryKey(Integer id); 9 | 10 | int insert(TTask record); 11 | 12 | int insertSelective(TTask record); 13 | 14 | TTask selectByPrimaryKey(Integer id); 15 | 16 | int updateByPrimaryKeySelective(TTask record); 17 | 18 | int updateByPrimaryKey(TTask record); 19 | 20 | List selectAll(); 21 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/dao/TWxMpUserMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.dao; 2 | 3 | import com.fangxuele.tool.push.domain.TWxMpUser; 4 | 5 | public interface TWxMpUserMapper { 6 | int deleteByPrimaryKey(String openId); 7 | 8 | int insert(TWxMpUser record); 9 | 10 | int insertSelective(TWxMpUser record); 11 | 12 | TWxMpUser selectByPrimaryKey(String openId); 13 | 14 | int updateByPrimaryKeySelective(TWxMpUser record); 15 | 16 | int updateByPrimaryKey(TWxMpUser record); 17 | 18 | int deleteAll(); 19 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TAccount.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TAccount { 4 | private Integer id; 5 | 6 | private Integer msgType; 7 | 8 | private String accountName; 9 | 10 | private String accountConfig; 11 | 12 | private String remark; 13 | 14 | private String createTime; 15 | 16 | private String modifiedTime; 17 | 18 | public Integer getId() { 19 | return id; 20 | } 21 | 22 | public void setId(Integer id) { 23 | this.id = id; 24 | } 25 | 26 | public Integer getMsgType() { 27 | return msgType; 28 | } 29 | 30 | public void setMsgType(Integer msgType) { 31 | this.msgType = msgType; 32 | } 33 | 34 | public String getAccountName() { 35 | return accountName; 36 | } 37 | 38 | public void setAccountName(String accountName) { 39 | this.accountName = accountName == null ? null : accountName.trim(); 40 | } 41 | 42 | public String getAccountConfig() { 43 | return accountConfig; 44 | } 45 | 46 | public void setAccountConfig(String accountConfig) { 47 | this.accountConfig = accountConfig == null ? null : accountConfig.trim(); 48 | } 49 | 50 | public String getRemark() { 51 | return remark; 52 | } 53 | 54 | public void setRemark(String remark) { 55 | this.remark = remark == null ? null : remark.trim(); 56 | } 57 | 58 | public String getCreateTime() { 59 | return createTime; 60 | } 61 | 62 | public void setCreateTime(String createTime) { 63 | this.createTime = createTime == null ? null : createTime.trim(); 64 | } 65 | 66 | public String getModifiedTime() { 67 | return modifiedTime; 68 | } 69 | 70 | public void setModifiedTime(String modifiedTime) { 71 | this.modifiedTime = modifiedTime == null ? null : modifiedTime.trim(); 72 | } 73 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsg.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TMsg { 4 | private Integer id; 5 | 6 | private Integer msgType; 7 | 8 | private Integer accountId; 9 | 10 | private String msgName; 11 | 12 | private String content; 13 | 14 | private String previewUser; 15 | 16 | private String remark; 17 | 18 | private String createTime; 19 | 20 | private String modifiedTime; 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | 30 | public Integer getMsgType() { 31 | return msgType; 32 | } 33 | 34 | public void setMsgType(Integer msgType) { 35 | this.msgType = msgType; 36 | } 37 | 38 | public Integer getAccountId() { 39 | return accountId; 40 | } 41 | 42 | public void setAccountId(Integer accountId) { 43 | this.accountId = accountId; 44 | } 45 | 46 | public String getMsgName() { 47 | return msgName; 48 | } 49 | 50 | public void setMsgName(String msgName) { 51 | this.msgName = msgName == null ? null : msgName.trim(); 52 | } 53 | 54 | public String getContent() { 55 | return content; 56 | } 57 | 58 | public void setContent(String content) { 59 | this.content = content == null ? null : content.trim(); 60 | } 61 | 62 | public String getPreviewUser() { 63 | return previewUser; 64 | } 65 | 66 | public void setPreviewUser(String previewUser) { 67 | this.previewUser = previewUser == null ? null : previewUser.trim(); 68 | } 69 | 70 | public String getRemark() { 71 | return remark; 72 | } 73 | 74 | public void setRemark(String remark) { 75 | this.remark = remark == null ? null : remark.trim(); 76 | } 77 | 78 | public String getCreateTime() { 79 | return createTime; 80 | } 81 | 82 | public void setCreateTime(String createTime) { 83 | this.createTime = createTime == null ? null : createTime.trim(); 84 | } 85 | 86 | public String getModifiedTime() { 87 | return modifiedTime; 88 | } 89 | 90 | public void setModifiedTime(String modifiedTime) { 91 | this.modifiedTime = modifiedTime == null ? null : modifiedTime.trim(); 92 | } 93 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsgDing.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TMsgDing { 4 | 5 | private String radioType; 6 | 7 | private String dingMsgType; 8 | 9 | private String webHook; 10 | 11 | private String content; 12 | 13 | private String msgTitle; 14 | 15 | private String picUrl; 16 | 17 | private String url; 18 | 19 | private String btnTxt; 20 | 21 | private String btnUrl; 22 | 23 | public String getRadioType() { 24 | return radioType; 25 | } 26 | 27 | public void setRadioType(String radioType) { 28 | this.radioType = radioType == null ? null : radioType.trim(); 29 | } 30 | 31 | public String getDingMsgType() { 32 | return dingMsgType; 33 | } 34 | 35 | public void setDingMsgType(String dingMsgType) { 36 | this.dingMsgType = dingMsgType == null ? null : dingMsgType.trim(); 37 | } 38 | 39 | public String getWebHook() { 40 | return webHook; 41 | } 42 | 43 | public void setWebHook(String webHook) { 44 | this.webHook = webHook == null ? null : webHook.trim(); 45 | } 46 | 47 | public String getContent() { 48 | return content; 49 | } 50 | 51 | public void setContent(String content) { 52 | this.content = content == null ? null : content.trim(); 53 | } 54 | 55 | public String getMsgTitle() { 56 | return msgTitle; 57 | } 58 | 59 | public void setMsgTitle(String msgTitle) { 60 | this.msgTitle = msgTitle; 61 | } 62 | 63 | public String getPicUrl() { 64 | return picUrl; 65 | } 66 | 67 | public void setPicUrl(String picUrl) { 68 | this.picUrl = picUrl; 69 | } 70 | 71 | public String getUrl() { 72 | return url; 73 | } 74 | 75 | public void setUrl(String url) { 76 | this.url = url; 77 | } 78 | 79 | public String getBtnTxt() { 80 | return btnTxt; 81 | } 82 | 83 | public void setBtnTxt(String btnTxt) { 84 | this.btnTxt = btnTxt; 85 | } 86 | 87 | public String getBtnUrl() { 88 | return btnUrl; 89 | } 90 | 91 | public void setBtnUrl(String btnUrl) { 92 | this.btnUrl = btnUrl; 93 | } 94 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsgHttp.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TMsgHttp { 4 | 5 | private String method; 6 | 7 | private String url; 8 | 9 | private String params; 10 | 11 | private String headers; 12 | 13 | private String cookies; 14 | 15 | private String body; 16 | 17 | private String bodyType; 18 | 19 | public String getMethod() { 20 | return method; 21 | } 22 | 23 | public void setMethod(String method) { 24 | this.method = method == null ? null : method.trim(); 25 | } 26 | 27 | public String getUrl() { 28 | return url; 29 | } 30 | 31 | public void setUrl(String url) { 32 | this.url = url == null ? null : url.trim(); 33 | } 34 | 35 | public String getParams() { 36 | return params; 37 | } 38 | 39 | public void setParams(String params) { 40 | this.params = params == null ? null : params.trim(); 41 | } 42 | 43 | public String getHeaders() { 44 | return headers; 45 | } 46 | 47 | public void setHeaders(String headers) { 48 | this.headers = headers == null ? null : headers.trim(); 49 | } 50 | 51 | public String getCookies() { 52 | return cookies; 53 | } 54 | 55 | public void setCookies(String cookies) { 56 | this.cookies = cookies == null ? null : cookies.trim(); 57 | } 58 | 59 | public String getBody() { 60 | return body; 61 | } 62 | 63 | public void setBody(String body) { 64 | this.body = body == null ? null : body.trim(); 65 | } 66 | 67 | public String getBodyType() { 68 | return bodyType; 69 | } 70 | 71 | public void setBodyType(String bodyType) { 72 | this.bodyType = bodyType == null ? null : bodyType.trim(); 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsgMaSubscribe.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | import com.fangxuele.tool.push.bean.TemplateData; 4 | 5 | import java.util.List; 6 | 7 | public class TMsgMaSubscribe { 8 | private String templateId; 9 | 10 | private String page; 11 | 12 | List templateDataList; 13 | 14 | public String getTemplateId() { 15 | return templateId; 16 | } 17 | 18 | public void setTemplateId(String templateId) { 19 | this.templateId = templateId == null ? null : templateId.trim(); 20 | } 21 | 22 | public String getPage() { 23 | return page; 24 | } 25 | 26 | public void setPage(String page) { 27 | this.page = page == null ? null : page.trim(); 28 | } 29 | 30 | public List getTemplateDataList() { 31 | return templateDataList; 32 | } 33 | 34 | public void setTemplateDataList(List templateDataList) { 35 | this.templateDataList = templateDataList; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsgMail.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TMsgMail { 4 | 5 | private String title; 6 | 7 | private String cc; 8 | 9 | private String files; 10 | 11 | private String content; 12 | 13 | public String getTitle() { 14 | return title; 15 | } 16 | 17 | public void setTitle(String title) { 18 | this.title = title == null ? null : title.trim(); 19 | } 20 | 21 | public String getCc() { 22 | return cc; 23 | } 24 | 25 | public void setCc(String cc) { 26 | this.cc = cc == null ? null : cc.trim(); 27 | } 28 | 29 | public String getFiles() { 30 | return files; 31 | } 32 | 33 | public void setFiles(String files) { 34 | this.files = files == null ? null : files.trim(); 35 | } 36 | 37 | public String getContent() { 38 | return content; 39 | } 40 | 41 | public void setContent(String content) { 42 | this.content = content == null ? null : content.trim(); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsgMpSubscribe.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | import com.fangxuele.tool.push.bean.TemplateData; 4 | 5 | import java.util.List; 6 | 7 | public class TMsgMpSubscribe { 8 | 9 | private String templateId; 10 | 11 | private String url; 12 | 13 | private String maAppid; 14 | 15 | private String maPagePath; 16 | 17 | List templateDataList; 18 | 19 | public String getTemplateId() { 20 | return templateId; 21 | } 22 | 23 | public void setTemplateId(String templateId) { 24 | this.templateId = templateId == null ? null : templateId.trim(); 25 | } 26 | 27 | public String getUrl() { 28 | return url; 29 | } 30 | 31 | public void setUrl(String url) { 32 | this.url = url == null ? null : url.trim(); 33 | } 34 | 35 | public String getMaAppid() { 36 | return maAppid; 37 | } 38 | 39 | public void setMaAppid(String maAppid) { 40 | this.maAppid = maAppid == null ? null : maAppid.trim(); 41 | } 42 | 43 | public String getMaPagePath() { 44 | return maPagePath; 45 | } 46 | 47 | public void setMaPagePath(String maPagePath) { 48 | this.maPagePath = maPagePath == null ? null : maPagePath.trim(); 49 | } 50 | 51 | public List getTemplateDataList() { 52 | return templateDataList; 53 | } 54 | 55 | public void setTemplateDataList(List templateDataList) { 56 | this.templateDataList = templateDataList; 57 | } 58 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsgMpTemplate.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | import com.fangxuele.tool.push.bean.TemplateData; 4 | 5 | import java.util.List; 6 | 7 | public class TMsgMpTemplate { 8 | 9 | private String templateId; 10 | 11 | private String url; 12 | 13 | private String maAppid; 14 | 15 | private String maPagePath; 16 | 17 | private List templateDataList; 18 | 19 | public String getTemplateId() { 20 | return templateId; 21 | } 22 | 23 | public void setTemplateId(String templateId) { 24 | this.templateId = templateId == null ? null : templateId.trim(); 25 | } 26 | 27 | public String getUrl() { 28 | return url; 29 | } 30 | 31 | public void setUrl(String url) { 32 | this.url = url == null ? null : url.trim(); 33 | } 34 | 35 | public String getMaAppid() { 36 | return maAppid; 37 | } 38 | 39 | public void setMaAppid(String maAppid) { 40 | this.maAppid = maAppid == null ? null : maAppid.trim(); 41 | } 42 | 43 | public String getMaPagePath() { 44 | return maPagePath; 45 | } 46 | 47 | public void setMaPagePath(String maPagePath) { 48 | this.maPagePath = maPagePath == null ? null : maPagePath.trim(); 49 | } 50 | 51 | public List getTemplateDataList() { 52 | return templateDataList; 53 | } 54 | 55 | public void setTemplateDataList(List templateDataList) { 56 | this.templateDataList = templateDataList; 57 | } 58 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsgSms.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | import com.fangxuele.tool.push.bean.TemplateData; 4 | 5 | import java.util.List; 6 | 7 | public class TMsgSms { 8 | 9 | private String templateId; 10 | 11 | private String content; 12 | 13 | private List templateDataList; 14 | 15 | public String getTemplateId() { 16 | return templateId; 17 | } 18 | 19 | public void setTemplateId(String templateId) { 20 | this.templateId = templateId == null ? null : templateId.trim(); 21 | } 22 | 23 | public String getContent() { 24 | return content; 25 | } 26 | 27 | public void setContent(String content) { 28 | this.content = content == null ? null : content.trim(); 29 | } 30 | 31 | public List getTemplateDataList() { 32 | return templateDataList; 33 | } 34 | 35 | public void setTemplateDataList(List templateDataList) { 36 | this.templateDataList = templateDataList; 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TMsgWxCp.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TMsgWxCp { 4 | 5 | private String cpMsgType; 6 | 7 | private String content; 8 | 9 | private String title; 10 | 11 | private String imgUrl; 12 | 13 | private String describe; 14 | 15 | private String url; 16 | 17 | private String btnTxt; 18 | 19 | public String getCpMsgType() { 20 | return cpMsgType; 21 | } 22 | 23 | public void setCpMsgType(String cpMsgType) { 24 | this.cpMsgType = cpMsgType == null ? null : cpMsgType.trim(); 25 | } 26 | 27 | public String getContent() { 28 | return content; 29 | } 30 | 31 | public void setContent(String content) { 32 | this.content = content == null ? null : content.trim(); 33 | } 34 | 35 | public String getTitle() { 36 | return title; 37 | } 38 | 39 | public void setTitle(String title) { 40 | this.title = title == null ? null : title.trim(); 41 | } 42 | 43 | public String getImgUrl() { 44 | return imgUrl; 45 | } 46 | 47 | public void setImgUrl(String imgUrl) { 48 | this.imgUrl = imgUrl == null ? null : imgUrl.trim(); 49 | } 50 | 51 | public String getDescribe() { 52 | return describe; 53 | } 54 | 55 | public void setDescribe(String describe) { 56 | this.describe = describe == null ? null : describe.trim(); 57 | } 58 | 59 | public String getUrl() { 60 | return url; 61 | } 62 | 63 | public void setUrl(String url) { 64 | this.url = url == null ? null : url.trim(); 65 | } 66 | 67 | public String getBtnTxt() { 68 | return btnTxt; 69 | } 70 | 71 | public void setBtnTxt(String btnTxt) { 72 | this.btnTxt = btnTxt == null ? null : btnTxt.trim(); 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TPeople.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TPeople { 4 | private Integer id; 5 | 6 | private Integer msgType; 7 | 8 | private Integer accountId; 9 | 10 | private String peopleName; 11 | 12 | private String appVersion; 13 | 14 | private String remark; 15 | 16 | private String createTime; 17 | 18 | private String modifiedTime; 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public Integer getMsgType() { 29 | return msgType; 30 | } 31 | 32 | public void setMsgType(Integer msgType) { 33 | this.msgType = msgType; 34 | } 35 | 36 | public Integer getAccountId() { 37 | return accountId; 38 | } 39 | 40 | public void setAccountId(Integer accountId) { 41 | this.accountId = accountId; 42 | } 43 | 44 | public String getPeopleName() { 45 | return peopleName; 46 | } 47 | 48 | public void setPeopleName(String peopleName) { 49 | this.peopleName = peopleName == null ? null : peopleName.trim(); 50 | } 51 | 52 | public String getAppVersion() { 53 | return appVersion; 54 | } 55 | 56 | public void setAppVersion(String appVersion) { 57 | this.appVersion = appVersion == null ? null : appVersion.trim(); 58 | } 59 | 60 | public String getRemark() { 61 | return remark; 62 | } 63 | 64 | public void setRemark(String remark) { 65 | this.remark = remark == null ? null : remark.trim(); 66 | } 67 | 68 | public String getCreateTime() { 69 | return createTime; 70 | } 71 | 72 | public void setCreateTime(String createTime) { 73 | this.createTime = createTime == null ? null : createTime.trim(); 74 | } 75 | 76 | public String getModifiedTime() { 77 | return modifiedTime; 78 | } 79 | 80 | public void setModifiedTime(String modifiedTime) { 81 | this.modifiedTime = modifiedTime == null ? null : modifiedTime.trim(); 82 | } 83 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TPeopleData.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TPeopleData { 4 | private Integer id; 5 | 6 | private Integer peopleId; 7 | 8 | private String pin; 9 | 10 | private String varData; 11 | 12 | private String appVersion; 13 | 14 | private String dataVersion; 15 | 16 | private String remark; 17 | 18 | private String createTime; 19 | 20 | private String modifiedTime; 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | 30 | public Integer getPeopleId() { 31 | return peopleId; 32 | } 33 | 34 | public void setPeopleId(Integer peopleId) { 35 | this.peopleId = peopleId; 36 | } 37 | 38 | public String getPin() { 39 | return pin; 40 | } 41 | 42 | public void setPin(String pin) { 43 | this.pin = pin == null ? null : pin.trim(); 44 | } 45 | 46 | public String getVarData() { 47 | return varData; 48 | } 49 | 50 | public void setVarData(String varData) { 51 | this.varData = varData == null ? null : varData.trim(); 52 | } 53 | 54 | public String getAppVersion() { 55 | return appVersion; 56 | } 57 | 58 | public void setAppVersion(String appVersion) { 59 | this.appVersion = appVersion == null ? null : appVersion.trim(); 60 | } 61 | 62 | public String getDataVersion() { 63 | return dataVersion; 64 | } 65 | 66 | public void setDataVersion(String dataVersion) { 67 | this.dataVersion = dataVersion; 68 | } 69 | 70 | public String getRemark() { 71 | return remark; 72 | } 73 | 74 | public void setRemark(String remark) { 75 | this.remark = remark == null ? null : remark.trim(); 76 | } 77 | 78 | public String getCreateTime() { 79 | return createTime; 80 | } 81 | 82 | public void setCreateTime(String createTime) { 83 | this.createTime = createTime == null ? null : createTime.trim(); 84 | } 85 | 86 | public String getModifiedTime() { 87 | return modifiedTime; 88 | } 89 | 90 | public void setModifiedTime(String modifiedTime) { 91 | this.modifiedTime = modifiedTime == null ? null : modifiedTime.trim(); 92 | } 93 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/domain/TTemplateData.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.domain; 2 | 3 | public class TTemplateData { 4 | private Integer id; 5 | 6 | private Integer msgType; 7 | 8 | private Integer msgId; 9 | 10 | private String name; 11 | 12 | private String value; 13 | 14 | private String color; 15 | 16 | private String createTime; 17 | 18 | private String modifiedTime; 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public Integer getMsgType() { 29 | return msgType; 30 | } 31 | 32 | public void setMsgType(Integer msgType) { 33 | this.msgType = msgType; 34 | } 35 | 36 | public Integer getMsgId() { 37 | return msgId; 38 | } 39 | 40 | public void setMsgId(Integer msgId) { 41 | this.msgId = msgId; 42 | } 43 | 44 | public String getName() { 45 | return name; 46 | } 47 | 48 | public void setName(String name) { 49 | this.name = name == null ? null : name.trim(); 50 | } 51 | 52 | public String getValue() { 53 | return value; 54 | } 55 | 56 | public void setValue(String value) { 57 | this.value = value == null ? null : value.trim(); 58 | } 59 | 60 | public String getColor() { 61 | return color; 62 | } 63 | 64 | public void setColor(String color) { 65 | this.color = color == null ? null : color.trim(); 66 | } 67 | 68 | public String getCreateTime() { 69 | return createTime; 70 | } 71 | 72 | public void setCreateTime(String createTime) { 73 | this.createTime = createTime == null ? null : createTime.trim(); 74 | } 75 | 76 | public String getModifiedTime() { 77 | return modifiedTime; 78 | } 79 | 80 | public void setModifiedTime(String modifiedTime) { 81 | this.modifiedTime = modifiedTime == null ? null : modifiedTime.trim(); 82 | } 83 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/PeopleImportWayEnum.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic; 2 | 3 | /** 4 | *
 5 |  * 人群导入方式枚举
 6 |  * 
7 | * 8 | * @author Zhou Bo 9 | * @since 2021/4/29. 10 | */ 11 | public enum PeopleImportWayEnum { 12 | /** 13 | * 导入方式 14 | */ 15 | BY_FILE(1, "通过文件导入"), 16 | BY_SQL(2, "通过SQL导入"), 17 | BY_WX_MP(3, "通过微信公众平台导入"), 18 | BY_WX_CP(4, "通过微信企业通讯录导入"), 19 | BY_DING(5, "通过钉钉通讯录导入"), 20 | BY_NUM(6, "通过数量导入"); 21 | 22 | private int code; 23 | 24 | private String name; 25 | 26 | public static final int BY_FILE_CODE = 1; 27 | public static final int BY_SQL_CODE = 2; 28 | public static final int BY_WX_MP_CODE = 3; 29 | public static final int BY_WX_CP_CODE = 4; 30 | public static final int BY_DING_CODE = 5; 31 | public static final int BY_NUM_CODE = 6; 32 | 33 | PeopleImportWayEnum(int code, String name) { 34 | this.code = code; 35 | this.name = name; 36 | } 37 | 38 | public static String getName(int code) { 39 | String name = ""; 40 | switch (code) { 41 | case 1: 42 | name = BY_FILE.name; 43 | break; 44 | case 2: 45 | name = BY_SQL.name; 46 | break; 47 | case 3: 48 | name = BY_WX_MP.name; 49 | break; 50 | case 4: 51 | name = BY_WX_CP.name; 52 | break; 53 | case 5: 54 | name = BY_DING.name; 55 | break; 56 | case 6: 57 | name = BY_NUM.name; 58 | break; 59 | default: 60 | name = ""; 61 | } 62 | return name; 63 | } 64 | 65 | public static String getName(PeopleImportWayEnum wayEnum) { 66 | return wayEnum.name; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/PeriodTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic; 2 | 3 | /** 4 | *
 5 |  * 周期类型常量
 6 |  * 
7 | * 8 | * @author Zhou Bo 9 | * @since 2023/8/2 10 | */ 11 | public enum PeriodTypeEnum { 12 | /** 13 | * 周期类型 14 | */ 15 | RUN_AT_THIS_TIME_TASK(1, "在此时间开始推送"), 16 | RUN_PER_DAY_TASK(2, "每天定时推送"), 17 | RUN_PER_WEEK_TASK(3, "每周定时推送"), 18 | CRON_TASK(4, "Cron表达式定时推送"); 19 | 20 | private int code; 21 | 22 | private String name; 23 | 24 | public static final int RUN_AT_THIS_TIME_TASK_CODE = 1; 25 | public static final int RUN_PER_DAY_TASK_CODE = 2; 26 | public static final int RUN_PER_WEEK_TASK_CODE = 3; 27 | public static final int CRON_TASK_CODE = 4; 28 | 29 | PeriodTypeEnum(int code, String name) { 30 | this.code = code; 31 | this.name = name; 32 | } 33 | 34 | public static String getName(PeriodTypeEnum messageTypeEnum) { 35 | return messageTypeEnum.name; 36 | } 37 | 38 | public static String getDesc(Integer periodType) { 39 | for (PeriodTypeEnum periodTypeEnum : PeriodTypeEnum.values()) { 40 | if (periodTypeEnum.code == periodType) { 41 | return periodTypeEnum.name; 42 | } 43 | } 44 | return null; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/PushControl.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic; 2 | 3 | import cn.hutool.log.Log; 4 | import cn.hutool.log.LogFactory; 5 | import com.fangxuele.tool.push.logic.msgsender.IMsgSender; 6 | import com.fangxuele.tool.push.logic.msgsender.MsgSenderFactory; 7 | import com.fangxuele.tool.push.logic.msgsender.SendResult; 8 | import com.fangxuele.tool.push.ui.dialog.importway.ImportByFile; 9 | import com.fangxuele.tool.push.ui.form.MessageEditForm; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | *
16 |  * 推送控制
17 |  * 
18 | * 19 | * @author RememBerBer 20 | * @since 2017/6/19. 21 | */ 22 | public class PushControl { 23 | private static final Log logger = LogFactory.get(); 24 | 25 | /** 26 | * 模板变量前缀 27 | */ 28 | public static final String TEMPLATE_VAR_PREFIX = "var"; 29 | 30 | public static List preview(Integer tMsgId) { 31 | List sendResultList = new ArrayList<>(); 32 | List msgDataList = new ArrayList<>(); 33 | for (String data : MessageEditForm.getInstance().getPreviewUserField().getText().split(";")) { 34 | msgDataList.add(data.split(ImportByFile.TXT_FILE_DATA_SEPERATOR_REGEX)); 35 | } 36 | 37 | // 准备消息构造器 38 | IMsgSender msgSender = MsgSenderFactory.getMsgSender(tMsgId, 0); 39 | 40 | if (msgSender != null) { 41 | for (String[] msgData : msgDataList) { 42 | sendResultList.add(msgSender.send(msgData)); 43 | } 44 | } else { 45 | return null; 46 | } 47 | 48 | return sendResultList; 49 | } 50 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/TaskModeEnum.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic; 2 | 3 | /** 4 | *
 5 |  * 任务模式常量
 6 |  * 
7 | * 8 | * @author Zhou Bo 9 | * @since 2023/8/2 10 | */ 11 | public enum TaskModeEnum { 12 | /** 13 | * 任务模式 14 | */ 15 | FIX_THREAD_TASK(1, "固定线程"), 16 | INFINITY_TASK(2, "变速模式"); 17 | 18 | private int code; 19 | 20 | private String name; 21 | 22 | public static final int FIX_THREAD_TASK_CODE = 1; 23 | public static final int INFINITY_TASK_CODE = 2; 24 | 25 | TaskModeEnum(int code, String name) { 26 | this.code = code; 27 | this.name = name; 28 | } 29 | 30 | public static String getName(TaskModeEnum messageTypeEnum) { 31 | return messageTypeEnum.name; 32 | } 33 | 34 | public static String getDescByCode(Integer code) { 35 | for (TaskModeEnum taskModeEnum : TaskModeEnum.values()) { 36 | if (taskModeEnum.code == code) { 37 | return taskModeEnum.name; 38 | } 39 | } 40 | return null; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/TaskStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic; 2 | 3 | /** 4 | *
 5 |  * 任务状态常量
 6 |  * 
7 | * 8 | * @author Zhou Bo 9 | * @since 2023/8/14. 10 | */ 11 | public enum TaskStatusEnum { 12 | /** 13 | * 任务状态 14 | */ 15 | INIT(10, "初始化"), 16 | RUNNING(20, "运行中"), 17 | FINISH(30, "完成"), 18 | STOP(40, "停止"); 19 | 20 | private int code; 21 | 22 | private String name; 23 | 24 | public static final int INIT_CODE = 10; 25 | public static final int RUNNING_CODE = 20; 26 | public static final int FINISH_CODE = 30; 27 | public static final int STOP_CODE = 40; 28 | 29 | TaskStatusEnum(int code, String name) { 30 | this.code = code; 31 | this.name = name; 32 | } 33 | 34 | public static String getName(TaskStatusEnum taskStatusEnum) { 35 | return taskStatusEnum.name; 36 | } 37 | 38 | public static String getDescByCode(Integer taskPeriod) { 39 | for (TaskStatusEnum taskStatusEnum : TaskStatusEnum.values()) { 40 | if (taskStatusEnum.code == taskPeriod) { 41 | return taskStatusEnum.name; 42 | } 43 | } 44 | return null; 45 | } 46 | 47 | public int getCode() { 48 | return code; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/TaskTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic; 2 | 3 | /** 4 | *
 5 |  * 任务类型常量
 6 |  * 
7 | * 8 | * @author Zhou Bo 9 | * @since 2021/6/4. 10 | */ 11 | public enum TaskTypeEnum { 12 | /** 13 | * 任务类型 14 | */ 15 | MANUAL_TASK(1, "手动任务"), 16 | SCHEDULE_TASK(2, "定时任务"), 17 | TRIGGER_TASK(3, "触发任务"); 18 | 19 | private int code; 20 | 21 | private String name; 22 | 23 | public static final int MANUAL_TASK_CODE = 1; 24 | public static final int SCHEDULE_TASK_CODE = 2; 25 | public static final int TRIGGER_TASK_CODE = 3; 26 | 27 | TaskTypeEnum(int code, String name) { 28 | this.code = code; 29 | this.name = name; 30 | } 31 | 32 | public static String getName(TaskTypeEnum taskTypeEnum) { 33 | return taskTypeEnum.name; 34 | } 35 | 36 | public static String getDescByCode(Integer taskPeriod) { 37 | for (TaskTypeEnum taskTypeEnum : TaskTypeEnum.values()) { 38 | if (taskTypeEnum.code == taskPeriod) { 39 | return taskTypeEnum.name; 40 | } 41 | } 42 | return null; 43 | } 44 | 45 | public int getCode() { 46 | return code; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/BaseMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.fangxuele.tool.push.logic.PushControl; 4 | import org.apache.velocity.VelocityContext; 5 | 6 | /** 7 | *
 8 |  * 消息加工器基类
 9 |  * 
10 | * 11 | * @author Zhou Bo 12 | * @since 2019/6/14. 13 | */ 14 | public class BaseMsgMaker { 15 | /** 16 | * 获取模板引擎上下文 17 | * 18 | * @param msgData 消息数据 19 | * @return VelocityContext 模板引擎上下文 20 | */ 21 | VelocityContext getVelocityContext(String[] msgData) { 22 | VelocityContext velocityContext = new VelocityContext(); 23 | for (int i = 0; i < msgData.length; i++) { 24 | velocityContext.put(PushControl.TEMPLATE_VAR_PREFIX + i, msgData[i]); 25 | } 26 | return velocityContext; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/BdYunMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.bean.TemplateData; 5 | import com.fangxuele.tool.push.domain.TMsg; 6 | import com.fangxuele.tool.push.domain.TMsgSms; 7 | import com.fangxuele.tool.push.util.TemplateUtil; 8 | import lombok.Getter; 9 | import org.apache.velocity.VelocityContext; 10 | 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | 14 | /** 15 | *
16 |  * 百度云模板短信加工器
17 |  * 
18 | * 19 | * @author Zhou Bo 20 | * @since 2019/6/14. 21 | */ 22 | @Getter 23 | public class BdYunMsgMaker extends BaseMsgMaker implements IMsgMaker { 24 | 25 | private String templateId; 26 | 27 | private Map paramMap; 28 | 29 | public BdYunMsgMaker(TMsg tMsg) { 30 | TMsgSms tMsgSms = JSON.parseObject(tMsg.getContent(), TMsgSms.class); 31 | templateId = tMsgSms.getTemplateId(); 32 | paramMap = new HashMap<>(); 33 | for (TemplateData templateData : tMsgSms.getTemplateDataList()) { 34 | paramMap.put(templateData.getName(), templateData.getValue()); 35 | } 36 | } 37 | 38 | /** 39 | * 组织百度云短信消息 40 | * 41 | * @param msgData 消息信息 42 | * @return String[] 43 | */ 44 | @Override 45 | public Map makeMsg(String[] msgData) { 46 | 47 | VelocityContext velocityContext = getVelocityContext(msgData); 48 | for (Map.Entry entry : paramMap.entrySet()) { 49 | entry.setValue(TemplateUtil.evaluate(entry.getValue(), velocityContext)); 50 | } 51 | return paramMap; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/DingMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.domain.TMsg; 5 | import com.fangxuele.tool.push.domain.TMsgDing; 6 | import com.fangxuele.tool.push.util.TemplateUtil; 7 | import org.apache.velocity.VelocityContext; 8 | 9 | /** 10 | *
11 |  * 钉钉消息加工器
12 |  * 
13 | * 14 | * @author Zhou Bo 15 | * @since 2019/9/5. 16 | */ 17 | public class DingMsgMaker extends BaseMsgMaker implements IMsgMaker { 18 | 19 | private String msgType; 20 | 21 | private String msgTitle; 22 | 23 | private String picUrl; 24 | 25 | private String url; 26 | 27 | private String btnTxt; 28 | 29 | private String btnUrl; 30 | 31 | private String msgContent; 32 | 33 | private String radioType; 34 | 35 | private String webHook; 36 | 37 | public DingMsgMaker(TMsg tMsg) { 38 | TMsgDing tMsgDing = JSON.parseObject(tMsg.getContent(), TMsgDing.class); 39 | 40 | msgType = tMsgDing.getDingMsgType(); 41 | msgTitle = tMsgDing.getMsgTitle(); 42 | picUrl = tMsgDing.getPicUrl(); 43 | url = tMsgDing.getUrl(); 44 | btnTxt = tMsgDing.getBtnTxt(); 45 | btnUrl = tMsgDing.getBtnUrl(); 46 | msgContent = tMsgDing.getContent(); 47 | radioType = tMsgDing.getRadioType(); 48 | webHook = tMsgDing.getWebHook(); 49 | } 50 | 51 | /** 52 | * 组织消息-企业号 53 | * 54 | * @param msgData 消息数据 55 | * @return WxMpTemplateMessage 56 | */ 57 | @Override 58 | public TMsgDing makeMsg(String[] msgData) { 59 | 60 | TMsgDing dingMsg = new TMsgDing(); 61 | VelocityContext velocityContext = getVelocityContext(msgData); 62 | if ("markdown消息".equals(msgType)) { 63 | dingMsg.setContent(msgContent); 64 | } else { 65 | dingMsg.setContent(TemplateUtil.evaluate(msgContent, velocityContext)); 66 | } 67 | dingMsg.setMsgTitle(TemplateUtil.evaluate(msgTitle, velocityContext)); 68 | dingMsg.setPicUrl(TemplateUtil.evaluate(picUrl, velocityContext)); 69 | dingMsg.setUrl(TemplateUtil.evaluate(url, velocityContext)); 70 | dingMsg.setBtnTxt(TemplateUtil.evaluate(btnTxt, velocityContext)); 71 | dingMsg.setBtnUrl(TemplateUtil.evaluate(btnUrl, velocityContext)); 72 | 73 | return dingMsg; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/HwYunMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.bean.TemplateData; 5 | import com.fangxuele.tool.push.domain.TMsg; 6 | import com.fangxuele.tool.push.domain.TMsgSms; 7 | import com.fangxuele.tool.push.util.TemplateUtil; 8 | import lombok.Getter; 9 | import org.apache.velocity.VelocityContext; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | *
16 |  * 华为云模板短信加工器
17 |  * 
18 | * 19 | * @author Zhou Bo 20 | * @since 2019/6/14. 21 | */ 22 | @Getter 23 | public class HwYunMsgMaker extends BaseMsgMaker implements IMsgMaker { 24 | 25 | private String templateId; 26 | 27 | private List paramList; 28 | 29 | public HwYunMsgMaker(TMsg tMsg) { 30 | TMsgSms tMsgSms = JSON.parseObject(tMsg.getContent(), TMsgSms.class); 31 | this.templateId = tMsgSms.getTemplateId(); 32 | paramList = new ArrayList<>(); 33 | for (TemplateData templateData : tMsgSms.getTemplateDataList()) { 34 | paramList.add(templateData.getValue()); 35 | } 36 | } 37 | 38 | /** 39 | * 组织华为云短信消息 40 | * 41 | * @param msgData 消息信息 42 | * @return String[] 43 | */ 44 | @Override 45 | public String[] makeMsg(String[] msgData) { 46 | 47 | VelocityContext velocityContext = getVelocityContext(msgData); 48 | for (int i = 0; i < paramList.size(); i++) { 49 | paramList.set(i, TemplateUtil.evaluate(paramList.get(i), velocityContext)); 50 | } 51 | String[] paramArray = new String[paramList.size()]; 52 | return paramList.toArray(paramArray); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/IMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | public interface IMsgMaker { 4 | 5 | /** 6 | * 消息加工器接口 7 | * 8 | * @param msgData 消息数据 9 | * @return Object 10 | */ 11 | Object makeMsg(String[] msgData); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/MailMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.bean.msg.MailMsg; 5 | import com.fangxuele.tool.push.domain.TMsg; 6 | import com.fangxuele.tool.push.domain.TMsgMail; 7 | import com.fangxuele.tool.push.util.TemplateUtil; 8 | import org.apache.commons.lang3.StringUtils; 9 | import org.apache.velocity.VelocityContext; 10 | 11 | import java.io.File; 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | /** 16 | *
17 |  * E-Mail加工器
18 |  * 
19 | * 20 | * @author Zhou Bo 21 | * @since 2019/6/23. 22 | */ 23 | public class MailMsgMaker extends BaseMsgMaker implements IMsgMaker { 24 | 25 | private String mailTitle; 26 | private String mailCc; 27 | private List mailFiles; 28 | private String mailContent; 29 | 30 | public MailMsgMaker(TMsg tMsg) { 31 | TMsgMail tMsgMail = JSON.parseObject(tMsg.getContent(), TMsgMail.class); 32 | mailTitle = tMsgMail.getTitle(); 33 | mailCc = tMsgMail.getCc(); 34 | List files = new ArrayList<>(); 35 | String text = tMsgMail.getFiles(); 36 | String[] strings = text.split("\\n"); 37 | for (String string : strings) { 38 | string = string.trim(); 39 | if (StringUtils.isNotEmpty(string)) { 40 | files.add(new File(string)); 41 | } 42 | } 43 | mailFiles = files; 44 | mailContent = tMsgMail.getContent(); 45 | } 46 | 47 | /** 48 | * 组织E-Mail消息 49 | * 50 | * @param msgData 消息信息 51 | * @return MailMsg 52 | */ 53 | @Override 54 | public MailMsg makeMsg(String[] msgData) { 55 | MailMsg mailMsg = new MailMsg(); 56 | VelocityContext velocityContext = getVelocityContext(msgData); 57 | String title = TemplateUtil.evaluate(mailTitle, velocityContext); 58 | String cc = TemplateUtil.evaluate(mailCc, velocityContext); 59 | String content = TemplateUtil.evaluate(mailContent, velocityContext); 60 | mailMsg.setMailTitle(title); 61 | mailMsg.setMailCc(cc); 62 | mailMsg.setMailFiles(mailFiles); 63 | mailMsg.setMailContent(content); 64 | return mailMsg; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/QiNiuYunMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.bean.TemplateData; 5 | import com.fangxuele.tool.push.domain.TMsg; 6 | import com.fangxuele.tool.push.domain.TMsgSms; 7 | import com.fangxuele.tool.push.util.TemplateUtil; 8 | import lombok.Getter; 9 | import org.apache.velocity.VelocityContext; 10 | 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | 14 | /** 15 | *
16 |  * 七牛云模板短信加工器
17 |  * 
18 | * 19 | * @author Zhou Bo 20 | * @since 2019/6/14. 21 | */ 22 | @Getter 23 | public class QiNiuYunMsgMaker extends BaseMsgMaker implements IMsgMaker { 24 | 25 | private String templateId; 26 | 27 | private Map paramMap; 28 | 29 | public QiNiuYunMsgMaker(TMsg tMsg) { 30 | TMsgSms tMsgSms = JSON.parseObject(tMsg.getContent(), TMsgSms.class); 31 | this.templateId = tMsgSms.getTemplateId(); 32 | 33 | paramMap = new HashMap<>(); 34 | 35 | for (TemplateData templateData : tMsgSms.getTemplateDataList()) { 36 | paramMap.put(templateData.getName(), templateData.getValue()); 37 | } 38 | } 39 | 40 | /** 41 | * 组织七牛云短信消息 42 | * 43 | * @param msgData 消息信息 44 | * @return String[] 45 | */ 46 | @Override 47 | public Map makeMsg(String[] msgData) { 48 | 49 | VelocityContext velocityContext = getVelocityContext(msgData); 50 | for (Map.Entry entry : paramMap.entrySet()) { 51 | entry.setValue(TemplateUtil.evaluate(entry.getValue(), velocityContext)); 52 | } 53 | return paramMap; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/TxYun3MsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.bean.TemplateData; 5 | import com.fangxuele.tool.push.domain.TMsg; 6 | import com.fangxuele.tool.push.domain.TMsgSms; 7 | import com.fangxuele.tool.push.util.TemplateUtil; 8 | import lombok.Getter; 9 | import org.apache.velocity.VelocityContext; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | *
16 |  * 腾讯云3.0模板短信加工器
17 |  * 
18 | * 19 | * @author Zhou Bo 20 | * @since 2023/9/4. 21 | */ 22 | @Getter 23 | public class TxYun3MsgMaker extends BaseMsgMaker implements IMsgMaker { 24 | 25 | private String templateId; 26 | 27 | private List paramList; 28 | 29 | public TxYun3MsgMaker(TMsg tMsg) { 30 | TMsgSms tMsgSms = JSON.parseObject(tMsg.getContent(), TMsgSms.class); 31 | this.templateId = tMsgSms.getTemplateId(); 32 | paramList = new ArrayList<>(); 33 | for (TemplateData templateData : tMsgSms.getTemplateDataList()) { 34 | paramList.add(templateData.getValue()); 35 | } 36 | } 37 | 38 | /** 39 | * 组织腾讯云短信消息 40 | * 41 | * @param msgData 消息信息 42 | * @return String[] 43 | */ 44 | @Override 45 | public String[] makeMsg(String[] msgData) { 46 | 47 | VelocityContext velocityContext = getVelocityContext(msgData); 48 | for (int i = 0; i < paramList.size(); i++) { 49 | paramList.set(i, TemplateUtil.evaluate(paramList.get(i), velocityContext)); 50 | } 51 | String[] paramArray = new String[paramList.size()]; 52 | return paramList.toArray(paramArray); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/TxYunMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.bean.TemplateData; 5 | import com.fangxuele.tool.push.domain.TMsg; 6 | import com.fangxuele.tool.push.domain.TMsgSms; 7 | import com.fangxuele.tool.push.util.TemplateUtil; 8 | import lombok.Getter; 9 | import org.apache.velocity.VelocityContext; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | *
16 |  * 腾讯云模板短信加工器
17 |  * 
18 | * 19 | * @author Zhou Bo 20 | * @since 2019/6/14. 21 | */ 22 | @Getter 23 | public class TxYunMsgMaker extends BaseMsgMaker implements IMsgMaker { 24 | 25 | private int templateId; 26 | 27 | private List paramList; 28 | 29 | public TxYunMsgMaker(TMsg tMsg) { 30 | TMsgSms tMsgSms = JSON.parseObject(tMsg.getContent(), TMsgSms.class); 31 | this.templateId = Integer.parseInt(tMsgSms.getTemplateId()); 32 | paramList = new ArrayList<>(); 33 | for (TemplateData templateData : tMsgSms.getTemplateDataList()) { 34 | paramList.add(templateData.getValue()); 35 | } 36 | } 37 | 38 | /** 39 | * 组织腾讯云短信消息 40 | * 41 | * @param msgData 消息信息 42 | * @return String[] 43 | */ 44 | @Override 45 | public String[] makeMsg(String[] msgData) { 46 | 47 | VelocityContext velocityContext = getVelocityContext(msgData); 48 | for (int i = 0; i < paramList.size(); i++) { 49 | paramList.set(i, TemplateUtil.evaluate(paramList.get(i), velocityContext)); 50 | } 51 | String[] paramArray = new String[paramList.size()]; 52 | return paramList.toArray(paramArray); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/UpYunMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.bean.TemplateData; 5 | import com.fangxuele.tool.push.domain.TMsg; 6 | import com.fangxuele.tool.push.domain.TMsgSms; 7 | import com.fangxuele.tool.push.util.TemplateUtil; 8 | import lombok.Getter; 9 | import org.apache.velocity.VelocityContext; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | *
16 |  * 又拍云模板短信加工器
17 |  * 
18 | * 19 | * @author Zhou Bo 20 | * @since 2019/6/14. 21 | */ 22 | @Getter 23 | public class UpYunMsgMaker extends BaseMsgMaker implements IMsgMaker { 24 | 25 | private String templateId; 26 | 27 | private List paramList; 28 | 29 | public UpYunMsgMaker(TMsg tMsg) { 30 | TMsgSms tMsgSms = JSON.parseObject(tMsg.getContent(), TMsgSms.class); 31 | this.templateId = tMsgSms.getTemplateId(); 32 | 33 | paramList = new ArrayList<>(); 34 | for (TemplateData templateData : tMsgSms.getTemplateDataList()) { 35 | paramList.add(templateData.getValue()); 36 | } 37 | } 38 | 39 | /** 40 | * 组织又拍云短信消息 41 | * 42 | * @param msgData 消息信息 43 | * @return String[] 44 | */ 45 | @Override 46 | public String[] makeMsg(String[] msgData) { 47 | 48 | VelocityContext velocityContext = getVelocityContext(msgData); 49 | for (int i = 0; i < paramList.size(); i++) { 50 | paramList.set(i, TemplateUtil.evaluate(paramList.get(i), velocityContext)); 51 | } 52 | String[] paramArray = new String[paramList.size()]; 53 | return paramList.toArray(paramArray); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/WxMaSubscribeMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage; 4 | import com.alibaba.fastjson.JSON; 5 | import com.fangxuele.tool.push.bean.TemplateData; 6 | import com.fangxuele.tool.push.domain.TMsg; 7 | import com.fangxuele.tool.push.domain.TMsgMaSubscribe; 8 | import com.fangxuele.tool.push.util.TemplateUtil; 9 | import org.apache.velocity.VelocityContext; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | *
15 |  * 小程序订阅消息加工器
16 |  * 
17 | * 18 | * @author Zhou Bo 19 | * @since 2019/11/29. 20 | */ 21 | public class WxMaSubscribeMsgMaker extends BaseMsgMaker implements IMsgMaker { 22 | 23 | private String templateId; 24 | private String page; 25 | private List templateDataList; 26 | 27 | public WxMaSubscribeMsgMaker(TMsg tMsg) { 28 | TMsgMaSubscribe tMsgMaSubscribe = JSON.parseObject(tMsg.getContent(), TMsgMaSubscribe.class); 29 | this.templateId = tMsgMaSubscribe.getTemplateId(); 30 | this.page = tMsgMaSubscribe.getPage(); 31 | this.templateDataList = tMsgMaSubscribe.getTemplateDataList(); 32 | } 33 | 34 | /** 35 | * 组织订阅消息-小程序 36 | * 37 | * @param msgData 消息信息 38 | * @return WxMaTemplateMessage 39 | */ 40 | @Override 41 | public WxMaSubscribeMessage makeMsg(String[] msgData) { 42 | // 拼模板 43 | WxMaSubscribeMessage wxMaSubscribeMessage = new WxMaSubscribeMessage(); 44 | wxMaSubscribeMessage.setTemplateId(templateId); 45 | VelocityContext velocityContext = getVelocityContext(msgData); 46 | String templateUrlEvaluated = TemplateUtil.evaluate(page, velocityContext); 47 | wxMaSubscribeMessage.setPage(templateUrlEvaluated); 48 | 49 | WxMaSubscribeMessage.MsgData wxMaSubscribeData; 50 | for (TemplateData templateData : templateDataList) { 51 | wxMaSubscribeData = new WxMaSubscribeMessage.MsgData(); 52 | wxMaSubscribeData.setName(templateData.getName()); 53 | wxMaSubscribeData.setValue(TemplateUtil.evaluate(templateData.getValue(), velocityContext)); 54 | wxMaSubscribeMessage.addData(wxMaSubscribeData); 55 | } 56 | 57 | return wxMaSubscribeMessage; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgmaker/YunPianMsgMaker.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgmaker; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.fangxuele.tool.push.domain.TMsg; 5 | import com.fangxuele.tool.push.domain.TMsgSms; 6 | import com.fangxuele.tool.push.util.TemplateUtil; 7 | import com.yunpian.sdk.YunpianClient; 8 | import org.apache.velocity.VelocityContext; 9 | 10 | import java.util.HashMap; 11 | import java.util.Map; 12 | 13 | /** 14 | *
15 |  * 云片网短信加工器
16 |  * 
17 | * 18 | * @author Zhou Bo 19 | * @since 2019/6/14. 20 | */ 21 | public class YunPianMsgMaker extends BaseMsgMaker implements IMsgMaker { 22 | 23 | private String msgYunpianMsgContent; 24 | 25 | public YunPianMsgMaker(TMsg tMsg) { 26 | TMsgSms tMsgSms = JSON.parseObject(tMsg.getContent(), TMsgSms.class); 27 | this.msgYunpianMsgContent = tMsgSms.getContent(); 28 | } 29 | 30 | /** 31 | * 组织云片网短信消息 32 | * 33 | * @param msgData 消息信息 34 | * @return Map 35 | */ 36 | @Override 37 | public Map makeMsg(String[] msgData) { 38 | Map params = new HashMap<>(2); 39 | VelocityContext velocityContext = getVelocityContext(msgData); 40 | String text = TemplateUtil.evaluate(msgYunpianMsgContent, velocityContext); 41 | params.put(YunpianClient.TEXT, text); 42 | return params; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgsender/HttpSendResult.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgsender; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | 7 | /** 8 | *
 9 |  * HttpSendResult
10 |  * 
11 | * 12 | * @author Zhou Bo 13 | * @since 2019/7/19. 14 | */ 15 | @Getter 16 | @Setter 17 | @ToString 18 | public class HttpSendResult extends SendResult { 19 | private String headers; 20 | 21 | private String body; 22 | 23 | private String cookies; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgsender/IMsgSender.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgsender; 2 | 3 | /** 4 | *
 5 |  * 消息发送器接口
 6 |  * 
7 | * 8 | * @author RememBerBer 9 | * @since 2019/6/15. 10 | */ 11 | public interface IMsgSender { 12 | 13 | /** 14 | * 发送消息 15 | * 16 | * @param msgData 消息数据 17 | */ 18 | SendResult send(String[] msgData); 19 | 20 | /** 21 | * 异步发送消息 22 | * 23 | * @param msgData 消息数据 24 | */ 25 | SendResult asyncSend(String[] msgData); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgsender/SendResult.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgsender; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | 7 | /** 8 | *
 9 |  * 发送结果
10 |  * 
11 | * 12 | * @author RememBerBer 13 | * @since 2019/6/15. 14 | */ 15 | @Getter 16 | @Setter 17 | @ToString 18 | public class SendResult { 19 | private boolean success = false; 20 | 21 | private String info; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgsender/WxKefuMsgSender.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgsender; 2 | 3 | import com.fangxuele.tool.push.dao.TMsgMapper; 4 | import com.fangxuele.tool.push.domain.TMsg; 5 | import com.fangxuele.tool.push.logic.msgmaker.WxKefuMsgMaker; 6 | import com.fangxuele.tool.push.util.MybatisUtil; 7 | import lombok.extern.slf4j.Slf4j; 8 | import me.chanjar.weixin.mp.api.WxMpService; 9 | import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage; 10 | import org.apache.commons.lang3.exception.ExceptionUtils; 11 | 12 | /** 13 | *
14 |  * 微信客服消息发送器
15 |  * 
16 | * 17 | * @author RememBerBer 18 | * @since 2019/6/15. 19 | */ 20 | @Slf4j 21 | public class WxKefuMsgSender implements IMsgSender { 22 | private WxKefuMsgMaker wxKefuMsgMaker; 23 | private WxMpService wxMpService; 24 | 25 | private static TMsgMapper msgMapper = MybatisUtil.getSqlSession().getMapper(TMsgMapper.class); 26 | 27 | private Integer dryRun; 28 | 29 | public WxKefuMsgSender(Integer msgId, Integer dryRun) { 30 | TMsg tMsg = msgMapper.selectByPrimaryKey(msgId); 31 | wxKefuMsgMaker = new WxKefuMsgMaker(tMsg); 32 | wxMpService = WxMpTemplateMsgSender.getWxMpService(tMsg.getAccountId()); 33 | this.dryRun = dryRun; 34 | } 35 | 36 | @Override 37 | public SendResult send(String[] msgData) { 38 | SendResult sendResult = new SendResult(); 39 | 40 | try { 41 | String openId = msgData[0]; 42 | WxMpKefuMessage wxMpKefuMessage = wxKefuMsgMaker.makeMsg(msgData); 43 | wxMpKefuMessage.setToUser(openId); 44 | if (dryRun == 1) { 45 | sendResult.setSuccess(true); 46 | return sendResult; 47 | } else { 48 | wxMpService.getKefuService().sendKefuMessage(wxMpKefuMessage); 49 | } 50 | } catch (Exception e) { 51 | sendResult.setSuccess(false); 52 | sendResult.setInfo(e.getMessage()); 53 | log.error(ExceptionUtils.getStackTrace(e)); 54 | return sendResult; 55 | } 56 | 57 | sendResult.setSuccess(true); 58 | return sendResult; 59 | } 60 | 61 | @Override 62 | public SendResult asyncSend(String[] msgData) { 63 | return null; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgsender/WxKefuPriorMsgSender.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgsender; 2 | 3 | /** 4 | *
 5 |  * 微信客服消息优先消息发送器
 6 |  * 
7 | * 8 | * @author RememBerBer 9 | * @since 2019/6/15. 10 | */ 11 | public class WxKefuPriorMsgSender implements IMsgSender { 12 | 13 | private WxMpTemplateMsgSender wxMpTemplateMsgSender; 14 | private WxKefuMsgSender wxKefuMsgSender; 15 | 16 | public WxKefuPriorMsgSender(Integer msgId, Integer dryRun) { 17 | wxMpTemplateMsgSender = new WxMpTemplateMsgSender(msgId, dryRun); 18 | wxKefuMsgSender = new WxKefuMsgSender(msgId, dryRun); 19 | } 20 | 21 | @Override 22 | public SendResult send(String[] msgData) { 23 | SendResult sendResult = new SendResult(); 24 | 25 | SendResult kefuMsgSendResult = wxKefuMsgSender.send(msgData); 26 | if (!kefuMsgSendResult.isSuccess()) { 27 | SendResult mpMsgSendResult = wxMpTemplateMsgSender.send(msgData); 28 | if (!mpMsgSendResult.isSuccess()) { 29 | return mpMsgSendResult; 30 | } 31 | } 32 | 33 | sendResult.setSuccess(true); 34 | return sendResult; 35 | } 36 | 37 | @Override 38 | public SendResult asyncSend(String[] msgData) { 39 | return null; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgsender/WxMpSubscribeMsgSender.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgsender; 2 | 3 | import com.fangxuele.tool.push.dao.TMsgMapper; 4 | import com.fangxuele.tool.push.domain.TMsg; 5 | import com.fangxuele.tool.push.logic.msgmaker.WxMpSubscribeMsgMaker; 6 | import com.fangxuele.tool.push.util.MybatisUtil; 7 | import lombok.extern.slf4j.Slf4j; 8 | import me.chanjar.weixin.mp.api.WxMpService; 9 | import me.chanjar.weixin.mp.bean.subscribe.WxMpSubscribeMessage; 10 | import org.apache.commons.lang3.exception.ExceptionUtils; 11 | 12 | /** 13 | *
14 |  * 微信公众号订阅通知发送器
15 |  * 
16 | * 17 | * @author RememBerBer 18 | * @since 2021/3/23. 19 | */ 20 | @Slf4j 21 | public class WxMpSubscribeMsgSender implements IMsgSender { 22 | private WxMpService wxMpService; 23 | private WxMpSubscribeMsgMaker wxMpSubscribeMsgMaker; 24 | 25 | private static TMsgMapper msgMapper = MybatisUtil.getSqlSession().getMapper(TMsgMapper.class); 26 | 27 | private Integer dryRun; 28 | 29 | public WxMpSubscribeMsgSender(Integer msgId, Integer dryRun) { 30 | TMsg tMsg = msgMapper.selectByPrimaryKey(msgId); 31 | wxMpSubscribeMsgMaker = new WxMpSubscribeMsgMaker(tMsg); 32 | wxMpService = WxMpTemplateMsgSender.getWxMpService(tMsg.getAccountId()); 33 | this.dryRun = dryRun; 34 | } 35 | 36 | @Override 37 | public SendResult send(String[] msgData) { 38 | SendResult sendResult = new SendResult(); 39 | 40 | try { 41 | String openId = msgData[0]; 42 | WxMpSubscribeMessage wxMessageTemplate = wxMpSubscribeMsgMaker.makeMsg(msgData); 43 | wxMessageTemplate.setToUser(openId); 44 | if (dryRun == 1) { 45 | sendResult.setSuccess(true); 46 | return sendResult; 47 | } else { 48 | wxMpService.getSubscribeMsgService().send(wxMessageTemplate); 49 | } 50 | } catch (Exception e) { 51 | sendResult.setSuccess(false); 52 | sendResult.setInfo(e.getMessage()); 53 | log.error(ExceptionUtils.getStackTrace(e)); 54 | return sendResult; 55 | } 56 | 57 | sendResult.setSuccess(true); 58 | return sendResult; 59 | } 60 | 61 | @Override 62 | public SendResult asyncSend(String[] msgData) { 63 | return null; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/logic/msgthread/BaseMsgThread.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.logic.msgthread; 2 | 3 | import cn.hutool.log.Log; 4 | import cn.hutool.log.LogFactory; 5 | import com.fangxuele.tool.push.logic.TaskRunThread; 6 | import com.fangxuele.tool.push.util.ConsoleUtil; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | *
12 |  * 消息发送服务线程父类
13 |  * 
14 | * 15 | * @author RememBerBer 16 | * @since 2017/3/29. 17 | */ 18 | public class BaseMsgThread implements Runnable { 19 | 20 | public static final Log logger = LogFactory.get(); 21 | 22 | /** 23 | * 起始索引 24 | */ 25 | private int startIndex; 26 | 27 | /** 28 | * 截止索引 29 | */ 30 | private int endIndex; 31 | 32 | /** 33 | * 当前线程要发送的list 34 | */ 35 | public List list; 36 | 37 | protected TaskRunThread taskRunThread; 38 | 39 | public static int msgType; 40 | 41 | public BaseMsgThread(int startIndex, int endIndex, TaskRunThread taskRunThread) { 42 | this.startIndex = startIndex; 43 | this.endIndex = endIndex; 44 | this.taskRunThread = taskRunThread; 45 | } 46 | 47 | @Override 48 | public void run() { 49 | 50 | } 51 | 52 | /** 53 | * 初始化当前线程 54 | */ 55 | public void initCurrentThread() { 56 | ConsoleUtil.pushLog(taskRunThread.getLogWriter(), "线程" + Thread.currentThread().getName() + "负责处理第:" + startIndex + "-" + endIndex + "条数据"); 57 | 58 | list = taskRunThread.getToSendList().subList(startIndex, endIndex); 59 | 60 | } 61 | 62 | /** 63 | * 当前线程结束 64 | */ 65 | public void currentThreadFinish() { 66 | ConsoleUtil.pushLog(taskRunThread.getLogWriter(), Thread.currentThread().getName() + "已处理完第" + startIndex + "-" + endIndex + "条的数据"); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/component/TableInCellCheckBoxRenderer.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.component; 2 | 3 | import javax.swing.*; 4 | import javax.swing.table.TableCellRenderer; 5 | import java.awt.*; 6 | 7 | /** 8 | *
 9 |  * 自定义单元格单选框渲染器
10 |  * 
11 | * 12 | * @author Zhou Bo 13 | * @since 2019/3/26. 14 | */ 15 | public class TableInCellCheckBoxRenderer extends JCheckBox implements TableCellRenderer { 16 | @Override 17 | public Component getTableCellRendererComponent(JTable table, Object value, 18 | boolean isSelected, boolean hasFocus, int row, int column) { 19 | //这一列必须都是integer类型(0-100) 20 | Boolean b = (Boolean) value; 21 | setSelected(b); 22 | return this; 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/component/TableInCellImageLabelRenderer.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.component; 2 | 3 | import javax.imageio.ImageIO; 4 | import javax.swing.*; 5 | import javax.swing.table.TableCellRenderer; 6 | import java.awt.*; 7 | import java.awt.image.BufferedImage; 8 | import java.net.URL; 9 | 10 | /** 11 | *
12 |  * 自定义图片单元格渲染器
13 |  * 
14 | * 15 | * @author Zhou Bo 16 | * @since 2019/3/26. 17 | */ 18 | public class TableInCellImageLabelRenderer extends JLabel implements TableCellRenderer { 19 | @Override 20 | public Component getTableCellRendererComponent(JTable table, Object value, 21 | boolean isSelected, boolean hasFocus, int row, int column) { 22 | try { 23 | String imgUrl = (String) value; 24 | imgUrl = imgUrl.replace("/132", "/64"); 25 | URL url = new URL(imgUrl); 26 | 27 | BufferedImage image = ImageIO.read(url); 28 | ImageIcon imageIcon = new ImageIcon(image); 29 | // imageIcon.setImage(imageIcon.getImage().getScaledInstance(table.getRowHeight(), table.getRowHeight(), Image.SCALE_DEFAULT)); 30 | setIcon(imageIcon); 31 | } catch (Exception e) { 32 | e.printStackTrace(); 33 | } 34 | return this; 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/component/TableInCellProgressBarRenderer.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.component; 2 | 3 | import javax.swing.*; 4 | import javax.swing.table.TableCellRenderer; 5 | import java.awt.*; 6 | 7 | /** 8 | *
 9 |  * 自定义进度条单元格渲染器
10 |  * 
11 | * 12 | * @author Zhou Bo 13 | * @since 2019/3/26. 14 | */ 15 | public class TableInCellProgressBarRenderer extends JProgressBar implements TableCellRenderer { 16 | @Override 17 | public Component getTableCellRendererComponent(JTable table, Object value, 18 | boolean isSelected, boolean hasFocus, int row, int column) { 19 | // 这一列必须都是integer类型(0-100) 20 | Integer v = (Integer) value; 21 | setValue(v); 22 | return this; 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/dialog/AppreciateDialog.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/dialog/Spinner.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/dialog/importway/config/DingImportConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.dialog.importway.config; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DingImportConfig { 7 | 8 | /** 9 | * 1:全部,2:按部门 10 | */ 11 | private Integer userType; 12 | 13 | /** 14 | * 部门id 15 | */ 16 | private Long deptId; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/dialog/importway/config/WxCpImportConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.dialog.importway.config; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class WxCpImportConfig { 7 | 8 | /** 9 | * 1:全部,2:按标签,3:按部门 10 | */ 11 | private Integer userType; 12 | 13 | /** 14 | * 标签id 15 | */ 16 | private String tagId; 17 | 18 | /** 19 | * 部门id 20 | */ 21 | private Long depId; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/dialog/importway/config/WxMpImportConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.dialog.importway.config; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class WxMpImportConfig { 7 | 8 | /** 9 | * 1:全部,2:标签取并集,3:标签取交集 10 | */ 11 | private Integer userType; 12 | 13 | /** 14 | * 标签id 15 | */ 16 | private Long tagId; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/form/LoadingForm.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/form/account/IAccountForm.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.form.account; 2 | 3 | import com.fangxuele.tool.push.dao.TAccountMapper; 4 | import com.fangxuele.tool.push.util.MybatisUtil; 5 | 6 | import javax.swing.*; 7 | 8 | /** 9 | *
10 |  * 账号编辑form界面接口
11 |  * 
12 | * 13 | * @author Zhou Bo 14 | * @since 2021/3/10. 15 | */ 16 | public interface IAccountForm { 17 | 18 | TAccountMapper accountMapper = MybatisUtil.getSqlSession().getMapper(TAccountMapper.class); 19 | 20 | /** 21 | * 初始化界面 22 | * 23 | * @param accountName 24 | */ 25 | void init(String accountName); 26 | 27 | /** 28 | * 保存 29 | * 30 | * @param accountName 31 | */ 32 | void save(String accountName); 33 | 34 | /** 35 | * 清空表单 36 | */ 37 | void clear(); 38 | 39 | /** 40 | * 获取主面板 41 | * 42 | * @return 43 | */ 44 | JPanel getMainPanel(); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/form/account/UpYunAccountForm.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/form/msg/IMsgForm.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.form.msg; 2 | 3 | /** 4 | *
 5 |  * 消息编辑form界面接口
 6 |  * 
7 | * 8 | * @author Zhou Bo 9 | * @since 2019/7/15. 10 | */ 11 | public interface IMsgForm { 12 | /** 13 | * 初始化界面 14 | * 15 | * @param msgId 16 | */ 17 | void init(Integer msgId); 18 | 19 | /** 20 | * 保存消息 21 | * 22 | * @param msgName 23 | */ 24 | void save(Integer accountId, String msgName); 25 | 26 | void clearAllField(); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/form/msg/YunpianMsgForm.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/frame/HttpResultFrame.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.frame; 2 | 3 | import com.fangxuele.tool.push.ui.form.HttpResultForm; 4 | import com.fangxuele.tool.push.util.ComponentUtil; 5 | 6 | import javax.swing.*; 7 | import java.awt.*; 8 | 9 | /** 10 | *
11 |  * Http请求响应结果展示frame
12 |  * 
13 | * 14 | * @author Zhou Bo 15 | * @since 2019/7/19. 16 | */ 17 | public class HttpResultFrame extends JFrame { 18 | 19 | private static final long serialVersionUID = 5950950940687769444L; 20 | 21 | private static HttpResultFrame httpResultFrame; 22 | 23 | public void init() { 24 | String title = "Http请求结果"; 25 | this.setName(title); 26 | this.setTitle(title); 27 | 28 | ComponentUtil.setPreferSizeAndLocateToCenter(this, 0.6, 0.66); 29 | } 30 | 31 | public static HttpResultFrame getInstance() { 32 | if (httpResultFrame == null) { 33 | httpResultFrame = new HttpResultFrame(); 34 | httpResultFrame.init(); 35 | Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); 36 | if (screenSize.getWidth() <= 1366) { 37 | // 低分辨率下自动最大化窗口 38 | httpResultFrame.setExtendedState(JFrame.MAXIMIZED_BOTH); 39 | } 40 | httpResultFrame.setContentPane(HttpResultForm.getInstance().getHttpResultPanel()); 41 | httpResultFrame.pack(); 42 | } 43 | 44 | return httpResultFrame; 45 | } 46 | 47 | public static void showResultWindow() { 48 | getInstance().setVisible(true); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/listener/AccountEditListener.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.listener; 2 | 3 | import cn.hutool.log.Log; 4 | import cn.hutool.log.LogFactory; 5 | import com.fangxuele.tool.push.ui.form.*; 6 | import com.fangxuele.tool.push.ui.form.account.AccountFormFactory; 7 | import org.apache.commons.lang3.StringUtils; 8 | 9 | import javax.swing.*; 10 | 11 | /** 12 | *
13 |  * 编辑账号tab相关事件监听
14 |  * 
15 | * 16 | * @author RememBerBer 17 | * @since 2021/3/19. 18 | */ 19 | public class AccountEditListener { 20 | private static final Log logger = LogFactory.get(); 21 | 22 | public static void addListeners() { 23 | AccountEditForm accountEditForm = AccountEditForm.getInstance(); 24 | 25 | // 保存按钮事件 26 | accountEditForm.getAccountSaveButton().addActionListener(e -> { 27 | String accountName = accountEditForm.getAccountNameField().getText(); 28 | if (StringUtils.isBlank(accountName)) { 29 | JOptionPane.showMessageDialog(MainWindow.getInstance().getMainPanel(), "请填写账号名称!\n\n", "失败", 30 | JOptionPane.ERROR_MESSAGE); 31 | return; 32 | } 33 | 34 | try { 35 | AccountFormFactory.getAccountForm().save(accountName); 36 | AccountManageForm.init(); 37 | MessageManageForm.init(); 38 | PeopleManageForm.init(); 39 | } catch (Exception e1) { 40 | JOptionPane.showMessageDialog(MainWindow.getInstance().getMainPanel(), "保存失败!\n\n" + e1.getMessage(), "失败", 41 | JOptionPane.ERROR_MESSAGE); 42 | logger.error(e1); 43 | } 44 | 45 | }); 46 | 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/listener/HelpListener.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.listener; 2 | 3 | import com.fangxuele.tool.push.ui.form.HelpForm; 4 | 5 | import java.awt.*; 6 | import java.awt.event.MouseAdapter; 7 | import java.awt.event.MouseEvent; 8 | import java.io.IOException; 9 | import java.net.URI; 10 | import java.net.URISyntaxException; 11 | 12 | /** 13 | *
14 |  * HelpPanel Listener
15 |  * 
16 | * 17 | * @author RememBerBer 18 | * @since 2018/2/9. 19 | */ 20 | public class HelpListener { 21 | 22 | public static void addListeners() { 23 | HelpForm.getInstance().getLabelOnlineHelp().addMouseListener(new MouseAdapter() { 24 | @Override 25 | public void mousePressed(MouseEvent e) { 26 | Desktop desktop = Desktop.getDesktop(); 27 | try { 28 | desktop.browse(new URI("https://gitee.com/zhoubochina/WePush/wikis/help")); 29 | } catch (IOException | URISyntaxException e1) { 30 | e1.printStackTrace(); 31 | } 32 | super.mousePressed(e); 33 | } 34 | 35 | @Override 36 | public void mouseEntered(MouseEvent e) { 37 | super.mouseEntered(e); 38 | HelpForm.getInstance().getLabelOnlineHelp().setCursor(new Cursor(Cursor.HAND_CURSOR)); 39 | } 40 | 41 | }); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/listener/TabListener.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.ui.listener; 2 | 3 | import com.fangxuele.tool.push.App; 4 | import com.fangxuele.tool.push.ui.form.MainWindow; 5 | 6 | import javax.swing.event.ChangeEvent; 7 | import javax.swing.event.ChangeListener; 8 | 9 | /** 10 | *
11 |  * tab事件监听
12 |  * 
13 | * 14 | * @author RememBerBer 15 | * @since 2017/6/21. 16 | */ 17 | public class TabListener { 18 | 19 | private static boolean warnFlag = true; 20 | 21 | public static void addListeners() { 22 | MainWindow.getInstance().getTabbedPane().addChangeListener(new ChangeListener() { 23 | /** 24 | * Invoked when the target of the listener has changed its state. 25 | * 26 | * @param e a ChangeEvent object 27 | */ 28 | @Override 29 | public void stateChanged(ChangeEvent e) { 30 | int index = MainWindow.getInstance().getTabbedPane().getSelectedIndex(); 31 | int msgType = App.config.getMsgType(); 32 | switch (index) { 33 | case 3: 34 | // if (warnFlag && msgType != MessageTypeEnum.EMAIL_CODE && msgType != MessageTypeEnum.HTTP_CODE) { 35 | // JOptionPane.showMessageDialog(MainWindow.getInstance().getSettingPanel(), "\n请确认您了解所要发送消息类型的使用频率、使用规范和限制规则,\n" + 36 | // "以免账号相关功能被封禁等给您带来麻烦\n", "提示", 37 | // JOptionPane.INFORMATION_MESSAGE); 38 | // warnFlag = false; 39 | // } 40 | break; 41 | default: 42 | break; 43 | } 44 | } 45 | }); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/ui/panel/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/java/com/fangxuele/tool/push/ui/panel/.gitkeep -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/ConfigBaseUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import cn.hutool.core.io.FileUtil; 4 | import cn.hutool.core.util.CharsetUtil; 5 | import cn.hutool.setting.Setting; 6 | 7 | import java.io.File; 8 | 9 | /** 10 | *
11 |  * 配置管理基类
12 |  * 
13 | * 14 | * @author RememBerBer 15 | * @since 2017/6/14. 16 | */ 17 | public class ConfigBaseUtil { 18 | /** 19 | * 设置文件路径 20 | */ 21 | private String settingFilePath = SystemUtil.CONFIG_HOME + "config" + File.separator + "config.setting"; 22 | 23 | Setting setting; 24 | 25 | ConfigBaseUtil() { 26 | setting = new Setting(FileUtil.touch(settingFilePath), CharsetUtil.CHARSET_UTF_8, false); 27 | } 28 | 29 | public void setProps(String key, String value) { 30 | setting.put(key, value); 31 | } 32 | 33 | public String getProps(String key) { 34 | return setting.get(key); 35 | } 36 | 37 | /** 38 | * 存盘 39 | */ 40 | public void save() { 41 | setting.store(settingFilePath); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/ConsoleUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import cn.hutool.log.Log; 4 | import cn.hutool.log.LogFactory; 5 | import lombok.extern.slf4j.Slf4j; 6 | 7 | import java.io.BufferedWriter; 8 | 9 | /** 10 | *
11 |  * WePush控制台打印相关
12 |  * 
13 | * 14 | * @author Zhou Bo 15 | * @since 2019/6/12. 16 | */ 17 | @Slf4j 18 | public class ConsoleUtil { 19 | 20 | private static final Log logger = LogFactory.get(); 21 | 22 | public synchronized static void pushLog(BufferedWriter logWriter, String content) { 23 | try { 24 | logWriter.write(SqliteUtil.nowDateForSqlite() + " " + content); 25 | logWriter.newLine(); 26 | logWriter.flush(); 27 | } catch (Exception e) { 28 | logger.error(e.toString()); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/FileCharSetUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import cn.hutool.log.Log; 4 | import cn.hutool.log.LogFactory; 5 | import info.monitorenter.cpdetector.io.ASCIIDetector; 6 | import info.monitorenter.cpdetector.io.ByteOrderMarkDetector; 7 | import info.monitorenter.cpdetector.io.CodepageDetectorProxy; 8 | import info.monitorenter.cpdetector.io.JChardetFacade; 9 | import info.monitorenter.cpdetector.io.ParsingDetector; 10 | import info.monitorenter.cpdetector.io.UnicodeDetector; 11 | 12 | import java.io.File; 13 | import java.io.IOException; 14 | import java.nio.charset.Charset; 15 | import java.nio.charset.StandardCharsets; 16 | 17 | /** 18 | *
19 |  * 字符集工具类
20 |  * 
21 | * 22 | * @author RememBerBer 23 | * @since 2018/12/25. 24 | */ 25 | public class FileCharSetUtil { 26 | private static final Log logger = LogFactory.get(); 27 | 28 | /** 29 | * 获取文件字符集名称 30 | * 31 | * @param file 文件 32 | * @return 字符集名称 33 | */ 34 | public static String getCharSetName(File file) { 35 | logger.warn(getCharSet(file).name()); 36 | return getCharSet(file).name(); 37 | } 38 | 39 | /** 40 | * 获取文件字符集 41 | * 42 | * @param file 文件 43 | * @return 字符集 44 | */ 45 | public static Charset getCharSet(File file) { 46 | CodepageDetectorProxy detector = CodepageDetectorProxy.getInstance(); 47 | detector.add(new ByteOrderMarkDetector()); 48 | detector.add(new ParsingDetector(true)); 49 | detector.add(JChardetFacade.getInstance()); 50 | detector.add(ASCIIDetector.getInstance()); 51 | detector.add(UnicodeDetector.getInstance()); 52 | 53 | Charset charset = null; 54 | try { 55 | charset = detector.detectCodepage(file.toURI().toURL()); 56 | } catch (IOException e) { 57 | e.printStackTrace(); 58 | } 59 | if (charset != null) { 60 | return charset; 61 | } else { 62 | return StandardCharsets.UTF_8; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/HikariUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import com.fangxuele.tool.push.App; 4 | import com.zaxxer.hikari.HikariDataSource; 5 | 6 | import java.sql.Connection; 7 | import java.sql.PreparedStatement; 8 | import java.sql.ResultSet; 9 | import java.sql.SQLException; 10 | 11 | /** 12 | *
13 |  * Hikari连接池工具
14 |  * 
15 | * 16 | * @author RememBerBer 17 | * @since 2019/6/20. 18 | */ 19 | public class HikariUtil { 20 | private volatile static HikariDataSource hikariDataSource; 21 | 22 | /** 23 | * 获取数据源 24 | * 25 | * @return HikariDataSource 26 | */ 27 | public static HikariDataSource getHikariDataSource() { 28 | if (hikariDataSource == null || hikariDataSource.isClosed()) { 29 | synchronized (HikariUtil.class) { 30 | if (hikariDataSource == null || hikariDataSource.isClosed()) { 31 | String mysqlUrl = App.config.getMysqlUrl(); 32 | String mysqlUser = App.config.getMysqlUser(); 33 | String mysqlPassword = App.config.getMysqlPassword(); 34 | 35 | hikariDataSource = new HikariDataSource(); 36 | hikariDataSource.setJdbcUrl("jdbc:mysql://" + mysqlUrl); 37 | hikariDataSource.setUsername(mysqlUser); 38 | hikariDataSource.setPassword(mysqlPassword); 39 | } 40 | } 41 | } 42 | return hikariDataSource; 43 | } 44 | 45 | /** 46 | * 获取连接 47 | * 48 | * @return Connection 49 | * @throws SQLException SQLException 50 | */ 51 | public static Connection getConnection() throws SQLException { 52 | return getHikariDataSource().getConnection(); 53 | } 54 | 55 | /** 56 | * 执行查询 57 | * 58 | * @param sql sql 59 | * @return ResultSet 60 | */ 61 | public static ResultSet executeQuery(String sql) throws SQLException { 62 | PreparedStatement preparedStatement = getConnection().prepareStatement(sql); 63 | return preparedStatement.executeQuery(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/JTableUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import javax.swing.*; 4 | import javax.swing.table.DefaultTableCellRenderer; 5 | import javax.swing.table.TableColumn; 6 | import java.awt.*; 7 | 8 | /** 9 | *
10 |  * JTableUtil
11 |  * 
12 | * 13 | * @author RememBerBer 14 | * @since 2019/5/12. 15 | */ 16 | public class JTableUtil { 17 | /** 18 | * 隐藏表格中的某一列 19 | * 20 | * @param table 21 | * @param index 22 | */ 23 | public static void hideColumn(JTable table, int index) { 24 | TableColumn tableColumn = table.getColumnModel().getColumn(index); 25 | tableColumn.setMaxWidth(0); 26 | tableColumn.setMinWidth(0); 27 | tableColumn.setPreferredWidth(0); 28 | tableColumn.setWidth(0); 29 | 30 | table.getTableHeader().getColumnModel().getColumn(index).setMaxWidth(0); 31 | table.getTableHeader().getColumnModel().getColumn(index).setMinWidth(0); 32 | } 33 | 34 | /** 35 | * 隐藏表头 36 | * 37 | * @param table 38 | */ 39 | public static void hideTableHeader(JTable table) { 40 | table.getTableHeader().setVisible(false); 41 | DefaultTableCellRenderer renderer = new DefaultTableCellRenderer(); 42 | renderer.setPreferredSize(new Dimension(0, 0)); 43 | table.getTableHeader().setDefaultRenderer(renderer); 44 | } 45 | 46 | /** 47 | * 表头列名居左 48 | */ 49 | public static void setTableHeaderLeftAlignment(JTable table) { 50 | DefaultTableCellRenderer hr = (DefaultTableCellRenderer) table.getTableHeader() 51 | .getDefaultRenderer(); 52 | // 表头列名居左 53 | hr.setHorizontalAlignment(DefaultTableCellRenderer.LEFT); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/ScrollUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import javax.swing.*; 4 | 5 | /** 6 | * some functions about scroll 7 | * 8 | * @author RememBerBer 9 | * @since 2021/11/23. 10 | */ 11 | public class ScrollUtil { 12 | 13 | public static void smoothPane(JScrollPane scrollPane) { 14 | scrollPane.getVerticalScrollBar().setUnitIncrement(14); 15 | scrollPane.getHorizontalScrollBar().setUnitIncrement(14); 16 | scrollPane.getVerticalScrollBar().setDoubleBuffered(true); 17 | scrollPane.getHorizontalScrollBar().setDoubleBuffered(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/SqliteUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import org.apache.commons.lang3.time.DateFormatUtils; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | *
 9 |  * Sqlite相关工具
10 |  * 
11 | * 12 | * @author Zhou Bo 13 | * @since 2019/3/14. 14 | */ 15 | public class SqliteUtil { 16 | 17 | public static String nowDateForSqlite() { 18 | return DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/SystemUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import java.io.File; 4 | 5 | /** 6 | *
 7 |  * 系统工具
 8 |  * 
9 | * 10 | * @author RememBerBer 11 | * @since 2019/4/20. 12 | */ 13 | public class SystemUtil { 14 | private static final String OS_NAME = System.getProperty("os.name"); 15 | private static final String OS_ARCH = System.getProperty("os.arch"); 16 | private static final String VM_VENDOR = System.getProperty("java.vm.vendor"); 17 | private static final String USER_HOME = System.getProperty("user.home"); 18 | public static final String CONFIG_HOME = USER_HOME + File.separator + ".WePush5" + File.separator; 19 | /** 20 | * 日志文件路径 21 | */ 22 | public final static String LOG_DIR = USER_HOME + File.separator + ".WePush5" + File.separator + "logs" + File.separator; 23 | 24 | public static boolean isWindowsOs() { 25 | return OS_NAME.contains("Windows"); 26 | } 27 | public static boolean isMacOs() { 28 | return OS_NAME.contains("Mac"); 29 | } 30 | 31 | public static boolean isLinuxOs() { 32 | return OS_NAME.contains("Linux"); 33 | } 34 | 35 | public static boolean isMacM1() { 36 | return OS_NAME.contains("Mac") && "aarch64".equals(OS_ARCH); 37 | } 38 | 39 | public static boolean isJBR() { 40 | return VM_VENDOR.contains("JetBrains"); 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/TemplateUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import cn.hutool.core.date.DateUtil; 4 | import com.fangxuele.tool.push.logic.PushControl; 5 | import com.fangxuele.tool.push.logic.msgsender.WxMpTemplateMsgSender; 6 | import me.chanjar.weixin.common.error.WxErrorException; 7 | import me.chanjar.weixin.mp.api.WxMpService; 8 | import org.apache.velocity.VelocityContext; 9 | import org.apache.velocity.app.VelocityEngine; 10 | 11 | import java.io.StringWriter; 12 | import java.util.Date; 13 | 14 | /** 15 | *
16 |  * 模板工具
17 |  * 
18 | * 19 | * @author RememBerBer 20 | * @since 2019/1/5. 21 | */ 22 | public class TemplateUtil { 23 | 24 | private static VelocityEngine velocityEngine; 25 | 26 | static { 27 | velocityEngine = new VelocityEngine(); 28 | velocityEngine.init(); 29 | } 30 | 31 | public static String evaluate(String content, VelocityContext velocityContext) { 32 | 33 | if (content.contains("NICK_NAME")) { 34 | WxMpService wxMpService = WxMpTemplateMsgSender.getWxMpService(); 35 | String nickName = ""; 36 | try { 37 | nickName = wxMpService.getUserService().userInfo(velocityContext.get(PushControl.TEMPLATE_VAR_PREFIX + "0").toString()).getNickname(); 38 | } catch (WxErrorException e) { 39 | e.printStackTrace(); 40 | } 41 | velocityContext.put("NICK_NAME", nickName); 42 | } 43 | 44 | velocityContext.put("ENTER", "\n"); 45 | Date now = new Date(); 46 | velocityContext.put("DATE", DateUtil.today()); 47 | velocityContext.put("TIME", DateUtil.formatTime(now)); 48 | velocityContext.put("DATE_TIME", DateUtil.formatDateTime(now)); 49 | 50 | StringWriter writer = new StringWriter(); 51 | velocityEngine.evaluate(velocityContext, writer, "", content); 52 | 53 | return writer.toString(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/fangxuele/tool/push/util/UndoUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | 5 | import javax.swing.text.JTextComponent; 6 | import javax.swing.undo.UndoManager; 7 | import java.awt.event.KeyEvent; 8 | import java.awt.event.KeyListener; 9 | import java.lang.reflect.Field; 10 | 11 | /** 12 | *
13 |  * 撤销/重做工具
14 |  * 
15 | * 16 | * @author Zhou Bo 17 | * @since 2019/8/9. 18 | */ 19 | @Slf4j 20 | public class UndoUtil { 21 | 22 | /** 23 | * 给对象中的文本框和文本域添加撤销/重做事件 24 | * 25 | * @param object 26 | */ 27 | public static void register(Object object) { 28 | Class strClass = object.getClass(); 29 | Field[] declaredFields = strClass.getDeclaredFields(); 30 | for (Field field : declaredFields) { 31 | if (JTextComponent.class.isAssignableFrom(field.getType())) { 32 | UndoManager undoManager = new UndoManager(); 33 | try { 34 | field.setAccessible(true); 35 | ((JTextComponent) field.get(object)).getDocument().addUndoableEditListener(undoManager); 36 | ((JTextComponent) field.get(object)).addKeyListener(new KeyListener() { 37 | @Override 38 | public void keyReleased(KeyEvent arg0) { 39 | } 40 | 41 | @Override 42 | public void keyPressed(KeyEvent evt) { 43 | if (evt.isControlDown() && evt.getKeyCode() == KeyEvent.VK_Z) { 44 | if (undoManager.canUndo()) { 45 | undoManager.undo(); 46 | } 47 | } 48 | if (evt.isControlDown() && evt.getKeyCode() == KeyEvent.VK_Y) { 49 | if (undoManager.canRedo()) { 50 | undoManager.redo(); 51 | } 52 | } 53 | } 54 | 55 | @Override 56 | public void keyTyped(KeyEvent arg0) { 57 | } 58 | }); 59 | } catch (IllegalAccessException e) { 60 | log.error(e.toString()); 61 | } 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/lib/taobao-sdk-java-auto.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/lib/taobao-sdk-java-auto.jar -------------------------------------------------------------------------------- /src/main/resources/generatorConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 43 | 46 | 47 | 48 |
49 | 50 |
51 |
-------------------------------------------------------------------------------- /src/main/resources/icon/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/add.png -------------------------------------------------------------------------------- /src/main/resources/icon/add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/add@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/add@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/analyze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/analyze.png -------------------------------------------------------------------------------- /src/main/resources/icon/analyze@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/analyze@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/arrow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/arrow_left.png -------------------------------------------------------------------------------- /src/main/resources/icon/arrow_left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/arrow_left@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/arrow_right.png -------------------------------------------------------------------------------- /src/main/resources/icon/arrow_right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/arrow_right@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/clear.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/clock.png -------------------------------------------------------------------------------- /src/main/resources/icon/clock@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/clock@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/data_base.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/debug.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/detail.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/export.png -------------------------------------------------------------------------------- /src/main/resources/icon/export.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/export@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/export@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/export@2x_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/export@2x_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/export_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/export_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/favorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/favorite.png -------------------------------------------------------------------------------- /src/main/resources/icon/favorite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/favorite@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/feature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/feature.png -------------------------------------------------------------------------------- /src/main/resources/icon/feature@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/feature@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/file-open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/find.png -------------------------------------------------------------------------------- /src/main/resources/icon/find.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/find@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/find@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/find@2x_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/find@2x_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/findPlain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/findPlain.png -------------------------------------------------------------------------------- /src/main/resources/icon/findPlain@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/findPlain@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/findWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/findWhite.png -------------------------------------------------------------------------------- /src/main/resources/icon/findWhite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/findWhite@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/find_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/find_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/forceRefresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/forceRefresh.png -------------------------------------------------------------------------------- /src/main/resources/icon/forceRefresh@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/forceRefresh@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/fromVCS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/fromVCS.png -------------------------------------------------------------------------------- /src/main/resources/icon/fromVCS@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/fromVCS@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/help-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/help.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/helpButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/helpButton.png -------------------------------------------------------------------------------- /src/main/resources/icon/helpButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/helpButton@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/helpButtonFocused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/helpButtonFocused.png -------------------------------------------------------------------------------- /src/main/resources/icon/helpButtonFocused@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/helpButtonFocused@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/icon_push.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/import.png -------------------------------------------------------------------------------- /src/main/resources/icon/import.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/import@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/import@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/import@2x_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/import@2x_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/import_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/import_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/loading_dark.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/loading_dark.gif -------------------------------------------------------------------------------- /src/main/resources/icon/logo-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-1024.png -------------------------------------------------------------------------------- /src/main/resources/icon/logo-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-128.png -------------------------------------------------------------------------------- /src/main/resources/icon/logo-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-16.png -------------------------------------------------------------------------------- /src/main/resources/icon/logo-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-24.png -------------------------------------------------------------------------------- /src/main/resources/icon/logo-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-256.png -------------------------------------------------------------------------------- /src/main/resources/icon/logo-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-32.png -------------------------------------------------------------------------------- /src/main/resources/icon/logo-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-48.png -------------------------------------------------------------------------------- /src/main/resources/icon/logo-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-512.png -------------------------------------------------------------------------------- /src/main/resources/icon/logo-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/logo-64.png -------------------------------------------------------------------------------- /src/main/resources/icon/menu-saveall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/menu-saveall.png -------------------------------------------------------------------------------- /src/main/resources/icon/menu-saveall@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/menu-saveall@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/menu-saveall@2x_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/menu-saveall@2x_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/menu-saveall_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/menu-saveall_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/modify.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/number.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/pause.png -------------------------------------------------------------------------------- /src/main/resources/icon/pause@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/pause@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/people.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/preview.png -------------------------------------------------------------------------------- /src/main/resources/icon/preview@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/preview@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/preview@2x_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/preview@2x_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/preview_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/preview_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/qiwei.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/refresh.png -------------------------------------------------------------------------------- /src/main/resources/icon/refresh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/refresh@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/refresh@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/remove.png -------------------------------------------------------------------------------- /src/main/resources/icon/remove.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/remove@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/remove@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/remove@2x_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/remove@2x_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/remove_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/remove_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/run.png -------------------------------------------------------------------------------- /src/main/resources/icon/run@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/run@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/save.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/saveTempConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/saveTempConfig.png -------------------------------------------------------------------------------- /src/main/resources/icon/saveTempConfig@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/saveTempConfig@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/schedule.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/selectall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/selectall.png -------------------------------------------------------------------------------- /src/main/resources/icon/selectall@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/selectall@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/selectall@2x_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/selectall@2x_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/selectall_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/selectall_dark.png -------------------------------------------------------------------------------- /src/main/resources/icon/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/send.png -------------------------------------------------------------------------------- /src/main/resources/icon/send.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/stop.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/icon/suspend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/suspend.png -------------------------------------------------------------------------------- /src/main/resources/icon/suspend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/suspend@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/weixin-qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/weixin-qrcode.png -------------------------------------------------------------------------------- /src/main/resources/icon/winHelp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/winHelp.png -------------------------------------------------------------------------------- /src/main/resources/icon/winHelp@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/winHelp@2x.png -------------------------------------------------------------------------------- /src/main/resources/icon/wx-zanshang.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/icon/wx-zanshang.jpg -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} :%line - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | ${user.home}/.WePush5/logs/wechat-push.%d{yyyy-MM-dd}.log 12 | 13 | 14 | %date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} :%line - %msg%n 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/page/help.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |

How WePush can help(工作原理)?

4 |

通过多线程实现快速批量发送各类微信短信等消息

5 |

目前支持:微信模板消息-公众号、模板消息-小程序、微信客服消息、阿里云短信、阿里大于模板短信、腾讯云短信、云片网短信

6 |

可扩展,后续会继续支持更多消息类型

7 |
8 | 9 |

WePush适用哪些场景?

10 |

可能的场景如:

11 |

批量发送奖励、活动、等各类通知

12 |

批量发放消费码、券等

13 |

批量发送各类服务通知

14 |

微信服务号各种模板消息

15 |

……

16 |
17 | 18 |

通常的执行流程?

19 |

①编辑消息->②准备目标用户->③开始推送->④推送完毕,保存结果数据

20 |
21 | 22 |

①编辑消息:

23 |

点击“新建任务”

24 |

选择“消息类型”,填写任务名称,编辑消息内容

25 |

填写能够预览消息的用户openid/手机号,点击“预览消息”

26 |

预览成功,内容符合预期后,点击“保存”

27 |
28 | 29 |

②准备目标用户:

30 |

可根据需要,通过文件(csv/txt),SQL,微信公众平台或历史推送数据等导入用户数据

31 |

csv文件格式示例:

32 | WePush 33 |

txt文件格式示例:

34 | WePush 35 |
36 | 37 |

③开始推送:

38 |

勾选“空跑”,点击“开始”

39 |

空跑可以预览整个推送过程,空跑模式不会真正发送消息给用户

40 |

此时可以调整“每页分配用户数”和“每个线程分配的页数”,进而调整推送的线程数

41 |

空跑没问题后,取消勾选“空跑”,点击开始,正式推送开始,等待推送完毕

42 |
43 | 44 |

④推送完毕:

45 |

推送完毕后会提示保存此次推送成功、推送失败和未推送的数据

46 |
47 | 48 |

变量消息及如何设置变量消息?

49 |

当每个用户推送的消息有区别时需要使用变量消息

50 |

目前只支持从文件导入,通过SQL导入和全员推送不支持变量消息

51 |
52 | 53 |

编辑消息时增加变量以及在预览时的设置示例:

54 | WePush 55 |

56 |

编辑消息时增加变量以及在从文件导入时的设置示例:

57 | WePush 58 |

59 |

注意:2.3.3及以后版本的变量消息命名方式变更为velocity模板格式,且变量命名为var1,var2,var3……

60 | WePush 61 |

62 |

最终效果示例:

63 | WePush 64 |

65 | 66 |

暂停/中断后怎样继续?

67 |

暂停后WePush会自动保存已发送和未发送的数据

68 |

在“准备目标用户”tab下的“从历史导入”可以选择这部分数据继续发送

69 |
70 | 71 |

发送预览消息失败如何处理?

72 |

根据提示的错误解决就行了

73 |

常见的问题有:模板ID不正确,ip地址不在公众号安全设置的白名单中等

74 |
75 | 76 |

推送微信消息需要满足的条件?

77 |

公众号需要是认证的服务号,且开通了开发者模式

78 |

在WePush设置中正确填写对应的APPID等参数并保存

79 |
80 | 81 |

通过SQL导入需要怎么写?

82 |

只要查询出的结果集只有一列openid(短信时对应的是手机号)就可以,列名不重要

83 |
-------------------------------------------------------------------------------- /src/main/resources/page/img/csv-data-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/page/img/csv-data-demo.png -------------------------------------------------------------------------------- /src/main/resources/page/img/txt-data-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/page/img/txt-data-demo.png -------------------------------------------------------------------------------- /src/main/resources/page/img/var-msg-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/page/img/var-msg-1.png -------------------------------------------------------------------------------- /src/main/resources/page/img/var-msg-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/page/img/var-msg-2.png -------------------------------------------------------------------------------- /src/main/resources/page/img/var-msg-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/page/img/var-msg-3.png -------------------------------------------------------------------------------- /src/main/resources/page/img/var-msg-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberber/WePush/2f5105fd8fea6d57e620d037a84128ae8fa8ff59/src/main/resources/page/img/var-msg-4.png -------------------------------------------------------------------------------- /src/main/resources/upgrade/4.sql: -------------------------------------------------------------------------------- 1 | alter table t_task 2 | add interval_push integer; 3 | alter table t_task 4 | add interval_time integer; -------------------------------------------------------------------------------- /src/main/resources/version_summary.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentVersion": "v_5.0.5", 3 | "versionIndex": { 4 | "v_0.0.0": "0", 5 | "v_5.0.0": "1", 6 | "v_5.0.1": "2", 7 | "v_5.0.2": "3", 8 | "v_5.0.3": "4", 9 | "v_5.0.4": "5", 10 | "v_5.0.5": "6" 11 | }, 12 | "versionDetailList": [ 13 | { 14 | "version": "v_0.0.0", 15 | "title": "UI细节调整,优化依赖和资源链接", 16 | "log": "● UI细节调整\n● 优化了maven依赖\n● 调整了资源链接\n" 17 | }, 18 | { 19 | "version": "v_5.0.0", 20 | "title": "5.0全新改版升级", 21 | "log": "● 新增任务机制\n● 多账号模式\n● 简化交互流程\n● UI调整,沉浸式窗口,优化macOS下体验\n● 更多细节等你发现\n● 该版本重构改动较大,未经充分测试,有问题可退回使用4.x版本,之前的数据还在\n" 22 | }, 23 | { 24 | "version": "v_5.0.1", 25 | "title": "针对5.0新版多处修复和优化", 26 | "log": "● 任务:修复任务执行状态更新不及时的问题\n● 窗口:优化esc键最小化后窗口再次恢复的表现\n● 修复excel导入提示缺少依赖的问题\n● 任务:修复任务详情成功失败文件路径不实时显示的问题\n● 增加执行前重新导入目标用户功能\n● 任务详情增加模式和线程数等更多细节展示\n" 27 | }, 28 | { 29 | "version": "v_5.0.2", 30 | "title": "增加支持腾讯云短信3.0", 31 | "log": "● 增加支持腾讯云短信3.0,由于没有条件,无法充分验证\n● 企业微信消息:支持私有化部署时BaseApiUrl配置\n● 全局:优化窗口关闭时的行为,避免再次点击任务栏图标无法唤出窗口\n" 32 | }, 33 | { 34 | "version": "v_5.0.3", 35 | "title": "使用Java21虚拟线程", 36 | "log": "● 全局:升级Java版本至Java21\n● 推送:固定线程模式下使用虚拟线程,线程数可以放心随意增大\n● 推送:支持设置推送间隔,避免超过频率限制\n● 消息:邮件,修复消息编辑tab邮件正文回显不正确的问题\n● 消息:企业微信,修复消息编辑tab内容回显不正确的问题\n● 消息:企业微信,修复初始打开时 “图文消息编辑框不一致” 问题\n● 任务:去掉保存成功时的弹框提示\n● 账号:企业微信,修复初始打开时 “私有BaseApiUrl” 可见性问题\n" 37 | }, 38 | { 39 | "version": "v_5.0.4", 40 | "title": "修复微信企业号/企业微信导入用户时因性别参数不支持而报错的问题", 41 | "log": "● 修复微信企业号/企业微信导入用户时因性别参数不支持而报错的问题\n● 升级部分依赖\n" 42 | }, 43 | { 44 | "version": "v_5.0.5", 45 | "title": "修复macOS15下无法启动的问题", 46 | "log": "● 修复macOS15下无法启动的问题\n● 调整macOS下的图标\n● 升级部分依赖\n" 47 | } 48 | ] 49 | } -------------------------------------------------------------------------------- /src/main/resources/wepush_qrcode.json: -------------------------------------------------------------------------------- 1 | { 2 | "url": "http://download.zhoubochina.com/file/wx-zanshang.jpg" 3 | } -------------------------------------------------------------------------------- /src/test/java/com/fangxuele/tool/push/util/CommonTest.java: -------------------------------------------------------------------------------- 1 | package com.fangxuele.tool.push.util; 2 | 3 | import org.junit.Test; 4 | 5 | import java.awt.*; 6 | 7 | /** 8 | *
 9 |  * 通用测试
10 |  * 
11 | * 12 | * @author Zhou Bo 13 | * @since 2019/6/17. 14 | */ 15 | public class CommonTest { 16 | 17 | @Test 18 | public void testGetSysFonts() { 19 | GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); 20 | String[] fonts = ge.getAvailableFontFamilyNames(); 21 | for (String font : fonts) { 22 | System.err.println(font); 23 | } 24 | } 25 | } 26 | --------------------------------------------------------------------------------