| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # é»è®¤å¿½ç¥çæä»¶ |
| | | /shelf/ |
| | | /workspace.xml |
| | | # åºäºç¼è¾å¨ç HTTP 客æ·ç«¯è¯·æ± |
| | | /httpRequests/ |
| | | # Datasource local storage ignored files |
| | | /dataSources/ |
| | | /dataSources.local.xml |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="CompilerConfiguration"> |
| | | <annotationProcessing> |
| | | <profile default="true" name="Default" enabled="true" /> |
| | | <profile name="Maven default annotation processors profile" enabled="true"> |
| | | <sourceOutputDir name="target/generated-sources/annotations" /> |
| | | <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> |
| | | <outputRelativeToContentRoot value="true" /> |
| | | <module name="api" /> |
| | | </profile> |
| | | </annotationProcessing> |
| | | </component> |
| | | <component name="JavacSettings"> |
| | | <option name="ADDITIONAL_OPTIONS_OVERRIDE"> |
| | | <module name="api" options="-parameters" /> |
| | | </option> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="DataSourceManagerImpl" format="xml" multifile-model="true"> |
| | | <data-source source="LOCAL" name="@47.106.172.9" uuid="673b6e88-ea79-47e3-b3d4-c376797d32da"> |
| | | <driver-ref>mysql.8</driver-ref> |
| | | <synchronize>true</synchronize> |
| | | <jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver> |
| | | <jdbc-url>jdbc:mysql://47.106.172.9:2512</jdbc-url> |
| | | <working-dir>$ProjectFileDir$</working-dir> |
| | | </data-source> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="Encoding"> |
| | | <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" /> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="PersistentConfig"> |
| | | <option name="historyConfigList"> |
| | | <map> |
| | | <entry key="pole_singlelamp_data"> |
| | | <value> |
| | | <Config> |
| | | <option name="comment" value="true" /> |
| | | <option name="daoMvnPath" value="src/main/java" /> |
| | | <option name="daoName" value="PoleSinglelampDataDao" /> |
| | | <option name="daoPackage" value="api.dao" /> |
| | | <option name="daoPostfix" value="Dao" /> |
| | | <option name="modelMvnPath" value="src/main/java" /> |
| | | <option name="modelName" value="PoleSinglelampData" /> |
| | | <option name="modelPackage" value="api.bean" /> |
| | | <option name="name" value="pole_singlelamp_data" /> |
| | | <option name="offsetLimit" value="true" /> |
| | | <option name="overrideJava" value="true" /> |
| | | <option name="overrideXML" value="true" /> |
| | | <option name="primaryKey" value="streetlight_id" /> |
| | | <option name="projectFolder" value="$PROJECT_DIR$" /> |
| | | <option name="tableName" value="pole_singlelamp_data" /> |
| | | <option name="useLombokPlugin" value="true" /> |
| | | <option name="useSchemaPrefix" value="true" /> |
| | | <option name="xmlMvnPath" value="src/main/resources" /> |
| | | <option name="xmlPackage" value="generator" /> |
| | | </Config> |
| | | </value> |
| | | </entry> |
| | | </map> |
| | | </option> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="GitToolBoxProjectSettings"> |
| | | <option name="commitMessageIssueKeyValidationOverride"> |
| | | <BoolValueOverride> |
| | | <option name="enabled" value="true" /> |
| | | </BoolValueOverride> |
| | | </option> |
| | | <option name="commitMessageValidationConfigOverride"> |
| | | <CommitMessageValidationOverride> |
| | | <option name="enabled" value="true" /> |
| | | </CommitMessageValidationOverride> |
| | | </option> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <component name="InspectionProjectProfileManager"> |
| | | <profile version="1.0"> |
| | | <option name="myName" value="Project Default" /> |
| | | <inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true"> |
| | | <option name="TOP_LEVEL_CLASS_OPTIONS"> |
| | | <value> |
| | | <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" /> |
| | | <option name="REQUIRED_TAGS" value="" /> |
| | | </value> |
| | | </option> |
| | | <option name="INNER_CLASS_OPTIONS"> |
| | | <value> |
| | | <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" /> |
| | | <option name="REQUIRED_TAGS" value="" /> |
| | | </value> |
| | | </option> |
| | | <option name="METHOD_OPTIONS"> |
| | | <value> |
| | | <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" /> |
| | | <option name="REQUIRED_TAGS" value="@return@param@throws or @exception" /> |
| | | </value> |
| | | </option> |
| | | <option name="FIELD_OPTIONS"> |
| | | <value> |
| | | <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" /> |
| | | <option name="REQUIRED_TAGS" value="" /> |
| | | </value> |
| | | </option> |
| | | <option name="IGNORE_DEPRECATED" value="false" /> |
| | | <option name="IGNORE_JAVADOC_PERIOD" value="true" /> |
| | | <option name="IGNORE_DUPLICATED_THROWS" value="false" /> |
| | | <option name="IGNORE_POINT_TO_ITSELF" value="false" /> |
| | | <option name="myAdditionalJavadocTags" value="date" /> |
| | | </inspection_tool> |
| | | </profile> |
| | | </component> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="RemoteRepositoriesConfiguration"> |
| | | <remote-repository> |
| | | <option name="id" value="spring-releases" /> |
| | | <option name="name" value="Spring Releases" /> |
| | | <option name="url" value="https://maven.aliyun.com/repository/public" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Maven Central repository" /> |
| | | <option name="url" value="https://repo1.maven.org/maven2" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="jboss.community" /> |
| | | <option name="name" value="JBoss Community repository" /> |
| | | <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="spring-milestones" /> |
| | | <option name="name" value="Spring Milestones" /> |
| | | <option name="url" value="https://maven.aliyun.com/repository/public" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Central Repository" /> |
| | | <option name="url" value="https://maven.aliyun.com/repository/public" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="spring-snapshots" /> |
| | | <option name="name" value="Spring Snapshots" /> |
| | | <option name="url" value="https://maven.aliyun.com/repository/public" /> |
| | | </remote-repository> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="CheckStyle-IDEA"> |
| | | <option name="configuration"> |
| | | <map> |
| | | <entry key="checkstyle-version" value="8.44" /> |
| | | <entry key="copy-libs" value="true" /> |
| | | <entry key="location-0" value="BUNDLED:(bundled):Sun Checks" /> |
| | | <entry key="location-1" value="BUNDLED:(bundled):Google Checks" /> |
| | | <entry key="scan-before-checkin" value="false" /> |
| | | <entry key="scanscope" value="JavaOnly" /> |
| | | <entry key="suppress-errors" value="false" /> |
| | | </map> |
| | | </option> |
| | | </component> |
| | | <component name="ExternalStorageConfigurationManager" enabled="true" /> |
| | | <component name="MavenProjectsManager"> |
| | | <option name="originalFiles"> |
| | | <list> |
| | | <option value="$PROJECT_DIR$/pom.xml" /> |
| | | </list> |
| | | </option> |
| | | </component> |
| | | <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" /> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="TemplatesSettings"> |
| | | <option name="templateConfigs"> |
| | | <TemplateContext> |
| | | <option name="generateConfig"> |
| | | <GenerateConfig> |
| | | <option name="annotationType" value="NONE" /> |
| | | <option name="basePackage" value="generator" /> |
| | | <option name="basePath" value="src/main/java" /> |
| | | <option name="encoding" value="UTF-8" /> |
| | | <option name="extraClassSuffix" value="" /> |
| | | <option name="ignoreFieldPrefix" value="" /> |
| | | <option name="ignoreFieldSuffix" value="" /> |
| | | <option name="ignoreTablePrefix" value="" /> |
| | | <option name="ignoreTableSuffix" value="" /> |
| | | <option name="moduleName" value="api" /> |
| | | <option name="modulePath" value="$PROJECT_DIR$/" /> |
| | | <option name="moduleUIInfoList"> |
| | | <list> |
| | | <ModuleInfoGo> |
| | | <option name="basePath" value="${domain.basePath}" /> |
| | | <option name="configName" value="mapperInterface" /> |
| | | <option name="encoding" value="${domain.encoding}" /> |
| | | <option name="fileName" value="${domain.fileName}Mapper" /> |
| | | <option name="fileNameWithSuffix" value="${domain.fileName}Mapper.java" /> |
| | | <option name="modulePath" value="$PROJECT_DIR$/" /> |
| | | <option name="packageName" value="${domain.basePackage}.mapper" /> |
| | | </ModuleInfoGo> |
| | | <ModuleInfoGo> |
| | | <option name="basePath" value="src/main/resources" /> |
| | | <option name="configName" value="mapperXml" /> |
| | | <option name="encoding" value="${domain.encoding}" /> |
| | | <option name="fileName" value="${domain.fileName}Mapper" /> |
| | | <option name="fileNameWithSuffix" value="${domain.fileName}Mapper.xml" /> |
| | | <option name="modulePath" value="$PROJECT_DIR$/" /> |
| | | <option name="packageName" value="mapper" /> |
| | | </ModuleInfoGo> |
| | | <ModuleInfoGo> |
| | | <option name="basePath" value="${domain.basePath}" /> |
| | | <option name="configName" value="serviceImpl" /> |
| | | <option name="encoding" value="${domain.encoding}" /> |
| | | <option name="fileName" value="${domain.fileName}ServiceImpl" /> |
| | | <option name="fileNameWithSuffix" value="${domain.fileName}ServiceImpl.java" /> |
| | | <option name="modulePath" value="$PROJECT_DIR$/" /> |
| | | <option name="packageName" value="${domain.basePackage}.service.impl" /> |
| | | </ModuleInfoGo> |
| | | <ModuleInfoGo> |
| | | <option name="basePath" value="${domain.basePath}" /> |
| | | <option name="configName" value="serviceInterface" /> |
| | | <option name="encoding" value="${domain.encoding}" /> |
| | | <option name="fileName" value="${domain.fileName}Service" /> |
| | | <option name="fileNameWithSuffix" value="${domain.fileName}Service.java" /> |
| | | <option name="modulePath" value="$PROJECT_DIR$/" /> |
| | | <option name="packageName" value="${domain.basePackage}.service" /> |
| | | </ModuleInfoGo> |
| | | </list> |
| | | </option> |
| | | <option name="needToStringHashcodeEquals" value="true" /> |
| | | <option name="needsComment" value="true" /> |
| | | <option name="relativePackage" value="domain" /> |
| | | <option name="superClass" value="" /> |
| | | <option name="tableUIInfoList"> |
| | | <list> |
| | | <TableUIInfo> |
| | | <option name="className" value="PoleSinglelampData" /> |
| | | <option name="tableName" value="pole_singlelamp_data_mq" /> |
| | | </TableUIInfo> |
| | | </list> |
| | | </option> |
| | | <option name="templatesName" value="mybatis-plus2" /> |
| | | </GenerateConfig> |
| | | </option> |
| | | <option name="moduleName" value="api" /> |
| | | <option name="projectPath" value="$PROJECT_DIR$" /> |
| | | <option name="templateName" value="mybatis-plus2" /> |
| | | </TemplateContext> |
| | | </option> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="RunConfigurationProducerService"> |
| | | <option name="ignoredProducers"> |
| | | <set> |
| | | <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" /> |
| | | </set> |
| | | </option> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="Palette2"> |
| | | <group name="Swing"> |
| | | <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> |
| | | </item> |
| | | <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> |
| | | </item> |
| | | <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> |
| | | </item> |
| | | <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> |
| | | <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> |
| | | </item> |
| | | <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> |
| | | <initial-values> |
| | | <property name="text" value="Button" /> |
| | | </initial-values> |
| | | </item> |
| | | <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> |
| | | <initial-values> |
| | | <property name="text" value="RadioButton" /> |
| | | </initial-values> |
| | | </item> |
| | | <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> |
| | | <initial-values> |
| | | <property name="text" value="CheckBox" /> |
| | | </initial-values> |
| | | </item> |
| | | <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> |
| | | <initial-values> |
| | | <property name="text" value="Label" /> |
| | | </initial-values> |
| | | </item> |
| | | <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
| | | <preferred-size width="150" height="-1" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
| | | <preferred-size width="150" height="-1" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
| | | <preferred-size width="150" height="-1" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
| | | <preferred-size width="150" height="50" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> |
| | | <preferred-size width="200" height="200" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> |
| | | <preferred-size width="200" height="200" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> |
| | | </item> |
| | | <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> |
| | | <preferred-size width="-1" height="20" /> |
| | | </default-constraints> |
| | | </item> |
| | | <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> |
| | | <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> |
| | | </item> |
| | | <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> |
| | | <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> |
| | | </item> |
| | | </group> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="VcsDirectoryMappings"> |
| | | <mapping directory="" vcs="Git" /> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package api.bean; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * pole_singlelamp_data |
| | | * @author van |
| | | */ |
| | | @Data |
| | | |
| | | public class LampEntity implements Serializable { |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private Long singlelampDataId; |
| | | |
| | | private Long streetlightId; |
| | | |
| | | private String streetlightName; |
| | | |
| | | /** |
| | | * æ
éä½ |
| | | */ |
| | | private Double currError; |
| | | |
| | | /** |
| | | * çµå |
| | | */ |
| | | private Double gridVolt; |
| | | |
| | | /** |
| | | * çµæµ |
| | | */ |
| | | private Double gridCurr; |
| | | |
| | | /** |
| | | * é¢ç |
| | | */ |
| | | private Double gridFreq; |
| | | |
| | | /** |
| | | * çµç½PF |
| | | */ |
| | | private Double gridPf; |
| | | |
| | | /** |
| | | * çµç½æå |
| | | */ |
| | | private Double gridAp; |
| | | |
| | | /** |
| | | * çµç½æ å |
| | | */ |
| | | private Double gridRp; |
| | | |
| | | /** |
| | | * 温度 |
| | | */ |
| | | private Double temperature; |
| | | |
| | | /** |
| | | * äº®ç¯ |
| | | */ |
| | | private Double ledDim; |
| | | |
| | | /** |
| | | * 工使¶é´ |
| | | */ |
| | | private Double workTime; |
| | | |
| | | /** |
| | | * 累计æ¶é´ |
| | | */ |
| | | private Double workTimeTotal; |
| | | |
| | | /** |
| | | * æ¬æ¬¡ç¨çµé |
| | | */ |
| | | private Double energyTonight; |
| | | |
| | | /** |
| | | * 累计ç¨çµé |
| | | */ |
| | | private Double energyTotal; |
| | | |
| | | /** |
| | | * ç¯å¤´ç
§åº¦å¼ |
| | | */ |
| | | private Double ledLux; |
| | | |
| | | /** |
| | | * å½å¤©è´è½½å³°å¼åç |
| | | */ |
| | | private Double ppkToday; |
| | | |
| | | /** |
| | | * åå²è´è½½å³°å¼åç |
| | | */ |
| | | private Double ppkHistory; |
| | | |
| | | /** |
| | | * 彿¥ç¨çµ |
| | | */ |
| | | private Double energyToday; |
| | | |
| | | /** |
| | | * ç»æµæ¶ç |
| | | */ |
| | | private Double saveMoney; |
| | | |
| | | /** |
| | | * CO2åæé |
| | | */ |
| | | private Double co2; |
| | | |
| | | /** |
| | | * æç¨çµ |
| | | */ |
| | | private Double energyMonth; |
| | | |
| | | /** |
| | | * å½æç»æµæ¶ç |
| | | */ |
| | | private Double saveMoneyMonth; |
| | | |
| | | /** |
| | | * 彿CO2ææ¾é |
| | | */ |
| | | private Double co2Month; |
| | | |
| | | /** |
| | | * å¹´çµé |
| | | */ |
| | | private Double gridEnergyYear; |
| | | |
| | | /** |
| | | * å½å¹´ç»æµæ¶ç |
| | | */ |
| | | private Double saveMoneyYear; |
| | | |
| | | /** |
| | | * å½å¹´CO2åæé |
| | | */ |
| | | private Double co2Year; |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | private Date updateTime; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package api.dao; |
| | | |
| | | import api.bean.LampEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface LampDao { |
| | | int deleteByPrimaryKey(Long singlelampDataId); |
| | | |
| | | int insert(LampEntity record); |
| | | |
| | | int insertSelective(LampEntity record); |
| | | |
| | | LampEntity selectByPrimaryKey(Long singlelampDataId); |
| | | |
| | | int updateByPrimaryKeySelective(LampEntity record); |
| | | |
| | | int updateByPrimaryKey(LampEntity record); |
| | | |
| | | /**è¶
级管ç忥æ¾å
¨é¨*/ |
| | | List<LampEntity> selectAll(); |
| | | /**æ®é管çåæå
¬å¸æ¥æ¾*/ |
| | | List<LampEntity> selectByCompany(Long userId); |
| | | /**ç¨æ·æ¥æ¾*/ |
| | | List<LampEntity> selectByUserId(Long userId); |
| | | /**åä¸ªç¯ææ°æ®*/ |
| | | List<LampEntity> selectByStreetlightId(Long lightId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="api.dao.LampDao"> |
| | | <resultMap id="BaseResultMap" type="api.bean.LampEntity"> |
| | | <id column="singlelamp_data_id" jdbcType="BIGINT" property="singlelampDataId" /> |
| | | <result column="streetlight_id" jdbcType="BIGINT" property="streetlightId" /> |
| | | <result column="curr_error" jdbcType="DOUBLE" property="currError" /> |
| | | <result column="grid_volt" jdbcType="DOUBLE" property="gridVolt" /> |
| | | <result column="grid_curr" jdbcType="DOUBLE" property="gridCurr" /> |
| | | <result column="grid_freq" jdbcType="DOUBLE" property="gridFreq" /> |
| | | <result column="grid_pf" jdbcType="DOUBLE" property="gridPf" /> |
| | | <result column="grid_ap" jdbcType="DOUBLE" property="gridAp" /> |
| | | <result column="grid_rp" jdbcType="DOUBLE" property="gridRp" /> |
| | | <result column="temperature" jdbcType="DOUBLE" property="temperature" /> |
| | | <result column="led_dim" jdbcType="DOUBLE" property="ledDim" /> |
| | | <result column="work_time" jdbcType="DOUBLE" property="workTime" /> |
| | | <result column="work_time_total" jdbcType="DOUBLE" property="workTimeTotal" /> |
| | | <result column="energy_tonight" jdbcType="DOUBLE" property="energyTonight" /> |
| | | <result column="energy_total" jdbcType="DOUBLE" property="energyTotal" /> |
| | | <result column="led_lux" jdbcType="DOUBLE" property="ledLux" /> |
| | | <result column="ppk_today" jdbcType="DOUBLE" property="ppkToday" /> |
| | | <result column="ppk_history" jdbcType="DOUBLE" property="ppkHistory" /> |
| | | <result column="energy_today" jdbcType="DOUBLE" property="energyToday" /> |
| | | <result column="save_money" jdbcType="DOUBLE" property="saveMoney" /> |
| | | <result column="co2" jdbcType="DOUBLE" property="co2" /> |
| | | <result column="energy_month" jdbcType="DOUBLE" property="energyMonth" /> |
| | | <result column="save_money_month" jdbcType="DOUBLE" property="saveMoneyMonth" /> |
| | | <result column="co2_month" jdbcType="DOUBLE" property="co2Month" /> |
| | | <result column="grid_energy_year" jdbcType="DOUBLE" property="gridEnergyYear" /> |
| | | <result column="save_money_year" jdbcType="DOUBLE" property="saveMoneyYear" /> |
| | | <result column="co2_year" jdbcType="DOUBLE" property="co2Year" /> |
| | | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="Base_Column_List"> |
| | | singlelamp_data_id, streetlight_id, curr_error, grid_volt, grid_curr, grid_freq, |
| | | grid_pf, grid_ap, grid_rp, temperature, led_dim, work_time, work_time_total, energy_tonight, |
| | | energy_total, led_lux, ppk_today, ppk_history, energy_today, save_money, co2, energy_month, |
| | | save_money_month, co2_month, grid_energy_year, save_money_year, co2_year, update_time |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from pole_singlelamp_data |
| | | where singlelamp_data_id = #{singlelampDataId,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectAll" resultType="api.bean.LampEntity"> |
| | | SELECT |
| | | pole_streetlight.streetlight_name,pole_singlelamp_data.* |
| | | FROM |
| | | pole_singlelamp_data |
| | | LEFT JOIN |
| | | pole_streetlight |
| | | ON |
| | | pole_singlelamp_data.streetlight_id = pole_streetlight.streetlight_id |
| | | WHERE |
| | | singlelamp_data_id IN ( |
| | | SELECT |
| | | max(singlelamp_data_id) |
| | | FROM |
| | | pole_singlelamp_data |
| | | GROUP BY |
| | | streetlight_id |
| | | ) |
| | | ORDER BY |
| | | singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | <select id="selectByCompany" resultType="api.bean.LampEntity"> |
| | | SELECT |
| | | pole_streetlight.streetlight_name, |
| | | pole_singlelamp_data.* |
| | | FROM |
| | | pole_singlelamp_data |
| | | LEFT JOIN pole_streetlight ON pole_singlelamp_data.streetlight_id = pole_streetlight.streetlight_id |
| | | WHERE |
| | | singlelamp_data_id IN ( |
| | | SELECT |
| | | max( singlelamp_data_id ) |
| | | FROM |
| | | pole_singlelamp_data |
| | | WHERE |
| | | streetlight_id IN ( SELECT streetlight_id FROM pole_user_streetlight WHERE company_id IN ( SELECT company_id FROM sys_user_company WHERE user_id = #{userId} ) ) |
| | | GROUP BY |
| | | streetlight_id |
| | | ) |
| | | ORDER BY |
| | | singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | <select id="selectByUserId" resultType="api.bean.LampEntity"> |
| | | SELECT |
| | | pole_streetlight.streetlight_name, |
| | | pole_singlelamp_data.* |
| | | FROM |
| | | pole_singlelamp_data |
| | | LEFT JOIN pole_streetlight ON pole_singlelamp_data.streetlight_id = pole_streetlight.streetlight_id |
| | | WHERE |
| | | singlelamp_data_id IN ( |
| | | SELECT |
| | | max(singlelamp_data_id) |
| | | FROM |
| | | pole_singlelamp_data |
| | | WHERE |
| | | streetlight_id IN ( |
| | | SELECT |
| | | streetlight_id |
| | | FROM |
| | | pole_user_streetlight |
| | | WHERE |
| | | user_id = #{userId} |
| | | ) |
| | | GROUP BY |
| | | streetlight_id |
| | | ) |
| | | ORDER BY |
| | | singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | <select id="selectByStreetlightId" resultType="api.bean.LampEntity"> |
| | | SELECT |
| | | pole_streetlight.streetlight_name, |
| | | pole_singlelamp_data.* |
| | | FROM |
| | | pole_singlelamp_data |
| | | LEFT JOIN pole_streetlight ON pole_singlelamp_data.streetlight_id = pole_streetlight.streetlight_id |
| | | WHERE |
| | | pole_singlelamp_data.streetlight_id = #{streetlightId} |
| | | ORDER BY |
| | | singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from pole_singlelamp_data |
| | | where singlelamp_data_id = #{singlelampDataId,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="streetlight_id" keyProperty="streetlightId" parameterType="api.bean.LampEntity" useGeneratedKeys="true"> |
| | | insert into pole_singlelamp_data (singlelamp_data_id, curr_error, grid_volt, |
| | | grid_curr, grid_freq, grid_pf, |
| | | grid_ap, grid_rp, temperature, |
| | | led_dim, work_time, work_time_total, |
| | | energy_tonight, energy_total, led_lux, |
| | | ppk_today, ppk_history, energy_today, |
| | | save_money, co2, energy_month, |
| | | save_money_month, co2_month, grid_energy_year, |
| | | save_money_year, co2_year, update_time |
| | | ) |
| | | values (#{singlelampDataId,jdbcType=BIGINT}, #{currError,jdbcType=DOUBLE}, #{gridVolt,jdbcType=DOUBLE}, |
| | | #{gridCurr,jdbcType=DOUBLE}, #{gridFreq,jdbcType=DOUBLE}, #{gridPf,jdbcType=DOUBLE}, |
| | | #{gridAp,jdbcType=DOUBLE}, #{gridRp,jdbcType=DOUBLE}, #{temperature,jdbcType=DOUBLE}, |
| | | #{ledDim,jdbcType=DOUBLE}, #{workTime,jdbcType=DOUBLE}, #{workTimeTotal,jdbcType=DOUBLE}, |
| | | #{energyTonight,jdbcType=DOUBLE}, #{energyTotal,jdbcType=DOUBLE}, #{ledLux,jdbcType=DOUBLE}, |
| | | #{ppkToday,jdbcType=DOUBLE}, #{ppkHistory,jdbcType=DOUBLE}, #{energyToday,jdbcType=DOUBLE}, |
| | | #{saveMoney,jdbcType=DOUBLE}, #{co2,jdbcType=DOUBLE}, #{energyMonth,jdbcType=DOUBLE}, |
| | | #{saveMoneyMonth,jdbcType=DOUBLE}, #{co2Month,jdbcType=DOUBLE}, #{gridEnergyYear,jdbcType=DOUBLE}, |
| | | #{saveMoneyYear,jdbcType=DOUBLE}, #{co2Year,jdbcType=DOUBLE}, #{updateTime,jdbcType=TIMESTAMP} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="streetlight_id" keyProperty="streetlightId" parameterType="api.bean.LampEntity" useGeneratedKeys="true"> |
| | | insert into pole_singlelamp_data |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="singlelampDataId != null"> |
| | | singlelamp_data_id, |
| | | </if> |
| | | <if test="currError != null"> |
| | | curr_error, |
| | | </if> |
| | | <if test="gridVolt != null"> |
| | | grid_volt, |
| | | </if> |
| | | <if test="gridCurr != null"> |
| | | grid_curr, |
| | | </if> |
| | | <if test="gridFreq != null"> |
| | | grid_freq, |
| | | </if> |
| | | <if test="gridPf != null"> |
| | | grid_pf, |
| | | </if> |
| | | <if test="gridAp != null"> |
| | | grid_ap, |
| | | </if> |
| | | <if test="gridRp != null"> |
| | | grid_rp, |
| | | </if> |
| | | <if test="temperature != null"> |
| | | temperature, |
| | | </if> |
| | | <if test="ledDim != null"> |
| | | led_dim, |
| | | </if> |
| | | <if test="workTime != null"> |
| | | work_time, |
| | | </if> |
| | | <if test="workTimeTotal != null"> |
| | | work_time_total, |
| | | </if> |
| | | <if test="energyTonight != null"> |
| | | energy_tonight, |
| | | </if> |
| | | <if test="energyTotal != null"> |
| | | energy_total, |
| | | </if> |
| | | <if test="ledLux != null"> |
| | | led_lux, |
| | | </if> |
| | | <if test="ppkToday != null"> |
| | | ppk_today, |
| | | </if> |
| | | <if test="ppkHistory != null"> |
| | | ppk_history, |
| | | </if> |
| | | <if test="energyToday != null"> |
| | | energy_today, |
| | | </if> |
| | | <if test="saveMoney != null"> |
| | | save_money, |
| | | </if> |
| | | <if test="co2 != null"> |
| | | co2, |
| | | </if> |
| | | <if test="energyMonth != null"> |
| | | energy_month, |
| | | </if> |
| | | <if test="saveMoneyMonth != null"> |
| | | save_money_month, |
| | | </if> |
| | | <if test="co2Month != null"> |
| | | co2_month, |
| | | </if> |
| | | <if test="gridEnergyYear != null"> |
| | | grid_energy_year, |
| | | </if> |
| | | <if test="saveMoneyYear != null"> |
| | | save_money_year, |
| | | </if> |
| | | <if test="co2Year != null"> |
| | | co2_year, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | update_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="singlelampDataId != null"> |
| | | #{singlelampDataId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="currError != null"> |
| | | #{currError,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridVolt != null"> |
| | | #{gridVolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridCurr != null"> |
| | | #{gridCurr,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridFreq != null"> |
| | | #{gridFreq,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridPf != null"> |
| | | #{gridPf,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridAp != null"> |
| | | #{gridAp,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridRp != null"> |
| | | #{gridRp,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="temperature != null"> |
| | | #{temperature,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ledDim != null"> |
| | | #{ledDim,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="workTime != null"> |
| | | #{workTime,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="workTimeTotal != null"> |
| | | #{workTimeTotal,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyTonight != null"> |
| | | #{energyTonight,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyTotal != null"> |
| | | #{energyTotal,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ledLux != null"> |
| | | #{ledLux,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ppkToday != null"> |
| | | #{ppkToday,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ppkHistory != null"> |
| | | #{ppkHistory,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyToday != null"> |
| | | #{energyToday,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoney != null"> |
| | | #{saveMoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2 != null"> |
| | | #{co2,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyMonth != null"> |
| | | #{energyMonth,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoneyMonth != null"> |
| | | #{saveMoneyMonth,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2Month != null"> |
| | | #{co2Month,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridEnergyYear != null"> |
| | | #{gridEnergyYear,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoneyYear != null"> |
| | | #{saveMoneyYear,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2Year != null"> |
| | | #{co2Year,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="api.bean.LampEntity"> |
| | | update pole_singlelamp_data |
| | | <set> |
| | | <if test="streetlightId != null"> |
| | | streetlight_id = #{streetlightId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="currError != null"> |
| | | curr_error = #{currError,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridVolt != null"> |
| | | grid_volt = #{gridVolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridCurr != null"> |
| | | grid_curr = #{gridCurr,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridFreq != null"> |
| | | grid_freq = #{gridFreq,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridPf != null"> |
| | | grid_pf = #{gridPf,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridAp != null"> |
| | | grid_ap = #{gridAp,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridRp != null"> |
| | | grid_rp = #{gridRp,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="temperature != null"> |
| | | temperature = #{temperature,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ledDim != null"> |
| | | led_dim = #{ledDim,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="workTime != null"> |
| | | work_time = #{workTime,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="workTimeTotal != null"> |
| | | work_time_total = #{workTimeTotal,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyTonight != null"> |
| | | energy_tonight = #{energyTonight,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyTotal != null"> |
| | | energy_total = #{energyTotal,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ledLux != null"> |
| | | led_lux = #{ledLux,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ppkToday != null"> |
| | | ppk_today = #{ppkToday,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ppkHistory != null"> |
| | | ppk_history = #{ppkHistory,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyToday != null"> |
| | | energy_today = #{energyToday,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoney != null"> |
| | | save_money = #{saveMoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2 != null"> |
| | | co2 = #{co2,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyMonth != null"> |
| | | energy_month = #{energyMonth,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoneyMonth != null"> |
| | | save_money_month = #{saveMoneyMonth,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2Month != null"> |
| | | co2_month = #{co2Month,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridEnergyYear != null"> |
| | | grid_energy_year = #{gridEnergyYear,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoneyYear != null"> |
| | | save_money_year = #{saveMoneyYear,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2Year != null"> |
| | | co2_year = #{co2Year,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | update_time = #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where singlelamp_data_id = #{singlelampDataId,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="api.bean.LampEntity"> |
| | | update pole_singlelamp_data |
| | | set streetlight_id = #{streetlightId,jdbcType=BIGINT}, |
| | | curr_error = #{currError,jdbcType=DOUBLE}, |
| | | grid_volt = #{gridVolt,jdbcType=DOUBLE}, |
| | | grid_curr = #{gridCurr,jdbcType=DOUBLE}, |
| | | grid_freq = #{gridFreq,jdbcType=DOUBLE}, |
| | | grid_pf = #{gridPf,jdbcType=DOUBLE}, |
| | | grid_ap = #{gridAp,jdbcType=DOUBLE}, |
| | | grid_rp = #{gridRp,jdbcType=DOUBLE}, |
| | | temperature = #{temperature,jdbcType=DOUBLE}, |
| | | led_dim = #{ledDim,jdbcType=DOUBLE}, |
| | | work_time = #{workTime,jdbcType=DOUBLE}, |
| | | work_time_total = #{workTimeTotal,jdbcType=DOUBLE}, |
| | | energy_tonight = #{energyTonight,jdbcType=DOUBLE}, |
| | | energy_total = #{energyTotal,jdbcType=DOUBLE}, |
| | | led_lux = #{ledLux,jdbcType=DOUBLE}, |
| | | ppk_today = #{ppkToday,jdbcType=DOUBLE}, |
| | | ppk_history = #{ppkHistory,jdbcType=DOUBLE}, |
| | | energy_today = #{energyToday,jdbcType=DOUBLE}, |
| | | save_money = #{saveMoney,jdbcType=DOUBLE}, |
| | | co2 = #{co2,jdbcType=DOUBLE}, |
| | | energy_month = #{energyMonth,jdbcType=DOUBLE}, |
| | | save_money_month = #{saveMoneyMonth,jdbcType=DOUBLE}, |
| | | co2_month = #{co2Month,jdbcType=DOUBLE}, |
| | | grid_energy_year = #{gridEnergyYear,jdbcType=DOUBLE}, |
| | | save_money_year = #{saveMoneyYear,jdbcType=DOUBLE}, |
| | | co2_year = #{co2Year,jdbcType=DOUBLE}, |
| | | update_time = #{updateTime,jdbcType=TIMESTAMP} |
| | | where singlelamp_data_id = #{singlelampDataId,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="api.dao.SinglelampDataDao"> |
| | | |
| | | <select id="selectAll" resultType="api.bean.SinglelampDataEntity"> |
| | | select |
| | | ps.streetlight_name,ps.streetlight_id, |
| | | psdm.* |
| | | from |
| | | pole_singlelamp_data_mq psdm |
| | | left join pole_streetlight ps on |
| | | psdm.mac = ps.code_number |
| | | where |
| | | psdm.singlelamp_data_id in ( |
| | | select |
| | | max(singlelamp_data_id) |
| | | from |
| | | pole_singlelamp_data_mq |
| | | group by |
| | | mac |
| | | ) |
| | | </select> |
| | | |
| | | <select id="selectByCompany" resultType="api.bean.SinglelampDataEntity"> |
| | | select |
| | | ps.streetlight_name,ps.streetlight_id, |
| | | psdm.* |
| | | from |
| | | pole_singlelamp_data_mq psdm |
| | | left join pole_streetlight ps on |
| | | psdm.mac = ps.code_number |
| | | where |
| | | psdm.singlelamp_data_id in ( |
| | | select |
| | | max(singlelamp_data_id) |
| | | from |
| | | pole_singlelamp_data_mq |
| | | where |
| | | pole_singlelamp_data_mq.mac |
| | | in ( |
| | | select |
| | | ps2.code_number |
| | | from |
| | | pole_streetlight ps2 |
| | | where |
| | | ps2.streetlight_id |
| | | in ( |
| | | select |
| | | pus.streetlight_id |
| | | from |
| | | pole_user_streetlight pus |
| | | where |
| | | pus.company_id in( |
| | | select |
| | | suc.company_id |
| | | from |
| | | sys_user_company suc |
| | | where |
| | | suc.user_id = #{userId}) |
| | | ) |
| | | ) |
| | | group by |
| | | mac |
| | | ) |
| | | order by |
| | | streetlight_id |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="selectByStreetlightId" resultType="api.bean.SinglelampDataEntity"> |
| | | SELECT |
| | | ps.streetlight_name,ps.streetlight_id, |
| | | psd.* |
| | | FROM |
| | | pole_singlelamp_data_mq psd |
| | | LEFT JOIN pole_streetlight ps ON psd.mac = ps.code_number |
| | | WHERE |
| | | ps.code_number = #{mac} |
| | | ORDER BY |
| | | psd.singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="api.dao.LampDao"> |
| | | <resultMap id="BaseResultMap" type="api.bean.LampEntity"> |
| | | <id column="singlelamp_data_id" jdbcType="BIGINT" property="singlelampDataId" /> |
| | | <result column="streetlight_id" jdbcType="BIGINT" property="streetlightId" /> |
| | | <result column="curr_error" jdbcType="DOUBLE" property="currError" /> |
| | | <result column="grid_volt" jdbcType="DOUBLE" property="gridVolt" /> |
| | | <result column="grid_curr" jdbcType="DOUBLE" property="gridCurr" /> |
| | | <result column="grid_freq" jdbcType="DOUBLE" property="gridFreq" /> |
| | | <result column="grid_pf" jdbcType="DOUBLE" property="gridPf" /> |
| | | <result column="grid_ap" jdbcType="DOUBLE" property="gridAp" /> |
| | | <result column="grid_rp" jdbcType="DOUBLE" property="gridRp" /> |
| | | <result column="temperature" jdbcType="DOUBLE" property="temperature" /> |
| | | <result column="led_dim" jdbcType="DOUBLE" property="ledDim" /> |
| | | <result column="work_time" jdbcType="DOUBLE" property="workTime" /> |
| | | <result column="work_time_total" jdbcType="DOUBLE" property="workTimeTotal" /> |
| | | <result column="energy_tonight" jdbcType="DOUBLE" property="energyTonight" /> |
| | | <result column="energy_total" jdbcType="DOUBLE" property="energyTotal" /> |
| | | <result column="led_lux" jdbcType="DOUBLE" property="ledLux" /> |
| | | <result column="ppk_today" jdbcType="DOUBLE" property="ppkToday" /> |
| | | <result column="ppk_history" jdbcType="DOUBLE" property="ppkHistory" /> |
| | | <result column="energy_today" jdbcType="DOUBLE" property="energyToday" /> |
| | | <result column="save_money" jdbcType="DOUBLE" property="saveMoney" /> |
| | | <result column="co2" jdbcType="DOUBLE" property="co2" /> |
| | | <result column="energy_month" jdbcType="DOUBLE" property="energyMonth" /> |
| | | <result column="save_money_month" jdbcType="DOUBLE" property="saveMoneyMonth" /> |
| | | <result column="co2_month" jdbcType="DOUBLE" property="co2Month" /> |
| | | <result column="grid_energy_year" jdbcType="DOUBLE" property="gridEnergyYear" /> |
| | | <result column="save_money_year" jdbcType="DOUBLE" property="saveMoneyYear" /> |
| | | <result column="co2_year" jdbcType="DOUBLE" property="co2Year" /> |
| | | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="Base_Column_List"> |
| | | singlelamp_data_id, streetlight_id, curr_error, grid_volt, grid_curr, grid_freq, |
| | | grid_pf, grid_ap, grid_rp, temperature, led_dim, work_time, work_time_total, energy_tonight, |
| | | energy_total, led_lux, ppk_today, ppk_history, energy_today, save_money, co2, energy_month, |
| | | save_money_month, co2_month, grid_energy_year, save_money_year, co2_year, update_time |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from pole_singlelamp_data |
| | | where singlelamp_data_id = #{singlelampDataId,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectAll" resultType="api.bean.LampEntity"> |
| | | SELECT |
| | | pole_streetlight.streetlight_name,pole_singlelamp_data.* |
| | | FROM |
| | | pole_singlelamp_data |
| | | LEFT JOIN |
| | | pole_streetlight |
| | | ON |
| | | pole_singlelamp_data.streetlight_id = pole_streetlight.streetlight_id |
| | | WHERE |
| | | singlelamp_data_id IN ( |
| | | SELECT |
| | | max(singlelamp_data_id) |
| | | FROM |
| | | pole_singlelamp_data |
| | | GROUP BY |
| | | streetlight_id |
| | | ) |
| | | ORDER BY |
| | | singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | <select id="selectByCompany" resultType="api.bean.LampEntity"> |
| | | SELECT |
| | | pole_streetlight.streetlight_name, |
| | | pole_singlelamp_data.* |
| | | FROM |
| | | pole_singlelamp_data |
| | | LEFT JOIN pole_streetlight ON pole_singlelamp_data.streetlight_id = pole_streetlight.streetlight_id |
| | | WHERE |
| | | singlelamp_data_id IN ( |
| | | SELECT |
| | | max( singlelamp_data_id ) |
| | | FROM |
| | | pole_singlelamp_data |
| | | WHERE |
| | | streetlight_id IN ( SELECT streetlight_id FROM pole_user_streetlight WHERE company_id IN ( SELECT company_id FROM sys_user_company WHERE user_id = #{userId} ) ) |
| | | GROUP BY |
| | | streetlight_id |
| | | ) |
| | | ORDER BY |
| | | singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | <select id="selectByUserId" resultType="api.bean.LampEntity"> |
| | | SELECT |
| | | pole_streetlight.streetlight_name, |
| | | pole_singlelamp_data.* |
| | | FROM |
| | | pole_singlelamp_data |
| | | LEFT JOIN pole_streetlight ON pole_singlelamp_data.streetlight_id = pole_streetlight.streetlight_id |
| | | WHERE |
| | | singlelamp_data_id IN ( |
| | | SELECT |
| | | max(singlelamp_data_id) |
| | | FROM |
| | | pole_singlelamp_data |
| | | WHERE |
| | | streetlight_id IN ( |
| | | SELECT |
| | | streetlight_id |
| | | FROM |
| | | pole_user_streetlight |
| | | WHERE |
| | | user_id = #{userId} |
| | | ) |
| | | GROUP BY |
| | | streetlight_id |
| | | ) |
| | | ORDER BY |
| | | singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | <select id="selectByStreetlightId" resultType="api.bean.LampEntity"> |
| | | SELECT |
| | | pole_streetlight.streetlight_name, |
| | | pole_singlelamp_data.* |
| | | FROM |
| | | pole_singlelamp_data |
| | | LEFT JOIN pole_streetlight ON pole_singlelamp_data.streetlight_id = pole_streetlight.streetlight_id |
| | | WHERE |
| | | pole_singlelamp_data.streetlight_id = #{streetlightId} |
| | | ORDER BY |
| | | singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from pole_singlelamp_data |
| | | where singlelamp_data_id = #{singlelampDataId,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="streetlight_id" keyProperty="streetlightId" parameterType="api.bean.LampEntity" useGeneratedKeys="true"> |
| | | insert into pole_singlelamp_data (singlelamp_data_id, curr_error, grid_volt, |
| | | grid_curr, grid_freq, grid_pf, |
| | | grid_ap, grid_rp, temperature, |
| | | led_dim, work_time, work_time_total, |
| | | energy_tonight, energy_total, led_lux, |
| | | ppk_today, ppk_history, energy_today, |
| | | save_money, co2, energy_month, |
| | | save_money_month, co2_month, grid_energy_year, |
| | | save_money_year, co2_year, update_time |
| | | ) |
| | | values (#{singlelampDataId,jdbcType=BIGINT}, #{currError,jdbcType=DOUBLE}, #{gridVolt,jdbcType=DOUBLE}, |
| | | #{gridCurr,jdbcType=DOUBLE}, #{gridFreq,jdbcType=DOUBLE}, #{gridPf,jdbcType=DOUBLE}, |
| | | #{gridAp,jdbcType=DOUBLE}, #{gridRp,jdbcType=DOUBLE}, #{temperature,jdbcType=DOUBLE}, |
| | | #{ledDim,jdbcType=DOUBLE}, #{workTime,jdbcType=DOUBLE}, #{workTimeTotal,jdbcType=DOUBLE}, |
| | | #{energyTonight,jdbcType=DOUBLE}, #{energyTotal,jdbcType=DOUBLE}, #{ledLux,jdbcType=DOUBLE}, |
| | | #{ppkToday,jdbcType=DOUBLE}, #{ppkHistory,jdbcType=DOUBLE}, #{energyToday,jdbcType=DOUBLE}, |
| | | #{saveMoney,jdbcType=DOUBLE}, #{co2,jdbcType=DOUBLE}, #{energyMonth,jdbcType=DOUBLE}, |
| | | #{saveMoneyMonth,jdbcType=DOUBLE}, #{co2Month,jdbcType=DOUBLE}, #{gridEnergyYear,jdbcType=DOUBLE}, |
| | | #{saveMoneyYear,jdbcType=DOUBLE}, #{co2Year,jdbcType=DOUBLE}, #{updateTime,jdbcType=TIMESTAMP} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="streetlight_id" keyProperty="streetlightId" parameterType="api.bean.LampEntity" useGeneratedKeys="true"> |
| | | insert into pole_singlelamp_data |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="singlelampDataId != null"> |
| | | singlelamp_data_id, |
| | | </if> |
| | | <if test="currError != null"> |
| | | curr_error, |
| | | </if> |
| | | <if test="gridVolt != null"> |
| | | grid_volt, |
| | | </if> |
| | | <if test="gridCurr != null"> |
| | | grid_curr, |
| | | </if> |
| | | <if test="gridFreq != null"> |
| | | grid_freq, |
| | | </if> |
| | | <if test="gridPf != null"> |
| | | grid_pf, |
| | | </if> |
| | | <if test="gridAp != null"> |
| | | grid_ap, |
| | | </if> |
| | | <if test="gridRp != null"> |
| | | grid_rp, |
| | | </if> |
| | | <if test="temperature != null"> |
| | | temperature, |
| | | </if> |
| | | <if test="ledDim != null"> |
| | | led_dim, |
| | | </if> |
| | | <if test="workTime != null"> |
| | | work_time, |
| | | </if> |
| | | <if test="workTimeTotal != null"> |
| | | work_time_total, |
| | | </if> |
| | | <if test="energyTonight != null"> |
| | | energy_tonight, |
| | | </if> |
| | | <if test="energyTotal != null"> |
| | | energy_total, |
| | | </if> |
| | | <if test="ledLux != null"> |
| | | led_lux, |
| | | </if> |
| | | <if test="ppkToday != null"> |
| | | ppk_today, |
| | | </if> |
| | | <if test="ppkHistory != null"> |
| | | ppk_history, |
| | | </if> |
| | | <if test="energyToday != null"> |
| | | energy_today, |
| | | </if> |
| | | <if test="saveMoney != null"> |
| | | save_money, |
| | | </if> |
| | | <if test="co2 != null"> |
| | | co2, |
| | | </if> |
| | | <if test="energyMonth != null"> |
| | | energy_month, |
| | | </if> |
| | | <if test="saveMoneyMonth != null"> |
| | | save_money_month, |
| | | </if> |
| | | <if test="co2Month != null"> |
| | | co2_month, |
| | | </if> |
| | | <if test="gridEnergyYear != null"> |
| | | grid_energy_year, |
| | | </if> |
| | | <if test="saveMoneyYear != null"> |
| | | save_money_year, |
| | | </if> |
| | | <if test="co2Year != null"> |
| | | co2_year, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | update_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="singlelampDataId != null"> |
| | | #{singlelampDataId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="currError != null"> |
| | | #{currError,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridVolt != null"> |
| | | #{gridVolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridCurr != null"> |
| | | #{gridCurr,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridFreq != null"> |
| | | #{gridFreq,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridPf != null"> |
| | | #{gridPf,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridAp != null"> |
| | | #{gridAp,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridRp != null"> |
| | | #{gridRp,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="temperature != null"> |
| | | #{temperature,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ledDim != null"> |
| | | #{ledDim,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="workTime != null"> |
| | | #{workTime,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="workTimeTotal != null"> |
| | | #{workTimeTotal,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyTonight != null"> |
| | | #{energyTonight,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyTotal != null"> |
| | | #{energyTotal,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ledLux != null"> |
| | | #{ledLux,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ppkToday != null"> |
| | | #{ppkToday,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ppkHistory != null"> |
| | | #{ppkHistory,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyToday != null"> |
| | | #{energyToday,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoney != null"> |
| | | #{saveMoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2 != null"> |
| | | #{co2,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyMonth != null"> |
| | | #{energyMonth,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoneyMonth != null"> |
| | | #{saveMoneyMonth,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2Month != null"> |
| | | #{co2Month,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridEnergyYear != null"> |
| | | #{gridEnergyYear,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoneyYear != null"> |
| | | #{saveMoneyYear,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2Year != null"> |
| | | #{co2Year,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="api.bean.LampEntity"> |
| | | update pole_singlelamp_data |
| | | <set> |
| | | <if test="streetlightId != null"> |
| | | streetlight_id = #{streetlightId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="currError != null"> |
| | | curr_error = #{currError,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridVolt != null"> |
| | | grid_volt = #{gridVolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridCurr != null"> |
| | | grid_curr = #{gridCurr,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridFreq != null"> |
| | | grid_freq = #{gridFreq,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridPf != null"> |
| | | grid_pf = #{gridPf,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridAp != null"> |
| | | grid_ap = #{gridAp,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridRp != null"> |
| | | grid_rp = #{gridRp,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="temperature != null"> |
| | | temperature = #{temperature,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ledDim != null"> |
| | | led_dim = #{ledDim,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="workTime != null"> |
| | | work_time = #{workTime,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="workTimeTotal != null"> |
| | | work_time_total = #{workTimeTotal,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyTonight != null"> |
| | | energy_tonight = #{energyTonight,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyTotal != null"> |
| | | energy_total = #{energyTotal,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ledLux != null"> |
| | | led_lux = #{ledLux,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ppkToday != null"> |
| | | ppk_today = #{ppkToday,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="ppkHistory != null"> |
| | | ppk_history = #{ppkHistory,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyToday != null"> |
| | | energy_today = #{energyToday,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoney != null"> |
| | | save_money = #{saveMoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2 != null"> |
| | | co2 = #{co2,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="energyMonth != null"> |
| | | energy_month = #{energyMonth,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoneyMonth != null"> |
| | | save_money_month = #{saveMoneyMonth,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2Month != null"> |
| | | co2_month = #{co2Month,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="gridEnergyYear != null"> |
| | | grid_energy_year = #{gridEnergyYear,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="saveMoneyYear != null"> |
| | | save_money_year = #{saveMoneyYear,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="co2Year != null"> |
| | | co2_year = #{co2Year,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | update_time = #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where singlelamp_data_id = #{singlelampDataId,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="api.bean.LampEntity"> |
| | | update pole_singlelamp_data |
| | | set streetlight_id = #{streetlightId,jdbcType=BIGINT}, |
| | | curr_error = #{currError,jdbcType=DOUBLE}, |
| | | grid_volt = #{gridVolt,jdbcType=DOUBLE}, |
| | | grid_curr = #{gridCurr,jdbcType=DOUBLE}, |
| | | grid_freq = #{gridFreq,jdbcType=DOUBLE}, |
| | | grid_pf = #{gridPf,jdbcType=DOUBLE}, |
| | | grid_ap = #{gridAp,jdbcType=DOUBLE}, |
| | | grid_rp = #{gridRp,jdbcType=DOUBLE}, |
| | | temperature = #{temperature,jdbcType=DOUBLE}, |
| | | led_dim = #{ledDim,jdbcType=DOUBLE}, |
| | | work_time = #{workTime,jdbcType=DOUBLE}, |
| | | work_time_total = #{workTimeTotal,jdbcType=DOUBLE}, |
| | | energy_tonight = #{energyTonight,jdbcType=DOUBLE}, |
| | | energy_total = #{energyTotal,jdbcType=DOUBLE}, |
| | | led_lux = #{ledLux,jdbcType=DOUBLE}, |
| | | ppk_today = #{ppkToday,jdbcType=DOUBLE}, |
| | | ppk_history = #{ppkHistory,jdbcType=DOUBLE}, |
| | | energy_today = #{energyToday,jdbcType=DOUBLE}, |
| | | save_money = #{saveMoney,jdbcType=DOUBLE}, |
| | | co2 = #{co2,jdbcType=DOUBLE}, |
| | | energy_month = #{energyMonth,jdbcType=DOUBLE}, |
| | | save_money_month = #{saveMoneyMonth,jdbcType=DOUBLE}, |
| | | co2_month = #{co2Month,jdbcType=DOUBLE}, |
| | | grid_energy_year = #{gridEnergyYear,jdbcType=DOUBLE}, |
| | | save_money_year = #{saveMoneyYear,jdbcType=DOUBLE}, |
| | | co2_year = #{co2Year,jdbcType=DOUBLE}, |
| | | update_time = #{updateTime,jdbcType=TIMESTAMP} |
| | | where singlelamp_data_id = #{singlelampDataId,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="api.dao.SinglelampDataDao"> |
| | | |
| | | <select id="selectAll" resultType="api.bean.SinglelampDataEntity"> |
| | | select |
| | | ps.streetlight_name,ps.streetlight_id, |
| | | psdm.* |
| | | from |
| | | pole_singlelamp_data_mq psdm |
| | | left join pole_streetlight ps on |
| | | psdm.mac = ps.code_number |
| | | where |
| | | psdm.singlelamp_data_id in ( |
| | | select |
| | | max(singlelamp_data_id) |
| | | from |
| | | pole_singlelamp_data_mq |
| | | group by |
| | | mac |
| | | ) |
| | | </select> |
| | | |
| | | <select id="selectByCompany" resultType="api.bean.SinglelampDataEntity"> |
| | | select |
| | | ps.streetlight_name,ps.streetlight_id, |
| | | psdm.* |
| | | from |
| | | pole_singlelamp_data_mq psdm |
| | | left join pole_streetlight ps on |
| | | psdm.mac = ps.code_number |
| | | where |
| | | psdm.singlelamp_data_id in ( |
| | | select |
| | | max(singlelamp_data_id) |
| | | from |
| | | pole_singlelamp_data_mq |
| | | where |
| | | pole_singlelamp_data_mq.mac |
| | | in ( |
| | | select |
| | | ps2.code_number |
| | | from |
| | | pole_streetlight ps2 |
| | | where |
| | | ps2.streetlight_id |
| | | in ( |
| | | select |
| | | pus.streetlight_id |
| | | from |
| | | pole_user_streetlight pus |
| | | where |
| | | pus.company_id in( |
| | | select |
| | | suc.company_id |
| | | from |
| | | sys_user_company suc |
| | | where |
| | | suc.user_id = #{userId}) |
| | | ) |
| | | ) |
| | | group by |
| | | mac |
| | | ) |
| | | order by |
| | | streetlight_id |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="selectByStreetlightId" resultType="api.bean.SinglelampDataEntity"> |
| | | SELECT |
| | | ps.streetlight_name,ps.streetlight_id, |
| | | psd.* |
| | | FROM |
| | | pole_singlelamp_data_mq psd |
| | | LEFT JOIN pole_streetlight ps ON psd.mac = ps.code_number |
| | | WHERE |
| | | ps.code_number = #{mac} |
| | | ORDER BY |
| | | psd.singlelamp_data_id DESC |
| | | </select> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | groupId=api |
| | | artifactId=api |
| | | version=1.0-SNAPSHOT |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | C:\Coding\api\src\main\java\api\service\LampService.java |
| | | C:\Coding\api\src\main\java\api\APIApplication.java |
| | | C:\Coding\api\src\main\java\api\service\SinglelampDataServer.java |
| | | C:\Coding\api\src\main\java\api\bean\ReqParams.java |
| | | C:\Coding\api\src\main\java\api\controller\AccessController.java |
| | | C:\Coding\api\src\main\java\api\utils\httpClient.java |
| | | C:\Coding\api\src\main\java\api\bean\SinglelampDataEntity.java |
| | | C:\Coding\api\src\main\java\api\bean\LampEntity.java |
| | | C:\Coding\api\src\main\java\api\result\Msg.java |
| | | C:\Coding\api\src\main\java\api\dao\AccessDao.java |
| | | C:\Coding\api\src\main\java\api\bean\WeatherEntity.java |
| | | C:\Coding\api\src\main\java\api\service\AccessService.java |
| | | C:\Coding\api\src\main\java\api\dao\SinglelampDataDao.java |
| | | C:\Coding\api\src\main\java\api\controller\LampController.java |
| | | C:\Coding\api\src\main\java\api\controller\WeatherController.java |
| | | C:\Coding\api\src\main\java\api\dao\LampDao.java |
| | | C:\Coding\api\src\main\java\api\bean\AccessEntity.java |
| | | C:\Coding\api\src\main\java\api\dao\WeatherDao.java |
| | | C:\Coding\api\src\main\java\api\controller\SinglelampDataController.java |
| | | C:\Coding\api\src\main\java\api\service\WeatherService.java |