test:(电子围栏组和电子围栏)

dev
zhang xu 2024-05-31 21:52:08 +08:00
parent bacd7f18da
commit ced68c06c0
6 changed files with 166 additions and 1 deletions

View File

@ -0,0 +1,33 @@
package com.muyu.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 15:16
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FenceGroups extends BaseEntity {
/**
*id
* */
private Long id;
/**
*
* */
private String groupName;
/**
*
* */
private List<Fences> fencesList;
}

View File

@ -0,0 +1,62 @@
package com.muyu.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.naming.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 15:11
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class Fences extends BaseEntity {
/**
*
*id
* **/
private Long id;
/**
*id
*
* **/
private String groupId;
/**
*
*
* **/
private String fenceName;
/**
*
*
* **/
private String fenceType;
/**
*
*
* **/
private Double radius;
/**
*
*
* **/
private String eventType;
/**
*
*
* **/
private String staut;
/**
*
*
* **/
private String polygonPoints;
}

View File

@ -0,0 +1,18 @@
package com.muyu.networking.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.domain.Fences;
import org.apache.ibatis.annotations.Mapper;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 16:21
*/
@Mapper
public interface FenceMapper extends BaseMapper<Fences> {
int addFeace(Fences fences);
}

View File

@ -0,0 +1,16 @@
package com.muyu.networking.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.domain.Fences;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 16:22
*/
public interface FenceService extends IService<Fences> {
int insertFence(Fences fences);
}

View File

@ -1,6 +1,7 @@
package com.muyu.networking.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.domain.Information;
import java.util.List;
@ -11,7 +12,7 @@ import java.util.List;
* @author ruoyi
* @date 2024-05-27
*/
public interface IInformationService
public interface IInformationService extends IService<Information>
{
/**
*

View File

@ -0,0 +1,35 @@
package com.muyu.networking.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.domain.Fences;
import com.muyu.networking.mapper.FenceMapper;
import com.muyu.networking.service.FenceService;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.stream.Collectors;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 16:23
*/
public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fences> implements FenceService {
@Override
public int insertFence(Fences fences) {
return 0;
}
}