diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 9e4d49c..d0efd6d 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -11,6 +11,7 @@ <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-authorization" /> @@ -28,6 +29,7 @@ <component name="JavacSettings"> <option name="ADDITIONAL_OPTIONS_OVERRIDE"> <module name="cneeds-common-data" options="-parameters" /> + <module name="cneeds-common-hadoop-dfs" options="-parameters" /> <module name="cneeds-common-pojo" options="-parameters" /> <module name="cneeds-common-utils" options="-parameters" /> <module name="cneeds-server-advice-control" options="-parameters" /> diff --git a/.idea/encodings.xml b/.idea/encodings.xml index 4d1ba30..313f2e9 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -4,6 +4,7 @@ <file url="file://$PROJECT_DIR$" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/cneeds-common-data" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/cneeds-common-data/src/main/java" charset="UTF-8" /> + <file url="file://$PROJECT_DIR$/cneeds-common-hadoop-dfs/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/cneeds-common-pojo/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/cneeds-common-utils" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/cneeds-common-utils/src/main/java" charset="UTF-8" /> diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 99fec3b..28eadbf 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,22 +1,20 @@ <?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="1.日志上传模块 2.修改数据库"> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/CleanLogBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/DeviceBehaviorBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/DeviceLogStartBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/DeviceLogStopBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/DeviceRebootBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/LogSettingBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/MobileNetworkSwitchBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/ReductionDeviceBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/UploadInformationDeviceBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/UserActivationDeviceBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/UserBaseDataBean.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/WiFiSwitchBean.java" afterDir="false" /> + <list default="true" id="58efcb75-622d-40c1-b8e0-10cd2fb456b4" name="Default Changelist" comment=""> + <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-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/BaseMqttBean.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/BaseMqttBean.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/RemoteControl.java" beforeDir="false" afterPath="$PROJECT_DIR$/cneeds-server-user/src/main/java/com/mx/cneeds/server/user/mqtt/bean/RemoteControlBean.java" 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/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" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> @@ -49,6 +47,7 @@ <component name="FileTemplateManagerImpl"> <option name="RECENT_TEMPLATES"> <list> + <option value="Interface" /> <option value="Class" /> </list> </option> @@ -86,6 +85,7 @@ </component> <component name="PropertiesComponent"> <property name="ASKED_ADD_EXTERNAL_FILES" value="true" /> + <property name="ExpandSpringBootJavaOptionsPanel" value="true" /> <property name="MyBatisLogPluginparameters" value="Parameters:" /> <property name="MyBatisLogPluginpreparing" value="Preparing:" /> <property name="MyBatisLogPluginrunning" value="true" /> @@ -96,7 +96,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-user/src/main/java/com/mx/cneeds/server/user/mqtt" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$/cneeds-server-logupload/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" /> @@ -108,11 +108,11 @@ </component> <component name="RecentsManager"> <key name="CopyFile.RECENT_KEYS"> - <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-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" /> - <recent name="E:\mx_project\cneeds-server\cneeds-server-eureka\src\main\resources" /> - <recent name="E:\mx_project\cneeds-server\cneeds-server-device\src\main\resources" /> </key> <key name="CopyClassDialog.RECENTS_KEY"> <recent name="com.mx.cneeds.server.datashow.web.device" /> @@ -133,13 +133,13 @@ <treeState> <expand> <path> - <item name="Found 125 services " type="fcff1e1b:RestServiceStructure$RootNode" /> + <item name="Found 127 services " type="fcff1e1b:RestServiceStructure$RootNode" /> </path> </expand> <select /> </treeState> </component> - <component name="RunManager" selected="Spring Boot.DatashowApplication"> + <component name="RunManager" selected="Spring Boot.LogUploadApplication"> <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" /> @@ -217,6 +217,11 @@ <configuration name="DatashowApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot"> <module name="cneeds-server-datashow" /> <option name="SPRING_BOOT_MAIN_CLASS" value="com.mx.cneeds.server.datashow.DatashowApplication" /> + <option name="VM_PARAMETERS" value="-XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m -Xms1024m -Xmx1024m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <envs> + <env name="HADOOP_USER_NAME" value="fengte" /> + </envs> <method v="2"> <option name="Make" enabled="true" /> </method> @@ -341,7 +346,12 @@ <workItem from="1586927616699" duration="1790000" /> <workItem from="1587004158743" duration="26712000" /> <workItem from="1587088050691" duration="17519000" /> - <workItem from="1587347151961" duration="19235000" /> + <workItem from="1587347151961" duration="19311000" /> + <workItem from="1587433543783" duration="7658000" /> + <workItem from="1587519723763" duration="21953000" /> + <workItem from="1587560891375" duration="39000" /> + <workItem from="1587605292833" duration="20516000" /> + <workItem from="1587692456906" duration="17040000" /> </task> <task id="LOCAL-00001" summary="1.修改不需要web服务 2.增加一个logupload"> <created>1578451117064</created> @@ -497,7 +507,35 @@ <option name="project" value="LOCAL" /> <updated>1587121319426</updated> </task> - <option name="localTasksCounter" value="23" /> + <task id="LOCAL-00023" summary="1.mqttBean"> + <created>1587384320808</created> + <option name="number" value="00023" /> + <option name="presentableId" value="LOCAL-00023" /> + <option name="project" value="LOCAL" /> + <updated>1587384320808</updated> + </task> + <task id="LOCAL-00024" summary="1.add hadoop"> + <created>1587465833274</created> + <option name="number" value="00024" /> + <option name="presentableId" value="LOCAL-00024" /> + <option name="project" value="LOCAL" /> + <updated>1587465833274</updated> + </task> + <task id="LOCAL-00025" summary="1.fix"> + <created>1587560920472</created> + <option name="number" value="00025" /> + <option name="presentableId" value="LOCAL-00025" /> + <option name="project" value="LOCAL" /> + <updated>1587560920472</updated> + </task> + <task id="LOCAL-00026" summary="1.add device log oos"> + <created>1587639799164</created> + <option name="number" value="00026" /> + <option name="presentableId" value="LOCAL-00026" /> + <option name="project" value="LOCAL" /> + <updated>1587639799164</updated> + </task> + <option name="localTasksCounter" value="27" /> <servers /> </component> <component name="TypeScriptGeneratedFilesManager"> @@ -518,8 +556,6 @@ </component> <component name="VcsManagerConfiguration"> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> - <MESSAGE value="1.修改不需要web服务 2.增加一个logupload" /> - <MESSAGE value="1.增加持久层代码 2.增加utils 3.修改项目间依赖关系 4.增加service、controller" /> <MESSAGE value="1.add 依赖 common-io" /> <MESSAGE value="添加数据库表文档" /> <MESSAGE value="1.修改项目结构 2.更改数据库连接 3.增加测试docker部署" /> @@ -541,21 +577,25 @@ <MESSAGE value="1.日志上传文件上传" /> <MESSAGE value="1.add日志上传模块" /> <MESSAGE value="1.修改渠道管理 2.增加测试环境配置" /> - <option name="LAST_COMMIT_MESSAGE" value="1.修改渠道管理 2.增加测试环境配置" /> + <MESSAGE value="1.mqttBean" /> + <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" /> </component> <component name="WindowStateProjectService"> <state x="590" y="156" key="#LogUploadApplication" timestamp="1585894479679"> <screen x="0" y="0" width="1920" height="1040" /> </state> <state x="590" y="156" key="#LogUploadApplication/0.0.1920.1040@0.0.1920.1040" timestamp="1585894479679" /> - <state x="552" y="178" key="#Project_Structure" timestamp="1585133454018"> + <state x="552" y="178" key="#Project_Structure" timestamp="1587463658342"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state x="552" y="178" key="#Project_Structure/0.0.1920.1040@0.0.1920.1040" timestamp="1585133454018" /> - <state x="414" y="175" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1585894458539"> + <state x="552" y="178" key="#Project_Structure/0.0.1920.1040@0.0.1920.1040" timestamp="1587463658342" /> + <state x="378" y="114" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1587558670160"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state x="414" y="175" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1585894458539" /> + <state x="378" y="114" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1587558670160" /> <state x="765" y="229" key="#com.intellij.ide.util.MemberChooser" timestamp="1585635266398"> <screen x="0" y="0" width="1920" height="1040" /> </state> @@ -576,10 +616,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="1587121315998"> + <state x="463" y="112" key="CommitChangelistDialog2" timestamp="1587639796390"> <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="1587121315998" /> + <state x="463" y="112" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1587639796390" /> <state x="150" y="103" key="DiffContextDialog" timestamp="1585117146381"> <screen x="0" y="0" width="1920" height="1040" /> </state> @@ -588,54 +628,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="299" key="GridCell.Tab.0.bottom" timestamp="1587121326779"> + <state width="1877" height="425" key="GridCell.Tab.0.bottom" timestamp="1587718590411"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.0.center" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.0.left" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.0.right" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.1.bottom" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.1.center" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.1.left" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.1.right" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.2.bottom" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.2.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.2.center" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.2.center/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.2.left" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.2.left/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> - <state width="1877" height="299" key="GridCell.Tab.2.right" timestamp="1587121326779"> + <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"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state width="1877" height="299" key="GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587121326779" /> + <state width="1877" height="294" key="GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040" timestamp="1587713122879" /> <state x="490" y="175" key="Maven.ArtifactSearchDialog" timestamp="1583320014926"> <screen x="0" y="0" width="1920" height="1040" /> </state> @@ -648,10 +688,10 @@ <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="1587121320768"> + <state x="552" y="253" key="Vcs.Push.Dialog.v2" timestamp="1587639800124"> <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="1587121320768" /> + <state x="552" y="253" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1587639800124" /> <state width="968" height="528" key="XDebugger.FullValuePopup" timestamp="1585818529449"> <screen x="0" y="0" width="1920" height="1040" /> </state> @@ -664,18 +704,18 @@ <screen x="0" y="0" width="1920" height="1040" /> </state> <state x="690" y="284" key="extract.method.dialog/0.0.1920.1040@0.0.1920.1040" timestamp="1584010366958" /> - <state x="636" y="253" width="659" height="534" key="find.popup" timestamp="1587380184212"> + <state x="636" y="253" width="667" height="534" key="find.popup" timestamp="1587715342703"> <screen x="0" y="0" width="1920" height="1040" /> </state> - <state x="636" y="253" width="659" height="534" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1587380184212" /> - <state x="511" y="210" key="new project wizard" timestamp="1583318693876"> + <state x="636" y="253" width="667" height="534" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1587715342703" /> + <state x="511" y="210" key="new project wizard" timestamp="1587463523363"> <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="1583318693876" /> - <state x="616" y="173" width="672" height="676" key="search.everywhere.popup" timestamp="1587373120148"> + <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"> <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="1587373120148" /> + <state x="616" y="173" width="672" height="676" key="search.everywhere.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1587632688116" /> </component> <component name="XDebuggerManager"> <breakpoint-manager> @@ -710,7 +750,24 @@ <line>102</line> <option name="timeStamp" value="32" /> </line-breakpoint> + <line-breakpoint enabled="true" type="java-line"> + <url>file://$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/wechat/WechatController.java</url> + <line>63</line> + <option name="timeStamp" value="41" /> + </line-breakpoint> + <line-breakpoint enabled="true" type="java-line"> + <url>file://$PROJECT_DIR$/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/wechat/WechatController.java</url> + <line>48</line> + <option name="timeStamp" value="42" /> + </line-breakpoint> </breakpoints> </breakpoint-manager> + <watches-manager> + <configuration name="SpringBootApplicationConfigurationType"> + <watch expression="file.getOriginalFilename()" language="JAVA" /> + <watch expression="file.getSize()" language="JAVA" /> + <watch expression="SecurityContextHolder.getContext().getAuthentication()" language="JAVA" /> + </configuration> + </watches-manager> </component> </project> \ No newline at end of file diff --git a/cneeds-common-data/db/cneeds_server.sql b/cneeds-common-data/db/cneeds_server.sql index 75c84f7..9ac12c2 100644 --- a/cneeds-common-data/db/cneeds_server.sql +++ b/cneeds-common-data/db/cneeds_server.sql @@ -66,7 +66,7 @@ CREATE TABLE `device_log` ( DROP TABLE IF EXISTS `device_logmedia`; CREATE TABLE `device_logmedia` ( `logmedia_id` bigint(20) NOT NULL AUTO_INCREMENT, - `location_url` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '音频路径', + `location_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '音频路径', `log_id` bigint(20) DEFAULT NULL, `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '格式', PRIMARY KEY (`logmedia_id`) USING BTREE diff --git a/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceInfoDto.java b/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceInfoDto.java index 313cc75..46474d1 100644 --- a/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceInfoDto.java +++ b/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceInfoDto.java @@ -77,4 +77,6 @@ public class DeviceInfoDto { * 产品系列号 */ private String seriesNum; + + } diff --git a/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceLogFileDto.java b/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceLogFileDto.java index 0fb8269..3c38495 100644 --- a/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceLogFileDto.java +++ b/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/DeviceLogFileDto.java @@ -28,4 +28,9 @@ public class DeviceLogFileDto { * 设备Id */ Long deviceId; + + /** + * 文件大小 + */ + Long logfileSize; } diff --git a/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/WechatDeviceLogDto.java b/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/WechatDeviceLogDto.java index ba797ad..ba94d08 100644 --- a/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/WechatDeviceLogDto.java +++ b/cneeds-common-pojo/src/main/java/com/mx/cneeds/common/dto/WechatDeviceLogDto.java @@ -49,4 +49,9 @@ public class WechatDeviceLogDto { */ Long deviceId; + + private String createUsername; + + private Long userId; + } diff --git a/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogFlieController.java b/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogFlieController.java index b25b34a..aff25ef 100644 --- a/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogFlieController.java +++ b/cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogFlieController.java @@ -1,6 +1,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.converter.RequestParamterConverter; import com.mx.cneeds.common.dto.*; @@ -9,6 +10,7 @@ import com.mx.cneeds.common.vo.DeviceLogFileVo; import com.mx.cneeds.common.vo.WechatDeviceLogVo; import com.mx.cneeds.server.datashow.client.DeviceClient; import com.mx.cneeds.server.datashow.client.LogFileClient; +import com.mx.cneeds.server.datashow.client.UserClient; import com.mx.hbasefile.hadoop.hdfs.api.HdfsTemplate; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; @@ -44,6 +46,9 @@ public class LogFlieController { @Autowired private HdfsTemplate hdfsTemplate; + @Autowired + private UserClient userClient; + @PostMapping("/logfile/wechatDeviceLogUpload") @ResponseBody public R wechatUploadLog(WechatDeviceLogVo vo, MultipartFile[] file) throws IOException { @@ -61,6 +66,11 @@ public class LogFlieController { dto.setLocationUrls(listUrl); DeviceInfoDto deviceInfoDto = deviceClient.queryDeviceByImei(dto.getImei()); dto.setDeviceId(deviceInfoDto.getDeviceId()); + + UserDto userDto = userClient.userInfo(UserUtils.getUserName()); + dto.setCreateUsername(UserUtils.getUserName()); + dto.setUserId(userDto.getUserId()); + logFileClient.wechatUploadLog(dto); return R.ok(); } @@ -77,7 +87,7 @@ public class LogFlieController { hdfsTemplate.saveFile(dir.toString(),file.getOriginalFilename(),file.getInputStream(),file.getSize(), (short) 2); dto.setLogfileUrl(dir.toString()+"/"+file.getOriginalFilename()); - + dto.setLogfileSize(file.getSize()); DeviceInfoDto deviceInfoDto = deviceClient.queryDeviceByImei(dto.getImei()); dto.setDeviceId(deviceInfoDto.getDeviceId()); logFileClient.uploadLogFile(dto); diff --git a/cneeds-server-datashow/src/main/resources/application.yml b/cneeds-server-datashow/src/main/resources/application.yml index 46ace43..a36b85b 100644 --- a/cneeds-server-datashow/src/main/resources/application.yml +++ b/cneeds-server-datashow/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: profiles: - active: dev + active: prod application: name: cneeds-server-datashow server: diff --git a/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/service/impl/DeviceLogServiceImpl.java b/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/service/impl/DeviceLogServiceImpl.java index cdf1ce5..114ec53 100644 --- a/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/service/impl/DeviceLogServiceImpl.java +++ b/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/service/impl/DeviceLogServiceImpl.java @@ -13,10 +13,7 @@ import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @ClassName DeviceLogServiceImpl @@ -59,10 +56,16 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogDao, DeviceLogEnt public Long wechatUploadLog(DeviceLogEntity deviceLogEntity){ DeviceLogEntity logEntity = queryOneBylogAcceptId(deviceLogEntity.getLogAcceptId()); if(logEntity != null){ + + //未处理状态 + deviceLogEntity.setStatus(0); + deviceLogEntity.setLogfileStatus(1); getBaseMapper().update(deviceLogEntity, new UpdateWrapper<DeviceLogEntity>() .eq("log_accept_id", deviceLogEntity.getLogAcceptId())); }else { + deviceLogEntity.setCreateTime(new Date()); + deviceLogEntity.setStatus(-1); getBaseMapper().insert(deviceLogEntity); logEntity = queryOneBylogAcceptId(deviceLogEntity.getLogAcceptId()); } @@ -76,10 +79,15 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogDao, DeviceLogEnt public void deviceUploadLogFile(DeviceLogEntity deviceLogEntity){ DeviceLogEntity logEntity = queryOneBylogAcceptId(deviceLogEntity.getLogAcceptId()); if(logEntity != null){ + //未处理状态 + deviceLogEntity.setStatus(0); + deviceLogEntity.setLogfileStatus(1); getBaseMapper().update(deviceLogEntity, new UpdateWrapper<DeviceLogEntity>() .eq("log_accept_id", deviceLogEntity.getLogAcceptId())); }else { + deviceLogEntity.setCreateTime(new Date()); + deviceLogEntity.setStatus(-1); getBaseMapper().insert(deviceLogEntity); } } diff --git a/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java b/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java index cdd83ad..7f70352 100644 --- a/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java +++ b/cneeds-server-logupload/src/main/java/com/mx/cneeds/server/logupload/web/LogUploadController.java @@ -39,7 +39,8 @@ public class LogUploadController { public void wechatUploadLog(@RequestBody WechatDeviceLogDto dto){ DeviceLogEntity deviceLogEntity = new DeviceLogEntity(); - + deviceLogEntity.setCreateUsername(dto.getCreateUsername()); + deviceLogEntity.setUserId(dto.getUserId()); deviceLogEntity.setLogAcceptId(dto.getLogAcceptId()); deviceLogEntity.setDeviceId(dto.getDeviceId()); deviceLogEntity.setLogName(dto.getBugTitle()); @@ -59,6 +60,7 @@ public class LogUploadController { deviceLogEntity.setDeviceId(dto.getDeviceId()); deviceLogEntity.setLogfileUrl(dto.getLogfileUrl()); deviceLogEntity.setLogAcceptId(dto.getLogAcceptId()); + deviceLogEntity.setLogfileSize(dto.getLogfileSize()); deviceLogService.deviceUploadLogFile(deviceLogEntity); } diff --git a/cneeds-server-logupload/src/main/resources/application.yml b/cneeds-server-logupload/src/main/resources/application.yml index 877d5c2..2696bb9 100644 --- a/cneeds-server-logupload/src/main/resources/application.yml +++ b/cneeds-server-logupload/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: profiles: - active: dev + active: prod application: name: cneeds-server-logupload diff --git a/cneeds-server-user/src/main/resources/application-test.yml b/cneeds-server-user/src/main/resources/application-test.yml index 165b7f6..56d460a 100644 --- a/cneeds-server-user/src/main/resources/application-test.yml +++ b/cneeds-server-user/src/main/resources/application-test.yml @@ -42,7 +42,21 @@ spring: # wall: # config: # multi-statement-allow: true - + mqtt: + username: admin + password: public + host-url: tcp://120.25.162.101:1883 + # client-id: zhjsbackground${random.value} + client-id: server + # default-topic: $SYS/brokers/+/clients/# + completionTimeout: 3000 + keepAlive: 60 + topics[0]: + topicname: device/+/+/push + qos: 0 + topics[1]: + topicname: server/receive/ + qos: 0 eureka: client: @@ -52,27 +66,3 @@ eureka: 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' -