Commit da7aca93 authored by hezhen's avatar hezhen

123

parent 98b487ce
......@@ -43,6 +43,9 @@ public class JPushBiz extends BaseBiz<MessagePushMapper, MessagePush> {
@Value("${universal.APP_KEY}")
private String APP_KEY;
@Value("${universal.DEBUG}")
private boolean debug;
public static final String ALERT = "Test from API Example - alert";
//推送给所有平台设备
......@@ -139,6 +142,7 @@ public class JPushBiz extends BaseBiz<MessagePushMapper, MessagePush> {
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"参数无效");
}
try {
log.debug("\n推送参数:"+payload.toJSON());
PushResult result = jpushClient.sendPush(payload);
log.debug("\n推送结果:"+result);
return ObjectRestResponse.succ();
......@@ -173,6 +177,11 @@ public class JPushBiz extends BaseBiz<MessagePushMapper, MessagePush> {
}
String [] userIdList=userIds.split(",");
audience=Audience.alias(userIdList);
}else {
if (debug){
String [] userIdList=userIds.split(",");
audience=Audience.alias(userIdList);
}
}
JsonObject intent = new JsonObject();
if (StringUtils.isNotBlank(messagePush.getIntent())){
......
......@@ -15,7 +15,7 @@ import java.util.concurrent.Executors;
@Service
public class MailServiceBiz {
@Autowired
//@Autowired
JavaMailSender mailSender;
public void sendSimpleMail(String to, String subject, String content) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment