Compare commits
2 Commits
87d3c291c4
...
1ca8cc4281
Author | SHA1 | Date |
---|---|---|
|
1ca8cc4281 | |
|
0335ab8678 |
|
@ -0,0 +1,63 @@
|
|||
package com.dragon.vehicle.history.domain.common;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 围栏表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("fence")
|
||||
public class Fence {
|
||||
/**
|
||||
* 字段属性:围栏主键id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer fenceId;
|
||||
/**
|
||||
* 字段属性:围栏名称
|
||||
*/
|
||||
private String fenceName;
|
||||
/**
|
||||
* 字段属性:围栏数据
|
||||
*/
|
||||
private String fenceData;
|
||||
/**s
|
||||
* 字段属性:围栏状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 字段属性:告警类型
|
||||
*/
|
||||
private Integer alarmType;
|
||||
/**
|
||||
* 字段属性:围栏标签id
|
||||
*/
|
||||
private Integer fenceTagId;
|
||||
/**
|
||||
* 字段属性:创建人
|
||||
*/
|
||||
private String createdBy;
|
||||
/**
|
||||
* 字段属性:创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
/**
|
||||
* 字段属性:更新人
|
||||
*/
|
||||
private String updatedBy;
|
||||
/**
|
||||
* 字段属性:更新时间
|
||||
*/
|
||||
private Date updatedTime;
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.dragon.vehicle.history.domain.common;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 围栏授权表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("fence_tag")
|
||||
public class FenceTag {
|
||||
/**
|
||||
* 字段属性:租户号
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private String tenantId;
|
||||
/**
|
||||
* 字段属性:乐观锁
|
||||
*/
|
||||
private String revision;
|
||||
/**
|
||||
* 字段属性:创建人
|
||||
*/
|
||||
private String createdBy;
|
||||
/**
|
||||
* 字段属性:创建时间
|
||||
*/
|
||||
private String createdTime;
|
||||
/**
|
||||
* 字段属性:更新人
|
||||
*/
|
||||
private String updatedBy;
|
||||
/**
|
||||
* 字段属性:更新时间
|
||||
*/
|
||||
private String updatedTime;
|
||||
/**
|
||||
* 字段属性:围栏标签主键id
|
||||
*/
|
||||
private String fenceTagId;
|
||||
/**
|
||||
* 字段属性:围栏标签名称
|
||||
*/
|
||||
private String fenceTagName;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.dragon.vehicle.history.domain.common.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 添加的围栏载体
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AddFenceReq {
|
||||
/**
|
||||
* 字段属性:围栏名称
|
||||
*/
|
||||
private String fenceName;
|
||||
/**
|
||||
* 字段属性:围栏数据
|
||||
*/
|
||||
private String fenceData;
|
||||
/**
|
||||
* 字段属性:围栏状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 字段属性:告警类型
|
||||
*/
|
||||
private Integer alarmType;
|
||||
/**
|
||||
* 字段属性:围栏标签id
|
||||
*/
|
||||
private Integer fenceTagId;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.dragon.vehicle.history.domain.common.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 添加的围栏标签载体
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AddFenceTagReq {
|
||||
/**
|
||||
* 字段属性:围栏标签名称
|
||||
*/
|
||||
private String fenceTagName;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package dragon.vehicle.fence.remote;
|
||||
package com.dragon.vehicle.fence.remote;
|
||||
|
||||
/**
|
||||
* @author 冯凯
|
|
@ -1,6 +1,6 @@
|
|||
package dragon.vehicle.fence.remote.factory;
|
||||
package com.dragon.vehicle.fence.remote.factory;
|
||||
|
||||
import dragon.vehicle.fence.remote.RemoteFenceService;
|
||||
import com.dragon.vehicle.fence.remote.RemoteFenceService;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
|
@ -1 +1 @@
|
|||
dragon.vehicle.fence.remote.factory.RemoteFenceServiceFallbackFactory
|
||||
com.dragon.vehicle.fence.remote.factory.RemoteFenceServiceFallbackFactory
|
||||
|
|
|
@ -91,6 +91,17 @@
|
|||
<groupId>com.dragon</groupId>
|
||||
<artifactId>dragon-system-common</artifactId>
|
||||
</dependency>
|
||||
<!-- aop 依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
<!-- 用于日志切面中,以 json 格式打印出入参 -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package dragon.vehicle.fence.server;
|
||||
package com.dragon.vehicle.fence.server;
|
||||
|
||||
import com.dragon.common.security.annotation.EnableCustomConfig;
|
||||
import com.dragon.common.security.annotation.EnableDragonFeignClients;
|
||||
|
@ -19,6 +19,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||
public class DragonVehicleFenceApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DragonVehicleFenceApplication.class,args);
|
||||
SpringApplication.run(DragonVehicleFenceApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.dragon.vehicle.fence.server.aop;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.METHOD})
|
||||
@Documented
|
||||
public @interface WebLog {
|
||||
/**
|
||||
* 日志描述信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String description() default "";
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package com.dragon.vehicle.fence.server.aop;
|
||||
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.*;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
|
||||
@Aspect
|
||||
@Component
|
||||
@Profile({"dev","test"})
|
||||
@Log4j2
|
||||
public class WebLogAspect {
|
||||
/** 换行符 **/
|
||||
private static final String LINE_SEPARATOR = System.lineSeparator();
|
||||
|
||||
/** 以自定义@WebLog 注解为切点 */
|
||||
@Pointcut("@annotation(com.dragon.vehicle.fence.server.aop.WebLog)")
|
||||
public void webLog(){}
|
||||
|
||||
/**
|
||||
* 在切点之前织入
|
||||
* @param joinPoint
|
||||
* @throws Throwable
|
||||
*/
|
||||
@Before("webLog()")
|
||||
public void doBefore(JoinPoint joinPoint) throws Throwable {
|
||||
//开始打印请求日志
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
|
||||
//获取@WebLog注解的描述信息
|
||||
String methodDescription = getAspectLogDescription(joinPoint);
|
||||
|
||||
//打印相关请求参数
|
||||
log.info("================ Start =================");
|
||||
//打印请求url
|
||||
log.info("URL :{}",request.getRequestURL().toString());
|
||||
//打印描述信息
|
||||
log.info("Description :{}",methodDescription);
|
||||
//打印Http method
|
||||
log.info("HTTP Method :{}", request.getMethod());
|
||||
//打印调用的controller的全路径已经执行方法
|
||||
log.info("Class Method :{},{}",joinPoint.getSignature().getDeclaringTypeName(),joinPoint.getSignature().getName());
|
||||
//打印请求的IP
|
||||
log.info("IP :{}",request.getRemoteAddr());
|
||||
//打印请求入参
|
||||
log.info("Request Args :{}", new Gson().toJson(joinPoint.getArgs()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 在切点之后织入
|
||||
* @throws Throwable
|
||||
*/
|
||||
@After("webLog()")
|
||||
public void doAfter() throws Throwable {
|
||||
//接口结束后换行,方便分割查看
|
||||
log.info("================ End =================");
|
||||
}
|
||||
|
||||
/**
|
||||
* 环绕
|
||||
*
|
||||
* @param proceedingJoinPoint
|
||||
* @return
|
||||
* @throws Throwable
|
||||
*/
|
||||
@Around("webLog()")
|
||||
public Object doAround(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
|
||||
long startTime = System.currentTimeMillis();
|
||||
Object result = proceedingJoinPoint.proceed();
|
||||
//打印出参
|
||||
log.info("Response Args : {}", new Gson().toJson(result));
|
||||
//执行耗时
|
||||
log.info("Time-Consuming :{} ms", System.currentTimeMillis()-startTime);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取切面注解的描述
|
||||
*
|
||||
* @param joinPoint 切点
|
||||
* @return 描述信息
|
||||
* @throws Exception
|
||||
*/
|
||||
public String getAspectLogDescription(JoinPoint joinPoint) throws Exception{
|
||||
String targetName = joinPoint.getTarget().getClass().getName();
|
||||
String methodName = joinPoint.getSignature().getName();
|
||||
Object[] arguments = joinPoint.getArgs();
|
||||
Class targetClass = Class.forName(targetName);
|
||||
Method[] methods = targetClass.getMethods();
|
||||
StringBuilder description = new StringBuilder("");
|
||||
for (Method method : methods){
|
||||
if (method.getName().equals(methodName)){
|
||||
Class[] clazzs = method.getParameterTypes();
|
||||
if(clazzs.length == arguments.length){
|
||||
description.append(method.getAnnotation(WebLog.class).description());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return description.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.dragon.vehicle.fence.server.controller;
|
||||
|
||||
import com.dragon.common.core.domain.Result;
|
||||
import com.dragon.vehicle.fence.server.service.FenceTagService;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.history.domain.common.FenceTag;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceTagReq;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 围栏标识控制层
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/fenceTag")
|
||||
public class FenceTagController {
|
||||
@Autowired
|
||||
private FenceTagService tagService;
|
||||
|
||||
/**
|
||||
* 查询所有的标识表
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public Result<List<FenceTag>> list() {
|
||||
return Result.success(tagService.list());
|
||||
}
|
||||
/**
|
||||
* 查询这个围栏标签下的围栏数据
|
||||
*/
|
||||
@GetMapping("/selectIdFence/{fenceTagId}")
|
||||
public Result<List<Fence>> selectIdFence(@PathVariable Integer fenceTagId){
|
||||
return tagService.selectIdFence(fenceTagId);
|
||||
}
|
||||
|
||||
@PostMapping("/insert")
|
||||
public Result insert(@RequestBody AddFenceTagReq addFenceTagReq){
|
||||
FenceTag fenceTag =tagService.insert(addFenceTagReq);
|
||||
return Result.success(tagService.save(fenceTag));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.dragon.vehicle.fence.server.controller;
|
||||
|
||||
import com.dragon.common.core.domain.Result;
|
||||
import com.dragon.vehicle.fence.server.aop.WebLog;
|
||||
import com.dragon.vehicle.fence.server.mapper.VehicleFenceMapper;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.fence.server.service.VehicleFenceService;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceReq;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 围栏控制层
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@RequestMapping("/fence")
|
||||
public class VehicleFenceController {
|
||||
@Autowired
|
||||
private VehicleFenceService vehicleFenceService;
|
||||
@Autowired
|
||||
private VehicleFenceMapper vehicleFenceMapper;
|
||||
|
||||
/**
|
||||
* 方法序号:1-1
|
||||
* 查询所有的电子围栏数据
|
||||
* @param
|
||||
* @return:Result<List<Fence>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@WebLog(description = "管理员请求了查询所有电子围栏请求")
|
||||
public Result<List<Fence>> list(){
|
||||
return Result.success(vehicleFenceService.list(),"查询成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法序号:1-2
|
||||
* 添加电子围栏信息
|
||||
* @param addFenceReq
|
||||
* @return:Result
|
||||
*/
|
||||
@PostMapping("/insert")
|
||||
@WebLog(description = "管理员添加了新的电子围栏")
|
||||
public Result insert(@RequestBody AddFenceReq addFenceReq){
|
||||
//给对象赋值
|
||||
Fence fence = vehicleFenceService.insertFence(addFenceReq);
|
||||
return Result.success(vehicleFenceService.save(fence),"添加成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法序号:1-3
|
||||
* 删除电子围栏信息
|
||||
* @param fenceId
|
||||
* @return:Result
|
||||
*/
|
||||
@GetMapping("/delete/{fenceId}")
|
||||
@WebLog(description = "管理员删除了那个围栏")
|
||||
public Result delete(@PathVariable Integer fenceId){
|
||||
return Result.success(vehicleFenceMapper.deleteById(fenceId),"删除成功");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.dragon.vehicle.fence.server.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.history.domain.common.FenceTag;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author 冯凯
|
||||
* @version 1.0
|
||||
* @description:
|
||||
* @date 2023/11/19 19:26
|
||||
*/
|
||||
@Mapper
|
||||
public interface FenceTagMapper extends BaseMapper<FenceTag> {
|
||||
List<Fence> selectIdFence(@Param("fenceTagId") Integer fenceTagId);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.dragon.vehicle.fence.server.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* @author 冯凯
|
||||
* @version 1.0
|
||||
* @description:
|
||||
* @date 2023/11/19 19:26
|
||||
*/
|
||||
@Mapper
|
||||
public interface VehicleFenceMapper extends BaseMapper<Fence> {
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.dragon.vehicle.fence.server.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dragon.common.core.domain.Result;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.history.domain.common.FenceTag;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceTagReq;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface FenceTagService extends IService<FenceTag> {
|
||||
|
||||
Result<List<Fence>> selectIdFence(Integer fenceTagId);
|
||||
|
||||
FenceTag insert(AddFenceTagReq addFenceTagReq);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.dragon.vehicle.fence.server.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceReq;
|
||||
|
||||
public interface VehicleFenceService extends IService<Fence> {
|
||||
|
||||
Fence insertFence(AddFenceReq addFenceReq);
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.dragon.vehicle.fence.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dragon.common.core.domain.Result;
|
||||
import com.dragon.vehicle.fence.server.mapper.FenceTagMapper;
|
||||
import com.dragon.vehicle.fence.server.service.FenceTagService;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.history.domain.common.FenceTag;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceTagReq;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class FenceTagServiceImpl extends ServiceImpl<FenceTagMapper, FenceTag> implements FenceTagService{
|
||||
@Autowired
|
||||
private FenceTagMapper fenceTagMapper;
|
||||
@Override
|
||||
public Result<List<Fence>> selectIdFence(Integer fenceTagId) {
|
||||
List<Fence> fences=fenceTagMapper.selectIdFence(fenceTagId);
|
||||
Result<List<Fence>> result = (Result<List<Fence>>) Result.success(fences);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FenceTag insert(AddFenceTagReq addFenceTagReq) {
|
||||
FenceTag.builder().build()
|
||||
.setFenceTagName(addFenceTagReq.getFenceTagName());
|
||||
return new FenceTag();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.dragon.vehicle.fence.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dragon.vehicle.fence.server.mapper.VehicleFenceMapper;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.fence.server.service.VehicleFenceService;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceReq;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Service
|
||||
public class VehicleFenceServiceImpl extends ServiceImpl<VehicleFenceMapper, Fence> implements VehicleFenceService {
|
||||
@Override
|
||||
public Fence insertFence(AddFenceReq addFenceReq) {
|
||||
Fence fence = new Fence();
|
||||
fence.setFenceName(addFenceReq.getFenceName());
|
||||
fence.setFenceData(addFenceReq.getFenceData());
|
||||
fence.setAlarmType(addFenceReq.getAlarmType());
|
||||
fence.setStatus(1);
|
||||
/*//获取当前登录人
|
||||
SysUser user = SecurityUtils.getLoginUser().getSysUser();
|
||||
fence.setCreatedBy(user.getUserName());*/
|
||||
fence.setCreatedTime(new Date());
|
||||
return fence;
|
||||
}
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package dragon.vehicle.fence.server.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author 冯凯
|
||||
* @version 1.0
|
||||
* @description:
|
||||
* @date 2023/11/19 19:26
|
||||
*/
|
||||
@Mapper
|
||||
public interface VehicleFenceMapper {
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
<?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.dragon.vehicle.fence.server.mapper.FenceTagMapper">
|
||||
<sql id="fence">
|
||||
select fence_id,
|
||||
fence_name,
|
||||
fence_data,
|
||||
status,
|
||||
alarm_type,
|
||||
fence_tag_id,
|
||||
created_by,
|
||||
created_time,
|
||||
updated_by,
|
||||
updated_time
|
||||
from fence
|
||||
|
||||
</sql>
|
||||
<select id="selectIdFence" resultType="com.dragon.vehicle.history.domain.common.Fence">
|
||||
<include refid="fence"></include>
|
||||
<where>
|
||||
<if test="fenceTagId != null">
|
||||
and fence_tag_id = #{fenceTagId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,6 +1,4 @@
|
|||
<?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="dragon.vehicle.fence.server.mapper.VehicleFenceMapper">
|
||||
|
||||
|
||||
<mapper namespace="com.dragon.vehicle.fence.server.mapper.VehicleFenceMapper">
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue