| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper;
|
| | | import com.yeshi.fanli.entity.admin.ReslutOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
|
| | |
| | | Iterator<String> its = map.keySet().iterator();
|
| | | while (its.hasNext()) {
|
| | | String orderId = its.next();
|
| | | String key = "doorder-" + orderId;
|
| | | String key = "addorder-" + orderId;
|
| | | // redis做频率限制
|
| | | try {
|
| | | if (!StringUtil.isNullOrEmpty(redisManager.getCommonString(key))) {
|
| | | continue;
|
| | | if (Constant.IS_OUTNET) {
|
| | | if (!StringUtil.isNullOrEmpty(redisManager.getCommonString(key))) {
|
| | | continue;
|
| | | }
|
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | |
| | | addTaoBaoOrder(orderId, map.get(orderId));
|
| | | try {
|
| | | // 6小时内不再处理
|
| | | redisManager.cacheCommonString(key, "1", 60 * 60 * 6);
|
| | | if (Constant.IS_OUTNET)
|
| | | redisManager.cacheCommonString(key, "1", 60 * 60 * 6);
|
| | | } catch (Exception e) {
|
| | |
|
| | | }
|
| | |
| | | return taoBaoOrderMapper.selectTaoBaoOrderByOrderId(orderId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<ReslutOrder> queryJoinHongBao(int start, int count, String key, String startTime, String endTime,
|
| | | Integer type, Integer days) throws Exception {
|
| | | return taoBaoOrderMapper.queryJoinHongBao(start, count, key, startTime, endTime, type, days);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int countQueryJoinHongBao(String key, String startTime, String endTime, Integer type, Integer days)
|
| | | throws Exception {
|
| | | return taoBaoOrderMapper.countQueryJoinHongBao(key, startTime, endTime, type, days);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public double countEstimate(String date) throws Exception {
|
| | | return taoBaoOrderMapper.countEstimate(date);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<TaoBaoOrder> getStateByOrderIdAndPayment(String orderId, String payment) throws Exception {
|
| | | return taoBaoOrderMapper.getStateByOrderIdAndPayment(orderId, payment);
|
| | | }
|
| | |
|
| | | }
|