Skip to content

Commit

Permalink
Merge pull request #256 from rememberber/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rememberber authored Dec 27, 2020
2 parents 3e0382d + 9759412 commit fda0e9d
Show file tree
Hide file tree
Showing 14 changed files with 371 additions and 75 deletions.
3 changes: 3 additions & 0 deletions download.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<details>
<summary>Windows</summary>

[WePush-v4.2.4_201222-x64-Setup.exe](http://download.zhoubochina.com/exe/WePush-v4.2.4_201222-x64-Setup.exe)
[WePush-v4.2.3_201210-x64-Setup.exe](http://download.zhoubochina.com/exe/WePush-v4.2.3_201210-x64-Setup.exe)
[WePush-v4.2.2_201208-x64-Setup.exe](http://download.zhoubochina.com/exe/WePush-v4.2.2_201208-x64-Setup.exe)
[WePush-v4.2.1_200308-x64-Setup.exe](http://download.zhoubochina.com/exe/WePush-v4.2.1_200308-x64-Setup.exe)
Expand Down Expand Up @@ -77,6 +78,7 @@
<details>
<summary>Mac OS</summary>

[v_4.2.4_201222.app](http://download.zhoubochina.com/mac/4.2.4.zip)
[v_4.2.3_201210.app](http://download.zhoubochina.com/mac/4.2.3.zip)
[v_4.2.2_201208.app](http://download.zhoubochina.com/mac/4.2.2.zip)
[v_4.2.1_200308.app](http://download.zhoubochina.com/mac/4.2.1.zip)
Expand Down Expand Up @@ -131,6 +133,7 @@
<details>
<summary>Portable(各系统通用绿色便携版32/64位)</summary>

[v4.2.4_201222](http://download.zhoubochina.com/linux/WePush-4.2.4.zip)
[v4.2.3_201210](http://download.zhoubochina.com/linux/WePush-4.2.3.zip)
[v4.2.2_201208](http://download.zhoubochina.com/linux/WePush-4.2.2.zip)
[v4.2.1_200308](http://download.zhoubochina.com/linux/WePush-4.2.1.zip)
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/com/fangxuele/tool/push/domain/TMsgKefu.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public class TMsgKefu implements Serializable {

private Integer wxAccountId;

private String appId;

private String pagePath;

private String thumbMediaId;

private static final long serialVersionUID = 1L;

public Integer getId() {
Expand Down Expand Up @@ -134,4 +140,28 @@ public Integer getWxAccountId() {
public void setWxAccountId(Integer wxAccountId) {
this.wxAccountId = wxAccountId;
}

public String getAppId() {
return appId;
}

public void setAppId(String appId) {
this.appId = appId == null ? null : appId.trim();
}

public String getPagePath() {
return pagePath;
}

public void setPagePath(String pagePath) {
this.pagePath = pagePath == null ? null : pagePath.trim();
}

public String getThumbMediaId() {
return thumbMediaId;
}

public void setThumbMediaId(String thumbMediaId) {
this.thumbMediaId = thumbMediaId == null ? null : thumbMediaId.trim();
}
}
30 changes: 30 additions & 0 deletions src/main/java/com/fangxuele/tool/push/domain/TMsgKefuPriority.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public class TMsgKefuPriority implements Serializable {

private Integer wxAccountId;

private String appId;

private String pagePath;

private String thumbMediaId;

private static final long serialVersionUID = 1L;

public Integer getId() {
Expand Down Expand Up @@ -174,4 +180,28 @@ public Integer getWxAccountId() {
public void setWxAccountId(Integer wxAccountId) {
this.wxAccountId = wxAccountId;
}

public String getAppId() {
return appId;
}

public void setAppId(String appId) {
this.appId = appId == null ? null : appId.trim();
}

public String getPagePath() {
return pagePath;
}

public void setPagePath(String pagePath) {
this.pagePath = pagePath == null ? null : pagePath.trim();
}

public String getThumbMediaId() {
return thumbMediaId;
}

public void setThumbMediaId(String thumbMediaId) {
this.thumbMediaId = thumbMediaId == null ? null : thumbMediaId.trim();
}
}
4 changes: 4 additions & 0 deletions src/main/java/com/fangxuele/tool/push/logic/PushControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fangxuele.tool.push.dao.TPushHistoryMapper;
import com.fangxuele.tool.push.domain.TPushHistory;
import com.fangxuele.tool.push.logic.msgmaker.MsgMakerFactory;
import com.fangxuele.tool.push.logic.msgmaker.WxKefuMsgMaker;
import com.fangxuele.tool.push.logic.msgmaker.WxMaSubscribeMsgMaker;
import com.fangxuele.tool.push.logic.msgmaker.WxMpTemplateMsgMaker;
import com.fangxuele.tool.push.logic.msgsender.IMsgSender;
Expand Down Expand Up @@ -439,6 +440,9 @@ static void prepareMsgMaker() {
if (App.config.getMsgType() == MessageTypeEnum.WX_UNIFORM_MESSAGE_CODE) {
new WxMpTemplateMsgMaker().prepare();
new WxMaSubscribeMsgMaker().prepare();
} else if (App.config.getMsgType() == MessageTypeEnum.KEFU_PRIORITY_CODE) {
new WxKefuMsgMaker().prepare();
new WxMpTemplateMsgMaker().prepare();
} else {
MsgMakerFactory.getMsgMaker().prepare();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public class WxKefuMsgMaker extends BaseMsgMaker implements IMsgMaker {

private static String msgKefuUrl;

private static String msgKefuAppid;

private static String msgKefuPagepath;

private static String msgKefuThumbMediaId;

/**
* 准备(界面字段等)
*/
Expand All @@ -38,6 +44,9 @@ public void prepare() {
msgKefuDesc = KefuMsgForm.getInstance().getMsgKefuDescTextField().getText();
msgKefuUrl = KefuMsgForm.getInstance().getMsgKefuUrlTextField().getText();
msgKefuMsgContent = KefuMsgForm.getInstance().getContentTextArea().getText();
msgKefuAppid = KefuMsgForm.getInstance().getMsgKefuAppidTextField().getText();
msgKefuPagepath = KefuMsgForm.getInstance().getMsgKefuPagepathTextField().getText();
msgKefuThumbMediaId = KefuMsgForm.getInstance().getMsgKefuThumbMediaIdTextField().getText();
}

/**
Expand Down Expand Up @@ -73,6 +82,11 @@ public WxMpKefuMessage makeMsg(String[] msgData) {
} else if ("文本消息".equals(msgKefuMsgType)) {
String content = TemplateUtil.evaluate(msgKefuMsgContent, velocityContext);
kefuMessage = WxMpKefuMessage.TEXT().content(content).build();
} else if ("小程序卡片消息".equals(msgKefuMsgType)) {
String title = TemplateUtil.evaluate(msgKefuMsgTitle, velocityContext);
String pagePath = TemplateUtil.evaluate(msgKefuPagepath, velocityContext);
String thumbMediaId = TemplateUtil.evaluate(msgKefuThumbMediaId, velocityContext);
kefuMessage = WxMpKefuMessage.MINIPROGRAMPAGE().title(title).appId(msgKefuAppid).pagePath(pagePath).thumbMediaId(thumbMediaId).build();
}

return kefuMessage;
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_4.2.3_201210";
public final static String APP_VERSION = "v_4.2.4_201222";

/**
* Logo-1024*1024
Expand Down
59 changes: 56 additions & 3 deletions src/main/java/com/fangxuele/tool/push/ui/form/msg/KefuMsgForm.form
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<grid id="27dc6" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
<xy x="20" y="20" width="518" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="eafc9" binding="kefuMsgPanel" layout-manager="GridLayoutManager" row-count="7" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="eafc9" binding="kefuMsgPanel" layout-manager="GridLayoutManager" row-count="10" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="15" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
Expand All @@ -29,7 +29,7 @@
</component>
<vspacer id="ba599">
<constraints>
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="a26ee" class="javax.swing.JComboBox" binding="msgKefuMsgTypeComboBox">
Expand All @@ -40,6 +40,7 @@
<model>
<item value="图文消息"/>
<item value="文本消息"/>
<item value="小程序卡片消息"/>
</model>
</properties>
</component>
Expand Down Expand Up @@ -104,6 +105,34 @@
<text value="跳转URL"/>
</properties>
</component>
<component id="652a9" class="javax.swing.JLabel" binding="kefuMsgAppidLabel">
<constraints>
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="d074b"/>
<text value="小程序appid"/>
</properties>
</component>
<component id="18f21" class="javax.swing.JLabel" binding="kefuMsgPagepathLabel">
<constraints>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="1527b"/>
<text value="小程序页面路径"/>
</properties>
</component>
<component id="851f3" class="javax.swing.JLabel" binding="kefuMsgThumbMediaIdLabel">
<constraints>
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="33032"/>
<text value="卡片图片的媒体ID"/>
<toolTipText value="thumb_media_id"/>
</properties>
</component>
<component id="bf2d2" class="javax.swing.JTextField" binding="msgKefuUrlTextField">
<constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="8" fill="1" indent="0" use-parent-layout="false">
Expand All @@ -112,6 +141,30 @@
</constraints>
<properties/>
</component>
<component id="d074b" class="javax.swing.JTextField" binding="msgKefuAppidTextField">
<constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="1527b" class="javax.swing.JTextField" binding="msgKefuPagepathTextField">
<constraints>
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="33032" class="javax.swing.JTextField" binding="msgKefuThumbMediaIdTextField">
<constraints>
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="1e011" class="javax.swing.JLabel" binding="contentLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
Expand Down
Loading

0 comments on commit fda0e9d

Please sign in to comment.