1
This commit is contained in:
@@ -126,21 +126,7 @@ public class WXController {
|
|||||||
return R.ok(result);
|
return R.ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/send/imt")
|
|
||||||
@ResponseBody
|
|
||||||
@RateLimiter(time = 1, count = 60)
|
|
||||||
public R sendToIMT(@RequestBody MessageRequest message) throws Exception {
|
|
||||||
logger.info(message.toString());
|
|
||||||
|
|
||||||
if (!TokenUtil.checkToken(message.getVanToken())) {
|
|
||||||
return R.error("vanToken无效");
|
|
||||||
}
|
|
||||||
if (!StrUtil.isAllNotEmpty(message.getTitle(), message.getText())) {
|
|
||||||
return R.error("缺少标题和内容");
|
|
||||||
}
|
|
||||||
String result = WxSendUtil.sendNotifyForMpnews(message.getTitle(), message.getText(), message.getTouser(), WXMessageType.IMT);
|
|
||||||
return R.ok(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping(value = "/send/ty")
|
@RequestMapping(value = "/send/ty")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@@ -218,7 +204,7 @@ public class WXController {
|
|||||||
if (!TokenUtil.checkToken(vanToken)) {
|
if (!TokenUtil.checkToken(vanToken)) {
|
||||||
return R.error("vanToken无效");
|
return R.error("vanToken无效");
|
||||||
}
|
}
|
||||||
String result = WxSendUtil.sendNotifyForText(message.getText(), message.getTouser(), WXMessageType.JD);
|
String result = WxSendUtil.sendNotifyForText(message.getText(), message.getTouser(), WXMessageType.PDD);
|
||||||
logger.info("result 打印---{}",result);
|
logger.info("result 打印---{}",result);
|
||||||
return R.ok(result);
|
return R.ok(result);
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ public enum WXMessageType {
|
|||||||
QH("QH","1000003","ww929e7d6493c6336e","lHW1JT3tLB6WZXO_4ww0SdjhMoXtSPX7LBl_zqvY46g"),
|
QH("QH","1000003","ww929e7d6493c6336e","lHW1JT3tLB6WZXO_4ww0SdjhMoXtSPX7LBl_zqvY46g"),
|
||||||
// 美团
|
// 美团
|
||||||
MT("MT","1000004","ww929e7d6493c6336e","kdViRoqUFJZcGQ2dAoJZwPTktQ-fovQPeTnloAbn7bg"),
|
MT("MT","1000004","ww929e7d6493c6336e","kdViRoqUFJZcGQ2dAoJZwPTktQ-fovQPeTnloAbn7bg"),
|
||||||
// 爱茅台
|
// 拼多多
|
||||||
IMT("IMT","1000005","ww929e7d6493c6336e","SpYfWAA4lougQECoQ3WNvZnJ31Po77NU-XSnuC8syGs"),
|
PDD("PDD","1000005","ww929e7d6493c6336e","SpYfWAA4lougQECoQ3WNvZnJ31Po77NU-XSnuC8syGs"),
|
||||||
// TY
|
// TY
|
||||||
TY("TY","1000006","ww929e7d6493c6336e","sGrNc8uBd_Wp6hmme2oP_Rh37scmgGulPuCHiQ9PYcc"),
|
TY("TY","1000006","ww929e7d6493c6336e","sGrNc8uBd_Wp6hmme2oP_Rh37scmgGulPuCHiQ9PYcc"),
|
||||||
JD("JD","1000008","ww929e7d6493c6336e","neXT6KJ8FYVLR-LN455MAcFaeUYkVaTsAkIOqXx3wLA"),
|
JD("JD","1000008","ww929e7d6493c6336e","neXT6KJ8FYVLR-LN455MAcFaeUYkVaTsAkIOqXx3wLA"),
|
||||||
|
|||||||
Reference in New Issue
Block a user