修改代码

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