| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- package com.ydtech.modules.order.service;
- import com.baomidou.mybatisplus.extension.service.IService;
- import com.ydtech.modules.order.entity.po.SysQuoteConfig;
- import com.ydtech.modules.order.entity.po.SysQuoteRecord;
- import com.ydtech.modules.order.entity.po.SysQuoteUserConfigAppend;
- import com.ydtech.modules.order.entity.vo.QuoteNumRedisVo;
- import org.springframework.data.redis.core.RedisTemplate;
- import java.math.BigDecimal;
- import java.util.List;
- /**
- * 针对表【SysQuoteConfig】的数据库操作Service
- */
- public interface SysQuoteRedisService {
- /**
- * 模糊搜索报价次数的keys
- * @param pattern
- * @return
- */
- public List<String> searchKeysWithScan(String pattern);
- /**
- * 组装报价次数的redis数据
- * @return
- */
- public QuoteNumRedisVo assembleQuoteRedisData(String userId,List<SysQuoteConfig> sysQuoteConfigs);
- /**
- * 保存redis数据
- * @param quoteNumberRedis
- */
- public void saveRedisData(QuoteNumRedisVo quoteNumberRedis);
- /**
- * 获取报价次数缓存key
- * @param userId
- * @return
- */
- public String getQuoteNumberRedisKey(String userId);
- /**
- * 从redis获取用户报价次数的数据
- * @param userId
- * @return
- */
- public QuoteNumRedisVo getQuoteNumberRedisData(String userId);
- public void setQuoteRecordRedis(String userId, QuoteNumRedisVo quoteNumRedisVo);
- public void delQuoteRedis(String userId);
- /**
- * 更新所有的缓存数据
- * @param sysQuoteConfig
- * @return
- */
- public boolean updateAllQuoteRedis(SysQuoteConfig sysQuoteConfig);
- /**
- * 更新用户追加的缓存数据
- * @param sysQuoteUserConfigAppend
- * @return
- */
- public boolean updateUserQuoteAppendRedis(SysQuoteUserConfigAppend sysQuoteUserConfigAppend);
- /**
- * 报价之后redis数据更新
- * @param companyId
- * @param userId
- * @param licenseNo
- * @param num
- * @return
- */
- public void quoteAfterRedisData(String companyId,String userId,String licenseNo,Integer num);
- /**
- * 根据车辆信息获取最大的报价次数
- */
- public Integer getMaxQuoteNum(String companyId,String userId,String licenseNo);
- /**
- * 获取出单比例
- * @param companyId
- * @param userId
- * @return
- */
- public BigDecimal getQuoteRatio(String companyId, String userId);
- /**
- * 刷新报价次数
- * @param companyId
- * @param userId
- * @return
- */
- public void refreshQuoteNum(String companyId, String userId, List<SysQuoteRecord> sysQuoteRecords);
- }
|