From a6f34b99ee20e528b766c8ed5a61bd9c5aa0e7ae Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 16 十一月 2019 18:10:33 +0800 Subject: [PATCH] 淘宝相似商品推荐接口优化,根据商品ID搜索商品基本信息优化 --- fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/BindingAccountServiceImpl.java | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/BindingAccountServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/BindingAccountServiceImpl.java index 0b13be1..a0d3fe5 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/BindingAccountServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/BindingAccountServiceImpl.java @@ -40,6 +40,7 @@ import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; +import com.yeshi.fanli.util.TimeUtil; import com.yeshi.fanli.util.factory.UserMoneyDetailFactory; import net.sf.json.JSONObject; @@ -283,10 +284,8 @@ } AlipayAccountValidNormalHistory latest = alipayAccountValidNormalHistoryMapper.selectLatestByUid(uid); if (latest != null) { - Calendar caLatest = Calendar.getInstance(); - caLatest.setTimeInMillis(latest.getCreateTime().getTime()); - Calendar nowLatest = Calendar.getInstance(); - if (caLatest.get(Calendar.MONTH) == nowLatest.get(Calendar.MONTH))// 涓婃鏇存敼鍜岀幇鍦ㄦ槸鍚屼竴涓湀 + if (TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM") + .equalsIgnoreCase(TimeUtil.getGernalTime(latest.getCreateTime().getTime(), "yyyy-MM")))// 涓婃鏇存敼鍜岀幇鍦ㄦ槸鍚屼竴骞村悓涓�涓湀 throw new BindingAccountException(2, "姣忔湀浠呭彲淇敼1娆℃彁鐜拌处鍙凤紝璇蜂笅鏈堝啀璇曞惂銆�"); } return true; -- Gitblit v1.8.0