Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 51a2005d
authored
May 18, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
围栏、设备
1 parent
dbac7e70
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
229 additions
and
89 deletions
src/main/java/cn/com/glsx/admin/modules/controller/ElectricFenceController.java
src/main/java/cn/com/glsx/admin/modules/mapper/ElectricFenceMapper.java
src/main/java/cn/com/glsx/admin/modules/mapper/ElectricFenceSnsMapper.java
src/main/java/cn/com/glsx/admin/modules/model/ElectricFenceBO.java
src/main/java/cn/com/glsx/admin/modules/model/ElectricFenceDetailsDTO.java
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
src/main/resources/mapper/ElectricFenceMapper.xml
src/main/resources/mapper/ElectricFenceSnsMapper.xml
src/test/java/cn/com/glsx/test/AdminApplicationTests.java
src/main/java/cn/com/glsx/admin/modules/controller/ElectricFenceController.java
View file @
51a2005
package
cn
.
com
.
glsx
.
admin
.
modules
.
controller
;
package
cn
.
com
.
glsx
.
admin
.
modules
.
controller
;
import
cn.com.glsx.admin.modules.model.ElectricFenceBO
;
import
cn.com.glsx.admin.modules.model.ElectricFenceBO
;
import
cn.com.glsx.admin.modules.model.ElectricFenceDetailsDTO
;
import
cn.com.glsx.admin.modules.service.ElectricFenceService
;
import
com.glsx.plat.common.annotation.SysLog
;
import
com.glsx.plat.common.annotation.SysLog
;
import
com.glsx.plat.core.web.R
;
import
com.glsx.plat.core.web.R
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -15,6 +20,9 @@ import org.springframework.web.bind.annotation.*;
...
@@ -15,6 +20,9 @@ import org.springframework.web.bind.annotation.*;
@Api
(
value
=
"围栏管理"
,
tags
=
{
"围栏管理"
})
@Api
(
value
=
"围栏管理"
,
tags
=
{
"围栏管理"
})
public
class
ElectricFenceController
{
public
class
ElectricFenceController
{
@Autowired
private
ElectricFenceService
electricFenceService
;
/**
/**
* 新增围栏
* 新增围栏
*
*
...
@@ -24,8 +32,11 @@ public class ElectricFenceController {
...
@@ -24,8 +32,11 @@ public class ElectricFenceController {
@SysLog
(
"新增围栏"
)
@SysLog
(
"新增围栏"
)
@PostMapping
(
value
=
"/add"
)
@PostMapping
(
value
=
"/add"
)
@ApiOperation
(
value
=
"新增围栏"
)
@ApiOperation
(
value
=
"新增围栏"
)
public
R
add
(
@RequestBody
@Validated
ElectricFenceBO
fenceBO
)
{
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"fenceName"
,
value
=
"fenceName"
,
required
=
true
,
dataType
=
"cn.com.glsx.admin.modules.model.ElectricFenceBO"
,
paramType
=
"body"
)
})
public
R
add
(
@RequestBody
@Validated
ElectricFenceBO
fenceBO
)
throws
Exception
{
electricFenceService
.
addFence
(
fenceBO
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
@@ -38,7 +49,8 @@ public class ElectricFenceController {
...
@@ -38,7 +49,8 @@ public class ElectricFenceController {
@SysLog
(
"编辑围栏"
)
@SysLog
(
"编辑围栏"
)
@PostMapping
(
value
=
"/edit"
)
@PostMapping
(
value
=
"/edit"
)
@ApiOperation
(
value
=
"编辑围栏"
)
@ApiOperation
(
value
=
"编辑围栏"
)
public
R
edit
(
@RequestBody
@Validated
ElectricFenceBO
fenceBO
)
{
public
R
edit
(
@RequestBody
@Validated
ElectricFenceBO
fenceBO
)
throws
Exception
{
electricFenceService
.
updateFence
(
fenceBO
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
@@ -48,11 +60,11 @@ public class ElectricFenceController {
...
@@ -48,11 +60,11 @@ public class ElectricFenceController {
* @param fenceId
* @param fenceId
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/info"
)
@GetMapping
(
value
=
"/info
/{fenceId}
"
)
@ApiOperation
(
value
=
"查看围栏详情"
)
@ApiOperation
(
value
=
"查看围栏详情"
)
public
R
info
(
@
RequestParam
(
"fenceId"
)
Long
fenceId
)
{
public
R
info
(
@
PathVariable
(
"fenceId"
)
Long
fenceId
)
{
ElectricFenceDetailsDTO
detailsDTO
=
electricFenceService
.
getInfoById
(
fenceId
);
return
R
.
ok
();
return
R
.
ok
()
.
data
(
detailsDTO
)
;
}
}
/**
/**
...
@@ -65,7 +77,7 @@ public class ElectricFenceController {
...
@@ -65,7 +77,7 @@ public class ElectricFenceController {
@GetMapping
(
value
=
"/delete"
)
@GetMapping
(
value
=
"/delete"
)
@ApiOperation
(
value
=
"删除围栏"
)
@ApiOperation
(
value
=
"删除围栏"
)
public
R
delete
(
@RequestParam
(
"fenceId"
)
Long
fenceId
)
{
public
R
delete
(
@RequestParam
(
"fenceId"
)
Long
fenceId
)
{
electricFenceService
.
deleteById
(
fenceId
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
src/main/java/cn/com/glsx/admin/modules/mapper/ElectricFenceMapper.java
View file @
51a2005
...
@@ -3,7 +3,17 @@ package cn.com.glsx.admin.modules.mapper;
...
@@ -3,7 +3,17 @@ package cn.com.glsx.admin.modules.mapper;
import
cn.com.glsx.admin.modules.entity.ElectricFence
;
import
cn.com.glsx.admin.modules.entity.ElectricFence
;
import
com.glsx.plat.mybatis.mapper.CommonBaseMapper
;
import
com.glsx.plat.mybatis.mapper.CommonBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
@Mapper
public
interface
ElectricFenceMapper
extends
CommonBaseMapper
<
ElectricFence
>
{
public
interface
ElectricFenceMapper
extends
CommonBaseMapper
<
ElectricFence
>
{
/**
* 逻辑删除
*
* @param id
* @return
*/
int
logicDeleteById
(
@Param
(
"id"
)
Long
id
);
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/admin/modules/mapper/ElectricFenceSnsMapper.java
View file @
51a2005
...
@@ -14,4 +14,13 @@ public interface ElectricFenceSnsMapper extends CommonBaseMapper<ElectricFenceSn
...
@@ -14,4 +14,13 @@ public interface ElectricFenceSnsMapper extends CommonBaseMapper<ElectricFenceSn
@Select
(
"select * from d_electric_fence_sns where fenceId=#{fenceId} and source=1"
)
@Select
(
"select * from d_electric_fence_sns where fenceId=#{fenceId} and source=1"
)
List
<
ElectricFenceSns
>
selectByFenceId
(
@Param
(
"fenceId"
)
Long
fenceId
);
List
<
ElectricFenceSns
>
selectByFenceId
(
@Param
(
"fenceId"
)
Long
fenceId
);
/**
* 逻辑删除
*
* @param fenceId
* @return
*/
int
logicDeleteByFenceId
(
@Param
(
"fenceId"
)
Long
fenceId
);
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/admin/modules/model/ElectricFenceBO.java
View file @
51a2005
...
@@ -2,6 +2,7 @@ package cn.com.glsx.admin.modules.model;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.admin.modules.model;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -22,6 +23,7 @@ public class ElectricFenceBO implements Serializable {
...
@@ -22,6 +23,7 @@ public class ElectricFenceBO implements Serializable {
/**
/**
* 栅栏名称
* 栅栏名称
*/
*/
@NotBlank
(
message
=
"栅栏名称不能为空"
)
private
String
fenceName
;
private
String
fenceName
;
/**
/**
* 围栏编号
* 围栏编号
...
@@ -84,10 +86,6 @@ public class ElectricFenceBO implements Serializable {
...
@@ -84,10 +86,6 @@ public class ElectricFenceBO implements Serializable {
private
String
areaText
;
private
String
areaText
;
/**
/**
* 解析地址
*/
private
String
analysisAddress
;
/**
* 通知对象的电话号码,多个电话号码用逗号分隔
* 通知对象的电话号码,多个电话号码用逗号分隔
*/
*/
private
String
telNumbers
;
private
String
telNumbers
;
...
...
src/main/java/cn/com/glsx/admin/modules/model/ElectricFenceDetailsDTO.java
0 → 100644
View file @
51a2005
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
ElectricFenceDetailsDTO
{
private
Long
id
;
/**
* 栅栏名称
*/
private
String
fenceName
;
/**
* 围栏编号
*/
private
String
fenceNo
;
/**
* 业务围栏类型 0警情围栏,1试驾围栏
*/
private
Integer
bizFenceType
;
/**
* 定位信息类型 1gps,2基站
*/
private
Integer
locationType
;
/**
* 围栏形状类型 1.圆形(默认) 2.矩形 3.多边形 4.行政区域
*/
private
Integer
shapeType
;
/**
* 半径(米)
*/
private
Integer
radius
;
/**
* 经纬度坐标
*/
private
String
lnglat
;
/**
* 触发类型 1驶入,2驶出,3:驶入驶出报警
*/
private
Integer
triggerType
;
/**
* 时间周期 1:永久 2:指定区间
*/
private
Integer
timeType
;
/**
* 起始日期
*/
private
Date
startTime
;
/**
* 关闭日期
*/
private
Date
endTime
;
/**
* 启用状态:0关闭;1开启
*/
private
Integer
enableStatus
;
/**
* 描述(备注)
*/
private
String
remark
;
/**
* 行政区域代码
*/
private
String
areaCode
;
/**
* 行政区域
*/
private
String
areaText
;
/**
* 解析地址
*/
private
String
analysisAddress
;
/**
* 通知对象的电话号码,多个电话号码用逗号分隔
*/
private
String
telNumbers
;
/**
* 电子栅栏与sn关联集合
*/
private
List
<
ElectricFenceSnsDTO
>
snList
=
new
ArrayList
<>();
}
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
View file @
51a2005
...
@@ -5,9 +5,10 @@ import cn.com.glsx.admin.modules.entity.ElectricFence;
...
@@ -5,9 +5,10 @@ import cn.com.glsx.admin.modules.entity.ElectricFence;
import
cn.com.glsx.admin.modules.mapper.ElectricFenceMapper
;
import
cn.com.glsx.admin.modules.mapper.ElectricFenceMapper
;
import
cn.com.glsx.admin.modules.mapper.ElectricFenceSnsMapper
;
import
cn.com.glsx.admin.modules.mapper.ElectricFenceSnsMapper
;
import
cn.com.glsx.admin.modules.model.ElectricFenceBO
;
import
cn.com.glsx.admin.modules.model.ElectricFenceBO
;
import
cn.com.glsx.admin.modules.model.ElectricFenceDetailsDTO
;
import
cn.com.glsx.admin.modules.model.ElectricFenceSnsModel
;
import
cn.com.glsx.auth.utils.ShieldContextHolder
;
import
cn.com.glsx.auth.utils.ShieldContextHolder
;
import
com.glsx.plat.common.utils.DateUtils
;
import
com.glsx.plat.common.utils.DateUtils
;
import
com.glsx.plat.context.utils.PropertiesUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -15,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -15,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Slf4j
@Slf4j
@Service
@Service
...
@@ -93,8 +95,15 @@ public class ElectricFenceService {
...
@@ -93,8 +95,15 @@ public class ElectricFenceService {
}
}
}
}
@Transactional
public
void
linkDevice
(
ElectricFence
fence
,
List
<
ElectricFenceSnsModel
>
snList
)
{
public
void
linkDevice
(
ElectricFenceBO
fenceBO
)
throws
Exception
{
}
public
ElectricFenceDetailsDTO
getInfoById
(
Long
fenceId
)
{
return
null
;
}
public
void
deleteById
(
Long
fenceId
)
{
}
}
...
...
src/main/resources/mapper/ElectricFenceMapper.xml
View file @
51a2005
<?xml version="1.0" encoding="UTF-8"?>
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.com.glsx.admin.modules.mapper.ElectricFenceMapper"
>
<mapper
namespace=
"cn.com.glsx.admin.modules.mapper.ElectricFenceMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.ElectricFence"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.ElectricFence"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"fence_name"
jdbcType=
"VARCHAR"
property=
"fenceName"
/>
<result
column=
"fence_name"
jdbcType=
"VARCHAR"
property=
"fenceName"
/>
<result
column=
"fence_no"
jdbcType=
"VARCHAR"
property=
"fenceNo"
/>
<result
column=
"fence_no"
jdbcType=
"VARCHAR"
property=
"fenceNo"
/>
<result
column=
"biz_fence_type"
jdbcType=
"TINYINT"
property=
"bizFenceType"
/>
<result
column=
"biz_fence_type"
jdbcType=
"TINYINT"
property=
"bizFenceType"
/>
<result
column=
"location_type"
jdbcType=
"TINYINT"
property=
"locationType"
/>
<result
column=
"location_type"
jdbcType=
"TINYINT"
property=
"locationType"
/>
<result
column=
"shape_type"
jdbcType=
"TINYINT"
property=
"shapeType"
/>
<result
column=
"shape_type"
jdbcType=
"TINYINT"
property=
"shapeType"
/>
<result
column=
"radius"
jdbcType=
"INTEGER"
property=
"radius"
/>
<result
column=
"radius"
jdbcType=
"INTEGER"
property=
"radius"
/>
<result
column=
"trigger_type"
jdbcType=
"TINYINT"
property=
"triggerType"
/>
<result
column=
"trigger_type"
jdbcType=
"TINYINT"
property=
"triggerType"
/>
<result
column=
"time_type"
jdbcType=
"TINYINT"
property=
"timeType"
/>
<result
column=
"time_type"
jdbcType=
"TINYINT"
property=
"timeType"
/>
<result
column=
"start_time"
jdbcType=
"DATE"
property=
"startTime"
/>
<result
column=
"start_time"
jdbcType=
"DATE"
property=
"startTime"
/>
<result
column=
"end_time"
jdbcType=
"DATE"
property=
"endTime"
/>
<result
column=
"end_time"
jdbcType=
"DATE"
property=
"endTime"
/>
<result
column=
"enable_status"
jdbcType=
"TINYINT"
property=
"enableStatus"
/>
<result
column=
"enable_status"
jdbcType=
"TINYINT"
property=
"enableStatus"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"area_code"
jdbcType=
"VARCHAR"
property=
"areaCode"
/>
<result
column=
"area_code"
jdbcType=
"VARCHAR"
property=
"areaCode"
/>
<result
column=
"area_text"
jdbcType=
"VARCHAR"
property=
"areaText"
/>
<result
column=
"area_text"
jdbcType=
"VARCHAR"
property=
"areaText"
/>
<result
column=
"analysis_address"
jdbcType=
"VARCHAR"
property=
"analysisAddress"
/>
<result
column=
"analysis_address"
jdbcType=
"VARCHAR"
property=
"analysisAddress"
/>
<result
column=
"tel_numbers"
jdbcType=
"VARCHAR"
property=
"telNumbers"
/>
<result
column=
"tel_numbers"
jdbcType=
"VARCHAR"
property=
"telNumbers"
/>
<result
column=
"record"
jdbcType=
"VARCHAR"
property=
"record"
/>
<result
column=
"record"
jdbcType=
"VARCHAR"
property=
"record"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"updated_by"
jdbcType=
"INTEGER"
property=
"updatedBy"
/>
<result
column=
"updated_by"
jdbcType=
"INTEGER"
property=
"updatedBy"
/>
</resultMap>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"cn.com.glsx.admin.modules.entity.ElectricFence"
>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"cn.com.glsx.admin.modules.entity.ElectricFence"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
<result
column=
"lnglat"
jdbcType=
"LONGVARCHAR"
property=
"lnglat"
/>
<result
column=
"lnglat"
jdbcType=
"LONGVARCHAR"
property=
"lnglat"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
id, fence_name, fence_no, biz_fence_type, location_type, shape_type, radius,
id, fence_name, fence_no, biz_fence_type, location_type, shape_type, radius,
trigger_type, time_type, start_time, end_time, `enable_status`, remark, area_code, area_text,
trigger_type, time_type, start_time, end_time, `enable_status`, remark, area_code, area_text,
record, analysis_address, tel_numbers, del_flag, created_date, created_by,
record, analysis_address, tel_numbers, del_flag, created_date, created_by,
updated_date, updated_by
updated_date, updated_by
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
lnglat
lnglat
</sql>
</sql>
<update
id=
"logicDeleteById"
>
update t_electric_fence
set del_flag = -1
where id = #{id}
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
src/main/resources/mapper/ElectricFenceSnsMapper.xml
View file @
51a2005
<?xml version="1.0" encoding="UTF-8"?>
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.com.glsx.admin.modules.mapper.ElectricFenceSnsMapper"
>
<mapper
namespace=
"cn.com.glsx.admin.modules.mapper.ElectricFenceSnsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.ElectricFenceSns"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.ElectricFenceSns"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"fence_id"
jdbcType=
"INTEGER"
property=
"fenceId"
/>
<result
column=
"fence_id"
jdbcType=
"INTEGER"
property=
"fenceId"
/>
<result
column=
"sn"
jdbcType=
"VARCHAR"
property=
"sn"
/>
<result
column=
"sn"
jdbcType=
"VARCHAR"
property=
"sn"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"vin"
jdbcType=
"VARCHAR"
property=
"vin"
/>
<result
column=
"vin"
jdbcType=
"VARCHAR"
property=
"vin"
/>
<result
column=
"user_tel"
jdbcType=
"VARCHAR"
property=
"userTel"
/>
<result
column=
"user_tel"
jdbcType=
"VARCHAR"
property=
"userTel"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"updated_by"
jdbcType=
"INTEGER"
property=
"updatedBy"
/>
<result
column=
"updated_by"
jdbcType=
"INTEGER"
property=
"updatedBy"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
id, fence_id, sn, `name`, vin, user_tel, del_flag, created_date, created_by,
id, fence_id, sn, `name`, vin, user_tel, del_flag, created_date, created_by,
updated_date, updated_by
updated_date, updated_by
</sql>
</sql>
<update
id=
"logicDeleteByFenceId"
>
update t_electric_fence
set del_flag = -1
where fence_id = #{fenceId}
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
src/test/java/cn/com/glsx/test/AdminApplicationTests.java
View file @
51a2005
...
@@ -62,7 +62,6 @@ public class AdminApplicationTests {
...
@@ -62,7 +62,6 @@ public class AdminApplicationTests {
fenceBO
.
setRemark
(
"这是一个测试围栏"
);
fenceBO
.
setRemark
(
"这是一个测试围栏"
);
fenceBO
.
setAreaCode
(
"12213"
);
fenceBO
.
setAreaCode
(
"12213"
);
fenceBO
.
setAreaText
(
"深圳"
);
fenceBO
.
setAreaText
(
"深圳"
);
fenceBO
.
setAnalysisAddress
(
"深圳深南大道"
);
fenceBO
.
setTelNumbers
(
"13800138000"
);
fenceBO
.
setTelNumbers
(
"13800138000"
);
electricFenceService
.
addFence
(
fenceBO
);
electricFenceService
.
addFence
(
fenceBO
);
}
}
...
@@ -86,7 +85,6 @@ public class AdminApplicationTests {
...
@@ -86,7 +85,6 @@ public class AdminApplicationTests {
fenceBO
.
setRemark
(
"这是一个测试围栏"
);
fenceBO
.
setRemark
(
"这是一个测试围栏"
);
fenceBO
.
setAreaCode
(
"12213"
);
fenceBO
.
setAreaCode
(
"12213"
);
fenceBO
.
setAreaText
(
"深圳"
);
fenceBO
.
setAreaText
(
"深圳"
);
fenceBO
.
setAnalysisAddress
(
"深圳深南大道333"
);
fenceBO
.
setTelNumbers
(
"13800138000"
);
fenceBO
.
setTelNumbers
(
"13800138000"
);
electricFenceService
.
updateFence
(
fenceBO
);
electricFenceService
.
updateFence
(
fenceBO
);
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment