Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.
Open

1 #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Maven Package

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
7 changes: 2 additions & 5 deletions src/main/java/cn/ofpp/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ public static void main(String[] args) {

// new 一个 女友
GirlFriend girlFriend = new GirlFriend("某女友",
"江苏省", "南京市", "1999-08-08", "2011-04-16", "oQFk-5qtXv2uGNCu9oiCiV85KWD8");
"江苏省", "南京市", "1999-08-08", "2011-04-16", "oQMt-6VqZ7NmcbM8083_2zD38zJA ");
Wx.sendTemplateMessage(MessageFactory.resolveMessage(girlFriend));

// new 一个 男友 也可单独针对一个friend设置模板ID 以达到不同人不同消息
BoyFriend boyFriend = new BoyFriend("某男友",
"江苏省", "南京市", "1999-08-08", "2011-04-16", "oQFk-5qtXv2uGNCu9oiCiV85KWD8", "5t7-Ksy8_rw-QmUkxf8J7Pe-QLQ2rBc7RWJi_pSmeh4");
Wx.sendTemplateMessage(MessageFactory.resolveMessage(boyFriend));

}

}
6 changes: 3 additions & 3 deletions src/main/java/cn/ofpp/Bootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ public class Bootstrap {
/**
* 公众号AppID
*/
public static final String APP_ID = "";
public static final String APP_ID = "wxd00606311d4294bb";

/**
* 公众号秘钥
*/
public static final String SECRET = "";
public static final String SECRET = "a39844ff60166cfd73729e95e502eff7";

/**
* 全局模板ID 也可针对单个Friend指定模板
*/
public static final String TEMPLATE_ID = "";
public static final String TEMPLATE_ID = "Oh9MGZK8fvxNcPWMRgJnlA5V_lxKoGDKSt7rppW_v34 ";

/**
* 初始化
Expand Down