|
@@ -1,6 +1,7 @@
|
|
|
package com.sooka.system.gas.zenner_gas_purchase_center_infor.service.impl;
|
|
|
|
|
|
import com.sooka.common.core.text.Convert;
|
|
|
+import com.sooka.common.utils.CacheUtils;
|
|
|
import com.sooka.common.utils.DateUtils;
|
|
|
import com.sooka.system.gas.zenner_gas_purchase_center_infor.domain.TGuijiZennerGasPurchaseCenterInfor;
|
|
|
import com.sooka.system.gas.zenner_gas_purchase_center_infor.mapper.TGuijiZennerGasPurchaseCenterMapper;
|
|
@@ -8,7 +9,9 @@ import com.sooka.system.gas.zenner_gas_purchase_center_infor.service.ITGuijiZenn
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 真兰收费系统-中心计费购气信息Service业务层处理
|
|
@@ -47,6 +50,26 @@ public class TGuijiZennerGasPurchaseCenterInforServiceImpl implements ITGuijiZen
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 获取cache name
|
|
|
+ *
|
|
|
+ * @return 缓存名
|
|
|
+ */
|
|
|
+ public Long getTotal(String tableName)
|
|
|
+ {
|
|
|
+ Long total = Convert.toLong(CacheUtils.get("guiji-data-count", tableName));//cacheName, cacheKey
|
|
|
+ if(total == null){
|
|
|
+ Map map = new HashMap();
|
|
|
+ map.put("tableName", tableName);
|
|
|
+ total = mapper.getDataCount(map);
|
|
|
+ CacheUtils.put("guiji-data-count", tableName, total);//cacheName, cacheKey
|
|
|
+ System.out.println("分页功能 缓存加入成功:" + tableName);
|
|
|
+ }else {
|
|
|
+ System.out.println("分页功能 根据缓存名称及键值获取缓存:" + tableName);
|
|
|
+ }
|
|
|
+ return total;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 新增真兰收费系统-中心计费购气信息
|
|
|
*
|
|
|
* @param param 真兰收费系统-中心计费购气信息
|