Skip to content

Commit

Permalink
修复秒杀活动时间段为一个时。不显示问题。修复可能会出现的es代码编译问题。improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiGaoRobot committed Mar 29, 2022
1 parent 36ce759 commit 6d014a0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
10 changes: 0 additions & 10 deletions config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -191,7 +182,6 @@ logging:
cn.lili: info
# org.hibernate: debug
# org.springframework: debug
# org.springframework.data.mongodb.core: debug
file:
# 指定路径
path: logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ private void savePaymentLog(PayParam payParam) {
//获取支付收银参数
CashierParam cashierParam = cashierSupport.cashierParam(payParam);
this.callBack(payParam, cashierParam);
} catch (Exception e) {
throw e;
} finally {
lock.unlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ private List<SeckillTimelineVO> getSeckillTimelineInfo() {
Arrays.sort(hoursSored);
for (int i = 0; i < hoursSored.length; i++) {
SeckillTimelineVO tempTimeline = new SeckillTimelineVO();
boolean hoursSoredHour = (hoursSored[i] >= 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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ private List<SelectorOptions> convertBrandOptions(EsGoodsSearchDTO goodsSearch,

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;
}
Expand All @@ -250,7 +251,8 @@ private List<SelectorOptions> convertBrandOptions(EsGoodsSearchDTO goodsSearch,
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;
}
Expand Down

0 comments on commit 6d014a0

Please sign in to comment.