修复购物车数量及其列表sku规格显示等问题

This commit is contained in:
hupeng
2019-12-19 20:22:15 +08:00
parent 4a18e76373
commit f112b50c66
12 changed files with 17 additions and 342 deletions

View File

@ -1,47 +0,0 @@
//package co.yixiang.config;
//
//import cn.hutool.core.util.StrUtil;
//import org.redisson.Redisson;
//import org.redisson.api.RedissonClient;
//import org.redisson.config.Config;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * redisson 配置类
// * Created on 2018/6/19
// */
//@Configuration
//public class RedissonConfig {
//
// @Value("${spring.redis.host}")
// private String host;
//
// @Value("${spring.redis.port}")
// private String port;
//
// @Value("${spring.redis.password}")
// private String password;
//
// @Value("${spring.redis.database}")
// private Integer database;
//
// // @Bean
// public RedissonClient getRedisson(){
//
// Config config = new Config();
// if(StrUtil.isNotEmpty(password)){
// config.useSingleServer().setAddress("redis://" + host + ":" + port)
// .setPassword(password).setDatabase(database);
// }else{
// config.useSingleServer().setAddress("redis://" + host + ":" + port).setDatabase(database);
// }
// //config.useSingleServer().setAddress("redis://" + host + ":" + port).setPassword(password).setDatabase(database);
// //添加主从配置
//// config.useMasterSlaveServers().setMasterAddress("").setPassword("").addSlaveAddress(new String[]{"",""});
//
// return Redisson.create(config);
// }
//
//}

View File

@ -1,17 +0,0 @@
//package co.yixiang.redisson;
//
//import lombok.Data;
//
//import java.io.Serializable;
//
//
///**
// * Created by kl on 2018/7/20.
// * Content :延时job
// */
//@Data
//public class DelayJob implements Serializable {
// private Integer orderId;//job执行参数
// private Class aClass;//具体执行实例实现
//
//}

View File

@ -1,32 +0,0 @@
//package co.yixiang.redisson;
//
//import org.redisson.api.RBlockingQueue;
//import org.redisson.api.RDelayedQueue;
//import org.redisson.api.RedissonClient;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.util.concurrent.TimeUnit;
//
///**
// * Created by kl on 2018/7/20.
// * Content :延时job服务
// */
//@Component
//public class DelayJobService {
//
// @Autowired
// private RedissonClient client;
//
// /**
// * 添加超时任务到redis队列
// * @param job 任务
// * @param delay 超时时间
// */
// public void submitJob(DelayJob job, Long delay){
// RBlockingQueue<DelayJob> blockingQueue = client.getBlockingQueue(JobTimer.jobsTag);
// RDelayedQueue<DelayJob> delayedQueue = client.getDelayedQueue(blockingQueue);
// delayedQueue.offer(job,delay,TimeUnit.SECONDS);
// }
//
//}

View File

@ -1,10 +0,0 @@
//package co.yixiang.redisson;
//
///**
// * Created by kl on 2018/7/20.
// * Content :延时job执行器接口
// */
//public interface ExecuteJob {
//
// void execute(DelayJob job);
//}

View File

@ -1,77 +0,0 @@
//package co.yixiang.redisson;
//
//import cn.hutool.core.util.ObjectUtil;
//import org.redisson.api.RBlockingQueue;
//import org.redisson.api.RDelayedQueue;
//import org.redisson.api.RedissonClient;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.ApplicationContext;
//import org.springframework.stereotype.Component;
//import javax.annotation.PostConstruct;
//import java.util.concurrent.ExecutorService;
//import java.util.concurrent.Executors;
//import java.util.concurrent.TimeUnit;
//
///**
// * 消费已经到点的延时job服务通过job参数调用业务执行器实现
// */
//@Component
//public class JobTimer {
//
// static final String jobsTag = "customer_jobtimer_jobs";
// @Autowired
// private RedissonClient client;
//
// @Autowired
// private ApplicationContext context;
//
// ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);
//
// @PostConstruct
// public void startJobTimer() {
// RBlockingQueue<DelayJob> blockingQueue = client.getBlockingQueue(jobsTag);
//
// new Thread() {
// @Override
// public void run() {
// while (true) {
// try {
// DelayJob job = blockingQueue.take();
// if(ObjectUtil.isNotNull(job)){
// executorService.execute(new ExecutorTask(context, job));
// RDelayedQueue<DelayJob> delayedQueue = client.getDelayedQueue(blockingQueue);
// delayedQueue.destroy();
// }
// } catch (Exception e) {
// RDelayedQueue<DelayJob> delayedQueue = client.getDelayedQueue(blockingQueue);
// delayedQueue.destroy();
// e.printStackTrace();
// try {
// TimeUnit.SECONDS.sleep(60);
// } catch (Exception ex) {
// }
// }
// }
// }
// }.start();
// }
//
// class ExecutorTask implements Runnable {
//
// private ApplicationContext context;
//
// private DelayJob delayJob;
//
// public ExecutorTask(ApplicationContext context, DelayJob delayJob) {
// this.context = context;
// this.delayJob = delayJob;
// }
//
// @Override
// public void run() {
// ExecuteJob service = (ExecuteJob) context.getBean(delayJob.getAClass());
// service.execute(delayJob);
// }
// }
//
//}