Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cneeds-server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangzr
cneeds-server
Commits
0c3416ec
Commit
0c3416ec
authored
4 years ago
by
zzrdark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.Log上传增加设备信息
2.增加 渠道号管理 修改接口 3.增加 渠道号统计页面
parent
28495493
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
135 additions
and
4 deletions
+135
-4
DeviceInfoDto.java
...src/main/java/com/mx/cneeds/common/dto/DeviceInfoDto.java
+5
-0
DeviceInfoVo.java
...o/src/main/java/com/mx/cneeds/common/vo/DeviceInfoVo.java
+87
-0
DeviceClient.java
...va/com/mx/cneeds/server/datashow/client/DeviceClient.java
+3
-0
DeviceController.java
...x/cneeds/server/datashow/web/device/DeviceController.java
+8
-0
LogController.java
...m/mx/cneeds/server/datashow/web/device/LogController.java
+0
-1
application.yml
cneeds-server-datashow/src/main/resources/application.yml
+1
-1
DeviceChannelController.java
.../mx/cneeds/server/device/web/DeviceChannelController.java
+25
-0
application.yml
cneeds-server-device/src/main/resources/application.yml
+1
-1
LogUploadController.java
...m/mx/cneeds/server/logupload/web/LogUploadController.java
+4
-0
application.yml
cneeds-server-logupload/src/main/resources/application.yml
+1
-1
No files found.
cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceInfoDto.java
View file @
0c3416ec
...
@@ -3,6 +3,7 @@ package com.mx.cneeds.common.dto;
...
@@ -3,6 +3,7 @@ package com.mx.cneeds.common.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @ClassName DeviceDto
* @ClassName DeviceDto
...
@@ -78,5 +79,9 @@ public class DeviceInfoDto {
...
@@ -78,5 +79,9 @@ public class DeviceInfoDto {
*/
*/
private
String
seriesNum
;
private
String
seriesNum
;
/**
* 渠道号Ids
*/
private
List
<
Long
>
channelIds
;
}
}
This diff is collapsed.
Click to expand it.
cneeds-common-pojo/src/main/java/com/mx/cneeds/common/vo/DeviceInfoVo.java
0 → 100644
View file @
0c3416ec
package
com
.
mx
.
cneeds
.
common
.
vo
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* @ClassName DeviceDto
* @Author zzrdark
* @Date 2020-03-25 18:51
* @Description TODO
**/
@Data
public
class
DeviceInfoVo
{
/**
* 设备id
*/
private
Long
deviceId
;
/**
*
*/
private
Long
deptId
;
/**
* imei
*/
private
String
imei
;
/**
* iccid
*/
private
String
iccid
;
/**
* 状态0未激活,1已激活
*/
private
String
status
;
/**
* 设备版本
*/
private
String
deviceVersion
;
/**
* 产品系列
*/
private
Long
seriesId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 激活时间
*/
private
Date
activeTime
;
/**
* 渠道号
*/
private
String
channelNums
;
/**
* 渠道号提示信息
*/
private
String
channelNumsMessage
;
/**
* 0:白名单,1:黑名单
*/
private
Integer
channelRules
;
/**
* 产品系列号
*/
private
String
seriesNum
;
/**
* 渠道号Ids
*/
private
List
<
Long
>
channelIds
;
}
This diff is collapsed.
Click to expand it.
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/client/DeviceClient.java
View file @
0c3416ec
...
@@ -93,4 +93,7 @@ public interface DeviceClient {
...
@@ -93,4 +93,7 @@ public interface DeviceClient {
@PostMapping
(
"/device/devicechannel/deleteSettingDeviceChannel"
)
@PostMapping
(
"/device/devicechannel/deleteSettingDeviceChannel"
)
void
deleteSettingDeviceChannel
(
@RequestBody
Long
deviceId
);
void
deleteSettingDeviceChannel
(
@RequestBody
Long
deviceId
);
@PostMapping
(
"/device/devicechannel/updateSettingDeviceChannel"
)
void
updateSettingDeviceChannel
(
@RequestBody
DeviceInfoDto
dto
);
}
}
This diff is collapsed.
Click to expand it.
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/DeviceController.java
View file @
0c3416ec
...
@@ -280,4 +280,12 @@ public class DeviceController {
...
@@ -280,4 +280,12 @@ public class DeviceController {
return
R
.
ok
();
return
R
.
ok
();
}
}
@PostMapping
(
"/deviceChannel/updateSettingDeviceChannel"
)
public
R
updateSettingDeviceChannel
(
DeviceInfoVo
vo
){
DeviceInfoDto
dto
=
new
DeviceInfoDto
();
BeanUtils
.
copyProperties
(
vo
,
dto
);
deviceClient
.
updateSettingDeviceChannel
(
dto
);
return
R
.
ok
();
}
}
}
This diff is collapsed.
Click to expand it.
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogController.java
View file @
0c3416ec
...
@@ -94,7 +94,6 @@ public class LogController {
...
@@ -94,7 +94,6 @@ public class LogController {
deviceInfoDtos
.
forEach
(
deviceInfoDto
->
{
deviceInfoDtos
.
forEach
(
deviceInfoDto
->
{
if
(
deviceLogDto
.
getDeviceId
().
equals
(
deviceInfoDto
.
getDeviceId
())
){
if
(
deviceLogDto
.
getDeviceId
().
equals
(
deviceInfoDto
.
getDeviceId
())
){
deviceLogDto
.
setSeriesNum
(
deviceInfoDto
.
getSeriesNum
());
deviceLogDto
.
setSeriesNum
(
deviceInfoDto
.
getSeriesNum
());
deviceLogDto
.
setDeviceVersion
(
deviceInfoDto
.
getDeviceVersion
());
}
}
});
});
});
});
...
...
This diff is collapsed.
Click to expand it.
cneeds-server-datashow/src/main/resources/application.yml
View file @
0c3416ec
spring
:
spring
:
profiles
:
profiles
:
active
:
prod
active
:
dev
application
:
application
:
name
:
cneeds-server-datashow
name
:
cneeds-server-datashow
server
:
server
:
...
...
This diff is collapsed.
Click to expand it.
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/web/DeviceChannelController.java
View file @
0c3416ec
package
com
.
mx
.
cneeds
.
server
.
device
.
web
;
package
com
.
mx
.
cneeds
.
server
.
device
.
web
;
import
com.mx.cneeds.common.dto.DeviceChannelDto
;
import
com.mx.cneeds.common.dto.DeviceChannelDto
;
import
com.mx.cneeds.common.dto.DeviceInfoDto
;
import
com.mx.cneeds.common.dto.SeriesDto
;
import
com.mx.cneeds.common.dto.SeriesDto
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.pager.PageUtils
;
import
com.mx.cneeds.common.result.R
;
import
com.mx.cneeds.common.result.R
;
...
@@ -9,6 +10,7 @@ import com.mx.cneeds.server.device.service.DeviceChannelService;
...
@@ -9,6 +10,7 @@ import com.mx.cneeds.server.device.service.DeviceChannelService;
import
com.mx.cneeds.server.device.service.DeviceInfoChannelService
;
import
com.mx.cneeds.server.device.service.DeviceInfoChannelService
;
import
com.mx.cneeds.server.device.service.DeviceInfoService
;
import
com.mx.cneeds.server.device.service.DeviceInfoService
;
import
com.mx.cneeds.server.entity.DeviceChannelEntity
;
import
com.mx.cneeds.server.entity.DeviceChannelEntity
;
import
com.mx.cneeds.server.entity.DeviceInfoChannelEntity
;
import
com.mx.cneeds.server.entity.DeviceInfoEntity
;
import
com.mx.cneeds.server.entity.DeviceInfoEntity
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -140,4 +142,27 @@ public class DeviceChannelController {
...
@@ -140,4 +142,27 @@ public class DeviceChannelController {
stringObjectHashMap
.
put
(
"device_id"
,
deviceId
);
stringObjectHashMap
.
put
(
"device_id"
,
deviceId
);
deviceInfoChannelService
.
removeByMap
(
stringObjectHashMap
);
deviceInfoChannelService
.
removeByMap
(
stringObjectHashMap
);
}
}
@RequestMapping
(
"/updateSettingDeviceChannel"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateSettingDeviceChannel
(
@RequestBody
DeviceInfoDto
deviceInfoDto
){
HashMap
<
String
,
Object
>
stringObjectHashMap
=
new
HashMap
<>();
stringObjectHashMap
.
put
(
"device_id"
,
deviceInfoDto
.
getDeviceId
());
deviceInfoChannelService
.
removeByMap
(
stringObjectHashMap
);
List
<
DeviceInfoChannelEntity
>
deviceInfoChannelEntities
=
new
LinkedList
<>();
for
(
Long
channelId
:
deviceInfoDto
.
getChannelIds
()){
DeviceInfoChannelEntity
deviceInfoChannelEntity
=
new
DeviceInfoChannelEntity
();
deviceInfoChannelEntity
.
setChannelId
(
channelId
);
deviceInfoChannelEntity
.
setDeviceId
(
deviceInfoDto
.
getDeviceId
());
deviceInfoChannelEntities
.
add
(
deviceInfoChannelEntity
);
}
deviceInfoChannelService
.
saveBatch
(
deviceInfoChannelEntities
);
DeviceInfoEntity
deviceInfoEntity
=
new
DeviceInfoEntity
();
deviceInfoEntity
.
setDeviceId
(
deviceInfoDto
.
getDeviceId
());
deviceInfoEntity
.
setChannelRules
(
deviceInfoDto
.
getChannelRules
());
deviceInfoEntity
.
setChannelNumsMessage
(
deviceInfoDto
.
getChannelNumsMessage
());
deviceInfoService
.
updateById
(
deviceInfoEntity
);
}
}
}
This diff is collapsed.
Click to expand it.
cneeds-server-device/src/main/resources/application.yml
View file @
0c3416ec
spring
:
spring
:
profiles
:
profiles
:
active
:
prod
active
:
dev
application
:
application
:
name
:
cneeds-server-device
name
:
cneeds-server-device
...
...
This diff is collapsed.
Click to expand it.
cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java
View file @
0c3416ec
...
@@ -70,6 +70,10 @@ public class LogUploadController {
...
@@ -70,6 +70,10 @@ public class LogUploadController {
@RequestMapping
(
"/queryLogFileByLogAcceptId"
)
@RequestMapping
(
"/queryLogFileByLogAcceptId"
)
public
DeviceLogDto
queryLogFileByLogAcceptId
(
@RequestBody
String
logAcceptId
){
public
DeviceLogDto
queryLogFileByLogAcceptId
(
@RequestBody
String
logAcceptId
){
DeviceLogEntity
deviceLogEntity
=
deviceLogService
.
queryOneBylogAcceptId
(
logAcceptId
);
DeviceLogEntity
deviceLogEntity
=
deviceLogService
.
queryOneBylogAcceptId
(
logAcceptId
);
if
(
deviceLogEntity
==
null
){
return
null
;
}
DeviceLogDto
dto
=
new
DeviceLogDto
();
DeviceLogDto
dto
=
new
DeviceLogDto
();
BeanUtils
.
copyProperties
(
deviceLogEntity
,
dto
);
BeanUtils
.
copyProperties
(
deviceLogEntity
,
dto
);
return
dto
;
return
dto
;
...
...
This diff is collapsed.
Click to expand it.
cneeds-server-logupload/src/main/resources/application.yml
View file @
0c3416ec
spring
:
spring
:
profiles
:
profiles
:
active
:
prod
active
:
dev
application
:
application
:
name
:
cneeds-server-logupload
name
:
cneeds-server-logupload
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment