Commit e6c43358 by zzrdark

1.add logging

2.增加 查询设备信息
parent 034fca8b
......@@ -11,12 +11,12 @@
<module name="cneeds-common-utils" />
<module name="cneeds-common-data" />
<module name="cneeds-server-eureka" />
<module name="cneeds-common-hadoop-dfs" />
<module name="cneeds-common-pojo" />
<module name="cneeds-server-device_activate" />
<module name="cneeds-server-logupload" />
<module name="cneeds-server-authorization" />
<module name="cneeds-server-user" />
<module name="cneeds-server-logupload" />
<module name="cneeds-common-hadoop-dfs" />
<module name="cneeds-server-device" />
</profile>
</annotationProcessing>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="58efcb75-622d-40c1-b8e0-10cd2fb456b4" name="Default Changelist" comment="">
<list default="true" id="58efcb75-622d-40c1-b8e0-10cd2fb456b4" name="Default Changelist" comment="1.fix DeviceLog">
<change afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/logback-spring-dev.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/logback-spring-prod.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-common-data/db/cneeds_server.sql" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-common-data/db/cneeds_server.sql" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceInfoDto.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceInfoDto.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceLogFileDto.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceLogFileDto.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/WechatDeviceLogDto.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/WechatDeviceLogDto.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/config/OAuth2ResourceServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/config/OAuth2ResourceServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/DeviceController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/DeviceController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogFlieController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogFlieController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/service/impl/DeviceLogServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/service/impl/DeviceLogServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-logupload/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-logupload/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-user/src/main/resources/application-test.yml" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/resources/application-test.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/application-dev.yml" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/application-dev.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/application-prod.yml" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/application-prod.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/application-test.yml" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources/application-test.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/ProductSeriesService.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/ProductSeriesService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/impl/ProductSeriesServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/impl/ProductSeriesServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-device/src/main/java/com/mx/cneeds/server/device/web/DeviceInfoController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-device/src/main/java/com/mx/cneeds/server/device/web/DeviceInfoController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cneeds-server-device/src/main/resources/application-test.yml" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-device/src/main/resources/application-test.yml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -96,7 +97,7 @@
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/cneeds-server-logupload/src/main/resources" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/cneeds-server-datashow/src/main/resources" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="project.structure.last.edited" value="Modules" />
......@@ -107,12 +108,12 @@
<property name="settings.editor.splitter.proportion" value="0.20898877" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="E:\mx_project\cneeds-server\cneeds-server-logupload\src\main\resources" />
<recent name="E:\mx_project\cneeds-server\cneeds-common-hadoop-dfs\src\main\resources" />
<recent name="E:\mx_project\cneeds-server\cneeds-common-hadoop-dfs\src\main\java\com\mx\hbasefile\hadoop" />
<recent name="E:\mx_project\cneeds-server\cneeds-server-user\src\main\java\com\mx\cneeds\server\user\mqtt" />
<recent name="E:\mx_project\cneeds-server\cneeds-server-user\src\main\resources" />
<key name="MoveFile.RECENT_KEYS">
<recent name="E:\mx_project\cneeds-server\cneeds-common-data\src\test" />
<recent name="E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\java\com\mx\cneeds" />
<recent name="E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\resources" />
<recent name="E:\mx_project\cneeds-server" />
<recent name="E:\mx_project\cneeds-server\src" />
</key>
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="com.mx.cneeds.server.datashow.web.device" />
......@@ -121,12 +122,12 @@
<recent name="com.mx.cneeds.server.logupload.config" />
<recent name="com.mx.cneeds.server.user.mqtt.server" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="E:\mx_project\cneeds-server\cneeds-common-data\src\test" />
<recent name="E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\java\com\mx\cneeds" />
<key name="CopyFile.RECENT_KEYS">
<recent name="E:\mx_project\cneeds-server\cneeds-server-datashow\src\main\resources" />
<recent name="E:\mx_project\cneeds-server" />
<recent name="E:\mx_project\cneeds-server\src" />
<recent name="E:\mx_project\cneeds-server\cneeds-server-logupload\src\main\resources" />
<recent name="E:\mx_project\cneeds-server\cneeds-common-hadoop-dfs\src\main\resources" />
<recent name="E:\mx_project\cneeds-server\cneeds-common-hadoop-dfs\src\main\java\com\mx\hbasefile\hadoop" />
<recent name="E:\mx_project\cneeds-server\cneeds-server-user\src\main\java\com\mx\cneeds\server\user\mqtt" />
</key>
</component>
<component name="RestServicesNavigator">
......@@ -139,7 +140,7 @@
<select />
</treeState>
</component>
<component name="RunManager" selected="Spring Boot.LogUploadApplication">
<component name="RunManager" selected="Spring Boot.DatashowApplication">
<configuration name="EurekaServerApplication" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="com.mx.cneeds.server.eureka.EurekaServerApplication" />
<module name="cneeds-server-eureka" />
......@@ -351,7 +352,8 @@
<workItem from="1587519723763" duration="21953000" />
<workItem from="1587560891375" duration="39000" />
<workItem from="1587605292833" duration="20516000" />
<workItem from="1587692456906" duration="17040000" />
<workItem from="1587692456906" duration="18275000" />
<workItem from="1587868620028" duration="22533000" />
</task>
<task id="LOCAL-00001" summary="1.修改不需要web服务 &#10;2.增加一个logupload">
<created>1578451117064</created>
......@@ -535,7 +537,14 @@
<option name="project" value="LOCAL" />
<updated>1587639799164</updated>
</task>
<option name="localTasksCounter" value="27" />
<task id="LOCAL-00027" summary="1.fix DeviceLog">
<created>1587724965685</created>
<option name="number" value="00027" />
<option name="presentableId" value="LOCAL-00027" />
<option name="project" value="LOCAL" />
<updated>1587724965685</updated>
</task>
<option name="localTasksCounter" value="28" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -556,7 +565,6 @@
</component>
<component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="1.add 依赖 common-io" />
<MESSAGE value="添加数据库表文档" />
<MESSAGE value="1.修改项目结构&#10;2.更改数据库连接&#10;3.增加测试docker部署" />
<MESSAGE value="1.修改项目结构&#10;2.登陆&#10;3.等等" />
......@@ -581,7 +589,8 @@
<MESSAGE value="1.add hadoop" />
<MESSAGE value="1.fix" />
<MESSAGE value="1.add device log oos" />
<option name="LAST_COMMIT_MESSAGE" value="1.add device log oos" />
<MESSAGE value="1.fix DeviceLog" />
<option name="LAST_COMMIT_MESSAGE" value="1.fix DeviceLog" />
</component>
<component name="WindowStateProjectService">
<state x="590" y="156" key="#LogUploadApplication" timestamp="1585894479679">
......@@ -616,10 +625,10 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="703" y="356" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/0.0.1920.1040@0.0.1920.1040" timestamp="1583822701848" />
<state x="463" y="112" key="CommitChangelistDialog2" timestamp="1587639796390">
<state x="463" y="112" key="CommitChangelistDialog2" timestamp="1587726176305">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="463" y="112" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1587639796390" />
<state x="463" y="112" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1587726176305" />
<state x="150" y="103" key="DiffContextDialog" timestamp="1585117146381">
<screen x="0" y="0" width="1920" height="1040" />
</state>
......@@ -628,54 +637,54 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="740" y="275" key="FileChooserDialogImpl/0.0.1920.1040@0.0.1920.1040" timestamp="1585025839953" />
<state width="1877" height="425" key="GridCell.Tab.0.bottom" timestamp="1587718590411">
<state width="1877" height="349" key="GridCell.Tab.0.bottom" timestamp="1587902004624">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="425" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587718590411" />
<state width="1877" height="425" key="GridCell.Tab.0.center" timestamp="1587718590411">
<state width="1877" height="349" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587902004624" />
<state width="1877" height="349" key="GridCell.Tab.0.center" timestamp="1587902004624">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="425" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587718590411" />
<state width="1877" height="425" key="GridCell.Tab.0.left" timestamp="1587718590411">
<state width="1877" height="349" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587902004624" />
<state width="1877" height="349" key="GridCell.Tab.0.left" timestamp="1587902004624">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="425" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587718590411" />
<state width="1877" height="425" key="GridCell.Tab.0.right" timestamp="1587718590411">
<state width="1877" height="349" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587902004624" />
<state width="1877" height="349" key="GridCell.Tab.0.right" timestamp="1587902004624">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="425" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587718590411" />
<state width="1877" height="294" key="GridCell.Tab.1.bottom" timestamp="1587713122879">
<state width="1877" height="349" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587902004624" />
<state width="1877" height="289" key="GridCell.Tab.1.bottom" timestamp="1587900935775">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="294" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122879" />
<state width="1877" height="294" key="GridCell.Tab.1.center" timestamp="1587713122878">
<state width="1877" height="289" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587900935775" />
<state width="1877" height="289" key="GridCell.Tab.1.center" timestamp="1587900935775">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="294" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122878" />
<state width="1877" height="294" key="GridCell.Tab.1.left" timestamp="1587713122878">
<state width="1877" height="289" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587900935775" />
<state width="1877" height="289" key="GridCell.Tab.1.left" timestamp="1587900935775">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="294" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122878" />
<state width="1877" height="294" key="GridCell.Tab.1.right" timestamp="1587713122879">
<state width="1877" height="289" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587900935775" />
<state width="1877" height="289" key="GridCell.Tab.1.right" timestamp="1587900935775">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="294" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122879" />
<state width="1877" height="294" key="GridCell.Tab.2.bottom" timestamp="1587713122879">
<state width="1877" height="289" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587900935775" />
<state width="1877" height="289" key="GridCell.Tab.2.bottom" timestamp="1587900935776">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="294" key="GridCell.Tab.2.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122879" />
<state width="1877" height="294" key="GridCell.Tab.2.center" timestamp="1587713122879">
<state width="1877" height="289" key="GridCell.Tab.2.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587900935776" />
<state width="1877" height="289" key="GridCell.Tab.2.center" timestamp="1587900935775">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="294" key="GridCell.Tab.2.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122879" />
<state width="1877" height="294" key="GridCell.Tab.2.left" timestamp="1587713122879">
<state width="1877" height="289" key="GridCell.Tab.2.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587900935775" />
<state width="1877" height="289" key="GridCell.Tab.2.left" timestamp="1587900935775">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="294" key="GridCell.Tab.2.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122879" />
<state width="1877" height="294" key="GridCell.Tab.2.right" timestamp="1587713122879">
<state width="1877" height="289" key="GridCell.Tab.2.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587900935775" />
<state width="1877" height="289" key="GridCell.Tab.2.right" timestamp="1587900935775">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="294" key="GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122879" />
<state width="1877" height="289" key="GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587900935775" />
<state x="490" y="175" key="Maven.ArtifactSearchDialog" timestamp="1583320014926">
<screen x="0" y="0" width="1920" height="1040" />
</state>
......@@ -684,14 +693,14 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="600" y="217" key="NewModule_or_Project.wizard/0.0.1920.1040@0.0.1920.1040" timestamp="1582699806601" />
<state x="438" y="166" width="1352" height="708" key="SettingsEditor" timestamp="1586417305565">
<state x="438" y="166" width="1352" height="708" key="SettingsEditor" timestamp="1587869864619">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="438" y="166" width="1352" height="708" key="SettingsEditor/0.0.1920.1040@0.0.1920.1040" timestamp="1586417305565" />
<state x="552" y="253" key="Vcs.Push.Dialog.v2" timestamp="1587639800124">
<state x="438" y="166" width="1352" height="708" key="SettingsEditor/0.0.1920.1040@0.0.1920.1040" timestamp="1587869864619" />
<state x="552" y="253" key="Vcs.Push.Dialog.v2" timestamp="1587724967227">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="552" y="253" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1587639800124" />
<state x="552" y="253" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1587724967227" />
<state width="968" height="528" key="XDebugger.FullValuePopup" timestamp="1585818529449">
<screen x="0" y="0" width="1920" height="1040" />
</state>
......@@ -712,10 +721,10 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="511" y="210" key="new project wizard/0.0.1920.1040@0.0.1920.1040" timestamp="1587463523363" />
<state x="616" y="173" width="672" height="676" key="search.everywhere.popup" timestamp="1587632688116">
<state x="616" y="173" width="672" height="676" key="search.everywhere.popup" timestamp="1587904828344">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="616" y="173" width="672" height="676" key="search.everywhere.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1587632688116" />
<state x="616" y="173" width="672" height="676" key="search.everywhere.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1587904828344" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
......
......@@ -23,6 +23,7 @@ public class OAuth2ResourceServer extends ResourceServerConfigurerAdapter {
"/device/device/getChannel_nums",
"/wechat/wechatFileUpload",
"/wechat/wechatDownload/**",
"/logFile/logfile/DeviceLogFileUpload",
// "/user/info",
"/statics/**")
.permitAll()
......
......@@ -191,5 +191,11 @@ public class DeviceController {
}
@PostMapping("/device/queryDeviceByImei")
public R queryDeviceByImei(@RequestParam(value = "imei") String imei){
DeviceInfoDto deviceInfoDto = deviceClient.queryDeviceByImei(imei);
return R.ok().put("data",deviceInfoDto);
}
}
......@@ -3,6 +3,7 @@ package com.mx.cneeds.server.datashow.web.device;
import com.google.gson.Gson;
import com.mx.cneeds.common.UserUtils;
import com.mx.cneeds.common.constant.FilePath;
import com.mx.cneeds.common.constant.ResultCode;
import com.mx.cneeds.common.converter.RequestParamterConverter;
import com.mx.cneeds.common.dto.*;
import com.mx.cneeds.common.result.R;
......@@ -81,6 +82,11 @@ public class LogFlieController {
DeviceLogFileDto dto = new DeviceLogFileDto();
BeanUtils.copyProperties(vo, dto);
DeviceInfoDto deviceInfoDto = deviceClient.queryDeviceByImei(dto.getImei());
if (deviceInfoDto == null){
return R.error(ResultCode.NOTFOUND_IMEI,"没有该imei");
}
// 把图片存入oos 返回路径
StringBuffer dir = new StringBuffer(FilePath.LogFilePath);
dir.append(vo.getLogAcceptId());
......@@ -88,7 +94,7 @@ public class LogFlieController {
dto.setLogfileUrl(dir.toString()+"/"+file.getOriginalFilename());
dto.setLogfileSize(file.getSize());
DeviceInfoDto deviceInfoDto = deviceClient.queryDeviceByImei(dto.getImei());
dto.setDeviceId(deviceInfoDto.getDeviceId());
logFileClient.uploadLogFile(dto);
return R.ok();
......
......@@ -17,4 +17,7 @@ spring:
servlet:
multipart:
max-file-size: 100000MB
max-request-size: 100000MB
\ No newline at end of file
max-request-size: 100000MB
logging:
config: classpath:logback-spring-dev.xml
\ No newline at end of file
......@@ -16,4 +16,7 @@ spring:
servlet:
multipart:
max-file-size: 100000MB
max-request-size: 100000MB
\ No newline at end of file
max-request-size: 100000MB
logging:
config: classpath:logback-spring-prod.xml
eureka:
client:
service-url:
defaultZone: http://192.168.2.244:8761/eureka/
instance:
prefer-ip-address: true
spring:
hadoop:
hdfs:
# hadoopConfigDir: D:\hadoop2.6_Win_x64\etc\hadoop
hadoopConfigDir: /home/fengte/hadoop/etc/hadoop/
hdfsUrl: hdfs://192.168.2.244:9100
defaultBlockSize: 128000000
bufferSize: 512000
servlet:
multipart:
max-file-size: 100000MB
max-request-size: 100000MB
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<contextName>logback</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<property name="log.path" value="E:/cneedsLog/log/datashow" />
<!--<property name="log.path" value="/root/cneeds-server/cneedsLog" />-->
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!--输出到控制台-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>info</level>
</filter>
<encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<!-- 设置字符集 -->
<charset>UTF-8</charset>
</encoder>
</appender>
<!--输出到文件-->
<!-- 时间滚动输出 level为 DEBUG 日志 -->
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_debug.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志归档 -->
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>debug</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 INFO 日志 -->
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_info.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 ERROR 日志 -->
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_error.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<root level="debug">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
<appender-ref ref="ERROR_FILE" />
</root>
<root level="info">
<appender-ref ref="INFO_FILE" />
</root>
<!--<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="TRACE" />-->
<!-- 开发、测试环境 -->
<springProfile name="dev,test,pro">
<logger name="org.springframework" level="debug"/>
<logger name="org.springboot" level="debug" />
<logger name="com.mx" level="debug" />
</springProfile>
<!--&lt;!&ndash; 生产环境 &ndash;&gt;
<springProfile name="pro">
<logger name="org.springframework" level="info"/>
<logger name="org.springboot" level="info" />
<logger name="com.mx" level="info" />
</springProfile>-->
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<contextName>logback</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<!-- <property name="log.path" value="E:/cneedsLog/log" />-->
<property name="log.path" value="/root/cneeds-server/cneedsLog/datashow" />
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!--输出到控制台-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>info</level>
</filter>
<encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<!-- 设置字符集 -->
<charset>UTF-8</charset>
</encoder>
</appender>
<!--输出到文件-->
<!-- 时间滚动输出 level为 DEBUG 日志 -->
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_debug.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志归档 -->
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>debug</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 INFO 日志 -->
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_info.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 ERROR 日志 -->
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_error.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<root level="debug">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
<appender-ref ref="ERROR_FILE" />
</root>
<root level="info">
<appender-ref ref="INFO_FILE" />
</root>
<!--<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="TRACE" />-->
<!-- 开发、测试环境 -->
<springProfile name="dev,test,pro">
<logger name="org.springframework" level="debug"/>
<logger name="org.springboot" level="debug" />
<logger name="com.mx" level="debug" />
</springProfile>
<!--&lt;!&ndash; 生产环境 &ndash;&gt;
<springProfile name="pro">
<logger name="org.springframework" level="info"/>
<logger name="org.springboot" level="info" />
<logger name="com.mx" level="info" />
</springProfile>-->
</configuration>
\ No newline at end of file
......@@ -22,5 +22,7 @@ public interface ProductSeriesService extends IService<ProductSeriesEntity> {
List<ProductSeriesEntity> queryListById(Collection<Long> array);
List<ProductSeriesEntity> queryList(Map<String, Object> params);
ProductSeriesEntity queryOne(Long seriesId);
}
......@@ -39,7 +39,15 @@ public class ProductSeriesServiceImpl extends ServiceImpl<ProductSeriesDao, Prod
@Override
public List<ProductSeriesEntity> queryList(Map<String, Object> params) {
return baseMapper.queryList(params);
}
@Override
public ProductSeriesEntity queryOne(Long seriesId){
ProductSeriesEntity seriesEntity = getById(seriesId);
return seriesEntity;
}
}
......@@ -8,7 +8,9 @@ import com.mx.cneeds.common.pager.PageUtils;
import com.mx.cneeds.common.result.R;
import com.mx.cneeds.common.validator.ValidatorUtils;
import com.mx.cneeds.server.device.service.DeviceInfoService;
import com.mx.cneeds.server.device.service.ProductSeriesService;
import com.mx.cneeds.server.entity.DeviceInfoEntity;
import com.mx.cneeds.server.entity.ProductSeriesEntity;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -32,6 +34,9 @@ public class DeviceInfoController {
@Autowired
private DeviceInfoService deviceInfoService;
@Autowired
private ProductSeriesService productSeriesService;
/**
* 列表
*/
......@@ -62,11 +67,14 @@ public class DeviceInfoController {
DeviceInfoDto deviceInfoDto = new DeviceInfoDto();
if (deviceInfoEntity != null){
BeanUtils.copyProperties(deviceInfoEntity,deviceInfoDto);
if (deviceInfoEntity.getSeriesId()!=null){
ProductSeriesEntity seriesEntity = productSeriesService.queryOne(deviceInfoEntity.getSeriesId());
deviceInfoDto.setSeriesNum(seriesEntity.getSeriesNum());
}
return deviceInfoDto;
}else{
return null;
}
}
@RequestMapping("/infoByIds")
......
......@@ -50,29 +50,5 @@ eureka:
defaultZone: http://192.168.2.244:8761/eureka/
instance:
prefer-ip-address: true
# ip-address: 192.168.2.244
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.mx.cneeds.server.entity
global-config:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: AUTO
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
field-strategy: NOT_NULL
#驼峰下划线转换
column-underline: true
logic-delete-value: -1
logic-not-delete-value: 0
banner: false
#原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
ip-address: 192.168.2.244
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment