From 1218de3ca12e3748211cc339d25b4363deb20dee Mon Sep 17 00:00:00 2001 From: hupeng Date: Fri, 22 Nov 2019 20:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=A2=E9=95=BF=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=8B=BC=E5=9B=A2=E4=B8=8D=E5=AE=8C=E5=96=84=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8F=8A=E5=85=B6=E6=8B=BC=E5=9B=A2=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E4=B8=80=E4=B8=AA=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/YxStoreCombinationServiceImpl.java | 1 + .../service/impl/YxStorePinkServiceImpl.java | 29 +++++++++++++++++++ .../service/impl/YxStoreOrderServiceImpl.java | 2 ++ .../main/resources/config/application-dev.yml | 6 ++-- .../src/main/resources/config/application.yml | 2 +- .../co/yixiang/redisson/RedissonConfig.java | 18 ++++++++---- .../main/resources/config/application-dev.yml | 6 ++-- 7 files changed, 52 insertions(+), 12 deletions(-) diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java index bcc0d059..d8f6e789 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java @@ -56,6 +56,7 @@ public class YxStoreCombinationServiceImpl extends BaseServiceImpl wrapperO = new QueryWrapper<>(); + YxStorePink storePinkO = new YxStorePink(); + storePinkO.setKId(0); + storePinkO.setStatus(1); + storePinkO.setStopTime(OrderUtil.getSecondTimestampTwo()+""); + storePinkO.setId(nextPinkT.getId()); + yxStorePinkMapper.updateById(storePinkO); + + //原有团长的数据变更成新团长下面 + wrapperO.eq("k_id",pinkT.getId()); + YxStorePink storePinkT = new YxStorePink(); + storePinkT.setKId(nextPinkT.getId()); + yxStorePinkMapper.update(storePinkT,wrapperO); + + //update order + + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setPinkId(nextPinkT.getId()); + storeOrder.setId(nextPinkT.getId()); + + storeOrderService.updateById(storeOrder); + + + } } /** diff --git a/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java index d034359b..91cf0b8e 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java @@ -137,6 +137,8 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl config = new HashMap<>(16); // create "testMap" cache with ttl = 24 minutes and maxIdleTime = 12 minutes - config.put("testMap",new CacheConfig(24*60*1000,12*60*1000)); - return new RedissonSpringCacheManager(redissonClient,config); + config.put("testMap", new CacheConfig(24 * 60 * 1000, 12 * 60 * 1000)); + return new RedissonSpringCacheManager(redissonClient, config); } /** * 自定义缓存key生成策略,默认将使用该策略 * 使用方法 @Cacheable + * * @return */ @Bean diff --git a/yshop-system/src/main/resources/config/application-dev.yml b/yshop-system/src/main/resources/config/application-dev.yml index b219f67f..4e0c4856 100644 --- a/yshop-system/src/main/resources/config/application-dev.yml +++ b/yshop-system/src/main/resources/config/application-dev.yml @@ -4,9 +4,9 @@ spring: druid: type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://106.12.82.39:3306/yxshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false + url: jdbc:log4jdbc:mysql://localhost:3306/yxshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false username: root - password: Admin@123 + password: root # 初始化配置 initial-size: 3 @@ -46,7 +46,7 @@ spring: database: 0 host: 127.0.0.1 port: 6379 - password: root + password: #连接超时时间 timeout: 5000