2 changed files with 51 additions and 1 deletions
@ -0,0 +1,48 @@
|
||||
//package com.logpm.basicdata;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSONObject;
|
||||
//import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
|
||||
//import com.logpm.basicdata.service.IBasicdataWarehouseService;
|
||||
//import org.junit.jupiter.api.Test;
|
||||
//import org.junit.jupiter.api.extension.ExtendWith;
|
||||
//import org.springblade.common.cache.CacheNames;
|
||||
//import org.springblade.core.redis.cache.BladeRedis;
|
||||
//import org.springblade.core.test.BladeBootTest;
|
||||
//import org.springblade.core.test.BladeSpringExtension;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//
|
||||
//@ExtendWith(BladeSpringExtension.class)
|
||||
//@BladeBootTest(appName = "logpm-basicdata-zhy", enableLoader = true)
|
||||
//public class TestService {
|
||||
//
|
||||
// @Autowired
|
||||
// private BladeRedis bladeRedis;
|
||||
// @Autowired
|
||||
// private IBasicdataWarehouseService basicdataWarehouseService;
|
||||
//
|
||||
//
|
||||
// @Test
|
||||
// public void test3() throws IOException {
|
||||
//
|
||||
// BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseService.getById(1684441029670547458L);
|
||||
//
|
||||
//// bladeRedis.setEx(CacheNames.tenantKeyObj("627683", CacheNames.USER_WAREHOUSE_KEY, "1649331096967450625"), JSONObject.toJSONString(warehouseEntity), 30 * 24 * 60 * 60L);
|
||||
//
|
||||
//// Object o = bladeRedis.get("627683:logpm:user:warehouse:select:1649331096967450625");
|
||||
//
|
||||
//
|
||||
//// bladeRedis.setEx(CacheNames.tenantKeyObj("627683111", CacheNames.USER_WAREHOUSE_KEY, "1649331096967450625"), ProtostuffUtil.serialize(warehouseEntity), 30 * 24 * 60 * 60L);
|
||||
//// Object o = bladeRedis.get("627683111:logpm:user:warehouse:select:1649331096967450625");
|
||||
//
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("name","xiaob");
|
||||
// jsonObject.put("age",23);
|
||||
//
|
||||
// bladeRedis.setEx(CacheNames.tenantKeyObj("627683", CacheNames.USER_WAREHOUSE_KEY, "1649331096967450625"), jsonObject.toJSONString(), 30 * 24 * 60 * 60L);
|
||||
//
|
||||
// System.out.println(111);
|
||||
// }
|
||||
//
|
||||
//}
|
Loading…
Reference in new issue