Skip to content

Commit

Permalink
Merge pull request #214 from rememberber/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rememberber committed Sep 3, 2019
2 parents de2db1f + 227b9c7 commit 79578de
Show file tree
Hide file tree
Showing 28 changed files with 200 additions and 1,044 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
language: java

before_install:
- mvn install:install-file -Dfile=./lib/darcula.jar -DgroupId=com.darcula -DartifactId=darcula-lnf -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true
- mvn install:install-file -Dfile=./lib/beautyeye_lnf.jar -DgroupId=com.beautyeye -DartifactId=beautyeye-lnf -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true
- mvn install:install-file -Dfile=./lib/taobao-sdk-java.jar -DgroupId=com.taobao -DartifactId=top-auto-sdk -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true
- mvn install:install-file -Dfile=./lib/weblaf-1.29.jar -DgroupId=com.weblaf -DartifactId=weblaf-lnf -Dpackaging=jar -Dversion=1.2.9 -DgeneratePom=true -DcreateChecksum=true
- 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
- 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
- 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
- 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
- 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
- mvn install:install-file -Dfile=./lib/beautyeye_lnf.jar -DgroupId=com.beautyeye -DartifactId=beautyeye-lnf -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true
- 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
- 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
- mvn install:install-file -Dfile=./lib/darcula.jar -DgroupId=com.darcula -DartifactId=darcula-lnf -Dpackaging=jar -Dversion=1.0 -DgeneratePom=true -DcreateChecksum=true
- 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
- 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
- mvn install:install-file -Dfile=./lib/weblaf-1.29.jar -DgroupId=com.weblaf -DartifactId=weblaf-lnf -Dpackaging=jar -Dversion=1.2.9 -DgeneratePom=true -DcreateChecksum=true

jdk:
- openjdk8
Expand Down
Binary file removed lib/aliyun-java-sdk-dysmsapi-1.0.0.jar
Binary file not shown.
Binary file added lib/taobao-sdk-java-auto.jar
Binary file not shown.
Binary file removed lib/taobao-sdk-java.jar
Binary file not shown.
44 changes: 14 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<HikariCP.version>3.3.1</HikariCP.version>
<quartz.version>2.3.1</quartz.version>
<okhttp.version>4.0.1</okhttp.version>
<aliyun-java-sdk-dysmsapi.version>1.1.0</aliyun-java-sdk-dysmsapi.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -229,18 +230,6 @@
<version>1.0</version>
</dependency>

<dependency>
<groupId>com.taobao</groupId>
<artifactId>top-auto-sdk</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>1.0.0</version>
</dependency>

<!--文件字符集格式检测-->
<dependency>
<groupId>net.sourceforge.cpdetector</groupId>
Expand All @@ -262,6 +251,11 @@
<artifactId>jargs</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.taobao</groupId>
<artifactId>taobao-sdk-java-auto</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
Expand Down Expand Up @@ -303,6 +297,11 @@
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>${aliyun-java-sdk-dysmsapi.version}</version>
</dependency>

</dependencies>

