Commit 2b7722dc by levphon

新e盾admin服务api

0 parents
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ne-shield-parent</artifactId>
<groupId>com.glsx</groupId>
<version>1.2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>ne-shield-trialdrive-admin-api</artifactId>
<dependencies>
<!-- feign -->
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-feign</artifactId>
</dependency>
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-core</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
package cn.com.glsx.admin.api;
import cn.com.glsx.admin.dto.AddElectricFenceRequest;
import com.glsx.plat.core.web.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = "ne-shield-trialdrive-admin",
contextId = "feignFence",
path = "/trialdrive/felecfence",
decode404 = true)
public interface ElectricFenceService {
@PostMapping(value = "/add", consumes = MediaType.APPLICATION_JSON_VALUE)
R<Long> add(@RequestBody AddElectricFenceRequest request);
}
package cn.com.glsx.admin.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class AddElectricFenceRequest {
@NotBlank(message = "围栏名称不能为空")
private String fenceName;
/**
* 业务围栏类型 0警情围栏,1试驾围栏
*/
private Integer bizFenceType;
/**
* 围栏形状类型 1.圆形(默认) 2.矩形 3.多边形 4.行政区域
*/
@NotNull(message = "区域类型不能为空")
private Integer shapeType;
/**
* 半径(米)
*/
private Integer radius;
/**
* 经纬度坐标(行政区域形状围栏大数据侧按行政区域编码来控制)
*/
//@NotBlank(message = "经纬度不能为空")
private String lnglat;
/**
* 监控类型 1驶入,2驶出,3:驶入驶出报警
*/
private Integer triggerType;
/**
* 时间周期 1:永久 2:指定区间
*/
private Integer timeType;
/**
* 起始日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
private Date startTime;
/**
* 关闭日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
private Date endTime;
/**
* 描述(备注)
*/
private String remark;
/**
* 行政区域代码
*/
private String areaCode;
/**
* 行政区域
*/
private String areaText;
/**
* 通知对象的电话号码,多个电话号码用逗号分隔
*/
private String telNumbers;
/**
* 启用状态:0关闭;1开启
*/
private Integer enableStatus;
/**
* 电子栅栏与sn关联集合
*/
private List<String> snList = new ArrayList<>();
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!