修改代码

master
ZhiShuo_Lou 2023-11-24 09:14:47 +08:00
parent ca91f1eacd
commit 408645b006
1 changed files with 5 additions and 5 deletions

View File

@ -34,9 +34,9 @@ import java.util.Date;
@Log4j2 @Log4j2
public class FenceServiceImpl extends ServiceImpl<FenceMapper , Fence> implements FenceService { public class FenceServiceImpl extends ServiceImpl<FenceMapper , Fence> implements FenceService {
//redis // //redis
@Autowired // @Autowired
private RedisService redisService; // private RedisService redisService;
/** /**
* *
@ -80,11 +80,11 @@ public class FenceServiceImpl extends ServiceImpl<FenceMapper , Fence> implement
public boolean updateById(Fence entity) { public boolean updateById(Fence entity) {
entity.setUpdateTime(new Date()); entity.setUpdateTime(new Date());
//获取当前围栏坐标 //获取当前围栏坐标
String fenceLocation = entity.getFenceLocation(); // String fenceLocation = entity.getFenceLocation();
//将围栏坐标存储到redis中 //将围栏坐标存储到redis中
//key 围栏编号 //key 围栏编号
//value 围栏坐标信息 //value 围栏坐标信息
redisService.setCacheObject(entity.getFenceId()+"",fenceLocation); // redisService.setCacheObject(entity.getFenceId()+"",fenceLocation);
boolean update = super.updateById(entity); boolean update = super.updateById(entity);
if (!update){ if (!update){
log.warn("编辑围栏[/-{}-/]未成功! 请求参数:{}", log.warn("编辑围栏[/-{}-/]未成功! 请求参数:{}",