Merge remote-tracking branch 'origin/div' into div
| | |
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.util.CMQManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private LostOrderService lostOrderService;
|
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | |
|
| | | /**
|
| | | * 订单列表
|
| | |
| | | endTime += " 23:59:59";
|
| | | }
|
| | |
|
| | | // 判断是否需要显示订单找回提示
|
| | | if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if (state == 0 && page == 1) {
|
| | | if (redisManager.frequencyLimit("orderlist-" + acceptData.getDevice(), 15, 3)) {// 15秒内请求3次触发
|
| | | // TODO 显示订单找回提醒
|
| | | }
|
| | | }
|
| | |
|
| | | try {
|
| | | long count = 0;
|
| | | long totalValid = 0;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public boolean frequencyLimit(String key, int timeS, int num) {
|
| | | key = "frequency-" + key;
|
| | | Jedis jedis = jedisPool.getResource();
|
| | | try {
|
| | | long count = jedis.incr(key);
|
| | | if (count == 1)
|
| | | jedis.expire(key, timeS);
|
| | | if (count >= num)
|
| | | return true;
|
| | | else
|
| | | return false;
|
| | | } finally {
|
| | | jedisPool.returnResource(jedis);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取淘宝图片
|
| | | *
|
| | |
| | | return JsonUtil.jsonToList(value, clazz);
|
| | | }
|
| | |
|
| | | |
| | | public JDGoods getJDGoods(long goodsId) {
|
| | | String key = "jingdong-goods-" + goodsId;
|
| | |
|
| | |
| | | return JsonUtil.getSimpleGson().fromJson(value, JDGoods.class);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | public PDDGoodsDetail getPDDGoodsDetail(long goodsId) {
|
| | | String key = "pinduoduo-goods-" + goodsId;
|