Skip to content

Commit

Permalink
Merge pull request #151 from rememberber/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rememberber committed Jun 19, 2019
2 parents 26cff07 + 5cd84b1 commit 36e48ba
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 44 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Project exclude paths
/target/
/target/
/.idea/
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private static WxMaInMemoryConfig wxMaConfigStorage() {
//空闲链接的检测周期(单位ms)
clientBuilder.setCheckWaitTime(60000);
//每路最大连接数
clientBuilder.setMaxConnPerHost(App.config.getMaxThreadPool());
clientBuilder.setMaxConnPerHost(App.config.getMaxThreadPool() * 2);
//连接池最大连接数
clientBuilder.setMaxTotalConn(App.config.getMaxThreadPool() * 2);
//HttpClient请求时使用的User Agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private static WxMpInMemoryConfigStorage wxMpConfigStorage() {
//空闲链接的检测周期(单位ms)
clientBuilder.setCheckWaitTime(60000);
//每路最大连接数
clientBuilder.setMaxConnPerHost(App.config.getMaxThreadPool());
clientBuilder.setMaxConnPerHost(App.config.getMaxThreadPool() * 2);
//连接池最大连接数
clientBuilder.setMaxTotalConn(App.config.getMaxThreadPool() * 2);
//HttpClient请求时使用的User Agent
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/fangxuele/tool/push/ui/UiConsts.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class UiConsts {
* 软件名称,版本
*/
public final static String APP_NAME = "WePush";
public final static String APP_VERSION = "v_3.3.0_190608";
public final static String APP_VERSION = "v_3.4.0_190619";

/**
* 主窗口图标-大
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static void init(String msgName) {
String kefuMsgType = tMsgKefuPriority.getKefuMsgType();
KefuMsgForm.kefuMsgForm.getMsgKefuMsgTypeComboBox().setSelectedItem(kefuMsgType);
if ("文本消息".equals(kefuMsgType)) {
KefuMsgForm.kefuMsgForm.getMsgKefuMsgTitleTextField().setText(tMsgKefuPriority.getContent());
KefuMsgForm.kefuMsgForm.getContentTextArea().setText(tMsgKefuPriority.getContent());
} else if ("图文消息".equals(kefuMsgType)) {
KefuMsgForm.kefuMsgForm.getMsgKefuMsgTitleTextField().setText(tMsgKefuPriority.getTitle());
}
Expand All @@ -53,7 +53,7 @@ public static void init(String msgName) {

KefuMsgForm.switchKefuMsgType(kefuMsgType);

MpTemplateMsgForm.initTemplateDataTable();
MpTemplateMsgForm.selectedMsgTemplateId = tMsgKefuPriority.getTemplateId();
// 模板消息Data表
List<TTemplateData> templateDataList = templateDataMapper.selectByMsgTypeAndMsgId(MessageTypeEnum.KEFU_PRIORITY_CODE, msgId);
String[] headerNames = {"Name", "Value", "Color", "操作"};
Expand All @@ -80,6 +80,7 @@ public static void init(String msgName) {
} else {
KefuMsgForm.switchKefuMsgType("图文消息");
}
MpTemplateMsgForm.initTemplateList();
}

public static void save(String msgName) {
Expand All @@ -103,6 +104,7 @@ public static void save(String msgName) {
String templateId = MpTemplateMsgForm.mpTemplateMsgForm.getMsgTemplateIdTextField().getText();
String templateUrl = MpTemplateMsgForm.mpTemplateMsgForm.getMsgTemplateUrlTextField().getText();
String kefuMsgType = Objects.requireNonNull(KefuMsgForm.kefuMsgForm.getMsgKefuMsgTypeComboBox().getSelectedItem()).toString();
String kefuMsgContent = KefuMsgForm.kefuMsgForm.getContentTextArea().getText();
String kefuMsgTitle = KefuMsgForm.kefuMsgForm.getMsgKefuMsgTitleTextField().getText();
String kefuPicUrl = KefuMsgForm.kefuMsgForm.getMsgKefuPicUrlTextField().getText();
String kefuDesc = KefuMsgForm.kefuMsgForm.getMsgKefuDescTextField().getText();
Expand All @@ -120,7 +122,7 @@ public static void save(String msgName) {
tMsgKefuPriority.setMaAppid(templateMiniAppid);
tMsgKefuPriority.setMaPagePath(templateMiniPagePath);
tMsgKefuPriority.setKefuMsgType(kefuMsgType);
tMsgKefuPriority.setContent(kefuMsgTitle);
tMsgKefuPriority.setContent(kefuMsgContent);
tMsgKefuPriority.setTitle(kefuMsgTitle);
tMsgKefuPriority.setImgUrl(kefuPicUrl);
tMsgKefuPriority.setDescribe(kefuDesc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ public class MpTemplateMsgForm {
*/
public static String selectedMsgTemplateId;

/**
* (选择模板ComboBox)所选模板对应的模板ID
*/
public static String selectedComboBoxTemplateId;

/**
* 是否需要监听模板列表ComboBox
*/
Expand Down Expand Up @@ -143,16 +138,10 @@ public MpTemplateMsgForm() {
templateListComboBox.addItemListener(e -> {
if (needListenTemplateListComboBox && e.getStateChange() == ItemEvent.SELECTED) {
clearAllField();
int index = mpTemplateMsgForm.getTemplateListComboBox().getSelectedIndex();
String templateId = "";
if (templateList != null && templateList.size() > 0) {
templateId = templateList.get(index).getTemplateId();
}
selectedComboBoxTemplateId = templateId;
fillWxTemplateContentToField(templateId);
fillWxTemplateContentToField();
}
});
autoFillButton.addActionListener(e -> autoFillTemplateDataTable(selectedComboBoxTemplateId));
autoFillButton.addActionListener(e -> autoFillTemplateDataTable());
refreshTemplateListButton.addActionListener(e -> {
initTemplateList();
initTemplateDataTable();
Expand Down Expand Up @@ -229,14 +218,7 @@ public static void initTemplateList() {

mpTemplateMsgForm.getTemplateListComboBox().setSelectedIndex(selectedIndex);

if (templateList != null && templateList.size() > 0) {
selectedComboBoxTemplateId = templateList.get(0).getTemplateId();
}
if (selectedMsgTemplateId != null) {
selectedComboBoxTemplateId = selectedMsgTemplateId;
}

fillWxTemplateContentToField(selectedComboBoxTemplateId);
fillWxTemplateContentToField();
} catch (Exception e) {
log.error(e.toString());
}
Expand All @@ -260,11 +242,9 @@ public static List<String> getTemplateParams(String templateContent) {

/**
* 根据模板id填充模板列表中对应的WxTemplate内容到表单
*
* @param templateId
*/
public static void fillWxTemplateContentToField(String templateId) {
WxMpTemplate wxMpTemplate = templateMap.get(templateId);
public static void fillWxTemplateContentToField() {
WxMpTemplate wxMpTemplate = templateList.get(mpTemplateMsgForm.getTemplateListComboBox().getSelectedIndex());
if (wxMpTemplate != null) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("-----------模板ID-----------\n").append(wxMpTemplate.getTemplateId()).append("\n");
Expand All @@ -278,12 +258,10 @@ public static void fillWxTemplateContentToField(String templateId) {

/**
* 自动填充模板数据Table
*
* @param templateId templateId
*/
private static void autoFillTemplateDataTable(String templateId) {
if (templateId != null && templateMap != null) {
WxMpTemplate wxMpTemplate = templateMap.get(templateId);
private static void autoFillTemplateDataTable() {
if (templateList != null) {
WxMpTemplate wxMpTemplate = templateList.get(mpTemplateMsgForm.getTemplateListComboBox().getSelectedIndex());
if (wxMpTemplate != null) {
initTemplateDataTable();
DefaultTableModel tableModel = (DefaultTableModel) mpTemplateMsgForm.getTemplateMsgDataTable()
Expand Down
10 changes: 8 additions & 2 deletions src/main/resources/version_summary.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"currentVersion": "v_3.3.0_190608",
"currentVersion": "v_3.4.0_190619",
"versionIndex": {
"v_1.1.0_170701": "0",
"v_1.2.0_170831": "1",
Expand All @@ -25,7 +25,8 @@
"v_3.1.0_190524": "21",
"v_3.2.0_190601": "22",
"v_3.2.1_190603": "23",
"v_3.3.0_190608": "24"
"v_3.3.0_190608": "24",
"v_3.4.0_190619": "25"
},
"versionDetailList": [
{
Expand Down Expand Up @@ -152,6 +153,11 @@
"version": "v_3.3.0_190608",
"title": "微信相关消息支持使用http代理+优化连接池+全局帮助",
"log": "● 增加全局帮助对话框\n● 版本更新对话框优化,避免更新日志过多显示不下\n● 根据屏幕DPI自动初始化字号\n● 短信编辑form调整\n● 优化微信相关消息发送时连接获取超时的问题\n● 微信相关消息类型增加Http代理设置\n● 第一次安装时增加字号大小设置引导\n● 消息编辑深度梳理大规模重构\n"
},
{
"version": "v_3.4.0_190619",
"title": "自动获取微信公众号可选模板+模板参数自动填充",
"log": "● 自动获取微信公众号可选模板\n● 模板参数自动填充\n● 客服消息文本类型输入区域优化\n● UI调整,消息编辑可见范围不受屏幕分辨率限制\n● 增加空跑帮助提示\n● 消息发送器解耦,新增消息加工器策略,大幅提高消息加工性能\n● push相关流程深度梳理和大规模重构\n● UI细节调整,增加累计推送量展示\n"
}
]
}
Loading

0 comments on commit 36e48ba

Please sign in to comment.