From 6d014a01bcc329c5b672d633a482bed2a5f61cc4 Mon Sep 17 00:00:00 2001 From: paulGao Date: Tue, 29 Mar 2022 10:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=92=E6=9D=80=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E9=97=B4=E6=AE=B5=E4=B8=BA=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=97=B6=E3=80=82=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD=E4=BC=9A=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=9A=84es=E4=BB=A3=E7=A0=81=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82improve=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/application.yml | 10 ---------- .../payment/kit/plugin/wallet/WalletPlugin.java | 2 -- .../promotion/serviceimpl/SeckillApplyServiceImpl.java | 2 +- .../search/serviceimpl/EsGoodsSearchServiceImpl.java | 6 ++++-- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/config/application.yml b/config/application.yml index 327cf008..703b96ae 100644 --- a/config/application.yml +++ b/config/application.yml @@ -25,15 +25,6 @@ spring: admin: client: url: http://192.168.0.116:8000 - # mongodb - data: - mongodb: - uri: 192.168.0.116:27017 - database: lilishop - username: root - password: lilishop - authentication-database: admin - # replica-set-name: mongoreplset cache: type: redis # Redis @@ -191,7 +182,6 @@ logging: cn.lili: info # org.hibernate: debug # org.springframework: debug - # org.springframework.data.mongodb.core: debug file: # 指定路径 path: logs diff --git a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wallet/WalletPlugin.java b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wallet/WalletPlugin.java index 79245326..9a2d1edc 100644 --- a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wallet/WalletPlugin.java +++ b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wallet/WalletPlugin.java @@ -124,8 +124,6 @@ public class WalletPlugin implements Payment { //获取支付收银参数 CashierParam cashierParam = cashierSupport.cashierParam(payParam); this.callBack(payParam, cashierParam); - } catch (Exception e) { - throw e; } finally { lock.unlock(); } diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillApplyServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillApplyServiceImpl.java index 0e774de5..11665dcb 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillApplyServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillApplyServiceImpl.java @@ -338,7 +338,7 @@ public class SeckillApplyServiceImpl extends ServiceImpl= hour || ((i + 1) < hoursSored.length && hoursSored[i + 1] > hour)); + boolean hoursSoredHour = (hoursSored[i] >= hour || ((i + 1) < hoursSored.length && hoursSored[i + 1] > hour) || hoursSored.length == 1); if (hoursSoredHour) { SimpleDateFormat format = new SimpleDateFormat(DatePattern.NORM_DATE_PATTERN); String date = format.format(new Date()); diff --git a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java index afbab567..85d669e0 100644 --- a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java @@ -240,7 +240,8 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService { String brandName = ""; if (brandBuckets.get(i).getAggregations() != null && brandBuckets.get(i).getAggregations().get(ATTR_BRAND_NAME) != null) { - brandName = this.getAggregationsBrandOptions(brandBuckets.get(i).getAggregations().get(ATTR_BRAND_NAME)); + ParsedStringTerms aggregation = brandBuckets.get(i).getAggregations().get(ATTR_BRAND_NAME); + brandName = this.getAggregationsBrandOptions(aggregation); if (StringUtils.isEmpty(brandName)) { continue; } @@ -250,7 +251,8 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService { if (brandUrlBuckets != null && !brandUrlBuckets.isEmpty() && brandUrlBuckets.get(i).getAggregations() != null && brandUrlBuckets.get(i).getAggregations().get(ATTR_BRAND_URL) != null) { - brandUrl = this.getAggregationsBrandOptions(brandUrlBuckets.get(i).getAggregations().get(ATTR_BRAND_URL)); + ParsedStringTerms aggregation = brandUrlBuckets.get(i).getAggregations().get(ATTR_BRAND_URL); + brandUrl = this.getAggregationsBrandOptions(aggregation); if (StringUtils.isEmpty(brandUrl)) { continue; }