feat:极光推送改为线上模式

This commit is contained in:
dzc committed 2026-07-07 18:10:28 +08:00
1 parent ba0c6f08bd
commit ac2c42dbc8
5 files changed
+14 -49

No files matched your search

@@ -1,17 +1,7 @@
package hard.com.bsd.pjcloud.hard;
import cn.hutool.json.JSONUtil;
import com.bsd.pjcloud.hard.HardApp;
import com.bsd.pjcloud.hard.api.dto.wechat.WechatMicropayDto;
import com.bsd.pjcloud.hard.api.dto.wechat.WechatQueryDto;
import com.bsd.pjcloud.hard.api.dto.wechat.WechatRefundDto;
import com.bsd.pjcloud.hard.api.vo.wechat.WechatMicropayVo;
import com.bsd.pjcloud.hard.api.vo.wechat.WechatQueryVo;
import com.bsd.pjcloud.hard.api.vo.wechat.WechatRefundVo;
import com.bsd.pjcloud.hard.service.WechatPayService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
/**
@@ -21,36 +11,5 @@ import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest(classes = HardApp.class)
public class WechatPayTest {
@Resource
private WechatPayService wechatPayService;
@Test
public void micropay() throws Exception {
long currentTimeMillis = System.currentTimeMillis();
WechatMicropayDto dto = new WechatMicropayDto();
dto.setMerId(currentTimeMillis);
dto.setOrderId(currentTimeMillis);
dto.setPrice(1);
dto.setWechatQrCode("132796932599913148");
WechatMicropayVo micropay = wechatPayService.micropay(dto);
if (micropay.isAllSuccess()) {
log.info("支付成功json:{}", JSONUtil.toJsonStr(micropay));
}
}
@Test
public void query() throws Exception {
WechatQueryDto dto = new WechatQueryDto();
dto.setWechantOrderId("4200002719202506059568204561");
WechatQueryVo micropay = wechatPayService.query(dto);
}
@Test
public void rerfund() throws Exception {
String currentOrderId = "4200002648202506062041165177";
}
}
@@ -21,6 +21,11 @@ public class JgConfig {
*/
private String appKey;
/**
* 是否生产模式
*/
private Boolean isProd;
/**
* 极光推送secret
*/
@@ -23,12 +23,12 @@ public class ThirdAppJgPushJob {
private final List<Long> testUserIdList = List.of(2029755089492066305L, 2034824566572941314L);
@PostConstruct
public void test() {
pushToAllUsers("早餐提醒", "早餐时间就要到了,请尽快预约哦!!");
// pushToAllUsers("午餐提醒", "午餐间就要到了,请尽快预约哦!!");
// pushToAllUsers("晚餐提醒", "晚餐时间就要到了,请尽快预约哦!!");
}
// @PostConstruct
// public void test() {
//// pushToAllUsers("早餐提醒", "早餐时间就要到了,请尽快预约哦!!");
//// pushToAllUsers("午餐提醒", "午餐间就要到了,请尽快预约哦!!");
//// pushToAllUsers("晚餐提醒", "晚餐时间就要到了,请尽快预约哦!!");
// }
private void pushToAllUsers(String title, String subtitle) {
JgPusDto jgPusDto = new JgPusDto();
@@ -75,7 +75,7 @@ public class ThirdThirdJgPushServiceImpl implements ThirdJgPushService {
// start 通知options ios start
Options options = new Options();
// true:表示推送生产环境,false:表示推送开发环境
options.setApnsProduction(false);
options.setApnsProduction(jgPush.getIsProd());
param.setOptions(options);
// end 通知options ios end
@@ -219,4 +219,5 @@ jg:
app-key: 3877351c5811a35093f04476
master-secret: 2a253b41ac1eaa96558c56ef
large-icon: https://public-com.zianxin.com/logo/60x60.png
small-icon-uri: https://public-com.zianxin.com/logo/320x320.png
small-icon-uri: https://public-com.zianxin.com/logo/320x320.png
is-prod: true