From 691cbf9350a6e98bfeb3cc2274906da75466bf1d Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 22 九月 2023 09:08:16 +0800 Subject: [PATCH] 销售价 --- server/service/src/main/java/com/doumee/service/impl/CateParamSelectServiceImpl.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/impl/CateParamSelectServiceImpl.java b/server/service/src/main/java/com/doumee/service/impl/CateParamSelectServiceImpl.java index 0f3717a..62bd13a 100644 --- a/server/service/src/main/java/com/doumee/service/impl/CateParamSelectServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/impl/CateParamSelectServiceImpl.java @@ -17,6 +17,7 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; @@ -153,7 +154,8 @@ @Override @Async - public void dealCateParamSelect() { + @Transactional + public void dealCateParamSelect() { LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); Boolean isGrouping = (Boolean)redisTemplate.opsForValue().get(loginUserInfo.getCompanyId()+Constants.CATE_PARAM_OPEN); if(isGrouping!=null && isGrouping ){ @@ -166,9 +168,11 @@ //鏂板褰撳墠浼佷笟鍙互浣跨敤鐨勬暟鎹� cateParamSelectMapper.insertBatch(loginUserInfo.getCompanyId(),loginUserInfo.getId()); }catch (Exception e){ - + e.printStackTrace(); }finally { redisTemplate.opsForValue().set(loginUserInfo.getCompanyId()+Constants.CATE_PARAM_OPEN,false); } } + + } -- Gitblit v1.9.3