jiaosong
2023-09-19 7fc79e5c6c98fa7fe1e2279572251a45f0970c65
server/service/src/main/java/com/doumee/service/impl/CateParamSelectServiceImpl.java
@@ -11,6 +11,8 @@
import com.doumee.dao.business.model.CateParamSelect;
import com.doumee.service.CateParamSelectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -24,6 +26,8 @@
@Service
public class CateParamSelectServiceImpl implements CateParamSelectService {
    @Autowired
    private RedisTemplate redisTemplate;
    @Autowired
    private CateParamSelectMapper cateParamSelectMapper;
@@ -142,4 +146,22 @@
        QueryWrapper<CateParamSelect> wrapper = new QueryWrapper<>(cateParamSelect);
        return cateParamSelectMapper.selectCount(wrapper);
    }
    @Override
    @Async
    public   void dealGroupVals(Integer companyId) {
        Boolean  isGrouping = (Boolean)redisTemplate.opsForValue().get(companyId+"_isGrouping");
        if(isGrouping!=null && isGrouping ){
            return;
        }
        redisTemplate.opsForValue().set(companyId+"_isGrouping",true);
        try {
            //---------TODO-------任康
        }catch (Exception e){
        }finally {
            redisTemplate.opsForValue().set(companyId+"_isGrouping",false);
        }
    }
}