Expand Down Expand Up @@ -393,27 +392,12 @@
</goals>
</execution>
<execution>
<id>install-taobao-sdk</id>
<id>install-taobao-sdk-auto</id>
<phase>clean</phase>
<configuration>
<file>lib/taobao-sdk-java.jar</file>
<file>lib/taobao-sdk-java-auto.jar</file>
<groupId>com.taobao</groupId>
<artifactId>top-auto-sdk</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
<execution>
<id>install-alysms-sdk</id>
<phase>clean</phase>
<configuration>
<file>lib/aliyun-java-sdk-dysmsapi-1.0.0.jar</file>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<artifactId>taobao-sdk-java-auto</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public enum MessageTypeEnum {
KEFU(3, "公众号-客服消息"),
KEFU_PRIORITY(4, "公众号-客服消息优先"),
ALI_YUN(5, "阿里云短信"),
ALI_TEMPLATE(6, "阿里大于模板短信"),
TX_YUN(7, "腾讯云短信"),
YUN_PIAN(8, "云片网短信"),
UP_YUN(9, "又拍云短信"),
Expand All @@ -35,7 +34,6 @@ public enum MessageTypeEnum {
public static final int KEFU_CODE = 3;
public static final int KEFU_PRIORITY_CODE = 4;
public static final int ALI_YUN_CODE = 5;
public static final int ALI_TEMPLATE_CODE = 6;
public static final int TX_YUN_CODE = 7;
public static final int YUN_PIAN_CODE = 8;
public static final int UP_YUN_CODE = 9;
Expand Down Expand Up @@ -67,9 +65,6 @@ public static String getName(int code) {
case 5:
name = ALI_YUN.name;
break;
case 6:
name = ALI_TEMPLATE.name;
break;
case 7:
name = TX_YUN.name;
break;
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/com/fangxuele/tool/push/logic/PushControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,6 @@ public static boolean configCheck() {
return false;
}
break;
case MessageTypeEnum.ALI_TEMPLATE_CODE:
String aliServerUrl = App.config.getAliServerUrl();
String aliAppKey = App.config.getAliAppKey();
String aliAppSecret = App.config.getAliAppSecret();

if (StringUtils.isEmpty(aliServerUrl) || StringUtils.isEmpty(aliAppKey)
|| StringUtils.isEmpty(aliAppSecret)) {
JOptionPane.showMessageDialog(settingForm.getSettingPanel(),
"请先在设置中填写并保存阿里大于相关配置!", "提示",
JOptionPane.INFORMATION_MESSAGE);
return false;
}
break;
case MessageTypeEnum.ALI_YUN_CODE:
String aliyunAccessKeyId = App.config.getAliyunAccessKeyId();
String aliyunAccessKeySecret = App.config.getAliyunAccessKeySecret();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ public static IMsgMaker getMsgMaker() {
case MessageTypeEnum.ALI_YUN_CODE:
iMsgMaker = new AliyunMsgMaker();
break;
case MessageTypeEnum.ALI_TEMPLATE_CODE:
iMsgMaker = new AliTemplateMsgMaker();
break;
case MessageTypeEnum.TX_YUN_CODE:
iMsgMaker = new TxYunMsgMaker();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ public class WxCpMsgMaker extends BaseMsgMaker implements IMsgMaker {
*/
@Override
public void prepare() {
agentId = WxCpMsgForm.appNameToAgentIdMap.get(WxCpMsgForm.getInstance().getAppNameComboBox().getSelectedItem());
String agentIdBefore = agentId;
String agentIdNow = WxCpMsgForm.appNameToAgentIdMap.get(WxCpMsgForm.getInstance().getAppNameComboBox().getSelectedItem());
if (agentIdBefore == null || !agentIdBefore.equals(agentIdNow)) {
WxCpMsgSender.wxCpConfigStorage = null;
WxCpMsgSender.wxCpService = null;
}
msgType = (String) WxCpMsgForm.getInstance().getMsgTypeComboBox().getSelectedItem();
msgTitle = WxCpMsgForm.getInstance().getTitleTextField().getText();
picUrl = WxCpMsgForm.getInstance().getPicUrlTextField().getText().trim();
desc = WxCpMsgForm.getInstance().getDescTextField().getText();
url = WxCpMsgForm.getInstance().getUrlTextField().getText().trim();
btnTxt = WxCpMsgForm.getInstance().getBtnTxtTextField().getText().trim();
msgContent = WxCpMsgForm.getInstance().getContentTextArea().getText();
WxCpMsgSender.wxCpConfigStorage = null;
WxCpMsgSender.wxCpService = null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.fangxuele.tool.push.logic.msgmaker;

import com.fangxuele.tool.push.logic.msgsender.WxMpTemplateMsgSender;
import com.fangxuele.tool.push.ui.form.msg.KefuMsgForm;
import com.fangxuele.tool.push.util.TemplateUtil;
import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage;
Expand Down Expand Up @@ -39,8 +38,6 @@ public void prepare() {
msgKefuDesc = KefuMsgForm.getInstance().getMsgKefuDescTextField().getText();
msgKefuUrl = KefuMsgForm.getInstance().getMsgKefuUrlTextField().getText();
msgKefuMsgContent = KefuMsgForm.getInstance().getContentTextArea().getText();
WxMpTemplateMsgSender.wxMpConfigStorage = null;
WxMpTemplateMsgSender.wxMpService = null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import cn.binarywang.wx.miniapp.bean.WxMaTemplateData;
import cn.binarywang.wx.miniapp.bean.WxMaTemplateMessage;
import com.fangxuele.tool.push.bean.TemplateData;
import com.fangxuele.tool.push.logic.msgsender.WxMaTemplateMsgSender;
import com.fangxuele.tool.push.ui.form.msg.MaTemplateMsgForm;
import com.fangxuele.tool.push.util.TemplateUtil;
import org.apache.commons.compress.utils.Lists;
Expand Down Expand Up @@ -54,8 +53,6 @@ public void prepare() {
templateData.setColor(color);
templateDataList.add(templateData);
}
WxMaTemplateMsgSender.wxMaConfigStorage = null;
WxMaTemplateMsgSender.wxMaService = null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.fangxuele.tool.push.logic.msgmaker;

import com.fangxuele.tool.push.bean.TemplateData;
import com.fangxuele.tool.push.logic.msgsender.WxMpTemplateMsgSender;
import com.fangxuele.tool.push.ui.form.msg.MpTemplateMsgForm;
import com.fangxuele.tool.push.util.TemplateUtil;
import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
Expand Down Expand Up @@ -61,8 +60,6 @@ public void prepare() {
templateDataList.add(templateData);
}

WxMpTemplateMsgSender.wxMpConfigStorage = null;
WxMpTemplateMsgSender.wxMpService = null;
}

/**
Expand Down
Loading

0 comments on commit 79578de

Please sign in to comment.