|
@@ -3,7 +3,7 @@ package com.huimv.eartag2.eartag.service;
|
|
|
import com.huimv.eartag2.common.service.IBaseConfigService;
|
|
|
import com.huimv.eartag2.common.service.impl.BaseConfigServiceImpl;
|
|
|
import com.huimv.eartag2.common.utils.BizConst;
|
|
|
-import org.junit.Test;
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
import org.junit.runner.RunWith;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
@@ -29,7 +29,20 @@ public class ServiceTest {
|
|
|
@Autowired
|
|
|
private IBaseConfigService iBaseConfigService;
|
|
|
@Autowired
|
|
|
- private RedisTemplate redisTemplate;
|
|
|
+ public RedisTemplate redisTemplate;
|
|
|
+
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void test4 (){
|
|
|
+ String hashKey = "hash:tempAlarm:farmCode:110101002";
|
|
|
+// redisTemplate.opsForHash().delete(hashKey);
|
|
|
+ redisTemplate.opsForHash().put(hashKey,"eartagMaxTem","30");
|
|
|
+ redisTemplate.opsForHash().put(hashKey,"eartagMinTem","20");
|
|
|
+
|
|
|
+ System.out.println( redisTemplate.opsForHash().get(hashKey,"eartagMaxTem"));
|
|
|
+ System.out.println( redisTemplate.opsForHash().get(hashKey,"eartagMinTem"));
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
@Test
|
|
|
public void test_1(){
|