feat: 围栏列表
parent
759ad1ee6f
commit
5cba075219
|
@ -15,7 +15,6 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
|
@ -24,4 +23,3 @@ spring:
|
|||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -1,5 +1,8 @@
|
|||
package com.couplet.map.common.domin;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.couplet.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
@ -14,8 +17,10 @@ import java.util.Date;
|
|||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@TableName("couplet_fence")
|
||||
public class Fence extends BaseEntity {
|
||||
|
||||
@TableId(value = "fence_id", type = IdType.AUTO)
|
||||
/**
|
||||
* 围栏id
|
||||
*/
|
||||
|
@ -67,5 +72,9 @@ public class Fence extends BaseEntity {
|
|||
*/
|
||||
|
||||
private Integer alarmStatus;
|
||||
/**
|
||||
* 围栏类型
|
||||
*/
|
||||
private Integer fenceType;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.couplet.map.common.domin.request;
|
||||
|
||||
import com.couplet.common.core.web.domain.BaseEntity;
|
||||
import com.couplet.map.common.domin.Fence;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: LiJiaYao
|
||||
* @Date: 2024/3/28
|
||||
*/
|
||||
@Data
|
||||
public class FenceConfig{
|
||||
|
||||
|
||||
private String fenceName;
|
||||
/**
|
||||
* 围栏经纬度
|
||||
*/
|
||||
private String fenceLongitudeLatitude;
|
||||
private Integer pageNum=1;
|
||||
private Integer pageSize=3;
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -0,0 +1,46 @@
|
|||
package com.couplet.map.server.controller;
|
||||
|
||||
import com.couplet.common.core.domain.Result;
|
||||
import com.couplet.common.core.web.controller.BaseController;
|
||||
import com.couplet.map.common.domin.Fence;
|
||||
import com.couplet.map.common.domin.request.FenceConfig;
|
||||
import com.couplet.map.server.service.FenceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.couplet.common.core.utils.PageUtils.startPage;
|
||||
|
||||
/**
|
||||
* @Author: LiJiaYao
|
||||
* @Date: 2024/3/28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/fence")
|
||||
public class FenceController extends BaseController {
|
||||
|
||||
/**
|
||||
* 调用服务
|
||||
*/
|
||||
@Autowired
|
||||
private FenceService fenceService;
|
||||
|
||||
/**
|
||||
* 获取围栏列表
|
||||
* @return
|
||||
* @param fenceConfig
|
||||
*/
|
||||
@GetMapping("/fenceList")
|
||||
public Result<?> fenceList(@RequestBody FenceConfig fenceConfig){
|
||||
|
||||
startPage();
|
||||
List<Fence> list = fenceService.pageQuery(fenceConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.couplet.map.server.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.couplet.map.common.domin.Fence;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @Author: LiJiaYao
|
||||
* @Date: 2024/3/28
|
||||
*/
|
||||
@Mapper
|
||||
public interface FenceMapper extends BaseMapper<Fence> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.couplet.map.server.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.couplet.map.common.domin.Fence;
|
||||
import com.couplet.map.common.domin.request.FenceConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: LiJiaYao
|
||||
* @Date: 2024/3/28
|
||||
*/
|
||||
public interface FenceService extends IService<Fence> {
|
||||
List<Fence> pageQuery(FenceConfig fenceConfig);
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.couplet.map.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.couplet.map.common.domin.Fence;
|
||||
import com.couplet.map.common.domin.request.FenceConfig;
|
||||
import com.couplet.map.server.mapper.FenceMapper;
|
||||
import com.couplet.map.server.service.FenceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: LiJiaYao
|
||||
* @Date: 2024/3/28
|
||||
*/
|
||||
@Service
|
||||
public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fence> implements FenceService {
|
||||
|
||||
/**
|
||||
* 调用围栏mapper
|
||||
*/
|
||||
@Autowired
|
||||
private FenceMapper fenceMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<Fence> pageQuery(FenceConfig fenceConfig) {
|
||||
LambdaQueryWrapper<Fence> queryWrapper = new LambdaQueryWrapper<>();
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9999
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: couplet-electronic-fence
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
logging:
|
||||
level:
|
||||
com.couplet.trouble.mapper: DEBUG
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.couplet.map.server.mapper.FenceMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
|
@ -15,7 +15,6 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
|
@ -24,4 +23,3 @@ spring:
|
|||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
|
|
|
@ -15,7 +15,6 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
|
@ -24,4 +23,3 @@ spring:
|
|||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
|
|
|
@ -15,7 +15,6 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
|
@ -24,4 +23,3 @@ spring:
|
|||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
|
|
|
@ -15,7 +15,6 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
|
@ -24,7 +23,6 @@ spring:
|
|||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
logging:
|
||||
level:
|
||||
com.couplet.system.mapper: DEBUG
|
||||
|
|
|
@ -15,7 +15,6 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
|
@ -24,7 +23,6 @@ spring:
|
|||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
logging:
|
||||
level:
|
||||
com.couplet.trouble.mapper: DEBUG
|
||||
|
|
|
@ -15,7 +15,6 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 121.89.211.230:8848
|
||||
|
@ -24,4 +23,3 @@ spring:
|
|||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
|
||||
|
|
Loading…
Reference in New Issue