fix(优惠券中心):携程接口优化

This commit is contained in:
2025-08-28 15:58:08 +08:00
parent fd8d2f936f
commit 6999bb79a5
20 changed files with 828 additions and 2712 deletions
@@ -225,7 +225,7 @@ public class ApiDeviceController {
log.info("开始下发设备指令: deviceId={}, qrcodeType={}", deviceId, qrcodeType);
try {
// 1. 生成随机订单号
String orderNo = deviceId;
String orderNo = generateRandomOrderNo();
// 2. 根据设备ID和二维码类型获取二维码信息
Map<String, Object> qrcodeResult = orderCenterService.getQrcodeByDeviceId(deviceId, qrcodeType);
@@ -256,7 +256,12 @@ public class ApiDeviceController {
* 生成随机订单号
*/
private String generateRandomOrderNo() {
return "CMD_" + System.currentTimeMillis() + "_" + (int)(Math.random() * 1000);
// 生成13位随机数字
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 13; i++) {
sb.append((int)(Math.random() * 10));
}
return sb.toString();
}
/**