This commit is contained in:
parent
3726ebbe16
commit
c2e615e949
|
|
@ -113,6 +113,12 @@
|
||||||
<version>3.3.2</version>
|
<version>3.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>wiki.xsx</groupId>
|
||||||
|
<artifactId>redis-spring-boot-starter</artifactId>
|
||||||
|
<version>2.2.8</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,7 @@ import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.constant.FactoryCodeEnum;
|
import com.nflg.product.bomnew.constant.FactoryCodeEnum;
|
||||||
import com.nflg.product.bomnew.constant.MBomConstantEnum;
|
import com.nflg.product.bomnew.constant.MBomConstantEnum;
|
||||||
import com.nflg.product.bomnew.constant.ValueEnum;
|
import com.nflg.product.bomnew.constant.ValueEnum;
|
||||||
import com.nflg.product.bomnew.pojo.dto.BomNewMBomChildDTO;
|
import com.nflg.product.bomnew.pojo.dto.*;
|
||||||
import com.nflg.product.bomnew.pojo.dto.BomNewMbomApplyBackMaterialDTO;
|
|
||||||
import com.nflg.product.bomnew.pojo.dto.BomNewMbomDetailDTO;
|
|
||||||
import com.nflg.product.bomnew.pojo.dto.BomNewMbomSuperStatusDTO;
|
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewMbomBackMaterialQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewMbomBackMaterialQuery;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BomNewMbomBackMaterialVO;
|
import com.nflg.product.bomnew.pojo.vo.BomNewMbomBackMaterialVO;
|
||||||
|
|
@ -23,6 +20,7 @@ import com.nflg.product.bomnew.pojo.vo.BomNewMbomParentVO;
|
||||||
import com.nflg.product.bomnew.service.BomNewMbomBackMaterialService;
|
import com.nflg.product.bomnew.service.BomNewMbomBackMaterialService;
|
||||||
import com.nflg.product.bomnew.service.BomNewMbomDetailService;
|
import com.nflg.product.bomnew.service.BomNewMbomDetailService;
|
||||||
import com.nflg.product.bomnew.service.BomNewMbomParentService;
|
import com.nflg.product.bomnew.service.BomNewMbomParentService;
|
||||||
|
import com.nflg.product.bomnew.service.RedisService;
|
||||||
import com.nflg.product.bomnew.util.EnumUtils;
|
import com.nflg.product.bomnew.util.EnumUtils;
|
||||||
import com.nflg.product.bomnew.util.VUtils;
|
import com.nflg.product.bomnew.util.VUtils;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|
@ -35,6 +33,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* t_bom_new_mbom_parent 表控制层
|
* t_bom_new_mbom_parent 表控制层
|
||||||
|
|
@ -204,6 +203,19 @@ public class MBomApi extends BaseApi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
RedisService redisService;
|
||||||
|
|
||||||
|
@GetMapping("redisTest")
|
||||||
|
@ApiOperation("redis 测试")
|
||||||
|
public ResultVO<Set<String>> redisTest() {
|
||||||
|
|
||||||
|
return ResultVO.success(redisService.test());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.nflg.product.bomnew.service;
|
||||||
|
|
||||||
|
import com.nflg.product.bomnew.pojo.dto.AddMaterialMainDTO;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import wiki.xsx.core.handler.DBHandler;
|
||||||
|
import wiki.xsx.core.handler.ListHandler;
|
||||||
|
import wiki.xsx.core.handler.SetHandler;
|
||||||
|
import wiki.xsx.core.util.RedisUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class RedisService {
|
||||||
|
|
||||||
|
private SetHandler setHandler= RedisUtil.getSetHandler();
|
||||||
|
|
||||||
|
public Set<String> test(){
|
||||||
|
AddMaterialMainDTO ddd=new AddMaterialMainDTO();
|
||||||
|
setHandler.add("testluo","lou");
|
||||||
|
setHandler.add("testluo","luolm");
|
||||||
|
setHandler.remove("testluo@V002","luo");
|
||||||
|
|
||||||
|
StringRedisTemplate template= setHandler.getStringRedisTemplate();
|
||||||
|
Set<String> keys = template.keys("test*");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return keys;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue