fix: 修复短信发送异常处理和MQTT主题配置
- 在WxLoginController中,捕获所有异常并记录错误日志,避免敏感信息泄露 - 更新MqttService中的MQTT主题和认证信息,确保与最新配置一致
This commit is contained in:
parent
6160e7a0c5
commit
c3ae430369
|
@ -69,8 +69,9 @@ public class WxLoginController {
|
||||||
@RequestParam String tel) {
|
@RequestParam String tel) {
|
||||||
try {
|
try {
|
||||||
return ResponseDTO.ok(Ab98ApiUtil.sendLoginSms(token, tel).getOutputData());
|
return ResponseDTO.ok(Ab98ApiUtil.sendLoginSms(token, tel).getOutputData());
|
||||||
} catch (ApiException e) {
|
} catch (Exception e) {
|
||||||
return ResponseDTO.fail(e);
|
log.error("短信发送失败: ", e);
|
||||||
|
return ResponseDTO.fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,12 @@ public class MqttService implements MqttCallback {
|
||||||
// private static final String TOPIC = "lock/down/S4202414S";
|
// private static final String TOPIC = "lock/down/S4202414S";
|
||||||
private static final String USERNAME = "sell";
|
private static final String USERNAME = "sell";
|
||||||
private static final String PASSWORD = "sell@ys#6785$";
|
private static final String PASSWORD = "sell@ys#6785$";
|
||||||
private static final String TOPIC_FILTER = "lock/up/S5200184S";
|
// private static final String TOPIC_FILTER = "lock/up/S5200184S";
|
||||||
private static final String TOPIC = "lock/down/S5200184S";
|
// private static final String TOPIC = "lock/down/S5200184S";
|
||||||
|
// private static final String USERNAME = "iot";
|
||||||
|
// private static final String PASSWORD = "iot@ys#9963$";
|
||||||
|
private static final String TOPIC_FILTER = "hongfa/2401310026C50D24FE/upload/";
|
||||||
|
private static final String TOPIC = "hongfa/2401310026C50D24FE/download/";
|
||||||
|
|
||||||
private MqttClient client;
|
private MqttClient client;
|
||||||
// 设置自定义消息处理器
|
// 设置自定义消息处理器
|
||||||
|
|
Loading…
Reference in New Issue