修改首页缓存时间

This commit is contained in:
mx 2024-11-14 18:37:00 +08:00
parent 51d656dd76
commit 99bf1c3e71
4 changed files with 18 additions and 15 deletions

View File

@ -75,40 +75,40 @@ public interface CacheNames {
/** /**
* 首页查询(成交金额) * 首页查询(成交金额)
*/ */
String HOME_A = "home_queryA#60s"; String HOME_A = "home_queryA#1200s";
/** /**
* 首页查询(回款统计与合同) * 首页查询(回款统计与合同)
*/ */
String HOME_B = "home_queryB#60s"; String HOME_B = "home_queryB#1200s";
/** /**
* 首页查询(成交金额) * 首页查询(成交金额)
*/ */
String HOME_C = "home_queryC#60s"; String HOME_C = "home_queryC#1200s";
/** /**
* 首页查询 * 首页查询
*/ */
String HOME_D = "home_queryD#60s"; String HOME_D = "home_queryD#1200s";
/** /**
* 首页查询 * 首页查询
*/ */
String HOME_E = "home_queryE#60s"; String HOME_E = "home_queryE#1200s";
/** /**
* 首页查询 * 首页查询
*/ */
String HOME_F = "home_queryF#60s"; String HOME_F = "home_queryF#1200s";
/** /**
* 首页查询 * 首页查询
*/ */
String HOME_G = "home_queryG#60s"; String HOME_G = "home_queryG#1200s";
/** /**
* 首页查询 * 首页查询
*/ */
String HOME_H = "home_queryH#60s"; String HOME_H = "home_queryH#1200s";
/** /**
* 首页查询 * 首页查询
*/ */
String HOME_I = "home_queryI#60s"; String HOME_I = "home_queryI#1200s";
} }

View File

@ -19,19 +19,19 @@ public class UserAmountInfoVo {
/** /**
* 合同数量 * 合同数量
*/ */
private Integer contractNum=0; private Integer contractNum = 0;
/** /**
* 合同总金额 * 合同总金额
*/ */
private BigDecimal sumAmount=new BigDecimal(0); private BigDecimal sumAmount = new BigDecimal(0);
/** /**
* 已支付总金额 * 已支付总金额
*/ */
private BigDecimal payedSumAmount=new BigDecimal(0); private BigDecimal payedSumAmount = new BigDecimal(0);
/** /**
* 未支付金额 * 未支付金额
*/ */
private BigDecimal unPaySumAmount=new BigDecimal(0); private BigDecimal unPaySumAmount = new BigDecimal(0);
/** /**
* 托管类型合同总金额 类型号:4 * 托管类型合同总金额 类型号:4

View File

@ -31,7 +31,7 @@ public class UserAmountVo {
/** /**
* 各人员成交金额 * 各人员成交金额
*/ */
private Collection<UserAmountInfoVo> userAmountList; private List<UserAmountInfoVo> userAmountList;
/** /**

View File

@ -299,6 +299,7 @@ public class HomeServiceImpl implements HomeService {
* @param isCaiwu * @param isCaiwu
* @return * @return
*/ */
@Cacheable(cacheNames = CacheNames.HOME_E, key = "#type")
public UserAmountVo getUserContractSourceAmountsByDeptId(Integer type, int tabType){ public UserAmountVo getUserContractSourceAmountsByDeptId(Integer type, int tabType){
Map<String, Object> mapParam = this.getDate(type); Map<String, Object> mapParam = this.getDate(type);
LocalDate startDate = (LocalDate)mapParam.get("startDate"); LocalDate startDate = (LocalDate)mapParam.get("startDate");
@ -486,6 +487,7 @@ public class HomeServiceImpl implements HomeService {
* @param type * @param type
* @return * @return
*/ */
@Cacheable(cacheNames = CacheNames.HOME_F, key = "#type")
public UserAmountVo getUserContractAndPayInfo(Integer type, int tabType){ public UserAmountVo getUserContractAndPayInfo(Integer type, int tabType){
Map<String, Object> mapParam = this.getDate(type); Map<String, Object> mapParam = this.getDate(type);
LocalDate startDate = (LocalDate)mapParam.get("startDate"); LocalDate startDate = (LocalDate)mapParam.get("startDate");
@ -578,7 +580,7 @@ public class HomeServiceImpl implements HomeService {
} }
UserAmountVo userAmountVo = new UserAmountVo(); UserAmountVo userAmountVo = new UserAmountVo();
userAmountVo.setUserAmountList(resMap.values()); userAmountVo.setUserAmountList(new ArrayList<>(resMap.values()));
userAmountVo.setDateStr(date); userAmountVo.setDateStr(date);
userAmountVo.setAll(sumAmount); userAmountVo.setAll(sumAmount);
return userAmountVo; return userAmountVo;
@ -743,6 +745,7 @@ public class HomeServiceImpl implements HomeService {
* @param type * @param type
* @return * @return
*/ */
@Cacheable(cacheNames = CacheNames.HOME_G, key = "#type")
public SalasVo salasData(Integer type){ public SalasVo salasData(Integer type){
Map<String, Object> mapParam = this.getDateByUser(type); Map<String, Object> mapParam = this.getDateByUser(type);
LocalDate startDate = (LocalDate)mapParam.get("startDate"); LocalDate startDate = (LocalDate)mapParam.get("startDate");