优化订单查询

This commit is contained in:
weicw
2023-08-08 17:20:57 +08:00
parent 2ca82fedb1
commit 44cfec9028
9 changed files with 483 additions and 294 deletions

View File

@@ -38,16 +38,22 @@ public class MybatisPlusConfig {
// String device_id = request.getHeader("device-id");
// System.out.println("device_id = " + device_id);
// 从设备请求头拿ID
String DeviceID = request.getHeader("Device-ID");
if (StrUtil.isNotBlank(DeviceID)) {
return new LongValue(10048);
}
// 从请求头拿ID
final String tenantId = request.getHeader("tenantId");
if(tenantId != null){
return new LongValue(tenantId);
}
return getLoginUserTenantId();
try {
String DeviceID = request.getHeader("Device-ID");
if (StrUtil.isNotBlank(DeviceID)) {
return new LongValue(6);
}
// 从请求头拿ID
final String tenantId = request.getHeader("tenantId");
if(tenantId != null){
return new LongValue(tenantId);
}
return getLoginUserTenantId();
}catch (Exception e){
return new LongValue(6);
}
}
@Override

View File

@@ -19,6 +19,8 @@ public class OrderConstants {
// 收货状态
public static final Integer RECEIPT_STATUS_NO = 10; // 未收货
public static final Integer RECEIPT_STATUS_YES = 20; // 已收货
public static final Integer RECEIPT_STATUS_APPLY = 21; // 申请
public static final Integer RECEIPT_STATUS_reject = 22; // 已驳回退租
public static final Integer RECEIPT_STATUS_RETURN = 30; // 已退货
// 订单状态
@@ -33,5 +35,4 @@ public class OrderConstants {
}

View File

@@ -67,7 +67,7 @@ public class AlipayConfigUtil {
*/
public JSONObject payment(Integer tenantId) {
System.out.println("tenantId = " + tenantId);
String key = "cache".concat(tenantId.toString()).concat(":setting:payment");
String key = "setting:payment:" + tenantId;
System.out.println("key = " + key);
String cache = stringRedisTemplate.opsForValue().get(key);
if (cache == null) {