Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cba6ad51
authored
Mar 17, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加假性离线消费的测试用例
1 parent
6add2cb1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
7 deletions
src/main/java/cn/com/glsx/stdinterface/modules/controller/FakeOfficeController.java
src/main/java/cn/com/glsx/stdinterface/modules/entity/FakeOfflineFenceSn.java
src/main/java/cn/com/glsx/stdinterface/modules/mapper/FakeOfflineFenceSnMapper.java
src/main/java/cn/com/glsx/stdinterface/modules/service/FakeOfficeService.java
src/main/resources/mapper/FakeOfflineFenceSnMapper.xml
src/main/java/cn/com/glsx/stdinterface/modules/controller/FakeOfficeController.java
View file @
cba6ad5
...
@@ -10,10 +10,9 @@ import io.swagger.annotations.Api;
...
@@ -10,10 +10,9 @@ import io.swagger.annotations.Api;
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.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
java.util.List
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
* 试驾统计 Controller
* 试驾统计 Controller
...
@@ -28,6 +27,16 @@ public class FakeOfficeController implements FakeOfficeClient {
...
@@ -28,6 +27,16 @@ public class FakeOfficeController implements FakeOfficeClient {
@Autowired
@Autowired
private
FakeOfficeService
fakeOfficeService
;
private
FakeOfficeService
fakeOfficeService
;
@Override
@GetMapping
(
value
=
"/getFakeOfficeData"
)
@SysLog
(
module
=
MODULE
,
value
=
"查询假性离线数据"
,
action
=
OperateType
.
QUERY
,
saveLog
=
false
)
@ApiOperation
(
value
=
"查询假性离线数据"
)
public
R
<
List
<
FakeOfflineFenceSnDto
>>
getFakeOfficeData
(
@RequestParam
String
uniqueFlag
)
{
List
<
FakeOfflineFenceSnDto
>
fakeOfflineFenceSnDtoList
=
fakeOfficeService
.
getFakeOfficeData
(
uniqueFlag
);
return
R
.
ok
().
data
(
fakeOfflineFenceSnDtoList
);
}
@Override
@Override
@PostMapping
(
value
=
"/storeFakeList"
)
@PostMapping
(
value
=
"/storeFakeList"
)
@SysLog
(
module
=
MODULE
,
value
=
"保存假性离线数据"
,
action
=
OperateType
.
ADD
,
saveLog
=
false
)
@SysLog
(
module
=
MODULE
,
value
=
"保存假性离线数据"
,
action
=
OperateType
.
ADD
,
saveLog
=
false
)
...
...
src/main/java/cn/com/glsx/stdinterface/modules/entity/FakeOfflineFenceSn.java
View file @
cba6ad5
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.glsx.plat.mybatis.base.BaseEntity
;
import
lombok.Data
;
import
lombok.ToString
;
import
lombok.experimental.Accessors
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
java.util.Date
;
/** * 假性离线围栏数据 * * @author yangll */
@Data
@Accessors
(
chain
=
true
)
@ToString
@Table
(
name
=
"t_fake_offline_fence_sn"
)
public
class
FakeOfflineFenceSn
extends
BaseEntity
{
/** * 设备号 */
private
String
sn
;
/** * 是否在家庭围栏或者工作围栏内, 1表是在围栏内, 2表示不在围栏内 */
private
Integer
status
;
/** * 围栏类型: 1.家庭所在地围栏 2.工作所在地围栏 */
@Column
(
name
=
"merchant_type"
)
private
Integer
merchantType
;
/** * 进围栏时间 */
@Column
(
name
=
"entry_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
entryTime
;
/** * 出围栏时间 */
@Column
(
name
=
"out_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
outTime
;
/** * 家庭所在地围栏|工作所在地围栏 */
private
String
addr
;
}
\ No newline at end of file
\ No newline at end of file
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.glsx.plat.mybatis.base.BaseEntity
;
import
lombok.Data
;
import
lombok.ToString
;
import
lombok.experimental.Accessors
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
java.util.Date
;
/** * 假性离线围栏数据 * * @author yangll */
@Data
@ToString
@Table
(
name
=
"t_fake_offline_fence_sn"
)
public
class
FakeOfflineFenceSn
extends
BaseEntity
{
/** * 设备号 */
private
String
sn
;
/** * 是否在家庭围栏或者工作围栏内, 1表是在围栏内, 2表示不在围栏内 */
private
Integer
status
;
/** * 围栏类型: 1.家庭所在地围栏 2.工作所在地围栏 */
@Column
(
name
=
"merchant_type"
)
private
Integer
merchantType
;
/** * 进围栏时间 */
@Column
(
name
=
"entry_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
entryTime
;
/** * 出围栏时间 */
@Column
(
name
=
"out_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
outTime
;
/** * 家庭所在地围栏|工作所在地围栏 */
private
String
addr
;
/** * 唯一标识位 */
@Column
(
name
=
"unique_flag"
)
private
String
uniqueFlag
;
}
\ No newline at end of file
\ No newline at end of file
...
...
src/main/java/cn/com/glsx/stdinterface/modules/mapper/FakeOfflineFenceSnMapper.java
View file @
cba6ad5
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
mapper
;
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
mapper
;
import
cn.com.glsx.stdinterface.dto.FakeOfflineFenceSnDto
;
import
cn.com.glsx.stdinterface.modules.entity.FakeOfflineFenceSn
;
import
cn.com.glsx.stdinterface.modules.entity.FakeOfflineFenceSn
;
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
;
import
java.util.List
;
/**
/**
* mapper
* mapper
...
@@ -13,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -13,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
public
interface
FakeOfflineFenceSnMapper
extends
CommonBaseMapper
<
FakeOfflineFenceSn
>
{
public
interface
FakeOfflineFenceSnMapper
extends
CommonBaseMapper
<
FakeOfflineFenceSn
>
{
List
<
FakeOfflineFenceSnDto
>
getFakeOfficeDataByUniqueFlag
(
@Param
(
"uniqueFlag"
)
String
uniqueFlag
);
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/stdinterface/modules/service/FakeOfficeService.java
View file @
cba6ad5
...
@@ -132,4 +132,14 @@ public class FakeOfficeService {
...
@@ -132,4 +132,14 @@ public class FakeOfficeService {
private
Vehicle
getVehicleBySn
(
String
sn
)
{
private
Vehicle
getVehicleBySn
(
String
sn
)
{
return
vehicleMapper
.
getVehicleBySn
(
sn
);
return
vehicleMapper
.
getVehicleBySn
(
sn
);
}
}
/**
* 通过唯一标识符 查询假性离线数据
*
* @param uniqueFlag 唯一标识符
* @return
*/
public
List
<
FakeOfflineFenceSnDto
>
getFakeOfficeData
(
String
uniqueFlag
)
{
return
fakeOfflineFenceSnMapper
.
getFakeOfficeDataByUniqueFlag
(
uniqueFlag
);
}
}
}
src/main/resources/mapper/FakeOfflineFenceSnMapper.xml
View file @
cba6ad5
...
@@ -8,15 +8,32 @@
...
@@ -8,15 +8,32 @@
<result
column=
"merchant_type"
property=
"merchantType"
jdbcType=
"TINYINT"
/>
<result
column=
"merchant_type"
property=
"merchantType"
jdbcType=
"TINYINT"
/>
<result
column=
"entry_time"
property=
"entryTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"entry_time"
property=
"entryTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"out_time"
property=
"outTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"out_time"
property=
"outTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"unique_flag"
property=
"uniqueFlag"
jdbcType=
"VARCHAR"
/>
<result
column=
"del_flag"
property=
"delFlag"
jdbcType=
"TINYINT"
/>
<result
column=
"del_flag"
property=
"delFlag"
jdbcType=
"TINYINT"
/>
<result
column=
"created_date"
property=
"createdDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"created_date"
property=
"createdDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"INTEGER"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"INTEGER"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"INTEGER"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"INTEGER"
/>
</resultMap>
</resultMap>
<resultMap
id=
"BaseDtoMap"
type=
"cn.com.glsx.stdinterface.dto.FakeOfflineFenceSnDto"
>
<result
column=
"sn"
property=
"sn"
jdbcType=
"VARCHAR"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"TINYINT"
/>
<result
column=
"merchant_type"
property=
"merchantType"
jdbcType=
"TINYINT"
/>
<result
column=
"entry_time"
property=
"entryTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"out_time"
property=
"outTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"unique_flag"
property=
"uniqueFlag"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"BaseColumns"
>
<sql
id=
"BaseColumns"
>
a.id, a.sn, a.status, a.merchant_type, a.entry_time, a.out_time, a.del_flag, a.
created_date,
id, sn, status, merchant_type, entry_time, out_time, unique_flag, del_flag,
created_date,
a.created_by, a.updated_date, a.
updated_by
created_by, updated_date,
updated_by
</sql>
</sql>
<select
id=
"getFakeOfficeDataByUniqueFlag"
resultMap=
"BaseDtoMap"
>
select
sn, status, merchant_type, entry_time, out_time, unique_flag
from t_fake_offline_fence_sn
where unique_flag = #{uniqueFlag}
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
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