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
28495493
Commit
28495493
authored
May 14, 2020
by
zzrdark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改删除渠道号 并删除关联的渠道号
2.增加终端log上传的设备版本参数
parent
5d790fe0
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
4 deletions
+43
-4
cneeds_server.sql
cneeds-common-data/db/cneeds_server.sql
+5
-0
DeviceLogEntity.java
...ain/java/com/mx/cneeds/server/entity/DeviceLogEntity.java
+5
-0
DeviceLogDao.xml
...ds-common-data/src/main/resources/mapper/DeviceLogDao.xml
+1
-0
DeviceLogFileDto.java
.../main/java/com/mx/cneeds/common/dto/DeviceLogFileDto.java
+5
-0
DeviceLogFileVo.java
...rc/main/java/com/mx/cneeds/common/vo/DeviceLogFileVo.java
+5
-0
DeviceInfoChannelService.java
...needs/server/device/service/DeviceInfoChannelService.java
+2
-0
DeviceInfoChannelServiceImpl.java
...ver/device/service/impl/DeviceInfoChannelServiceImpl.java
+8
-0
DeviceChannelController.java
.../mx/cneeds/server/device/web/DeviceChannelController.java
+2
-1
DeviceInfoController.java
...com/mx/cneeds/server/device/web/DeviceInfoController.java
+8
-2
LogUploadController.java
...m/mx/cneeds/server/logupload/web/LogUploadController.java
+1
-0
application.yml
cneeds-server-logupload/src/main/resources/application.yml
+1
-1
No files found.
cneeds-common-data/db/cneeds_server.sql
View file @
28495493
...
...
@@ -323,3 +323,7 @@ CREATE TABLE `device_info_channel` (
-- 2020-05-13
ALTER
TABLE
`cneeds_server`
.
`device_info`
DROP
COLUMN
`channel_nums`
;
-- 2020-05-14
ALTER
TABLE
`cneeds_server`
.
`device_log`
ADD
COLUMN
`device_version`
varchar
(
255
)
COMMENT
'设备版本号'
AFTER
`log_accept_id`
;
\ No newline at end of file
cneeds-common-data/src/main/java/com/mx/cneeds/server/entity/DeviceLogEntity.java
View file @
28495493
...
...
@@ -74,4 +74,9 @@ public class DeviceLogEntity implements Serializable {
* 移动端日志文件标识符
*/
private
String
logAcceptId
;
/**
* 设备版本
*/
private
String
deviceVersion
;
}
cneeds-common-data/src/main/resources/mapper/DeviceLogDao.xml
View file @
28495493
...
...
@@ -18,6 +18,7 @@
<result
property=
"logfileStatus"
column=
"logfile_status"
/>
<result
property=
"repetitionProbability"
column=
"repetition_probability"
/>
<result
property=
"logAcceptId"
column=
"log_accept_id"
/>
<result
property=
"deviceVersion"
column=
"device_version"
/>
</resultMap>
...
...
cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceLogFileDto.java
View file @
28495493
...
...
@@ -33,4 +33,9 @@ public class DeviceLogFileDto {
* 文件大小
*/
Long
logfileSize
;
/**
* 设备版本信息
*/
String
deviceVersion
;
}
cneeds-common-pojo/src/main/java/com/mx/cneeds/common/vo/DeviceLogFileVo.java
View file @
28495493
...
...
@@ -21,4 +21,9 @@ public class DeviceLogFileVo {
*/
String
logAcceptId
;
/**
* 设备版本
*/
String
deviceVersion
;
}
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/DeviceInfoChannelService.java
View file @
28495493
...
...
@@ -16,5 +16,7 @@ public interface DeviceInfoChannelService extends IService<DeviceInfoChannelEnti
List
<
DeviceInfoChannelEntity
>
queryDeviceInfoChannelByDeviceId
(
Long
deviceId
);
void
removeDeivceInfoChannelByChannelId
(
List
<
Long
>
channelIds
);
}
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/impl/DeviceInfoChannelServiceImpl.java
View file @
28495493
...
...
@@ -22,4 +22,12 @@ public class DeviceInfoChannelServiceImpl extends ServiceImpl<DeviceInfoChannelD
return
entities
;
}
@Override
public
void
removeDeivceInfoChannelByChannelId
(
List
<
Long
>
channelIds
){
getBaseMapper
().
delete
(
new
QueryWrapper
<
DeviceInfoChannelEntity
>()
.
in
(
"channel_id"
,
channelIds
));
}
}
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/web/DeviceChannelController.java
View file @
28495493
...
...
@@ -92,9 +92,10 @@ public class DeviceChannelController {
* 删除渠道号
*/
@RequestMapping
(
"/delete"
)
@Transactional
public
R
delete
(
@RequestBody
Long
[]
deviceIds
){
deviceChannelService
.
removeByIds
(
Arrays
.
asList
(
deviceIds
));
deviceInfoChannelService
.
removeDeivceInfoChannelByChannelId
(
Arrays
.
asList
(
deviceIds
));
return
R
.
ok
();
}
...
...
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/web/DeviceInfoController.java
View file @
28495493
...
...
@@ -76,7 +76,11 @@ public class DeviceInfoController {
deviceChannelEntities
.
forEach
(
entities
->
{
sb
.
append
(
entities
.
getChannelNum
()+
","
);
});
dto
.
setChannelNums
(
sb
.
substring
(
0
,
sb
.
length
()-
1
));
if
(
sb
.
length
()
!=
0
){
dto
.
setChannelNums
(
sb
.
substring
(
0
,
sb
.
length
()-
1
));
}
}
list
.
add
(
dto
);
}
...
...
@@ -126,7 +130,9 @@ public class DeviceInfoController {
deviceChannelEntities
.
forEach
(
entities
->
{
sb
.
append
(
entities
.
getChannelNum
()+
","
);
});
deviceInfoDto
.
setChannelNums
(
sb
.
substring
(
0
,
sb
.
length
()-
1
));
if
(
sb
.
length
()
!=
0
)
{
deviceInfoDto
.
setChannelNums
(
sb
.
substring
(
0
,
sb
.
length
()
-
1
));
}
}
return
deviceInfoDto
;
}
else
{
...
...
cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java
View file @
28495493
...
...
@@ -83,6 +83,7 @@ public class LogUploadController {
deviceLogEntity
.
setLogfileUrl
(
dto
.
getLogfileUrl
());
deviceLogEntity
.
setLogAcceptId
(
dto
.
getLogAcceptId
());
deviceLogEntity
.
setLogfileSize
(
dto
.
getLogfileSize
());
deviceLogEntity
.
setDeviceVersion
(
dto
.
getDeviceVersion
());
deviceLogService
.
deviceUploadLogFile
(
deviceLogEntity
);
}
...
...
cneeds-server-logupload/src/main/resources/application.yml
View file @
28495493
spring
:
profiles
:
active
:
dev
active
:
prod
application
:
name
:
cneeds-server-logupload
...
...
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