Compare commits

...

3 Commits

Author SHA1 Message Date
dzq ca01d17e9a refactor(mqtt): 恢复默认的MQTT主题配置
恢复默认的MQTT主题配置,移除临时的主题配置,以确保与现有系统兼容。
2025-04-29 16:58:42 +08:00
dzq c3ae430369 fix: 修复短信发送异常处理和MQTT主题配置
- 在WxLoginController中,捕获所有异常并记录错误日志,避免敏感信息泄露
- 更新MqttService中的MQTT主题和认证信息,确保与最新配置一致
2025-04-29 16:43:29 +08:00
dzq 6160e7a0c5 refactor(订单服务): 移除createOrder方法的@Transactional注解
移除OrderApplicationService中createOrder方法的@Transactional注解,以避免不必要的事务管理开销。同时,更新PaymentApplicationService中的操作类型为"callJsApiPreCreate",以更准确地反映支付操作的实际行为。
2025-04-29 08:17:15 +08:00
4 changed files with 9 additions and 4 deletions

View File

@ -69,8 +69,9 @@ public class WxLoginController {
@RequestParam String tel) {
try {
return ResponseDTO.ok(Ab98ApiUtil.sendLoginSms(token, tel).getOutputData());
} catch (ApiException e) {
return ResponseDTO.fail(e);
} catch (Exception e) {
log.error("短信发送失败: ", e);
return ResponseDTO.fail();
}
}

View File

@ -21,6 +21,10 @@ public class MqttService implements MqttCallback {
private static final String PASSWORD = "sell@ys#6785$";
private static final String TOPIC_FILTER = "lock/up/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;
// 设置自定义消息处理器

View File

@ -141,7 +141,7 @@ public class OrderApplicationService {
}
}
@Transactional
// @Transactional
public CreateOrderResult createOrder(SubmitOrderCommand command) {
List<ShopOrderGoodsEntity> goodsList = command.getGoodsList();

View File

@ -82,7 +82,7 @@ public class PaymentApplicationService {
} catch (Exception e) {
AddPaymentOperationLogCommand paymentOperationLogCommand = new AddPaymentOperationLogCommand();
paymentOperationLogCommand.setParams("body" + jsonBody + " result" + result);
paymentOperationLogCommand.setOperationType("submitOrder");
paymentOperationLogCommand.setOperationType("callJsApiPreCreate");
paymentOperationLogCommand.setStatus(2);
paymentOperationLogCommand.setRemark(ExceptionUtils.getStackTrace(e));
paymentOperationLogCommand.initBaseEntity();