连接两个数据库进行同步数据,并且保持事务一致性

master
白美平 4 months ago
parent a59b5d384c
commit d7b128f6eb

23
.gitignore vendored

@ -1,23 +0,0 @@
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -7,13 +7,12 @@
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="IntegraManager" />
<module name="IntegralManager" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="IntegraManager" options="-parameters" />
<module name="IntegralManager" options="-parameters" />
</option>
</component>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal" created-in="IU-233.15026.9">
<data-source name="10.15.0.12" uuid="6bc743a1-1925-46b3-8cd4-b2cc4ecd2177">
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" dbms="ORACLE" />
<secret-storage>master_key</secret-storage>
<user-name>nmgjtjt</user-name>
<schema-mapping />
<load-sources>user_and_system_sources</load-sources>
</data-source>
</component>
</project>

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="10.15.0.12" uuid="6bc743a1-1925-46b3-8cd4-b2cc4ecd2177">
<driver-ref>oracle.19</driver-ref>
<synchronize>true</synchronize>
<auto-commit>false</auto-commit>
<jdbc-driver>oracle.jdbc.OracleDriver</jdbc-driver>
<jdbc-url>jdbc:oracle:thin:@10.15.0.12:1521:ORAL</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

@ -0,0 +1,6 @@
<?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>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<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_1_8" default="true" project-jdk-name="1.8 (2)" project-jdk-type="JavaSDK" />
</project>

@ -0,0 +1,124 @@
<?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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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.svg" 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>

@ -3,16 +3,76 @@
<component name="ArtifactsWorkspaceSettings">
<artifacts-to-build>
<artifact name="IntegralManager:war" />
<artifact name="IntegralManager:war exploded" />
</artifacts-to-build>
</component>
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="29bcb86b-1634-41e0-a498-79481163cba8" name="Changes" comment="打开项目报错了,删除了不需要的引用">
<list default="true" id="29bcb86b-1634-41e0-a498-79481163cba8" name="Changes" comment="去除一些不必要日志">
<change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/mapperset/mysqlmapper/OperatorsMyMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/mapperset/mysqlmapper/OperatorsMyMapper.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/mapperset/oraclemapper/OperatorsMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/mapperset/oraclemapper/OperatorsMapper.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/util/DataSourceUtil.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/util/OcrUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/IntegraManager.iml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/LICENSE" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/AppController/ServiceAreaOperatorsController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/AppController/ServiceAreaOperatorsController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/MyEnvironmentPostProcessor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/MyEnvironmentPostProcessor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/config/MybatisConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/config/MybatisConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/controller/FileUploadController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/controller/FileUploadController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/controller/InitController.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/controller/WebSocketRedis.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/controller/WebSocketRedis.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/IntegrationListMapper.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/IntegrationListMapper.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/Mapper.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/Mapper.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/OperatorsMapper.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/OperatorsMapper.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/PayIntegrationNumberMapper.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/PayIntegrationNumberMapper.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/ServiceAreaMapper.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/ServiceAreaMapper.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/ServiceAreaPicMapper.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/mapper/ServiceAreaPicMapper.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/IPayIntegrationNumberService.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ApponintmentInfoServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ApponintmentInfoServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/CommonServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/CommonServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ExcelDateImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ExcelDateImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralAppServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralAppServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralLevelMessageServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralLevelMessageServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralSeriveImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralSeriveImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralSignServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralSignServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralStarSetupServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegralStarSetupServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegrationListServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/IntegrationListServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/MessagePushServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/MessagePushServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/OperatorsServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/OperatorsServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/PayIntegrationNumberServiceImpl.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/QCodeInfoServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/QCodeInfoServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/RotationServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/RotationServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/SelectDataImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/SelectDataImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/SerivceAreaOperationMealServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/SerivceAreaOperationMealServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ServiceAreaPicServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ServiceAreaPicServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ServiceAreaServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ServiceAreaServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ServiceAreaSpecialServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/ServiceAreaSpecialServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/SolveUserAndVehcleServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/SolveUserAndVehcleServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/UserTableServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/UserTableServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/UserVehicleServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/UserVehicleServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/VehicleScoreServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/VehicleScoreServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/util/HttpClientUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/util/HttpClientUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/util/ImageUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/util/ImageUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/util/PubTools.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/util/PubTools.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/nmgs/util/main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/nmgs/util/main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/static/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/static/application.properties" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -75,80 +135,97 @@
<component name="ProjectViewState">
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;Application.DivPassDataImpl.executor&quot;: &quot;Run&quot;,
&quot;Application.ImageUtils.executor&quot;: &quot;Run&quot;,
&quot;Application.PubTools.executor&quot;: &quot;Run&quot;,
&quot;Application.QCodeInfoServiceImpl.executor&quot;: &quot;Debug&quot;,
&quot;Application.SensitiveFilter.executor&quot;: &quot;Run&quot;,
&quot;Application.main.executor&quot;: &quot;Run&quot;,
&quot;Application.redisConfigUtil.executor&quot;: &quot;Debug&quot;,
&quot;Maven.IntegraManager [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.IntegraManager [install].executor&quot;: &quot;Run&quot;,
&quot;Maven.IntegralManager [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.IntegralManager [install].executor&quot;: &quot;Run&quot;,
&quot;Maven.IntegralManager [validate].executor&quot;: &quot;Run&quot;,
&quot;Maven.IntegralManagerSys [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.IntegralManagerSys [install].executor&quot;: &quot;Run&quot;,
&quot;Maven.devProject [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.devProject [install].executor&quot;: &quot;Run&quot;,
&quot;Maven.dev_project [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.dev_project [install].executor&quot;: &quot;Run&quot;,
&quot;Maven.special_event [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.special_event [install].executor&quot;: &quot;Run&quot;,
&quot;Maven.special_event [org.apache.maven.plugins:maven-assembly-plugin:3.3.0:single].executor&quot;: &quot;Run&quot;,
&quot;Maven.special_event [org.springframework.boot:spring-boot-maven-plugin:2.7.11:repackage].executor&quot;: &quot;Run&quot;,
&quot;Maven.special_event [package].executor&quot;: &quot;Run&quot;,
&quot;Maven.special_event [validate].executor&quot;: &quot;Run&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;TomEE Server.special_event.executor&quot;: &quot;Debug&quot;,
&quot;Tomcat Server.Tomcat 9.0.80.executor&quot;: &quot;Debug&quot;,
&quot;deletionFromPopupRequiresConfirmation&quot;: &quot;false&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;D:/workspace/IntegralManager&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.15&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.37169158&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;reference.settings.project.maven.importing&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
"Application.DivPassDataImpl.executor": "Run",
"Application.ImageUtils.executor": "Run",
"Application.OcrUtil.executor": "Debug",
"Application.PubTools.executor": "Run",
"Application.QCodeInfoServiceImpl.executor": "Debug",
"Application.SensitiveFilter.executor": "Run",
"Application.main.executor": "Run",
"Application.redisConfigUtil.executor": "Debug",
"Maven.IntegraManager [clean].executor": "Run",
"Maven.IntegraManager [install].executor": "Run",
"Maven.IntegralManager [clean].executor": "Run",
"Maven.IntegralManager [install].executor": "Run",
"Maven.IntegralManager [site].executor": "Run",
"Maven.IntegralManager [validate].executor": "Run",
"Maven.IntegralManagerSys [clean].executor": "Run",
"Maven.IntegralManagerSys [install].executor": "Run",
"Maven.devProject [clean].executor": "Run",
"Maven.devProject [install].executor": "Run",
"Maven.dev_project [clean].executor": "Run",
"Maven.dev_project [install].executor": "Run",
"Maven.special_event [clean].executor": "Run",
"Maven.special_event [install].executor": "Run",
"Maven.special_event [org.apache.maven.plugins:maven-assembly-plugin:3.3.0:single].executor": "Run",
"Maven.special_event [org.springframework.boot:spring-boot-maven-plugin:2.7.11:repackage].executor": "Run",
"Maven.special_event [package].executor": "Run",
"Maven.special_event [validate].executor": "Run",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"TomEE Server.special_event.executor": "Debug",
"Tomcat Server.Tomcat 9.0.80.executor": "Debug",
"deletionFromPopupRequiresConfirmation": "false",
"git-widget-placeholder": "master",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "D:/workspace/IntegralManager/src/main/java/com/nmgs/mapperset/mysqlmapper",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Artifacts",
"project.structure.proportion": "0.15",
"project.structure.side.proportion": "0.37169158",
"settings.editor.selected.configurable": "reference.settings.project.maven.importing",
"vue.rearranger.settings.migration": "true"
},
&quot;keyToStringList&quot;: {
&quot;DatabaseDriversLRU&quot;: [
&quot;oracle&quot;
"keyToStringList": {
"DatabaseDriversLRU": [
"oracle"
]
}
}</component>
}]]></component>
<component name="ReactorSettings">
<option name="notificationShown" value="true" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="E:\work\TGGLT-WorkSpace\IntegralManager\src\main\resources\static" />
<recent name="E:\work\TGGLT-WorkSpace\IntegralManager\src\main\java\com\nmgs\controller" />
<recent name="E:\work\TGGLT-WorkSpace\IntegralManager\src\main\java\com\nmgs\mapper" />
<recent name="E:\work\TGGLT-WorkSpace\IntegralManager\src\main\java\com\nmgs\entity" />
<recent name="E:\work\TGGLT-WorkSpace\IntegralManager\src\main\java\com\nmgs\service" />
<recent name="D:\workspace\IntegralManager\src\main\java\com\nmgs\mapperset\mysqlmapper" />
<recent name="D:\workspace\IntegralManager\src\main\java\com\nmgs\mapperset\oraclemapper" />
<recent name="D:\workspacebak\IntegralManager\src\main\java\com\nmgs\mapperset\mysqlmapper" />
<recent name="D:\workspacebak\IntegralManager\src\main\java\com\nmgs\mapperset\oraclemapper" />
<recent name="D:\workspacebak\IntegralManager\src\main\java\com\nmgs\mapper\oraclemapper" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="E:\work\TGGLT-WorkSpace\dev_project\src\main\java\com\nmgs\mapper" />
</key>
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="com.nmgs.mapperset.oraclemapper" />
<recent name="com.nmgs.config" />
<recent name="com.nmgs.common" />
<recent name="com.nmgs.controller" />
<recent name="com.nmgs.service.impl" />
<recent name="com.nmgs.util" />
<recent name="com.nmgs.service" />
<recent name="com.nmgs.entity" />
</key>
</component>
<component name="RunManager" selected="Application.main">
<component name="RunManager" selected="Tomcat Server.Tomcat 9.0.80">
<configuration name="OcrUtil" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="com.nmgs.util.OcrUtil" />
<module name="IntegralManager" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.nmgs.util.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="com.nmgs.util.main" />
<module name="IntegralManager" />
@ -164,11 +241,11 @@
</configuration>
<configuration name="Tomcat 9.0.80" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 9.0.80" ALTERNATIVE_JRE_ENABLED="true" ALTERNATIVE_JRE_PATH="1.8 (2)" nameIsGenerated="true">
<option name="OPEN_IN_BROWSER" value="false" />
<option name="OPEN_IN_BROWSER_URL" value="http://192.168.101.59:9003/IntegralManager/doc.html" />
<option name="OPEN_IN_BROWSER_URL" value="http://192.168.101.59:9002/IntegralManager/doc.html" />
<option name="COMMON_VM_ARGUMENTS" value="-Dfile.encoding=utf-8" />
<option name="UPDATING_POLICY" value="restart-server" />
<deployment>
<artifact name="IntegralManager:war">
<artifact name="IntegralManager:war exploded">
<settings>
<option name="CONTEXT_PATH" value="/IntegralManager" />
</settings>
@ -250,6 +327,8 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="dev_project:war exploded" />
<artifact name="IntegralManager:war" />
<artifact name="IntegraManager:war exploded" />
<artifact name="IntegralManager:war exploded" />
</option>
</method>
</configuration>
@ -360,9 +439,15 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.OcrUtil" />
<item itemvalue="Application.main" />
<item itemvalue="Tomcat Server.Tomcat 9.0.80" />
</list>
<recent_temporary>
<list>
<item itemvalue="Application.main" />
<item itemvalue="Application.OcrUtil" />
</list>
</recent_temporary>
</component>
@ -537,7 +622,52 @@
<workItem from="1738986812804" duration="1335000" />
<workItem from="1739866933321" duration="3528000" />
<workItem from="1739933270638" duration="29000" />
<workItem from="1740453934628" duration="2221000" />
<workItem from="1740453934628" duration="3436000" />
<workItem from="1741338917331" duration="169000" />
<workItem from="1742283837684" duration="2641000" />
<workItem from="1742459327422" duration="2854000" />
<workItem from="1742516399253" duration="1888000" />
<workItem from="1742685573059" duration="1333000" />
<workItem from="1742782107066" duration="20783000" />
<workItem from="1742828819163" duration="714000" />
<workItem from="1742862100003" duration="7738000" />
<workItem from="1742890894122" duration="1207000" />
<workItem from="1742956310479" duration="1269000" />
<workItem from="1743040365177" duration="1213000" />
<workItem from="1743383556599" duration="2969000" />
<workItem from="1744350764139" duration="1806000" />
<workItem from="1744598645449" duration="585000" />
<workItem from="1744864299391" duration="453000" />
<workItem from="1745459854458" duration="877000" />
<workItem from="1746490436249" duration="3033000" />
<workItem from="1746519776057" duration="611000" />
<workItem from="1746759245973" duration="1496000" />
<workItem from="1748918936808" duration="1840000" />
<workItem from="1749461983577" duration="1777000" />
<workItem from="1749463782983" duration="2000" />
<workItem from="1749515195884" duration="1285000" />
<workItem from="1749603203815" duration="1603000" />
<workItem from="1750041501932" duration="11746000" />
<workItem from="1750211100037" duration="13130000" />
<workItem from="1750318754873" duration="4682000" />
<workItem from="1750381084712" duration="2871000" />
<workItem from="1750640235863" duration="6435000" />
<workItem from="1750724648173" duration="11125000" />
<workItem from="1750810827062" duration="2693000" />
<workItem from="1750897857197" duration="2469000" />
<workItem from="1750918750661" duration="1269000" />
<workItem from="1750920030963" duration="9000" />
<workItem from="1751010337152" duration="2537000" />
<workItem from="1751243996962" duration="4222000" />
<workItem from="1751267874661" duration="3840000" />
<workItem from="1751416309361" duration="10082000" />
<workItem from="1751503039176" duration="77000" />
<workItem from="1751936855639" duration="20103000" />
<workItem from="1752020490782" duration="17587000" />
<workItem from="1752107863349" duration="19089000" />
<workItem from="1752196997054" duration="21839000" />
<workItem from="1752452319437" duration="21823000" />
<workItem from="1752482128801" duration="3988000" />
</task>
<task id="LOCAL-00001" summary="特请处理">
<option name="closed" value="true" />
@ -731,7 +861,31 @@
<option name="project" value="LOCAL" />
<updated>1739870419806</updated>
</task>
<option name="localTasksCounter" value="25" />
<task id="LOCAL-00025" summary="积分流水ID步长由1改为10">
<option name="closed" value="true" />
<created>1740463493215</created>
<option name="number" value="00025" />
<option name="presentableId" value="LOCAL-00025" />
<option name="project" value="LOCAL" />
<updated>1740463493215</updated>
</task>
<task id="LOCAL-00026" summary="修改数据库连接池属性信息">
<option name="closed" value="true" />
<created>1746519427010</created>
<option name="number" value="00026" />
<option name="presentableId" value="LOCAL-00026" />
<option name="project" value="LOCAL" />
<updated>1746519427011</updated>
</task>
<task id="LOCAL-00027" summary="去除一些不必要日志">
<option name="closed" value="true" />
<created>1746759881177</created>
<option name="number" value="00027" />
<option name="presentableId" value="LOCAL-00027" />
<option name="project" value="LOCAL" />
<updated>1746759881177</updated>
</task>
<option name="localTasksCounter" value="28" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -764,7 +918,10 @@
<MESSAGE value="附件上传,按照日期存放" />
<MESSAGE value="解决餐饮预约核销成功之后前端通过websocket没有收到消息的问题" />
<MESSAGE value="打开项目报错了,删除了不需要的引用" />
<option name="LAST_COMMIT_MESSAGE" value="打开项目报错了,删除了不需要的引用" />
<MESSAGE value="积分流水ID步长由1改为10" />
<MESSAGE value="修改数据库连接池属性信息" />
<MESSAGE value="去除一些不必要日志" />
<option name="LAST_COMMIT_MESSAGE" value="去除一些不必要日志" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@ -779,6 +936,16 @@
<line>111</line>
<option name="timeStamp" value="34" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/nmgs/util/redisConfigUtil.java</url>
<line>13</line>
<option name="timeStamp" value="38" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/nmgs/service/impl/UserTableServiceImpl.java</url>
<line>116</line>
<option name="timeStamp" value="43" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>

@ -1,192 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="$MODULE_DIR$/pom.xml" external.system.module.type="SINGLE_MODULE" external.system.module.version="223-2" org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet external-system-id="Maven" type="web" name="Web">
<configuration>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.7.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.7.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.7.11" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.12" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.30" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.7.11" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.7.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.26" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.23" level="project" />
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.11.4" level="project" />
<orderEntry type="library" name="Maven: com.oracle:ojdbc6:11.2.0.3" level="project" />
<orderEntry type="library" name="Maven: io.github.yedaxia:japidocs:1.4.4" level="project" />
<orderEntry type="library" name="Maven: com.github.javaparser:javaparser-core:3.6.16" level="project" />
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.32" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.3.1" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.3.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.7.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.7.11" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.3.1" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.3.1" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.3.1" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.4" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.10" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.jeffreyning:mybatisplus-plus:1.7.3-RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.microsoft:sqljdbc4:3.0" level="project" />
<orderEntry type="library" name="Maven: com.auth0:java-jwt:4.3.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.5" level="project" />
<orderEntry type="library" name="Maven: com.enc:EndPassJava:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.session:spring-session-jdbc:2.7.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.7.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.27" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:2.0.25" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.25" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.25" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" />
<orderEntry type="library" name="Maven: com.dm:DmJdbcDriver18:1.8.0" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.8.25" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.2.0.Final" level="project" />
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
<orderEntry type="library" name="Maven: com.tetragramato:custom-spring-boot-resttemplate:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-spring-boot-starter-jaxws:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-spring-boot-autoconfigure:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-transports-http:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-core:3.2.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.ws.xmlschema:xmlschema-core:2.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-jaxws:3.2.5" level="project" />
<orderEntry type="library" name="Maven: xml-resolver:xml-resolver:1.2" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-soap:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-wsdl:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-databinding-jaxb:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-xml:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-simple:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-addr:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-policy:3.2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.neethi:neethi:3.1.1" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-ws:1.3.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jms:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework.ws:spring-ws-core:3.1.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.ws:spring-xml:3.1.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.ws:spring-ws-support:3.1.6" level="project" />
<orderEntry type="library" name="Maven: com.sun.mail:javax.mail:1.6.0" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
<orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.80" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.74" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:9.0.74" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:easyexcel:3.3.4" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:easyexcel-core:3.3.4" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:easyexcel-support:3.3.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
<orderEntry type="library" name="Maven: org.ehcache:ehcache:3.10.8" level="project" />
<orderEntry type="library" name="Maven: javax.cache:cache-api:1.1.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.8" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.glassfish.jaxb:txw2:2.3.8" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.istack:istack-commons-runtime:3.0.12" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-openapi2-spring-boot-starter:4.4.0" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:4.4.0" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-openapi2-ui:4.4.0" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.25.0-GA" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.10.5" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.12.23" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.github.classgraph:classgraph:4.1.7" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.6.6" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.6.6" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-webmvc:2.10.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.session:spring-session-data-redis:2.7.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.7.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.7.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.7.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.27" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.7.11" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:6.1.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.91.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.91.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.91.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.91.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-unix-common:4.1.91.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.91.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.91.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.29" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.4" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:3.8.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.11.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.14" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.16" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
</component>
</module>

@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

@ -1,37 +0,0 @@
# IntegralManager
#### 介绍
天润科丰小程序后台接口
#### 软件架构
采用springbbot +mybatisplus +tomcat +负载均衡
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

@ -9,7 +9,7 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>IntegraManager</artifactId>
<artifactId>IntegralManager</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<!--<packaging>jar</packaging>-->
@ -53,7 +53,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.23</version>
<version>8.0.11</version>
</dependency>
<!-- oracle驱动-->
<dependency>
@ -147,11 +147,6 @@
<artifactId>hibernate-validator</artifactId>
<version>6.2.0.Final</version>
</dependency>
<!-- <dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>-->
<dependency>
<groupId>com.tetragramato</groupId>
<artifactId>custom-spring-boot-resttemplate</artifactId>
@ -224,6 +219,17 @@
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<!--OCR 图片识别 OCR Java SDK-->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>ocr_api20210707</artifactId>
<version>3.1.2</version>
</dependency>
<!-- JTA (Atomikos) 保持事务一致性-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
</dependency>
</dependencies>
<build>

@ -2,7 +2,7 @@ package com.nmgs.AppController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nmgs.config.ResultData;
import com.nmgs.entity.ServiceAreaOperators;
import com.nmgs.mapper.OperatorsMapper;
import com.nmgs.mapperset.oraclemapper.OperatorsMapper;
import com.nmgs.service.IOperatorsService;
import com.nmgs.util.TokenUtil;
import io.swagger.annotations.Api;

@ -10,6 +10,8 @@ import org.springframework.core.env.PropertiesPropertySource;
import java.io.File;
import java.io.FileInputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Properties;
@Configuration
@ -36,38 +38,80 @@ public class MyEnvironmentPostProcessor implements EnvironmentPostProcessor {
if (!fileNewproperties.exists()) {
fileNewproperties.createNewFile();
}
properties.load(new FileInputStream(path));
properties.load(Files.newInputStream(Paths.get(path)));
String DBType = properties.getProperty("DBType") == null ? "1" : properties.getProperty("DBType");
Newproperties.load(new FileInputStream(NewPath));
Newproperties.load(Files.newInputStream(Paths.get(NewPath)));
properties.setProperty("spring.logback.logPath",PathUtil.TomcatPath+"/logs");
properties.setProperty("spring.datasource.url",properties.getProperty("DBUrl"));
properties.setProperty("spring.datasource.username",properties.getProperty("DBUserName"));
properties.setProperty("spring.datasource.password",PassWordUtils.decrypt(properties.getProperty("DBPassWord")));
properties.setProperty("spring.datasource.primary.jdbc-url", properties.getProperty("DBUrl"));
properties.setProperty("spring.datasource.primary.username", properties.getProperty("DBUserName"));
properties.setProperty("spring.datasource.primary.password", PassWordUtils.decrypt(properties.getProperty("DBPassWord")));
properties.setProperty("spring.datasource.main.jdbc-url", properties.getProperty("DBUrl"));
properties.setProperty("spring.datasource.main.username", properties.getProperty("DBUserName"));
properties.setProperty("spring.datasource.main.password", PassWordUtils.decrypt(properties.getProperty("DBPassWord")));
if(DBType.equals("1")){
properties.setProperty("spring.datasource.driver-class-name",Newproperties.getProperty("sqlClassName"));
properties.setProperty("spring.datasource.validationQuery",Newproperties.getProperty("sqlvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query",Newproperties.getProperty("sqlvalidationQuery"));
properties.setProperty("spring.datasource.primary.driver-class-name", Newproperties.getProperty("sqlClassName"));
properties.setProperty("spring.datasource.primary.validationQuery", Newproperties.getProperty("sqlvalidationQuery"));
properties.setProperty("spring.datasource.primary.hikari.connection-test-query", Newproperties.getProperty("sqlvalidationQuery"));
properties.setProperty("spring.datasource.main.driver-class-name", Newproperties.getProperty("sqlClassName"));
properties.setProperty("spring.datasource.main.validationQuery", Newproperties.getProperty("sqlvalidationQuery"));
properties.setProperty("spring.datasource.main.hikari.connection-test-query", Newproperties.getProperty("sqlvalidationQuery"));
}else if(DBType.equals("2")){
properties.setProperty("spring.datasource.driver-class-name",Newproperties.getProperty("OracleClassName"));
properties.setProperty("spring.datasource.validationQuery",Newproperties.getProperty("OraclevalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query",Newproperties.getProperty("OraclevalidationQuery"));
properties.setProperty("spring.datasource.primary.driver-class-name", Newproperties.getProperty("OracleClassName"));
properties.setProperty("spring.datasource.primary.validationQuery", Newproperties.getProperty("OraclevalidationQuery"));
properties.setProperty("spring.datasource.primary.hikari.connection-test-query", Newproperties.getProperty("OraclevalidationQuery"));
properties.setProperty("spring.datasource.main.driver-class-name", Newproperties.getProperty("OracleClassName"));
properties.setProperty("spring.datasource.main.validationQuery", Newproperties.getProperty("OraclevalidationQuery"));
properties.setProperty("spring.datasource.main.hikari.connection-test-query", Newproperties.getProperty("OraclevalidationQuery"));
}else if(DBType.equals("3")){
properties.setProperty("spring.datasource.driver-class-name",Newproperties.getProperty("DMClassName"));
properties.setProperty("spring.datasource.validationQuery",Newproperties.getProperty("DMvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query",Newproperties.getProperty("DMvalidationQuery"));
properties.setProperty("spring.datasource.primary.driver-class-name", Newproperties.getProperty("DMClassName"));
properties.setProperty("spring.datasource.primary.validationQuery", Newproperties.getProperty("DMvalidationQuery"));
properties.setProperty("spring.datasource.primary.hikari.connection-test-query", Newproperties.getProperty("DMvalidationQuery"));
properties.setProperty("spring.datasource.main.driver-class-name", Newproperties.getProperty("DMClassName"));
properties.setProperty("spring.datasource.main.validationQuery", Newproperties.getProperty("DMvalidationQuery"));
properties.setProperty("spring.datasource.main.hikari.connection-test-query", Newproperties.getProperty("DMvalidationQuery"));
}else if(DBType.equals("4")){
properties.setProperty("spring.datasource.driver-class-name",Newproperties.getProperty("MySQLClassName"));
properties.setProperty("spring.datasource.validationQuery",Newproperties.getProperty("MySQLvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query",Newproperties.getProperty("MySQLvalidationQuery"));
properties.setProperty("spring.datasource.primary.driver-class-name", Newproperties.getProperty("MySQLClassName"));
properties.setProperty("spring.datasource.primary.validationQuery", Newproperties.getProperty("MySQLvalidationQuery"));
properties.setProperty("spring.datasource.primary.hikari.connection-test-query", Newproperties.getProperty("MySQLvalidationQuery"));
properties.setProperty("spring.datasource.main.driver-class-name", Newproperties.getProperty("MySQLClassName"));
properties.setProperty("spring.datasource.main.validationQuery", Newproperties.getProperty("MySQLvalidationQuery"));
properties.setProperty("spring.datasource.main.hikari.connection-test-query", Newproperties.getProperty("MySQLvalidationQuery"));
}
String BakDBType = properties.getProperty("BakDBType") == null ? "1" : properties.getProperty("BakDBType");
properties.setProperty("spring.datasource.bak.jdbc-url", properties.getProperty("BAKDBUrl"));
properties.setProperty("spring.datasource.bak.username", properties.getProperty("BAKDBUserName"));
properties.setProperty("spring.datasource.bak.password", PassWordUtils.decrypt(properties.getProperty("BAKDBPassWord")));
if (BakDBType.equals("1")) {
properties.setProperty("spring.datasource.bak.driver-class-name", Newproperties.getProperty("sqlClassName"));
properties.setProperty("spring.datasource.bak.validationQuery", Newproperties.getProperty("sqlvalidationQuery"));
properties.setProperty("spring.datasource.bak.hikari.connection-test-query", Newproperties.getProperty("sqlvalidationQuery"));
} else if (BakDBType.equals("2")) {
properties.setProperty("spring.datasource.bak.driver-class-name", Newproperties.getProperty("OracleClassName"));
properties.setProperty("spring.datasource.bak.validationQuery", Newproperties.getProperty("OraclevalidationQuery"));
properties.setProperty("spring.datasource.bak.hikari.connection-test-query", Newproperties.getProperty("OraclevalidationQuery"));
} else if (BakDBType.equals("3")) {
properties.setProperty("spring.datasource.bak.driver-class-name", Newproperties.getProperty("DMClassName"));
properties.setProperty("spring.datasource.bak.validationQuery", Newproperties.getProperty("DMvalidationQuery"));
properties.setProperty("spring.datasource.bak.hikari.connection-test-query", Newproperties.getProperty("DMvalidationQuery"));
} else if (BakDBType.equals("4")) {
properties.setProperty("spring.datasource.bak.driver-class-name", Newproperties.getProperty("MySQLClassName"));
properties.setProperty("spring.datasource.bak.validationQuery", Newproperties.getProperty("MySQLvalidationQuery"));
properties.setProperty("spring.datasource.bak.hikari.connection-test-query", Newproperties.getProperty("MySQLvalidationQuery"));
}
System.out.println("---------------------------IntegralManager本次载入数据库----------------------");
System.out.println("server.port: " + properties.getProperty("server.port"));
System.out.println("server.ip: " + properties.getProperty("server.ip"));
System.out.println(" url : " + properties.getProperty("spring.datasource.url"));
System.out.println(" username : " + properties.getProperty("spring.datasource.username"));
System.out.println(" password : " + properties.getProperty("spring.datasource.password"));
System.out.println(" driver-class-name : " + properties.getProperty("spring.datasource.driver-class-name"));
System.out.println(" url : " + properties.getProperty("spring.datasource.primary.jdbc-url"));
System.out.println(" username : " + properties.getProperty("spring.datasource.primary.username"));
System.out.println(" password : " + properties.getProperty("spring.datasource.primary.password"));
System.out.println(" driver-class-name : " + properties.getProperty("spring.datasource.primary.driver-class-name"));
System.out.println(" bakurl : " + properties.getProperty("spring.datasource.bak.jdbc-url"));
System.out.println(" bakusername : " + properties.getProperty("spring.datasource.bak.username"));
System.out.println(" bakpassword : " + properties.getProperty("spring.datasource.bak.password"));
System.out.println(" bakdriver-class-name : " + properties.getProperty("spring.datasource.bak.driver-class-name"));
System.out.println(" mainurl : " + properties.getProperty("spring.datasource.main.jdbc-url"));
System.out.println(" mainusername : " + properties.getProperty("spring.datasource.main.username"));
System.out.println(" mainpassword : " + properties.getProperty("spring.datasource.main.password"));
System.out.println(" maindriver-class-name : " + properties.getProperty("spring.datasource.main.driver-class-name"));
System.out.println("---------------------------IntegralManager本次载入数据库----------------------");
//环境名称随意取,但尽量不能和其他环境名称相同,避免不生效
PropertiesPropertySource propertySource = new PropertiesPropertySource("environmentPostProcessor", properties);
PropertiesPropertySource newPropertySource = new PropertiesPropertySource("newEnvironmentPostProcessor", Newproperties);

@ -0,0 +1,46 @@
package com.nmgs.common;
import com.nmgs.config.ResultData;
import com.nmgs.util.LogUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.dao.DataAccessException;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import java.sql.SQLException;
@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(DataAccessException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public ResultData<String> handleDataAccessException(DataAccessException e) {
LogUtil.WriteLog_Error("数据库操作失败:" + e.getMessage(),"GlobalExceptionHandler");
return ResultData.fail("数据库操作失败" );
}
@ExceptionHandler(SQLException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public ResultData<String> handleSQLException(SQLException e) {
LogUtil.WriteLog_Error("数据库SQL执行失败:" + e.getMessage(),"GlobalExceptionHandler");
return ResultData.fail("数据库SQL执行失败");
}
@ExceptionHandler(IllegalArgumentException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public ResultData<String> handleIllegalArgumentException(IllegalArgumentException e) {
LogUtil.WriteLog_Error("参数错误:" + e.getMessage(),"GlobalExceptionHandler");
return ResultData.fail("参数错误" );
}
@ExceptionHandler(Exception.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public ResultData<String> handleGenericException(Exception e) {
LogUtil.WriteLog_Error("服务器内部错误:" + e.getMessage(),"GlobalExceptionHandler");
return ResultData.fail("服务器内部错误" );
}
}

@ -0,0 +1,172 @@
package com.nmgs.config;
import com.atomikos.icatch.jta.UserTransactionImp;
import com.atomikos.icatch.jta.UserTransactionManager;
import com.mysql.cj.jdbc.MysqlXADataSource;
import com.nmgs.util.PropertiesUtil;
import com.trkf.PasswordEncryption.PassWordUtils;
import com.zaxxer.hikari.HikariDataSource;
import oracle.jdbc.xa.client.OracleXADataSource;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.boot.jta.atomikos.AtomikosDataSourceBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.jta.JtaTransactionManager;
import javax.sql.DataSource;
import javax.sql.XADataSource;
import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import javax.transaction.UserTransaction;
import java.sql.SQLException;
@Configuration
@EnableTransactionManagement
public class DataSourceConfig {
@Bean
public UserTransaction localuserTransaction() throws SystemException {
UserTransactionImp userTransactionImp = new UserTransactionImp();
userTransactionImp.setTransactionTimeout(6000);
return userTransactionImp;
}
@Bean
public TransactionManager localtransactionManager() throws SystemException {
UserTransactionManager userTransactionManager = new UserTransactionManager();
userTransactionManager.setForceShutdown(false);
userTransactionManager.setTransactionTimeout(6000);
return userTransactionManager;
}
@Bean
public JtaTransactionManager jtatransactionManager(
UserTransaction localuserTransaction,
TransactionManager localtransactionManager) {
JtaTransactionManager jtaTransactionManager = new JtaTransactionManager(localuserTransaction, localtransactionManager);
jtaTransactionManager.setDefaultTimeout(6000);
return jtaTransactionManager;
}
/**
* springSpring
* @ConfigurationProperties
*/
@Bean
@ConfigurationProperties(prefix = "spring.datasource.primary")
public XADataSource getDataSourcePrimary() throws SQLException {
// 创建XA连接池
if("2".equals(PropertiesUtil.getValue("DBType"))){
OracleXADataSource oracleXADataSource = new OracleXADataSource();
oracleXADataSource.setURL(PropertiesUtil.getValue("DBUrl"));
oracleXADataSource.setUser(PropertiesUtil.getValue("DBUserName"));
oracleXADataSource.setPassword(PassWordUtils.decrypt(PropertiesUtil.getValue("DBPassWord")));
return oracleXADataSource;
}else if("4".equals(PropertiesUtil.getValue("DBType"))){
MysqlXADataSource oracleXADataSource = new MysqlXADataSource();
oracleXADataSource.setURL(PropertiesUtil.getValue("DBUrl"));
oracleXADataSource.setUser(PropertiesUtil.getValue("DBUserName"));
oracleXADataSource.setPassword(PassWordUtils.decrypt(PropertiesUtil.getValue("DBPassWord")));
return oracleXADataSource;
}
return null;
}
@Bean(name = "primaryDataSource")
@DependsOn({"getDataSourcePrimary","jtatransactionManager"})
public DataSource primaryDataSource(@Qualifier("getDataSourcePrimary") XADataSource xaDataSource) {
AtomikosDataSourceBean atomikosDataSourceBean = new AtomikosDataSourceBean();
//atomikosDataSourceBean.setXaDataSourceClassName("com.zaxxer.hikari.HikariXADataSource");
// 必须为数据源指定唯一标识
atomikosDataSourceBean.setUniqueResourceName("oracleDataSource");
atomikosDataSourceBean.setMinPoolSize(3);
atomikosDataSourceBean.setMaxPoolSize(25);
atomikosDataSourceBean.setMaxIdleTime(60000);
//获取连接的最大等待时间(单位:秒),超时抛出异常。默认 0无限等待建议设为 30 秒。
atomikosDataSourceBean.setBorrowConnectionTimeout(300);
// 每分钟检查空闲连接(单位:秒)‌
atomikosDataSourceBean.setMaintenanceInterval(60);
//事务超时后强制回收连接的等待时间(单位:秒),默认为 0不启用
atomikosDataSourceBean.setReapTimeout(20); // 事务超时20秒后回收:
atomikosDataSourceBean.setXaDataSource(xaDataSource);
return atomikosDataSourceBean;
}
/**
* springSpring
* @ConfigurationProperties
*/
@Bean
@ConfigurationProperties(prefix = "spring.datasource.bak")
public XADataSource getDataSourceBak() throws SQLException {
// 创建XA连接池
// 创建XA连接池
if("2".equals(PropertiesUtil.getValue("BakDBType"))){
OracleXADataSource oracleXADataSource = new OracleXADataSource();
oracleXADataSource.setURL(PropertiesUtil.getValue("BAKDBUrl"));
oracleXADataSource.setUser(PropertiesUtil.getValue("BAKDBUserName"));
oracleXADataSource.setPassword(PassWordUtils.decrypt(PropertiesUtil.getValue("BAKDBPassWord")));
return oracleXADataSource;
}else if("4".equals(PropertiesUtil.getValue("BakDBType"))){
MysqlXADataSource oracleXADataSource = new MysqlXADataSource();
oracleXADataSource.setURL(PropertiesUtil.getValue("BAKDBUrl"));
oracleXADataSource.setUser(PropertiesUtil.getValue("BAKDBUserName"));
oracleXADataSource.setPassword(PassWordUtils.decrypt(PropertiesUtil.getValue("BAKDBPassWord")));
return oracleXADataSource;
}
return null;
}
@Bean(name = "bakDataSource")
@DependsOn({"getDataSourceBak","jtatransactionManager"})
public DataSource bakDataSource(@Qualifier("getDataSourceBak") XADataSource xaDataSource) {
AtomikosDataSourceBean atomikosDataSourceBean = new AtomikosDataSourceBean();
//atomikosDataSourceBean.setXaDataSourceClassName("com.zaxxer.hikari.HikariXADataSource");
// 必须为数据源指定唯一标识
atomikosDataSourceBean.setUniqueResourceName("mysqlDataSource");
atomikosDataSourceBean.setMinPoolSize(2);
atomikosDataSourceBean.setMaxPoolSize(50);
// 空闲连接保留 300 秒5分钟
atomikosDataSourceBean.setMaxIdleTime(60000);
atomikosDataSourceBean.setTestQuery("select 1");
//获取连接的最大等待时间(单位:秒),超时抛出异常。默认 0无限等待建议设为 30 秒。
atomikosDataSourceBean.setBorrowConnectionTimeout(300);
// 每分钟检查空闲连接(单位:秒)‌
atomikosDataSourceBean.setMaintenanceInterval(60);
//事务超时后强制回收连接的等待时间(单位:秒),默认为 0不启用
atomikosDataSourceBean.setReapTimeout(20); // 事务超时20秒后回收:
atomikosDataSourceBean.setXaDataSource(xaDataSource);
return atomikosDataSourceBean;
}
@Bean(name = "commonDataSource")
@ConfigurationProperties(prefix = "spring.datasource.main")
public DataSource commonDataSource() {
return DataSourceBuilder.create().type(HikariDataSource.class).build();
}
public static DataSource initSource(String sourceType){
DataSourceConfig dsc=new DataSourceConfig();
try{
if("PRIMARY".equals(sourceType)){
return (DataSource) dsc.getDataSourcePrimary();
}else if("BAK".equals(sourceType)){
return (DataSource)dsc.getDataSourcePrimary();
}else if("COMMON".equals(sourceType)){
return dsc.commonDataSource();
}
}catch (Exception e){
e.printStackTrace();
}
return null;
}
}

@ -1,13 +1,25 @@
package com.nmgs.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.nmgs.util.PropertiesUtil;
import org.apache.ibatis.logging.stdout.StdOutImpl;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
//@Configuration
import javax.sql.DataSource;
@Configuration
public class MybatisConfig {
// @Bean
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
if(PropertiesUtil.getValue("DBType").equals("1")){
@ -21,19 +33,109 @@ public class MybatisConfig {
}
return interceptor;
}
/**
*
*
*/
// @Bean
// public PaginationInterceptor paginationInterceptor() {
// PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
// // 设置请求的页面大于最大页后操作, true调回到首页false 继续请求 默认false
// // paginationInterceptor.setOverflow(false);
// // 设置最大单页限制数量,默认 500 条,-1 不受限制
// // paginationInterceptor.setLimit(500);
// // 开启 count 的 join 优化,只针对部分 left join
// paginationInterceptor.setCountSqlParser(new JsqlParserCountOptimize(true));
// return paginationInterceptor;
// }
@Configuration
@MapperScan(
basePackages = "com.nmgs.mapperset.mysqlmapper",
sqlSessionFactoryRef = "mysqlSqlSessionFactory"
)
public static class MysqlMyBatisConfig {
@Autowired
@Qualifier("bakDataSource")
private DataSource bakDataSource;
@Autowired
@Qualifier("mybatisPlusInterceptor")
private MybatisPlusInterceptor mybatisPlusInterceptor;
@Bean
public SqlSessionFactory mysqlSqlSessionFactory() throws Exception {
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
if(bakDataSource==null){
bakDataSource=DataSourceConfig.initSource("BAK");
}
sessionFactory.setDataSource(bakDataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
configuration.addInterceptor(mybatisPlusInterceptor );
// 配置打印sql语句
if("Y".equals(PropertiesUtil.getValue("mybatislogImplEnabled"))){
configuration.setLogImpl(StdOutImpl.class);
}
sessionFactory.setConfiguration(configuration);
sessionFactory.setMapperLocations(
new PathMatchingResourcePatternResolver()
.getResources("classpath:com/nmgs/mapperset/mysqlmapper/*.xml")
);
return sessionFactory.getObject();
}
}
@Configuration
@MapperScan(
basePackages = "com.nmgs.mapperset.oraclemapper",
sqlSessionFactoryRef = "oracleSqlSessionFactory"
)
public static class OracleMyBatisConfig {
@Autowired
@Qualifier("primaryDataSource")
private DataSource primaryDataSource;
@Autowired
@Qualifier("mybatisPlusInterceptor")
private MybatisPlusInterceptor mybatisPlusInterceptor;
@Bean
public SqlSessionFactory oracleSqlSessionFactory() throws Exception {
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(primaryDataSource);
if(primaryDataSource==null){
primaryDataSource=DataSourceConfig.initSource("PRIMARY");
}
MybatisConfiguration configuration = new MybatisConfiguration();
configuration.addInterceptor(mybatisPlusInterceptor );
// 配置打印sql语句
if("Y".equals(PropertiesUtil.getValue("mybatislogImplEnabled"))){
configuration.setLogImpl(StdOutImpl.class);
}
sessionFactory.setConfiguration(configuration);
sessionFactory.setMapperLocations(
new PathMatchingResourcePatternResolver()
.getResources("classpath:com/nmgs/mapperset/oraclemapper/*.xml")
);
return sessionFactory.getObject();
}
}
@Configuration
@MapperScan(
basePackages = "com.nmgs.mappercommon",
sqlSessionFactoryRef = "commonSqlSessionFactory"
)
public static class commonMyBatisConfig {
@Autowired
@Qualifier("commonDataSource")
private DataSource commonDataSource;
@Autowired
@Qualifier("mybatisPlusInterceptor")
private MybatisPlusInterceptor mybatisPlusInterceptor;
@Bean
public SqlSessionFactory commonSqlSessionFactory() throws Exception {
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
if(commonDataSource==null){
commonDataSource=DataSourceConfig.initSource("COMMON");
}
sessionFactory.setDataSource(commonDataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
configuration.addInterceptor(mybatisPlusInterceptor );
// 配置打印sql语句
if("Y".equals(PropertiesUtil.getValue("mybatislogImplEnabled"))){
configuration.setLogImpl(StdOutImpl.class);
}
sessionFactory.setConfiguration(configuration);
sessionFactory.setMapperLocations(
new PathMatchingResourcePatternResolver()
.getResources("classpath:com/nmgs/mappercommon/*.xml")
);
return sessionFactory.getObject();
}
}
}

@ -34,10 +34,7 @@ public class FileUploadController {
String os = props.getProperty("os.name").toLowerCase();
String fileAddressLocal = PathUtil.uploadPath + "/" + PubTools.getCurrentDateYMD();
if (os.startsWith("win")) {
// fileAddressLocal = PropertiesUtil.getValue("fileAddressWin");
fileAddressLocal = fileAddressLocal.replace("/", "\\");
} else {
// fileAddressLocal = PropertiesUtil.getValue("fileAddressLinux");
}
LogUtil.WriteLog_Info("附件上传接口====fileAddressLocal====" + fileAddressLocal, "FileUploadController");
if (!PubTools.isNull(fileAddressLocal)) {
@ -56,36 +53,13 @@ public class FileUploadController {
} else {
return ResultData.fail("上传附件失败:附件类型不匹配");
}
/* File dest = new File(PropertiesUtil.getValue("fileTemp"), fileName);
System.out.println(filedata.getOriginalFilename());
// 使用下面的jar包
FileUtils.copyInputStreamToFile(filedata.getInputStream(), dest);
File fileTemp = new File(PropertiesUtil.getValue("fileTemp") + "/" + fileName);
if (!fileTemp.exists()) {
return ResultData.success(2, "附件上传失败");
}
String imageBase64 = ImageUtils.getImgFileToBase64(PropertiesUtil.getValue("fileTemp") + "/" + fileName);
if (fileTemp.exists()) {
fileTemp.delete();
}*/
byte[] bytes = filedata.getBytes();
String imageBase64 = ImageUtils.byteToBase64(bytes);
if (PubTools.isNull(imageBase64)) {
return ResultData.success(2, "附件解析失败");
return ResultData.fail(-1, "附件解析失败");
}
String addWaterImage = ImageUtils.addImageWaterMark(imageBase64, "仅用于内蒙古交通货运车辆积分会员认证", fileName);
if (!PubTools.isNull(addWaterImage)) {
/*// ImageUtils.delFile(fileName, false);
byte[] imageBytes = Base64.getDecoder().decode(addWaterImage);
// 创建文件
File file = new File(fileAddressLocal, fileName); // 指定上传位置
if (file.exists()) {
file.delete();
}
// 保存文件
LogUtil.WriteLog_Info("附件开始上传到服务器===========" + PubTools.getCurrentDate(), "FileUploadController");
FileUtils.writeByteArrayToFile(file, imageBytes);*/
LogUtil.WriteLog_Info("附件上传到服务器结束===========" + PubTools.getCurrentDate(), "FileUploadController");
} else if ("-9999".equals(addWaterImage)) {
throw new Exception("附件添加水印失败");
@ -93,7 +67,6 @@ public class FileUploadController {
}
LogUtil.WriteLog_Info("附件上传接口执行结束===========" + PubTools.getCurrentDate(), "FileUploadController");
} catch (Exception e) {
e.printStackTrace();
return ResultData.fail("上传附件失败:" + e.getMessage());
}
return ResultData.success("上传成功", fileName, 1);

@ -1,17 +0,0 @@
package com.nmgs.controller;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@Component
@Api(tags = "项目启动初始化")
public class InitController {
@PostConstruct
public void init() {
// 初始化代码
System.out.println("初始化方法被调用");
}
}

@ -22,7 +22,7 @@ import java.io.IOException;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.atomic.AtomicInteger;
@Component
//@Component
@ServerEndpoint(value = "/webSocketCheck/{userId}")
public class WebSocketRedis {
Log log= LogFactory.getLog(WebSocketRedis.class);

@ -1,71 +0,0 @@
package com.nmgs.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.nmgs.entity.IntegrationList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
@Mapper
public interface IntegrationListMapper extends MppBaseMapper<IntegrationList> {
/**
*
* @param params
* @return
*/
List<IntegrationList> getUserAddIntegation(@Param("params") Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<IntegrationList> getUserPayIntegation(@Param("params") Map<String, Object> params);
Integer getMaxId();
/**
*
* @param param
* @return
*/
List<Map<String, Object>> getIntegrationGrowTotal(@Param("params")Map<String, Object> param);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> getCarIntegrationGrowTotal(@Param("params")Map<String, Object> params);
/**
*
* @param params
* @return
*/
Map<String, Object> getMonthFeeTotal(@Param("params")Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> getFeeTypeTotal(@Param("params")Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<IntegrationList> getAMEScoreByTime(@Param("params") Map<String, Object> params);
@Select("select max(list.TOTALADDINTEGRATION) from INTEGRATION_LIST_TABLE list where list.USERID = #{id}")
BigDecimal getTotalAddIntegrationByUserId(@Param("id")Integer id);
}

@ -1,319 +0,0 @@
<?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="com.nmgs.mapper.IntegrationListMapper">
<select id="getMaxId" resultType="java.lang.Integer">
SELECT MAX(ID) FROM INTEGRATION_LIST_TABLE
</select>
<select id="getUserAddIntegation" resultType="com.nmgs.entity.IntegrationList">
select
list.ID,
list.ACARNO ,
list.LASTINTEGRATION,
list.PAYINTEGRATION ,
list.RESTINTEGRATION,
list.PAYTIME,
case
when list.PAYTYPE = 'P' then '加油'
when list.PAYTYPE = 'PM' then '加油里程'
when list.PAYTYPE = 'M' then '里程'
else ''end as PAYTYPE
from integration_list_table list
<where>
and list.PAYTYPE in ('P','PM','M')
<!-- 车牌号查询条件 -->
<if test="params.aCarNo != null and params.aCarNo != ''">
<bind name="aCarNo" value="'%'+params.aCarNo+'%'"/>
AND list.ACARNO LIKE #{aCarNo}
</if>
</where>
</select>
<select id="getUserPayIntegation" resultType="com.nmgs.entity.IntegrationList">
select
list.ID,
list.ACARNO ,
list.LASTINTEGRATION,
list.PAYINTEGRATION ,
list.RESTINTEGRATION,
list.PAYTIME,
case
when list.PAYTYPE = 'C' then '餐饮消费'
else ''end as PAYTYPE,
area.VALUE as serviceAreaName
from integration_list_table list
left join cafter_table caf on caf.INTEGRATIONLISTID = list.id
left join service_area_operators_table operation on operation.JOBNUMBER = caf.USERJOBNUMBER
left join service_area_table area on area.ID = operation.SERVICEAREAID
<where>
and list.PAYTYPE in ('C')
<!-- 车牌号查询条件 -->
<if test="params.aCarNo != null and params.aCarNo != ''">
<bind name="aCarNo" value="'%'+params.aCarNo+'%'"/>
AND list.ACARNO LIKE #{aCarNo}
</if>
</where>
</select>
<select id="getIntegrationGrowTotal" parameterType="java.util.HashMap" resultType="java.util.HashMap">
select
sum(list.PAYINTEGRATION/100.00) as TOTALCOUNT
from INTEGRATION_LIST_TABLE list
<where>
and list.PAYTYPE not in ('FC','FP')
<!-- 统计日期(起始)查询条件 -->
<if test="params.startTime != null and params.startTime != ''">
<if test="params.DBTYPE == 1">
AND list.PAYTIME >= dateadd(day,0,#{params.startTime})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME >= TO_DATE(#{params.startTime}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME >= TO_DATE(#{params.startTime}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME >= STR_TO_DATE(#{params.startTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.endTime != null and params.endTime != ''">
<if test="params.DBTYPE == 1">
AND list.PAYTIME &lt; dateadd(day,0,#{params.endTime})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME &lt; TO_DATE(#{params.endTime}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME &lt; TO_DATE(#{params.endTime}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME &lt; STR_TO_DATE(#{params.endTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
</where>
</select>
<select id="getCarIntegrationGrowTotal" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT RESULT.* FROM ( select
CONCAT(SUBSTR(list.ACARNO,0,INSTR(list.ACARNO,'_')-1),CONCAT(CONCAT('(',color.TEXT),')')) as ACARNO,
sum(list.PAYINTEGRATION/100.00) as TOTALCOUNT
from
integration_list_table list
left join platecolor_text color on color.VALUE = SUBSTR(list.ACARNO,INSTR(list.ACARNO,'_')+1)
<where>
and list.PAYTYPE in ('AM','AP')
<!-- 统计日期(起始)查询条件 -->
<if test="params.classDateBeginQuery != null and params.classDateBeginQuery != ''">
<if test="params.DBTYPE == 1">
AND list.PAYTIME >= dateadd(day,0,#{params.classDateBeginQuery})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME >= STR_TO_DATE(#{params.classDateBeginQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.classDateEndQuery != null and params.classDateEndQuery != '' ">
<if test="params.DBTYPE == 1">
AND list.PAYTIME &lt;= dateadd(day,0,#{params.classDateEndQuery})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME &lt;= STR_TO_DATE(#{params.classDateEndQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
</where>
GROUP BY ACARNO,color.TEXT
order by TOTALCOUNT desc) RESULT where
ROWNUM &lt;= 10
</select>
<select id="getMonthFeeTotal" parameterType="java.util.HashMap" resultType="java.util.HashMap">
select
sum(case when list.PAYTYPE not in ('FC','FP') then list.PAYINTEGRATION/100.00 else 0 end ) as ATOTAL,
sum(case when list.PAYTYPE in ('FC','FP') then list.PAYINTEGRATION/100.00 else 0 end ) FTOTAL
from
integration_list_table list
<where>
<!-- 统计日期(起始)查询条件 -->
<if test="params.classDateBeginQuery != null and params.classDateBeginQuery != ''">
<if test="params.DBTYPE == 1">
AND list.PAYTIME >= dateadd(day,0,#{params.classDateBeginQuery})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME >= STR_TO_DATE(#{params.classDateBeginQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.classDateEndQuery != null and params.classDateEndQuery != '' ">
<if test="params.DBTYPE == 1">
AND list.PAYTIME &lt;= dateadd(day,0,#{params.classDateEndQuery})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME &lt;= STR_TO_DATE(#{params.classDateEndQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
</where>
</select>
<select id="getFeeTypeTotal" parameterType="java.util.HashMap" resultType="java.util.HashMap">
select
'FC' as PEYTYPE,
peytype.TEXT as PEYTYPENAME,
NVL(sum(case when list.PAYTYPE in ('FC') then list.PAYINTEGRATION/100.00 else 0 end ),0) as FTOTAL
from
PEYTYPE_TEXT peytype
left join integration_list_table list on peytype.VALUE = list.PAYTYPE
<where>
and peytype.VALUE in ('FC')
<!-- 统计日期(起始)查询条件 -->
<if test="params.classDateBeginQuery != null and params.classDateBeginQuery != ''">
<if test="params.DBTYPE == 1">
AND list.PAYTIME >= dateadd(day,0,#{params.classDateBeginQuery})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME >= STR_TO_DATE(#{params.classDateBeginQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.classDateEndQuery != null and params.classDateEndQuery != '' ">
<if test="params.DBTYPE == 1">
AND list.PAYTIME &lt;= dateadd(day,0,#{params.classDateEndQuery})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME &lt;= STR_TO_DATE(#{params.classDateEndQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
</where>
GROUP BY peytype.VALUE,peytype.TEXT
UNION ALL
select
'FP' as PEYTYPE,
peytype.TEXT as PEYTYPENAME,
nvl(sum(case when list.PAYTYPE in ('FP') then list.PAYINTEGRATION/100.00 else 0 end ),0) as FTOTAL
from
PEYTYPE_TEXT peytype
left join integration_list_table list on peytype.VALUE = list.PAYTYPE
<where>
and peytype.VALUE in ('FP')
<!-- 统计日期(起始)查询条件 -->
<if test="params.classDateBeginQuery != null and params.classDateBeginQuery != ''">
<if test="params.DBTYPE == 1">
AND list.PAYTIME >= dateadd(day,0,#{params.classDateBeginQuery})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME >= STR_TO_DATE(#{params.classDateBeginQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.classDateEndQuery != null and params.classDateEndQuery != '' ">
<if test="params.DBTYPE == 1">
AND list.PAYTIME &lt;= dateadd(day,0,#{params.classDateEndQuery})
</if>
<if test="params.DBTYPE == 2">
AND list.PAYTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.PAYTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.PAYTIME &lt;= STR_TO_DATE(#{params.classDateEndQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
</where>
GROUP BY peytype.VALUE,peytype.TEXT
</select>
<select id="getAMEScoreByTime" resultType="com.nmgs.entity.IntegrationList">
select
*
from integration_list_table list
<where>
and list.PAYTYPE in ('AME')
<!-- 统计日期(起始)查询条件 -->
<if test="params.startTime != null and params.startTime != ''">
<if test="params.DBTYPE == 1">
AND list.MONTHMILEGRANTTIME >= dateadd(day,0,#{params.startTime})
</if>
<if test="params.DBTYPE == 2">
AND list.MONTHMILEGRANTTIME >= TO_DATE(#{params.startTime}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.MONTHMILEGRANTTIME >= TO_DATE(#{params.startTime}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.MONTHMILEGRANTTIME >= STR_TO_DATE(#{params.startTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.endTime != null and params.endTime != ''">
<if test="params.DBTYPE == 1">
AND list.MONTHMILEGRANTTIME &lt; dateadd(day,0,#{params.endTime})
</if>
<if test="params.DBTYPE == 2">
AND list.MONTHMILEGRANTTIME &lt; TO_DATE(#{params.endTime}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND list.MONTHMILEGRANTTIME &lt; TO_DATE(#{params.endTime}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND list.MONTHMILEGRANTTIME &lt; STR_TO_DATE(#{params.endTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
</where>
</select>
</mapper>

@ -1,35 +0,0 @@
package com.nmgs.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.nmgs.entity.PayIntegrationNumber;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface PayIntegrationNumberMapper extends MppBaseMapper<PayIntegrationNumber> {
/**
*
* @return
*/
List<PayIntegrationNumber> getPayIntegrationNumberList();
/**
* id
* @return
*/
Integer getMaxId();
/**
*
* @param type
* @return
*/
@Select("SELECT pay.ID,pay.VALUE,pay.type FROM pay_integration_number_table pay where pay.type=#{type}")
PayIntegrationNumber getAuScore(@Param("type") String type);
}

@ -1,21 +0,0 @@
<?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="com.nmgs.mapper.PayIntegrationNumberMapper">
<select id="getMaxId" resultType="java.lang.Integer">
SELECT MAX(ID) FROM pay_integration_number_table
</select>
<select id="getPayIntegrationNumberList" resultType="com.nmgs.entity.PayIntegrationNumber">
SELECT
pay.ID,
pay.VALUE/100.00 as VALUE,
pay.type,
pey.TEXT as typeName
FROM pay_integration_number_table pay
left join PEYTYPE_TEXT pey on pey.VALUE = pay.TYPE
</select>
</mapper>

@ -1,60 +0,0 @@
package com.nmgs.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.nmgs.entity.ServiceArea;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface ServiceAreaMapper extends MppBaseMapper<ServiceArea> {
/**
*
* @param page
* @param params
* @return
*/
Page<ServiceArea> getServiceAreaList(Page<ServiceArea> page, @Param("params") Map<String, Object> params);
/**
* id
* @return
*/
Integer getMaxId();
/**
*
* @return
*/
List<Map<String,Object>> selectServiceTypeList();
/**
*
* @return
*/
List<Map<String,Object>> selectServiceKindList();
/**
*
* @param params
* @return
*/
List<Map<String, Object>> getServiceAreaCafCount(@Param("params") Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> getServiceAreaCafTotal(@Param("params")Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> getServiceAreaFee(@Param("params")Map<String, Object> params);
}

@ -1,236 +0,0 @@
<?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="com.nmgs.mapper.ServiceAreaMapper">
<select id="getServiceAreaList" parameterType="java.util.HashMap" resultType="com.nmgs.entity.ServiceArea">
<if test="params.DBTYPE == 1">
</if>
<if test="params.DBTYPE == 2">
select
area.ID,
area.AREANAME,
area.SERVICETYPE,
area.SERVICEKIND,
LISTAGG(kind.TEXT,', ') WITHIN GROUP(ORDER BY kind.VALUE) as serviceKindName,
type.TEXT as serviceTypeName
from
service_area_table area
left join service_area_kind_text kind on INSTR(area.SERVICEKIND,kind.VALUE) > 0
left join service_area_TYPE_text type on type.VALUE = area.SERVICETYPE
<where>
<!-- 服务区名称 -->
<if test="params.areaName != null and params.areaName != ''">
<bind name="areaName" value="'%'+params.areaName+'%'"/>
AND area.AREANAME LIKE #{areaName}
</if>
<!-- 服务区类型 -->
<if test="params.serviceType != null and params.serviceType != ''">
AND area.SERVICETYPE = #{params.serviceType}
</if>
<!-- 服务种类 -->
<if test="params.serviceKindQuery != null ">
and INSTR(area.SERVICEKIND,#{params.serviceKindQuery}) > 0
</if>
</where>
GROUP BY area.ID,area.AREANAME,area.SERVICETYPE,area.SERVICEKIND,type.TEXT
</if>
<if test="params.DBTYPE == 3">
</if>
<if test="params.DBTYPE == 4">
select
area.ID,
area.AREANAME,
area.SERVICETYPE,
area.SERVICEKIND,
GROUP_CONCAT(kind.TEXT ORDER BY kind.VALUE) as serviceKindName,
type.TEXT as serviceTypeName
from
service_area_table area
left join service_area_kind_text kind on INSTR(area.SERVICEKIND,kind.VALUE) > 0
left join service_area_TYPE_text type on type.VALUE = area.SERVICETYPE
<where>
<!-- 服务区名称 -->
<if test="params.areaNameQuery != null and params.areaNameQuery != ''">
<bind name="areaNameQuery" value="'%'+params.areaNameQuery+'%'"/>
AND area.AREANAME LIKE #{areaNameQuery}
</if>
<!-- 服务区类型 -->
<if test="params.serviceTypeQuery != null ">
AND area.SERVICETYPE = #{params.serviceTypeQuery}
</if>
<!-- 服务种类 -->
<if test="params.serviceKindQuery != null ">
and INSTR(area.SERVICEKIND,#{params.serviceKindQuery}) > 0
</if>
</where>
GROUP BY area.ID
</if>
</select>
<select id="selectServiceTypeList" resultType="java.util.HashMap">
SELECT * FROM service_area_TYPE_text sub order by sub.VALUE
</select>
<select id="selectServiceKindList" resultType="java.util.HashMap">
SELECT * FROM service_area_kind_text p order by p.VALUE
</select>
<select id="getMaxId" resultType="java.lang.Integer">
SELECT MAX(ID) FROM SERVICE_AREA_TABLE
</select>
<select id="getServiceAreaCafCount" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT RESULT.* FROM (
select
area.ID as ID,
area.AREANAME as AREANAME,
count(caf.id) as FEECOUNT
from service_area_table area
left join service_area_operators_table operation on operation.SERVICEAREAID = area.ID
left join cafter_table caf on operation.JOBNUMBER = caf.USERJOBNUMBER
<!-- 统计日期(起始)查询条件 -->
<if test="params.classDateBeginQuery != null and params.classDateBeginQuery != ''">
<if test="params.DBTYPE == 1">
AND caf.CAFTERTIME >= dateadd(day,0,#{params.classDateBeginQuery})
</if>
<if test="params.DBTYPE == 2">
AND caf.CAFTERTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND caf.CAFTERTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND caf.CAFTERTIME >= STR_TO_DATE(#{params.classDateBeginQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.classDateEndQuery != null and params.classDateEndQuery != '' ">
<if test="params.DBTYPE == 1">
AND caf.CAFTERTIME &lt;= dateadd(day,0,#{params.classDateEndQuery})
</if>
<if test="params.DBTYPE == 2">
AND caf.CAFTERTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND caf.CAFTERTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND caf.CAFTERTIME &lt;= STR_TO_DATE(#{params.classDateEndQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
left join WEIXN_USER_TABLE u on u.ID = caf.USERID
left join integration_list_table list on list.ID = caf.INTEGRATIONLISTID
GROUP BY area.ID,area.AREANAME
order by FEECOUNT desc
) RESULT where
ROWNUM &lt;= 5
</select>
<select id="getServiceAreaCafTotal" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT RESULT.* FROM (
select
area.ID as ID,
area.AREANAME as AREANAME,
case when sum(list.PAYINTEGRATION) is not null then sum(list.PAYINTEGRATION/100.00) else 0 end as FEETOTAL
from service_area_table area
left join service_area_operators_table operation on operation.SERVICEAREAID = area.ID
left join cafter_table caf on operation.JOBNUMBER = caf.USERJOBNUMBER
<!-- 统计日期(起始)查询条件 -->
<if test="params.classDateBeginQuery != null and params.classDateBeginQuery != ''">
<if test="params.DBTYPE == 1">
AND caf.CAFTERTIME >= dateadd(day,0,#{params.classDateBeginQuery})
</if>
<if test="params.DBTYPE == 2">
AND caf.CAFTERTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND caf.CAFTERTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND caf.CAFTERTIME >= STR_TO_DATE(#{params.classDateBeginQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.classDateEndQuery != null and params.classDateEndQuery != '' ">
<if test="params.DBTYPE == 1">
AND caf.CAFTERTIME &lt;= dateadd(day,0,#{params.classDateEndQuery})
</if>
<if test="params.DBTYPE == 2">
AND caf.CAFTERTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND caf.CAFTERTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND caf.CAFTERTIME &lt;= STR_TO_DATE(#{params.classDateEndQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
left join WEIXN_USER_TABLE u on u.ID = caf.USERID
left join integration_list_table list on list.ID = caf.INTEGRATIONLISTID
GROUP BY area.ID,area.AREANAME
order by FEETOTAL desc
) RESULT where
ROWNUM &lt;= 5
</select>
<select id="getServiceAreaFee" parameterType="java.util.HashMap" resultType="java.util.HashMap">
select
area.ID as ID,
area.AREANAME as AREANAME,
case when sum(list.PAYINTEGRATION) is not null then sum(list.PAYINTEGRATION/100.00) else 0 end as FEETOTAL
from service_area_table area
left join service_area_operators_table operation on operation.SERVICEAREAID = area.ID
left join cafter_table caf on operation.JOBNUMBER = caf.USERJOBNUMBER
<!-- 统计日期(起始)查询条件 -->
<if test="params.classDateBeginQuery != null and params.classDateBeginQuery != ''">
<if test="params.DBTYPE == 1">
AND caf.CAFTERTIME >= dateadd(day,0,#{params.classDateBeginQuery})
</if>
<if test="params.DBTYPE == 2">
AND caf.CAFTERTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND caf.CAFTERTIME >= TO_DATE(#{params.classDateBeginQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND caf.CAFTERTIME >= STR_TO_DATE(#{params.classDateBeginQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<!-- 统计日期(终止)查询条件 -->
<if test="params.classDateEndQuery != null and params.classDateEndQuery != '' ">
<if test="params.DBTYPE == 1">
AND caf.CAFTERTIME &lt;= dateadd(day,0,#{params.classDateEndQuery})
</if>
<if test="params.DBTYPE == 2">
AND caf.CAFTERTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 3">
AND caf.CAFTERTIME &lt;= TO_DATE(#{params.classDateEndQuery}, 'SYYYY-MM-DD HH24:MI:SS')
</if>
<if test="params.DBTYPE == 4">
AND caf.CAFTERTIME &lt;= STR_TO_DATE(#{params.classDateEndQuery}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
left join WEIXN_USER_TABLE u on u.ID = caf.USERID
left join integration_list_table list on list.ID = caf.INTEGRATIONLISTID
GROUP BY area.ID,area.AREANAME
order by FEETOTAL desc
</select>
</mapper>

@ -1,30 +0,0 @@
package com.nmgs.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.nmgs.entity.ServiceAreaPic;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
@Mapper
public interface ServiceAreaPicMapper extends MppBaseMapper<ServiceAreaPic> {
/**
* id
* @return
*/
Integer getMaxId();
@Delete("delete from service_area_pic_table where SERVICEID=#{id}")
int deletePicByAreaId(@Param("id") Integer id);
@Select("select ID,SERVICEID,PICDATA from service_area_pic_table where SERVICEID=#{params.id}")
List<ServiceAreaPic> getAreaPic(@Param("params")Map<String, Object> params);
}

@ -1,11 +0,0 @@
<?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="com.nmgs.mapper.ServiceAreaPicMapper">
<select id="getMaxId" resultType="java.lang.Integer">
SELECT MAX(ID) FROM service_area_pic_table
</select>
</mapper>

@ -1,4 +1,4 @@
package com.nmgs.mapper;
package com.nmgs.mappercommon;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -10,7 +10,7 @@ import java.util.List;
import java.util.Map;
@org.apache.ibatis.annotations.Mapper
//@org.apache.ibatis.annotations.Mapper
public interface Mapper extends BaseMapper<MyReturnMap> {

@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nmgs.mapper.Mapper">
<mapper namespace="com.nmgs.mappercommon.Mapper">
<select id="select" parameterType="String" resultType="java.util.HashMap">
${sql}
</select>

@ -0,0 +1,18 @@
package com.nmgs.mapperset.mysqlmapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface AppointmentInfoMyMapper {
/**
*
* @param param
* @return
*/
public int addAppointmentInfo(@Param("params") Map<String,Object> param);
public int updateConpleteStatus(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,46 @@
<?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="com.nmgs.mapperset.mysqlmapper.AppointmentInfoMyMapper">
<update id="updateConpleteStatus" parameterType="java.util.HashMap">
update APPOINTMENT_INFO_TABLE
set COMPLETESTATUS=#{params.completeStatus}
where ORDERID = #{params.orderId}
</update>
<insert id="addAppointmentInfo" parameterType="java.util.HashMap">
insert into APPOINTMENT_INFO_TABLE(ID,USERID,ACARNO,APPOINTMENTTYPE,APPOINTMENTTIME,APPOINTMENTLINEID,
CREATETIME,SERVICEAREAID,MEALS,MEALSCOUNT,COMPLETESTATUS,INTEGRATIONLISTID,
SERVICEOPERATIONID,TOTALINTEGRAL,ORDERID)
values (#{params.maxId},${params.userId},#{params.acarno},#{params.appointmenttype},
<if test="params.DBTYPEBAK == 1">
dateadd(day,0,#{params.appointtime}),
</if>
<if test="params.DBTYPEBAK == 2">
TO_DATE(#{params.appointtime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 3">
TO_DATE(#{params.appointtime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 4">
STR_TO_DATE(#{params.appointtime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.appointmentlineid},
<if test="params.DBTYPEBAK == 1">
dateadd(day,0,#{params.createtime}),
</if>
<if test="params.DBTYPEBAK == 2">
TO_DATE(#{params.createtime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 3">
TO_DATE(#{params.createtime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 4">
STR_TO_DATE(#{params.createtime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.serviceareaId},#{params.meals},#{params.mealscount},#{params.completeStatus},#{params.integrationListId},
#{params.serviceOperationId,jdbcType=VARCHAR},#{params.totalIntegral},#{params.orderId})
</insert>
</mapper>

@ -0,0 +1,19 @@
package com.nmgs.mapperset.mysqlmapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface CafterTableMyMapper {
/**
*
* @param param
* @return
*/
public int addcafter(@Param("params") Map<String,Object> param);
public int updatecafter(@Param("params") Map<String,Object> param);
public int updatecafterConpleteStatus(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,57 @@
<?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="com.nmgs.mapperset.mysqlmapper.CafterTableMyMapper">
<update id="updatecafter" parameterType="java.util.HashMap">
update CAFTER_TABLE
set rollback=#{params.rollback}
<if test="params.rollbackTime != null and params.rollbackTime !=''">
<if test="params.DBTYPEBAK == 1">
,ROLLBACKTIME = dateadd(day,0,#{params.rollbackTime})
</if>
<if test="params.DBTYPEBAK == 2">
,ROLLBACKTIME= TO_DATE(#{params.rollbackTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 3">
,ROLLBACKTIME= TO_DATE(#{params.rollbackTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 4">
,ROLLBACKTIME= STR_TO_DATE(#{params.rollbackTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<if test="params.integralrollback != null and params.integralrollback !=''">
,INTEGRALROLLBACK=#{params.integralrollback}
</if>
where ORDERID = #{params.orderId} AND USERJOBNUMBER= #{params.serverOperationId}
</update>
<insert id="addcafter" parameterType="java.util.HashMap">
insert into CAFTER_TABLE(ID,
ACARNO,
USERID,
CAFTERTIME,
USERJOBNUMBER,
TRIMINTEGRAL,
INTEGRATIONLISTID,
ORDERID,CONTENT) values (#{params.maxId},#{params.acarNo},#{params.userId},
<if test="params.DBTYPEBAK == 1">
dateadd(day,0,#{params.cafterTime}),
</if>
<if test="params.DBTYPEBAK == 2">
TO_DATE(#{params.cafterTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 3">
TO_DATE(#{params.cafterTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 4">
STR_TO_DATE(#{params.cafterTime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.userJobnumber}, #{params.trimintegral},#{params.integrationListId},#{params.orderId},#{params.content})
</insert>
<update id="updatecafterConpleteStatus" parameterType="java.util.HashMap">
update CAFTER_TABLE
set COMPLETESTATUS=#{params.completeStatus}
where ORDERID = #{params.orderId}
</update>
</mapper>

@ -0,0 +1,17 @@
package com.nmgs.mapperset.mysqlmapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface IntegralLeavingMyMapper {
/**
*
* @param param
* @return
*/
public int addIntegralLeaving(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,27 @@
<?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="com.nmgs.mapperset.mysqlmapper.IntegralLeavingMyMapper">
<insert id="addIntegralLeaving" parameterType="java.util.HashMap">
insert into INTEGRAL_LEAVEMESSAGE_TABLE(ID,USERID,POSITION,MESSAGE,CREATETIME,REPLYSTATUS)
values(#{params.maxId},(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID=#{params.openId}),
#{params.positon},#{params.message},
<if test="params.DBTYPEBAK == 1">
dateadd(day,0,#{params.currentDate}),
</if>
<if test="params.DBTYPEBAK == 2">
TO_DATE(#{params.currentDate}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 3">
TO_DATE(#{params.currentDate}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 4">
STR_TO_DATE(#{params.currentDate}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.replyStatus})
</insert>
</mapper>

@ -0,0 +1,23 @@
package com.nmgs.mapperset.mysqlmapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface IntegralSignMyMapper {
/**
*
* @param param
* @return
*/
public int addIntegralSign(@Param("params") Map<String,Object> param);
/**
*
* @param param
* @return
*/
public int updateIntegralSign(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,18 @@
<?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="com.nmgs.mapperset.mysqlmapper.IntegralSignMyMapper">
<insert id="addIntegralSign" parameterType="java.util.HashMap">
insert into INTEGRAL_SIGN_TABLE(USERID,MONTH,DAY${params.dayvalue})
values((SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID=#{params.openId}),
#{params.month},'Y')
</insert>
<update id="updateIntegralSign" parameterType="java.util.HashMap">
UPDATE INTEGRAL_SIGN_TABLE set Day${params.dayvalue}='Y' where USERID=(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID=#{params.openId})
AND MONTH=#{params.month}
</update>
</mapper>

@ -0,0 +1,17 @@
package com.nmgs.mapperset.mysqlmapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface IntegrationListMyMapper {
/**
*
* @param param
* @return
*/
public int addIntegralList(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,27 @@
<?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="com.nmgs.mapperset.mysqlmapper.IntegrationListMyMapper">
<insert id="addIntegralList" parameterType="java.util.HashMap">
INSERT INTO integration_list_table ( ID, USERID,ACARNO, LASTINTEGRATION, TOTALADDINTEGRATION,PAYINTEGRATION, RESTINTEGRATION,
PAYTIME, PAYTYPE,CPENABLEINTEGRATION,OGENABLEINTEGRATION )
values(#{params.maxid},#{params.userId},#{params.acarNo},#{params.lastintegration},#{params.totalintegration},
#{params.payintegration},#{params.restintegration},
<if test="params.DBTYPEBAK == 1">
dateadd(day,0,#{params.payTime}),
</if>
<if test="params.DBTYPEBAK == 2">
TO_DATE(#{params.payTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 3">
TO_DATE(#{params.payTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 4">
STR_TO_DATE(#{params.payTime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.paytype},#{params.cpenableintegration},#{params.ogenableintegration})
</insert>
</mapper>

@ -0,0 +1,55 @@
package com.nmgs.mapperset.mysqlmapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.nmgs.entity.ServiceAreaOperators;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
//@Mapper
public interface OperatorsMyMapper extends MppBaseMapper<ServiceAreaOperators> {
/**
*
*
* @param page
* @param params
* @return
*/
Page<ServiceAreaOperators> getOperatorsList(Page<ServiceAreaOperators> page, @Param("params") Map<String, Object> params);
/**
*
*
* @return
*/
List<Map<String, Object>> selectRoleListList();
/**
*
*
* @return
*/
List<Map<String, Object>> selectServiceAreaList();
/**
* id
*
* @return
*/
Integer getMaxId();
/**
*
*
* @return
*/
List<ServiceAreaOperators> getOperationByJobNumber(@Param("jobNumber") String jobNumber);
}

@ -0,0 +1,84 @@
<?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="com.nmgs.mapperset.mysqlmapper.OperatorsMyMapper">
<select id="getOperatorsList" parameterType="java.util.HashMap" resultType="com.nmgs.entity.ServiceAreaOperators">
SELECT
oper.ID,
oper.JOBNUMBER,
oper.JOBNUMBERINFO,
oper.ROLEID,
oper.SERVICEAREAID,
oper.USERNAME,
oper.PASSWORD,
r.VALUE as roleName,
area.AREANAME as serviceAreaName
FROM
service_area_operators_table oper
LEFT JOIN service_area_table area on area.ID = oper.SERVICEAREAID
LEFT JOIN service_area_operators_role_text r on r.ID = oper.ROLEID
<where>
<!-- 姓名查询条件 -->
<if test="params.userNameQuery != null and params.userNameQuery != ''">
<bind name="userNameQuery" value="'%'+params.userNameQuery+'%'"/>
AND oper.USERNAME LIKE #{userNameQuery}
</if>
<!-- 服务区查询条件 -->
<if test="params.serviceAreaQuery != null ">
AND oper.SERVICEAREAID = #{params.serviceAreaQuery}
</if>
<!-- 工号查询条件 -->
<if test="params.jobNumberQuery != null and params.jobNumberQuery != ''">
<bind name="jobNumberQuery" value="'%'+params.jobNumberQuery+'%'"/>
AND oper.JOBNUMBER LIKE #{jobNumberQuery}
</if>
</where>
ORDER BY oper.JOBNUMBER
</select>
<select id="selectRoleListList" resultType="java.util.HashMap">
SELECT *
FROM service_area_operators_role_text sub
order by sub.ID
</select>
<select id="selectServiceAreaList" resultType="java.util.HashMap">
SELECT area.ID, area.AREANAME
FROM SERVICE_AREA_TABLE area
order by area.ID
</select>
<select id="getMaxId" resultType="java.lang.Integer">
SELECT MAX(ID)
FROM service_area_operators_table
</select>
<select id="getOperationByJobNumber" resultType="com.nmgs.entity.ServiceAreaOperators">
SELECT oper.ID,
oper.JOBNUMBER,
oper.JOBNUMBERINFO,
oper.ROLEID,
oper.SERVICEAREAID,
oper.USERNAME,
oper.PASSWORD,
r.VALUE as roleName,
area.AREANAME as serviceAreaName,
saoc.INPUTMENEY AS inputMeney
FROM service_area_operators_table oper
LEFT JOIN service_area_table area on area.ID = oper.SERVICEAREAID
LEFT JOIN service_area_operators_role_text r on r.ID = oper.ROLEID
LEFT JOIN SERVICE_AREA_OPERATORS_COMPANY_TEXT saoc on saoc.ID = oper.COMPANYID
where JOBNUMBER = #{jobNumber}
</select>
</mapper>

@ -0,0 +1,28 @@
package com.nmgs.mapperset.mysqlmapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface UserTableMysqlMapper {
/**
*
* @param param
* @return
*/
public int addUser(@Param("params") Map<String,Object> param);
/**
*
* @return
*/
public int updateUser(@Param("params") Map<String,Object> param);
/**
*
* @return
*/
public int updateUserById(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,61 @@
<?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="com.nmgs.mapperset.mysqlmapper.UserTableMysqlMapper">
<update id="updateUser" parameterType="java.util.HashMap">
update WEIXN_USER_TABLE set CERTIFICATION=#{params.certification} ,NUMBERPICNAME=#{params.filename}
<if test="params.phone != null and params.phone !=''">
,phone=#{params.phone}
</if>
<if test="params.realName != null and params.realName !=''">
,REALNAME=#{params.realName}
</if>
<if test="params.idNumber != null and params.idNumber !=''">
,IDNUMBER=#{params.idNumber}
</if>
<if test="params.DBTYPEBAK == 1">
,CREATETIME &lt;= dateadd(day,0,#{params.createTime})
</if>
<if test="params.DBTYPEBAK == 2">
,CREATETIME= TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 3">
,CREATETIME= TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 4">
,CREATETIME= STR_TO_DATE(#{params.createTime}, '%Y-%m-%d %H:%i:%s')
</if>
where OPENID=#{params.openid}
</update>
<insert id="addUser">
insert into WEIXN_USER_TABLE(ID,OPENID,USERNAME,CREATETIME,ENABLEINTEGRATION,STARLEVEL,OILENABLEINTEGRATION,GASENABLEINTEGRATION,
SPENABLEINTEGRATION,CAFENABLEINTEGRATION,CERTIFICATION,OGENABLEINTEGRATION,CPENABLEINTEGRATION,REFERRERCODE)
values(#{params.userid},#{params.openid},#{params.username}
<if test="params.DBTYPEBAK == 1">
,dateadd(day,0,#{params.createTime})
</if>
<if test="params.DBTYPEBAK == 2">
,TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 3">
,TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 4">
,STR_TO_DATE(#{params.createTime}, '%Y-%m-%d %H:%i:%s')
</if>
,0,0,0,0,0,0,0,0,0,#{params.REFERRERCODE})
</insert>
<update id="updateUserById" parameterType="java.util.HashMap">
update WEIXN_USER_TABLE SET
<if test="params.enabledTICp !='' and params.enabledTICp != null">
CPENABLEINTEGRATION=#{params.enabledTICp},
</if>
<if test="params.enabledTIOG !='' and params.enabledTIOG != null">
OGENABLEINTEGRATION=#{params.enabledTIOG},
</if>
ENABLEINTEGRATION= #{params.enabledTI}
where OPENID=#{params.userId}
</update>
</mapper>

@ -0,0 +1,28 @@
package com.nmgs.mapperset.mysqlmapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface UserVehicleMyMapper {
/**
*
* @param param
* @return
*/
public int addUserVehicle(@Param("params") Map<String,Object> param);
/**
*
* @param param
* @return
*/
public int updateUserVehicle(@Param("params") Map<String,Object> param);
/**
*
* @return
*/
public int delUserVehcile(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,86 @@
<?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="com.nmgs.mapperset.mysqlmapper.UserVehicleMyMapper">
<update id="updateUserVehicle" parameterType="java.util.HashMap">
update user_vehicle_table
set CERTIFICATION=#{params.certification}
<if test="params.cancelTime != null and params.cancelTime !=''">
<if test="params.DBTYPEBAK == 1">
,CANCELTIME = dateadd(day,0,#{params.cancelTime})
</if>
<if test="params.DBTYPEBAK == 2">
,CANCELTIME= TO_DATE(#{params.cancelTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 3">
,CANCELTIME= TO_DATE(#{params.cancelTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 4">
,CANCELTIME= STR_TO_DATE(#{params.cancelTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<if test="params.createTime != null and params.createTime !=''">
<if test="params.DBTYPEBAK == 1">
,CREATETIME = dateadd(day,0,#{params.createTime})
</if>
<if test="params.DBTYPEBAK == 2">
,CREATETIME= TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 3">
,CREATETIME= TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPEBAK == 4">
,CREATETIME= STR_TO_DATE(#{params.createTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<if test="params.licensepic != null and params.licensepic !=''">
,LICENSEPICNAME=#{params.licensepic}
</if>
<if test="params.permitpic != null and params.permitpic !=''">
,PERMITPICNAME=#{params.permitpic}
</if>
<if test="params.vehiclePic != null and params.vehiclePic !=''">
,VEHICLEPICNAME=#{params.vehiclePic}
</if>
<if test="params.referrerCode != null and params.referrerCode !=''">
,REFERRERCODE=#{params.referrerCode}
</if>
<if test="params.checkName != null and params.checkName !=''">
,CHECKUSERNAME=#{params.checkName}
</if>
<if test="params.checkUserNumber != null and params.checkUserNumber !=''">
,CHECKUSERNUMBER=#{params.checkUserNumber}
</if>
where USERID=#{params.userId} AND ACARNO=#{params.aCarNo}
<if test="params.commonCondition !=null and params.commonCondition !=''">
AND ${params.commonCondition}
</if>
</update>
<insert id="addUserVehicle" parameterType="java.util.HashMap">
insert into user_vehicle_table(USERID,ACARNO,CREATETIME,CERTIFICATION)
values((SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID=#{params.openid}),#{params.aCarNo},
<if test="params.DBTYPEBAK == 1">
dateadd(day,0,#{params.createTime}),
</if>
<if test="params.DBTYPEBAK == 2">
TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 3">
TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPEBAK == 4">
STR_TO_DATE(#{params.createTime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.certification})
</insert>
<delete id="delUserVehcile" parameterType="java.util.HashMap">
delete from user_vehicle_table where USERID=#{params.userId} AND ACARNO=#{params.aCarNo}
<if test="params.commonCondition !=null and params.commonCondition !=''">
AND ${params.commonCondition}
</if>
</delete>
</mapper>

@ -0,0 +1,18 @@
package com.nmgs.mapperset.oraclemapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface AppointmentInfoMapper {
/**
*
* @param param
* @return
*/
public int addAppointmentInfo(@Param("params") Map<String,Object> param);
public int updateConpleteStatus(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,46 @@
<?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="com.nmgs.mapperset.oraclemapper.AppointmentInfoMapper">
<update id="updateConpleteStatus" parameterType="java.util.HashMap">
update APPOINTMENT_INFO_TABLE
set COMPLETESTATUS=#{params.completeStatus}
where ORDERID = #{params.orderId}
</update>
<insert id="addAppointmentInfo" parameterType="java.util.HashMap">
insert into APPOINTMENT_INFO_TABLE(ID,USERID,ACARNO,APPOINTMENTTYPE,APPOINTMENTTIME,APPOINTMENTLINEID,
CREATETIME,SERVICEAREAID,MEALS,MEALSCOUNT,COMPLETESTATUS,INTEGRATIONLISTID,
SERVICEOPERATIONID,TOTALINTEGRAL,ORDERID)
values (#{params.maxId},${params.userId},#{params.acarno},#{params.appointmenttype},
<if test="params.DBTYPE == 1">
dateadd(day,0,#{params.appointtime}),
</if>
<if test="params.DBTYPE == 2">
TO_DATE(#{params.appointtime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 3">
TO_DATE(#{params.appointtime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 4">
STR_TO_DATE(#{params.appointtime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.appointmentlineid},
<if test="params.DBTYPE == 1">
dateadd(day,0,#{params.createtime}),
</if>
<if test="params.DBTYPE == 2">
TO_DATE(#{params.createtime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 3">
TO_DATE(#{params.createtime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 4">
STR_TO_DATE(#{params.createtime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.serviceareaId},#{params.meals},#{params.mealscount},#{params.completeStatus},#{params.integrationListId},
#{params.serviceOperationId,jdbcType=VARCHAR},#{params.totalIntegral},#{params.orderId})
</insert>
</mapper>

@ -0,0 +1,19 @@
package com.nmgs.mapperset.oraclemapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface CafterTableMapper {
/**
*
* @param param
* @return
*/
public int addcafter(@Param("params") Map<String,Object> param);
public int updatecafter(@Param("params") Map<String,Object> param);
public int updatecafterConpleteStatus(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,58 @@
<?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="com.nmgs.mapperset.oraclemapper.CafterTableMapper">
<update id="updatecafter" parameterType="java.util.HashMap">
update CAFTER_TABLE
set rollback=#{params.rollback}
<if test="params.rollbackTime != null and params.rollbackTime !=''">
<if test="params.DBTYPE == 1">
,ROLLBACKTIME = dateadd(day,0,#{params.rollbackTime})
</if>
<if test="params.DBTYPE == 2">
,ROLLBACKTIME= TO_DATE(#{params.rollbackTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 3">
,ROLLBACKTIME= TO_DATE(#{params.rollbackTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 4">
,ROLLBACKTIME= STR_TO_DATE(#{params.cancelTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<if test="params.integralrollback != null and params.integralrollback !=''">
,INTEGRALROLLBACK=#{params.integralrollback}
</if>
where ORDERID = #{params.orderId} AND USERJOBNUMBER= #{params.serverOperationId}
</update>
<update id="updatecafterConpleteStatus" parameterType="java.util.HashMap">
update CAFTER_TABLE
set COMPLETESTATUS=#{params.completeStatus}
where ORDERID = #{params.orderId}
</update>
<insert id="addcafter" parameterType="java.util.HashMap">
insert into CAFTER_TABLE(ID,
ACARNO,
USERID,
CAFTERTIME,
USERJOBNUMBER,
TRIMINTEGRAL,
INTEGRATIONLISTID,
ORDERID,CONTENT) values (#{params.maxId},#{params.acarNo},#{params.userId},
<if test="params.DBTYPE == 1">
dateadd(day,0,#{params.cafterTime}),
</if>
<if test="params.DBTYPE == 2">
TO_DATE(#{params.cafterTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 3">
TO_DATE(#{params.cafterTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 4">
STR_TO_DATE(#{params.cafterTime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.userJobnumber}, #{params.trimintegral},#{params.integrationListId},#{params.orderId},#{params.content})
</insert>
</mapper>

@ -0,0 +1,17 @@
package com.nmgs.mapperset.oraclemapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface IntegralLeavingMapper {
/**
*
* @param param
* @return
*/
public int addIntegralLeaving(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,27 @@
<?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="com.nmgs.mapperset.oraclemapper.IntegralLeavingMapper">
<insert id="addIntegralLeaving" parameterType="java.util.HashMap">
insert into INTEGRAL_LEAVEMESSAGE_TABLE(ID,USERID,POSITION,MESSAGE,CREATETIME,REPLYSTATUS)
values(#{params.maxId},(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID=#{params.openId}),
#{params.positon},#{params.message},
<if test="params.DBTYPE == 1">
dateadd(day,0,#{params.currentDate}),
</if>
<if test="params.DBTYPE == 2">
TO_DATE(#{params.currentDate}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 3">
TO_DATE(#{params.currentDate}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 4">
STR_TO_DATE(#{params.currentDate}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.replyStatus})
</insert>
</mapper>

@ -0,0 +1,23 @@
package com.nmgs.mapperset.oraclemapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface IntegralSignMapper {
/**
*
* @param param
* @return
*/
public int addIntegralSign(@Param("params") Map<String,Object> param);
/**
*
* @param param
* @return
*/
public int updateIntegralSign(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,18 @@
<?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="com.nmgs.mapperset.oraclemapper.IntegralSignMapper">
<insert id="addIntegralSign" parameterType="java.util.HashMap">
insert into INTEGRAL_SIGN_TABLE(USERID,MONTH,DAY${params.dayvalue})
values((SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID=#{params.openId}),
#{params.month},'Y')
</insert>
<update id="updateIntegralSign" parameterType="java.util.HashMap">
UPDATE INTEGRAL_SIGN_TABLE set Day${params.dayvalue}='Y' where USERID=(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID=#{params.openId})
AND MONTH=#{params.month}
</update>
</mapper>

@ -0,0 +1,17 @@
package com.nmgs.mapperset.oraclemapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface IntegrationListMapper {
/**
*
* @param param
* @return
*/
public int addIntegralList(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,34 @@
<?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="com.nmgs.mapperset.oraclemapper.IntegrationListMapper">
<insert id="addIntegralList" parameterType="java.util.HashMap">
INSERT INTO integration_list_table ( ID, USERID,ACARNO, LASTINTEGRATION,
<if test="params.totalintegration != null and params.totalintegration !=''">
TOTALADDINTEGRATION,
</if>
PAYINTEGRATION, RESTINTEGRATION,
PAYTIME, PAYTYPE,CPENABLEINTEGRATION,OGENABLEINTEGRATION )
values(#{params.maxid},#{params.userId},#{params.acarNo},#{params.lastintegration},
<if test="params.totalintegration != null and params.totalintegration !=''">
#{params.totalintegration},
</if>
#{params.payintegration},#{params.restintegration},
<if test="params.DBTYPE == 1">
dateadd(day,0,#{params.payTime}),
</if>
<if test="params.DBTYPE == 2">
TO_DATE(#{params.payTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 3">
TO_DATE(#{params.payTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 4">
STR_TO_DATE(#{params.payTime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.paytype},#{params.cpenableintegration},#{params.ogenableintegration})
</insert>
</mapper>

@ -1,52 +1,55 @@
package com.nmgs.mapper;
package com.nmgs.mapperset.oraclemapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.nmgs.entity.ServiceAreaOperators;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
//@Mapper
public interface OperatorsMapper extends MppBaseMapper<ServiceAreaOperators> {
/**
*
*
* @param page
* @param params
* @return
*/
Page<ServiceAreaOperators> getOperatorsList(Page<ServiceAreaOperators> page, @Param("params")Map<String, Object> params);
Page<ServiceAreaOperators> getOperatorsList(Page<ServiceAreaOperators> page, @Param("params") Map<String, Object> params);
/**
*
*
* @return
*/
List<Map<String,Object>> selectRoleListList();
List<Map<String, Object>> selectRoleListList();
/**
*
*
* @return
*/
List<Map<String,Object>> selectServiceAreaList();
List<Map<String, Object>> selectServiceAreaList();
/**
* id
*
* @return
*/
Integer getMaxId();
/**
*
*
* @return
*/
List<ServiceAreaOperators> getOperationByJobNumber(@Param("jobNumber")String jobNumber);
List<ServiceAreaOperators> getOperationByJobNumber(@Param("jobNumber") String jobNumber);
}

@ -2,22 +2,22 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nmgs.mapper.OperatorsMapper">
<mapper namespace="com.nmgs.mapperset.oraclemapper.OperatorsMapper">
<select id="getOperatorsList" parameterType="java.util.HashMap" resultType="com.nmgs.entity.ServiceAreaOperators">
SELECT
oper.ID,
oper.JOBNUMBER,
oper.JOBNUMBERINFO,
oper.ROLEID,
oper.SERVICEAREAID,
oper.USERNAME,
oper.PASSWORD,
r.VALUE as roleName,
area.AREANAME as serviceAreaName
oper.ID,
oper.JOBNUMBER,
oper.JOBNUMBERINFO,
oper.ROLEID,
oper.SERVICEAREAID,
oper.USERNAME,
oper.PASSWORD,
r.VALUE as roleName,
area.AREANAME as serviceAreaName
FROM
service_area_operators_table oper
service_area_operators_table oper
LEFT JOIN service_area_table area on area.ID = oper.SERVICEAREAID
LEFT JOIN service_area_operators_role_text r on r.ID = oper.ROLEID
<where>
@ -44,38 +44,40 @@
</select>
<select id="selectRoleListList" resultType="java.util.HashMap">
SELECT * FROM service_area_operators_role_text sub order by sub.ID
SELECT *
FROM service_area_operators_role_text sub
order by sub.ID
</select>
<select id="selectServiceAreaList" resultType="java.util.HashMap">
SELECT area.ID,area.AREANAME FROM SERVICE_AREA_TABLE area order by area.ID
SELECT area.ID, area.AREANAME
FROM SERVICE_AREA_TABLE area
order by area.ID
</select>
<select id="getMaxId" resultType="java.lang.Integer">
SELECT MAX(ID) FROM service_area_operators_table
<select id="getMaxId" resultType="java.lang.Integer">
SELECT MAX(ID)
FROM service_area_operators_table
</select>
<select id="getOperationByJobNumber" resultType="com.nmgs.entity.ServiceAreaOperators">
SELECT
oper.ID,
oper.JOBNUMBER,
oper.JOBNUMBERINFO,
oper.ROLEID,
oper.SERVICEAREAID,
oper.USERNAME,
oper.PASSWORD,
r.VALUE as roleName,
area.AREANAME as serviceAreaName,
saoc.INPUTMENEY AS inputMeney
FROM
service_area_operators_table oper
LEFT JOIN service_area_table area on area.ID = oper.SERVICEAREAID
LEFT JOIN service_area_operators_role_text r on r.ID = oper.ROLEID
LEFT JOIN SERVICE_AREA_OPERATORS_COMPANY_TEXT saoc on saoc.ID = oper.COMPANYID
where JOBNUMBER=#{jobNumber}
<select id="getOperationByJobNumber" resultType="com.nmgs.entity.ServiceAreaOperators">
SELECT oper.ID,
oper.JOBNUMBER,
oper.JOBNUMBERINFO,
oper.ROLEID,
oper.SERVICEAREAID,
oper.USERNAME,
oper.PASSWORD,
r.VALUE as roleName,
area.AREANAME as serviceAreaName,
saoc.INPUTMENEY AS inputMeney
FROM service_area_operators_table oper
LEFT JOIN service_area_table area on area.ID = oper.SERVICEAREAID
LEFT JOIN service_area_operators_role_text r on r.ID = oper.ROLEID
LEFT JOIN SERVICE_AREA_OPERATORS_COMPANY_TEXT saoc on saoc.ID = oper.COMPANYID
where JOBNUMBER = #{jobNumber}
</select>

@ -0,0 +1,29 @@
package com.nmgs.mapperset.oraclemapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface UserTableMapper {
/**
*
* @param param
* @return
*/
public int addUser(@Param("params") Map<String,Object> param);
/**
*
* @return
*/
public int updateUser(@Param("params") Map<String,Object> param);
/**
*
* @return
*/
public int updateUserById(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,61 @@
<?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="com.nmgs.mapperset.oraclemapper.UserTableMapper">
<update id="updateUser" parameterType="java.util.HashMap">
update WEIXN_USER_TABLE set CERTIFICATION=#{params.certification} ,NUMBERPICNAME=#{params.filename}
<if test="params.phone != null and params.phone !=''">
,phone=#{params.phone}
</if>
<if test="params.realName != null and params.realName !=''">
,REALNAME=#{params.realName}
</if>
<if test="params.idNumber != null and params.idNumber !=''">
,IDNUMBER=#{params.idNumber}
</if>
<if test="params.DBTYPE == 1">
,CREATETIME &lt;= dateadd(day,0,#{params.createTime})
</if>
<if test="params.DBTYPE == 2">
,CREATETIME= TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 3">
,CREATETIME= TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 4">
,CREATETIME= STR_TO_DATE(#{params.createTime}, '%Y-%m-%d %H:%i:%s')
</if>
where OPENID=#{params.openid}
</update>
<insert id="addUser">
insert into WEIXN_USER_TABLE(ID,OPENID,USERNAME,CREATETIME,ENABLEINTEGRATION,STARLEVEL,OILENABLEINTEGRATION,GASENABLEINTEGRATION,
SPENABLEINTEGRATION,CAFENABLEINTEGRATION,CERTIFICATION,OGENABLEINTEGRATION,CPENABLEINTEGRATION,REFERRERCODE)
values(#{params.userid},#{params.openid},#{params.username}
<if test="params.DBTYPE == 1">
,dateadd(day,0,#{params.createTime})
</if>
<if test="params.DBTYPE == 2">
,TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 3">
,TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 4">
,STR_TO_DATE(#{params.createTime}, '%Y-%m-%d %H:%i:%s')
</if>
,0,0,0,0,0,0,0,0,0,#{params.REFERRERCODE})
</insert>
<update id="updateUserById" parameterType="java.util.HashMap">
update WEIXN_USER_TABLE SET
<if test="params.enabledTICp !='' and params.enabledTICp != null">
CPENABLEINTEGRATION=#{params.enabledTICp},
</if>
<if test="params.enabledTIOG !='' and params.enabledTIOG != null">
OGENABLEINTEGRATION=#{params.enabledTIOG},
</if>
ENABLEINTEGRATION= #{params.enabledTI}
where OPENID=#{params.userId}
</update>
</mapper>

@ -0,0 +1,28 @@
package com.nmgs.mapperset.oraclemapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
//@Mapper
public interface UserVehicleMapper {
/**
*
* @param param
* @return
*/
public int addUserVehicle(@Param("params") Map<String,Object> param);
/**
*
* @param param
* @return
*/
public int updateUserVehicle(@Param("params") Map<String,Object> param);
/**
*
* @return
*/
public int delUserVehcile(@Param("params") Map<String,Object> param);
}

@ -0,0 +1,86 @@
<?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="com.nmgs.mapperset.oraclemapper.UserVehicleMapper">
<update id="updateUserVehicle" parameterType="java.util.HashMap">
update user_vehicle_table
set CERTIFICATION=#{params.certification}
<if test="params.cancelTime != null and params.cancelTime !=''">
<if test="params.DBTYPE == 1">
,CANCELTIME = dateadd(day,0,#{params.cancelTime})
</if>
<if test="params.DBTYPE == 2">
,CANCELTIME= TO_DATE(#{params.cancelTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 3">
,CANCELTIME= TO_DATE(#{params.cancelTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 4">
,CANCELTIME= STR_TO_DATE(#{params.cancelTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<if test="params.createTime != null and params.createTime !=''">
<if test="params.DBTYPE == 1">
,CREATETIME = dateadd(day,0,#{params.createTime})
</if>
<if test="params.DBTYPE == 2">
,CREATETIME= TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 3">
,CREATETIME= TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss')
</if>
<if test="params.DBTYPE == 4">
,CREATETIME= STR_TO_DATE(#{params.createTime}, '%Y-%m-%d %H:%i:%s')
</if>
</if>
<if test="params.licensepic != null and params.licensepic !=''">
,LICENSEPICNAME=#{params.licensepic}
</if>
<if test="params.permitpic != null and params.permitpic !=''">
,PERMITPICNAME=#{params.permitpic}
</if>
<if test="params.vehiclePic != null and params.vehiclePic !=''">
,VEHICLEPICNAME=#{params.vehiclePic}
</if>
<if test="params.referrerCode != null and params.referrerCode !=''">
,REFERRERCODE=#{params.referrerCode}
</if>
<if test="params.checkName != null and params.checkName !=''">
,CHECKUSERNAME=#{params.checkName}
</if>
<if test="params.checkUserNumber != null and params.checkUserNumber !=''">
,CHECKUSERNUMBER=#{params.checkUserNumber}
</if>
where USERID=#{params.userId} AND ACARNO=#{params.aCarNo}
<if test="params.commonCondition !=null and params.commonCondition !=''">
AND ${params.commonCondition}
</if>
</update>
<insert id="addUserVehicle" parameterType="java.util.HashMap">
insert into user_vehicle_table(USERID,ACARNO,CREATETIME,CERTIFICATION)
values((SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID=#{params.openid}),#{params.aCarNo},
<if test="params.DBTYPE == 1">
dateadd(day,0,#{params.createTime}),
</if>
<if test="params.DBTYPE == 2">
TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 3">
TO_DATE(#{params.createTime}, 'YYYY-MM-DD HH24:mi:ss'),
</if>
<if test="params.DBTYPE == 4">
STR_TO_DATE(#{params.createTime}, '%Y-%m-%d %H:%i:%s'),
</if>
#{params.certification})
</insert>
<delete id="delUserVehcile" parameterType="java.util.HashMap">
delete from user_vehicle_table where USERID=#{params.userId} AND ACARNO=#{params.aCarNo}
<if test="params.commonCondition !=null and params.commonCondition !=''">
AND ${params.commonCondition}
</if>
</delete>
</mapper>

@ -1,59 +0,0 @@
package com.nmgs.service;
import com.alibaba.fastjson.JSONArray;
import com.nmgs.entity.PayIntegrationNumber;
import java.util.List;
import java.util.Map;
public interface IPayIntegrationNumberService {
/**
*
* @return
*/
List<PayIntegrationNumber> getPayIntegrationNumberList();
/**
*
* @param payIntegrationNumber
* @return
*/
int savePayIntegrationNumber(List<PayIntegrationNumber> payIntegrationNumber);
/**
*
* @param params
* @return
*/
JSONArray getIntegrationGrowTotal(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String,Object>> getCarIntegrationGrowTotal(Map<String, Object> params);
/**
*
* @param params
* @return
*/
Map<String,Object> getMonthFeeTotal(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String,Object>> getFeeTypeTotal(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String,Object>> getMileScoreType(Map<String, Object> params);
}

@ -3,18 +3,27 @@ package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.entity.Consistant;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.mapperset.mysqlmapper.AppointmentInfoMyMapper;
import com.nmgs.mapperset.mysqlmapper.CafterTableMyMapper;
import com.nmgs.mapperset.mysqlmapper.IntegrationListMyMapper;
import com.nmgs.mapperset.mysqlmapper.UserTableMysqlMapper;
import com.nmgs.mapperset.oraclemapper.AppointmentInfoMapper;
import com.nmgs.mapperset.oraclemapper.CafterTableMapper;
import com.nmgs.mapperset.oraclemapper.IntegrationListMapper;
import com.nmgs.mapperset.oraclemapper.UserTableMapper;
import com.nmgs.service.AppointmentInfoService;
import com.nmgs.service.UserTableService;
import com.nmgs.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.*;
@ -34,6 +43,53 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
public void setMessagePushServiceImpl(MessagePushServiceImpl messagePushServiceImpl) {
this.messagePushServiceImpl = messagePushServiceImpl;
}
public IntegrationListMapper integrationListMapper;
@Autowired
public void setIntegrationListMapper(IntegrationListMapper integrationListMapper) {
this.integrationListMapper = integrationListMapper;
}
public IntegrationListMyMapper integrationListMyMapper;
@Autowired
public void setIntegrationListMyMapper(IntegrationListMyMapper integrationListMyMapper) {
this.integrationListMyMapper = integrationListMyMapper;
}
public UserTableMapper userTableMapper;
@Autowired
public void setUserTableMapper(UserTableMapper userTableMapper) {
this.userTableMapper = userTableMapper;
}
public UserTableMysqlMapper userTableMyMapper;
@Autowired
public void setUserTableMyMapper(UserTableMysqlMapper userTableMapper) {
this.userTableMyMapper = userTableMapper;
}
public UserTableMysqlMapper userTableMysqlMapper;
@Autowired
public void setUserTableMysqlMapper(UserTableMysqlMapper userTableMysqlMapper) {
this.userTableMysqlMapper = userTableMysqlMapper;
}
public CafterTableMapper cafterTableMapper;
@Autowired
public void setCafterTableMapper(CafterTableMapper cafterTableMapper) {
this.cafterTableMapper = cafterTableMapper;
}
public CafterTableMyMapper cafterTableMyMapper;
@Autowired
public void setCafterTableMyMapper(CafterTableMyMapper cafterTableMyMapper) {
this.cafterTableMyMapper = cafterTableMyMapper;
}
public AppointmentInfoMyMapper appointmentInfoMyMapper;
@Autowired
public void setAppointmentInfoMyMapper(AppointmentInfoMyMapper appointmentInfoMyMapper) {
this.appointmentInfoMyMapper = appointmentInfoMyMapper;
}
public AppointmentInfoMapper appointmentInfoMapper;
@Autowired
public void setAppointmentInfoMapper(AppointmentInfoMapper appointmentInfoMapper) {
this.appointmentInfoMapper = appointmentInfoMapper;
}
private static String sql="SELECT\n" +
"\tROWNUM AS num,\n" +
"\tait.ID,\n" +
@ -262,7 +318,7 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
}
@Override
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Transactional(value = "jtatransactionManager",timeout = 100)
public JSONObject commit(String openId,String appointmentType,
String appointmentId,String aCarNo,
String serviceId,String operatorId,
@ -271,7 +327,6 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
JSONObject retJo=new JSONObject();
String ret="-2";// -1 代表接口处理失败 1 处理成功 2 用户不存在 3 兑换积分大于用户可用积分 4 二维码信息过期 5 商户不存在 6 积分类型与消费方式不匹配 7 商户角色未设置 8 用户已冻结
String jobNumber = "";//商户工号
try{
String currentDate=PubTools.getCurrentDate();
if("2".equals(appointmentType)) {//餐饮预约需要扣除积分
Map<String, String> mapMealId = new HashMap<String, String>();
@ -294,28 +349,15 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
}
double discountMoney = PubTools.isNull(mealTotalMoney)?0.0:Double.parseDouble(mealTotalMoney);
double rebateIntegrateSave = 0.0;
//查询预约的套餐总金额,由于可以多选和数量,所以需要遍历
/* if (!PubTools.isNull(mealId)) {
String[] spliMeal = mealId.split(",");
String[] splitCount = mealIdCount.split(",");
for (int k = 0; k < spliMeal.length; k++) {
mapMealId.put(spliMeal[k], splitCount[k]);
String mealSql = "select tt.MEALPRICE AS TOTALMONEY from SERVICE_AREA_OPERATION_MEAL_TABLE tt where tt.ID =" + spliMeal[k];
Map<String, Object> select = this.mapperI.select(mealSql);
discountMoney += PubTools.isEmpty(select.get("TOTALMONEY")) ? 0.0 : Double.parseDouble(select.get("TOTALMONEY").toString()) * Integer.parseInt(splitCount[k]);
}
}*/
retJo.put("ENABLEINTEGRATIONBEFORE", PubTools.doubleSave1(Double.parseDouble(CPENABLEINTEGRATION)));
String sqlFc = sqlTemp.replace("@TYPE@", "FC");//查询餐饮的兑换比例
List selectforlistFc = this.mapperI.selectforlist(sqlFc);
//判断兑换积分是否够本次折扣
int rebateInFc = 1;
if (selectforlistFc.size() > 0) {
if (!selectforlistFc.isEmpty()) {
Map<String, Object> o = (Map<String, Object>) selectforlistFc.get(0);
BigDecimal bd = BigDecimal.valueOf(Double.parseDouble(o.get("VALUE").toString()));
bd = bd.setScale(1, BigDecimal.ROUND_HALF_UP);
bd = bd.setScale(1, RoundingMode.HALF_UP);
rebateInFc = bd.intValue();
}
//根据折扣金额计算积分
@ -332,7 +374,6 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
rebateIntegrateSave = rebateIntegrateIFcZK;
retJo.put("PAYINTEGRAL", rebateIntegrateIFcZK);
}
String serivceOperatorRole = "SELECT saot.ID,saot.USERNAME,saot.ROLEID,saot.JOBNUMBER,saot.SERVICEAREAID FROM SERVICE_AREA_OPERATORS_TABLE saot" +
" WHERE saot.ID=" + operatorId + "";
List serviceOperatorList = this.mapperI.selectforlist(serivceOperatorRole);
@ -342,39 +383,21 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
}
String integralListId = "";//积分流水的ID
String enabledIntegral = "";//本次消费之后,剩余的餐饮积分
// if (serviceforlist != null && serviceforlist.size() > 0) {
double restEnabled = Double.parseDouble(ENABLEINTEGRATION);
double lastEnabled = Double.parseDouble(ENABLEINTEGRATION);
double cpEnabled = Double.parseDouble(CPENABLEINTEGRATION);
// for (int k = 0; k < serviceforlist.size(); k++) {
// Map<String, Object> oTemp = (Map<String, Object>) serviceforlist.get(k);
//String serverOperationId = oTemp.get("JOBNUMBER").toString();
/*String serverOperationId = operatorId;
String mealIds = oTemp.get("MEALIDS").toString();//按照服务区分组的套餐ID
String mealPrices = oTemp.get("MEALPRICES").toString();//按照服务区分组的套餐ID
String[] splitMeal = mealIds.split(",");
String[] splitMealPrice = mealPrices.split(",");
double totalConsumeMoney = 0.0;
for (int H = 0; H < splitMeal.length; H++) {
System.out.println("splitMeal[H]===="+splitMeal[H]);
String sMealCount = mapMealId.get(splitMeal[H]);
double sMealPrice = Double.parseDouble(splitMealPrice[H]);
totalConsumeMoney += Integer.parseInt(sMealCount) * sMealPrice;
}*/
//double consumeInteger = totalConsumeMoney * rebateInFc;
double consumeInteger = rebateIntegrateIFcZK;
//1、积分流水记录新加
String sqlMax = "select COALESCE(max(ID),0) AS ID from integration_list_table";
List selectforlistMax = this.mapperI.selectforlist(sqlMax);
int maxId = 1;
if (selectforlistMax.size() > 0) {
Map<String, Object> o = (Map<String, Object>) selectforlistMax.get(0);
maxId = Integer.parseInt(o.get("ID").toString());
}
restEnabled = restEnabled - consumeInteger;
cpEnabled = cpEnabled - consumeInteger;
String cafterSql = "INSERT INTO integration_list_table ( ID, USERID, LASTINTEGRATION, PAYINTEGRATION, RESTINTEGRATION, PAYTIME, PAYTYPE,OGENABLEINTEGRATION,CPENABLEINTEGRATION )\n" +
double restEnabled = Double.parseDouble(ENABLEINTEGRATION);
double lastEnabled = Double.parseDouble(ENABLEINTEGRATION);
double cpEnabled = Double.parseDouble(CPENABLEINTEGRATION);
double consumeInteger = rebateIntegrateIFcZK;
//1、积分流水记录新加
String sqlMax = "select COALESCE(max(ID),0) AS ID from integration_list_table";
List selectforlistMax = this.mapperI.selectforlist(sqlMax);
int maxId = 1;
if (selectforlistMax.size() > 0) {
Map<String, Object> o = (Map<String, Object>) selectforlistMax.get(0);
maxId = Integer.parseInt(o.get("ID").toString());
}
restEnabled = restEnabled - consumeInteger;
cpEnabled = cpEnabled - consumeInteger;
/* String cafterSql = "INSERT INTO integration_list_table ( ID, USERID, LASTINTEGRATION, PAYINTEGRATION, RESTINTEGRATION, PAYTYPE,PAYTIME ,OGENABLEINTEGRATION,CPENABLEINTEGRATION )\n" +
"VALUES\n" +
"\t(\n" +
"\t\t" + (maxId + 10) + ",\n" +
@ -382,91 +405,134 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
"\t\t" + PubTools.doubleSave1(lastEnabled * 100) + ",\n" +
"\t\t" + PubTools.doubleSave1(consumeInteger * 100) + ",\n" +
"\t\t" + PubTools.doubleSave1((restEnabled * 100)) + ",\n" +
"\t\tto_date('" + rollbackTime + "','yyyy-MM-dd HH24:mi:ss'),\n" +
"\t'FCA', \n";
if ("4".equals(DBType)) {
cafterSql = "INSERT INTO integration_list_table ( ID, USERID, LASTINTEGRATION, PAYINTEGRATION, RESTINTEGRATION, PAYTIME, PAYTYPE,OGENABLEINTEGRATION,CPENABLEINTEGRATION )\n" +
"VALUES\n" +
"\t(\n" +
"\t\t" + (maxId + 10) + ",\n" +
"\t\t" + userIdNew + ",\n" +
"\t\t" + PubTools.doubleSave1(lastEnabled * 100) + ",\n" +
"\t\t" + PubTools.doubleSave1(consumeInteger * 100) + ",\n" +
"\t\t" + PubTools.doubleSave1((restEnabled * 100)) + ",\n" +
"\t\tstr_to_date('" + rollbackTime + "','%Y-%m-%d %H:%i:%s'),\n" +
"\t'FCA', \n";
}
"\t'FCA', \n";
if ("2".equals(DBType)) {
cafterSql += "\t\tto_date('" + rollbackTime + "','yyyy-MM-dd HH24:mi:ss'),\n";
} else if ("4".equals(DBType)) {
cafterSql += "\t\tstr_to_date('" + rollbackTime + "','%Y-%m-%d %H:%i:%s'),\n";
}
cafterSql += "\t" + PubTools.doubleSave1(((Double.parseDouble(OGENABLEINTEGRATION)) * 100)) + ", \n" +
"\t" + PubTools.doubleSave1(cpEnabled * 100) + " ";
cafterSql += "\t)";
this.mapperI.insert(cafterSql);*/
cafterSql += "\t" + PubTools.doubleSave1(((Double.parseDouble(OGENABLEINTEGRATION)) * 100)) + ", \n" +
"\t" + PubTools.doubleSave1(cpEnabled * 100) + " ";
cafterSql += "\t)";
this.mapperI.insert(cafterSql);
lastEnabled = lastEnabled - consumeInteger;
if (PubTools.isNull(integralListId)) {
integralListId = (maxId + 10) + "";
} else {
integralListId += "," + (maxId + 10);
}
LogUtil.WriteLog_Info("积分核减=====积分流水已插入", "ApponintmentInfoServiceImpl");
//2、新加一条消费记录
String sqlIntegralList = "insert into CAFTER_TABLE(ID,\n" +
"ACARNO,\n" +
"USERID,\n" +
"CAFTERTIME,\n" +
"USERJOBNUMBER,\n" +
"TRIMINTEGRAL," +
"INTEGRATIONLISTID,\n" +
"ORDERID) values (\n" +
" (select COALESCE(max(t.ID),0)+1 from CAFTER_TABLE t),''," +
"" + userIdNew + ",to_date('" + rollbackTime + "','yyyy-MM-dd HH24:mi:ss'),'" + jobNumber + "','SUCCESS'," + (maxId + 10) + ",'" + operatorId + "'" +
")";
if ("4".equals(DBType)) {
sqlIntegralList = "insert into CAFTER_TABLE(ID,\n" +
"ACARNO,\n" +
"USERID,\n" +
"CAFTERTIME,\n" +
"USERJOBNUMBER,\n" +
"TRIMINTEGRAL," +
"INTEGRATIONLISTID,\n" +
"ORDERID) values (\n" +
" (select COALESCE(max(t.ID),0)+1 from CAFTER_TABLE t),''," +
"" + userIdNew + ",str_to_date('" + rollbackTime + "','%Y-%m-%d %H:%i:%s'),'" + jobNumber + "','SUCCESS'," + (maxId + 10) + ",'" + jobNumber + "'" +
")";
}
this.mapperI.insert(sqlIntegralList);
LogUtil.WriteLog_Info("积分核减=====消费记录已插入", "ApponintmentInfoServiceImpl");
// }
Map<String,Object> integralList = new HashMap<>();
integralList.put("maxid",(maxId + 10));
integralList.put("userId",userIdNew);
integralList.put("acarNo","");
integralList.put("lastintegration",PubTools.doubleSave1(Double.parseDouble(ENABLEINTEGRATION) * 100));
integralList.put("payintegration",PubTools.doubleSave1(rebateIntegrateSave * 100));
integralList.put("restintegration",PubTools.doubleSave1(((Double.parseDouble(ENABLEINTEGRATION) - rebateIntegrateSave) * 100)));
integralList.put("payTime",rollbackTime);
integralList.put("paytype","FCA");
integralList.put("DBTYPE",DBType);
integralList.put("cpenableintegration",PubTools.doubleSave1(cpEnabled * 100));
integralList.put("ogenableintegration", PubTools.doubleSave1(((Double.parseDouble(OGENABLEINTEGRATION)) * 100)));
this.integrationListMapper.addIntegralList(integralList);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
integralList.put("DBTYPEBAK",bakDBType);
this.integrationListMyMapper.addIntegralList(integralList);
}
LogUtil.WriteLog_Info("餐饮预约=====积分流水已插入", "ApponintmentInfoServiceImpl");
//2、新加一条消费记录
String currentDate1 = PubTools.getCurrentDateNoStr().replace("-","").trim()+PubTools.getlinkNo();
String sqlTemp2 = "insert into APPOINTMENT_INFO_TABLE(ID,USERID,ACARNO,APPOINTMENTTYPE,APPOINTMENTTIME,APPOINTMENTLINEID,CREATETIME,SERVICEAREAID,MEALS,MEALSCOUNT,COMPLETESTATUS,INTEGRATIONLISTID,SERVICEOPERATIONID,TOTALINTEGRAL,ORDERID) " +
" values((SELECT COALESCE(MAX(ID),0)+1 FROM APPOINTMENT_INFO_TABLE ),(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='" + openId + "'),'" + aCarNo + "'," + Integer.parseInt(appointmentType) + ",to_date('" + dateTime + "','YYYY-MM-DD HH24:MI:SS')," + (PubTools.isNull(appointmentId) ? -1 : appointmentId) + ",to_date('" + currentDate + "','YYYY-MM-DD HH24:MI:SS')," + (PubTools.isNull(serviceId) ? -1 : serviceId) + ",'" + mealId + "','" + mealIdCount + "','N','" + integralListId + "',"+operatorId+",'"+mealTotalMoney+"','"+currentDate1+"') ";
if ("4".equals(DBType)) {
sqlTemp2 = "insert into APPOINTMENT_INFO_TABLE(ID,USERID,ACARNO,APPOINTMENTTYPE,APPOINTMENTTIME,APPOINTMENTLINEID,CREATETIME,SERVICEAREAID,MEALS,MEALSCOUNT,COMPLETESTATUS,INTEGRATIONLISTID,SERVICEOPERATIONID,TOTALINTEGRAL,ORDERID) " +
" values((SELECT COALESCE(MAX(t.ID),0)+1 FROM APPOINTMENT_INFO_TABLE t),(SELECT ID FROM WEIXN_USER_TABLE tt WHERE tt.OPENID='" + openId + "'),'" + aCarNo + "'," + Integer.parseInt(appointmentType) + ",str_to_date('" + dateTime + "','%Y-%m-%d %H:%i:%s')," + (PubTools.isNull(appointmentId) ? -1 : appointmentId) + ",str_to_date('" + currentDate + "','%Y-%m-%d %H:%i:%s')," + (PubTools.isNull(serviceId) ? -1 : serviceId) + ",'" + mealId + "','" + mealIdCount + "','N','" + integralListId + "',"+operatorId+",'"+mealTotalMoney+"','"+currentDate1+"') ";
String maxIdCafeSql="select COALESCE(max(t.ID),0)+1 as ID from CAFTER_TABLE t";
List maxIdCafeSqlMax = this.mapperI.selectforlist(maxIdCafeSql);
int maxIdCafe = 1;
if (!maxIdCafeSqlMax.isEmpty()) {
Map<String, Object> o = (Map<String, Object>) maxIdCafeSqlMax.get(0);
maxIdCafe = Integer.parseInt(o.get("ID").toString());
}
Map<String,Object> cafetparam = new HashMap<>();
cafetparam.put("maxId",maxIdCafe);
cafetparam.put("acarNo","");
cafetparam.put("userId",userIdNew);
cafetparam.put("cafterTime",rollbackTime);
cafetparam.put("userJobnumber",jobNumber);
cafetparam.put("trimintegral","SUCCESS");
cafetparam.put("integrationListId",(maxId + 10));
cafetparam.put("orderId",currentDate1);
cafetparam.put("content",operatorId);
cafetparam.put("DBTYPE",DBType);
this.cafterTableMapper.addcafter(cafetparam);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
cafetparam.put("DBTYPEBAK",bakDBType);
this.cafterTableMyMapper.addcafter(cafetparam);
}
if (PubTools.isNull(integralListId)) {
integralListId = (maxId + 10) + "";
} else {
integralListId += "," + (maxId + 10);
}
this.mapperI.insert(sqlTemp2);
String maxIdAppSql="SELECT COALESCE(MAX(ID),0)+1 AS ID FROM APPOINTMENT_INFO_TABLE ";
List maxIdApps = this.mapperI.selectforlist(maxIdAppSql);
//判断兑换积分是否够本次折扣
int maxIdApp = 1;
if (!maxIdApps.isEmpty()) {
Map<String, Object> o = (Map<String, Object>) maxIdApps.get(0);
maxIdApp = Integer.parseInt(o.get("ID").toString());
}
Map<String,Object> appointparam = new HashMap<>();
appointparam.put("maxId",maxIdApp);
appointparam.put("acarno",aCarNo);
appointparam.put("userId","(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='" + openId + "')");
appointparam.put("appointmenttype",Integer.parseInt(appointmentType));
appointparam.put("appointtime",dateTime);
appointparam.put("appointmentlineid",(PubTools.isNull(appointmentId) ? -1 : appointmentId));
appointparam.put("createtime",currentDate);
appointparam.put("serviceareaId",(PubTools.isNull(serviceId) ? -1 : serviceId));
appointparam.put("meals",mealId);
appointparam.put("mealscount",mealIdCount);
appointparam.put("completeStatus","N");
appointparam.put("integrationListId",integralListId);
appointparam.put("serviceOperationId",operatorId+"");
appointparam.put("totalIntegral",mealTotalMoney);
appointparam.put("orderId",currentDate1);
appointparam.put("DBTYPE",DBType);
this.appointmentInfoMapper.addAppointmentInfo(appointparam);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
appointparam.put("DBTYPEBAK",bakDBType);
this.appointmentInfoMyMapper.addAppointmentInfo(appointparam);
}
LogUtil.WriteLog_Info("餐饮预约=====消费记录已插入", "ApponintmentInfoServiceImpl");
//3、计算用户可用积分
String sql = "select " +
" ut.ID ,ut.OPENID ,COALESCE(ut.ENABLEINTEGRATION,0) AS ENABLEINTEGRATION,COALESCE(ut.CPENABLEINTEGRATION,0) AS CPENABLEINTEGRATION,COALESCE(ut.OGENABLEINTEGRATION,0) AS OGENABLEINTEGRATION" +
" from WEIXN_USER_TABLE ut " +
" where 1=1 AND ut.OPENID='" + openId + "'";
List selectforlist1 = this.mapperI.selectforlist(sql);
if (selectforlist1.size() > 0) {
if (!selectforlist1.isEmpty()) {
Object objT = selectforlist1.get(0);
Map<String, Object> obj1T = (Map<String, Object>) objT;
Double enabledT = Double.parseDouble(obj1T.get("ENABLEINTEGRATION").toString());
double enabledT = Double.parseDouble(obj1T.get("ENABLEINTEGRATION").toString());
BigDecimal bd = BigDecimal.valueOf(enabledT - rebateIntegrateSave * 100);
bd = bd.setScale(1, BigDecimal.ROUND_HALF_UP);
bd = bd.setScale(1, RoundingMode.HALF_UP);
double enabledTI = bd.doubleValue();
Double enabledTCp = Double.parseDouble(obj1T.get("CPENABLEINTEGRATION").toString());
double enabledTCp = Double.parseDouble(obj1T.get("CPENABLEINTEGRATION").toString());
BigDecimal bdcp = BigDecimal.valueOf(enabledTCp - rebateIntegrateSave * 100);
bdcp = bdcp.setScale(1, BigDecimal.ROUND_HALF_UP);
bdcp = bdcp.setScale(1, RoundingMode.HALF_UP);
double enabledTICp = bdcp.doubleValue();
String sqlUpdate = "update WEIXN_USER_TABLE SET ENABLEINTEGRATION=" + enabledTI + " ,CPENABLEINTEGRATION=" + enabledTICp + " " +
" where 1=1 AND OPENID='" + openId + "'";
this.mapperI.update(sqlUpdate);
enabledIntegral = PubTools.doubleSave1(enabledTICp / 100) + "";
retJo.put("ENABLEINTEGRATION", enabledIntegral);
retJo.put("ORDERID", currentDate1);
Map<String,Object> userParams=new HashMap<String,Object>();
userParams.put("userId",openId);
userParams.put("enabledTI",enabledTI);
userParams.put("enabledTICp",enabledTICp);
userParams.put("DBTYPE",DBType);
this.userTableMapper.updateUserById(userParams);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
userParams.put("DBTYPEBAK",bakDBType);
this.userTableMyMapper.updateUserById(userParams);
}
LogUtil.WriteLog_Info("用户更新可用积分完成", "ApponintmentInfoServiceImpl");
}
@ -478,30 +544,49 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
//}
}else{
String currentDate1 = PubTools.getCurrentDate().replace("-","").trim()+PubTools.getlinkNo();
String sqlTemp2="insert into APPOINTMENT_INFO_TABLE(ID,USERID,ACARNO,APPOINTMENTTYPE,APPOINTMENTTIME,APPOINTMENTLINEID,CREATETIME,SERVICEAREAID,MEALS,MEALSCOUNT,COMPLETESTATUS,ORDERID) " +
/* String sqlTemp2="insert into APPOINTMENT_INFO_TABLE(ID,USERID,ACARNO,APPOINTMENTTYPE,APPOINTMENTTIME,APPOINTMENTLINEID,CREATETIME,SERVICEAREAID,MEALS,MEALSCOUNT,COMPLETESTATUS,ORDERID) " +
" values((SELECT COALESCE(MAX(ID),0)+1 FROM APPOINTMENT_INFO_TABLE ),(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='"+openId+"'),'"+aCarNo+"',"+Integer.parseInt(appointmentType)+",to_date('"+dateTime+"','YYYY-MM-DD HH24:MI:SS'),"+(PubTools.isNull(appointmentId)?-1:appointmentId)+",to_date('"+currentDate+"','YYYY-MM-DD HH24:MI:SS'),"+(PubTools.isNull(serviceId)?-1:serviceId)+",'"+mealId+"','"+mealIdCount+"','N','"+currentDate1+"') ";
if("4".equals(DBType)){
sqlTemp2="insert into APPOINTMENT_INFO_TABLE(ID,USERID,ACARNO,APPOINTMENTTYPE,APPOINTMENTTIME,APPOINTMENTLINEID,CREATETIME,SERVICEAREAID,MEALS,MEALSCOUNT,COMPLETESTATUS,ORDERID) " +
" values((SELECT COALESCE(MAX(t.ID),0)+1 FROM APPOINTMENT_INFO_TABLE t),(SELECT ID FROM WEIXN_USER_TABLE tt WHERE tt.OPENID='"+openId+"'),'"+aCarNo+"',"+Integer.parseInt(appointmentType)+",str_to_date('"+dateTime+"','%Y-%m-%d %H:%i:%s'),"+(PubTools.isNull(appointmentId)?-1:appointmentId)+",str_to_date('"+currentDate+"','%Y-%m-%d %H:%i:%s'),"+(PubTools.isNull(serviceId)?-1:serviceId)+",'"+mealId+"','"+mealIdCount+"','N','"+currentDate1+"') ";
}
this.mapperI.insert(sqlTemp2);
this.mapperI.insert(sqlTemp2);*/
String maxIdAppSql="SELECT COALESCE(MAX(ID),0)+1 AS ID FROM APPOINTMENT_INFO_TABLE ";
List maxIdApps = this.mapperI.selectforlist(maxIdAppSql);
//判断兑换积分是否够本次折扣
int maxIdApp = 1;
if (!maxIdApps.isEmpty()) {
Map<String, Object> o = (Map<String, Object>) maxIdApps.get(0);
maxIdApp = Integer.parseInt(o.get("ID").toString());
}
Map<String,Object> appointparam = new HashMap<>();
appointparam.put("maxId",maxIdApp);
appointparam.put("acarno",aCarNo);
appointparam.put("userId","(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='" + openId + "')");
appointparam.put("appointmenttype",Integer.parseInt(appointmentType));
appointparam.put("appointtime",dateTime);
appointparam.put("appointmentlineid",(PubTools.isNull(appointmentId) ? -1 : appointmentId));
appointparam.put("createtime",currentDate);
appointparam.put("serviceareaId",(PubTools.isNull(serviceId) ? -1 : serviceId));
appointparam.put("meals",mealId);
appointparam.put("mealscount",mealIdCount);
appointparam.put("completeStatus","M");
appointparam.put("integrationListId","");
appointparam.put("serviceOperationId",operatorId);
appointparam.put("totalIntegral",mealTotalMoney);
appointparam.put("orderId",currentDate1);
appointparam.put("DBTYPE",DBType);
this.appointmentInfoMapper.addAppointmentInfo(appointparam);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
appointparam.put("DBTYPEBAK",bakDBType);
this.appointmentInfoMyMapper.addAppointmentInfo(appointparam);
}
retJo.put("ORDERID", currentDate1);
}
ret="1";
retJo.put("ret",ret);
}catch (Exception e){
e.printStackTrace();
LogUtil.WriteLog_Error("预约记录提交失败===>"+e.getMessage(),"ApponintmentInfoServiceImpl");
ret="-1";
retJo.put("ret",ret);
//Consistant.map.remove(content);
retJo.put("code",-1);
retJo.put("msg","提交预约记录接口出错");
retJo.put("data","");
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return retJo;
}
return retJo;
}
@ -589,9 +674,7 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
// ja.add(jo);
}
}
//map.put("MEALINFO",ja);
}
//listRet.add(ja);
}else{
listRet=ret;
}
@ -662,25 +745,4 @@ public class ApponintmentInfoServiceImpl implements AppointmentInfoService {
return content;
}
/**
* O
*/
public void updateCompleteStastus() {
String selStr = "select t.id FROM APPOINTMENT_INFO_TABLE t WHERE t.COMPLETESTATUS='N'";
String sql = "update APPOINTMENT_INFO_TABLE set COMPLETESTATUS='O' WHERE COMPLETESTATUS='N'";
if ("2".equals(DBType)) {
selStr += " and t.APPOINTMENTTIME <to_date('" + PubTools.getCurrentDateYYD() + "','yyyy-MM-dd')";
sql += " and APPOINTMENTTIME <to_date('" + PubTools.getCurrentDateYYD() + "','yyyy-MM-dd')";
}
if ("4".equals(DBType)) {
selStr += " and t.APPOINTMENTTIME <str_to_date('" + PubTools.getCurrentDateYYD() + "','%Y-%m-%d')";
sql += " and APPOINTMENTTIME <str_to_date('" + PubTools.getCurrentDateYYD() + "','%Y-%m-%d')";
}
List selectforlist = this.mapperI.selectforlist(selStr);
if (selectforlist != null && selectforlist.size() > 0 && !PubTools.isEmpty(selectforlist.get(0))) {
this.mapperI.update(sql);
}
}
}

@ -1,7 +1,7 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PubTools;
import org.springframework.beans.factory.annotation.Autowired;

@ -1,16 +1,7 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PubTools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
@Service
public class ExcelDateImpl {

@ -1,6 +1,6 @@
package com.nmgs.service.impl;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.LogUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@ -1,7 +1,8 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.mapperset.mysqlmapper.IntegralLeavingMyMapper;
import com.nmgs.mapperset.oraclemapper.IntegralLeavingMapper;
import com.nmgs.service.IntegralLevelMessageService;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;
@ -9,13 +10,28 @@ import com.nmgs.util.PubTools;
import com.nmgs.util.SensitiveFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class IntegralLevelMessageServiceImpl implements IntegralLevelMessageService {
@Autowired
public Mapper mapperI;
public IntegralLeavingMapper integralLeavingMapper;
@Autowired
public void setIntegralLeavingMapper(IntegralLeavingMapper integralLeavingMapper) {
this.integralLeavingMapper = integralLeavingMapper;
}
public IntegralLeavingMyMapper integralLeavingMyMapper;
@Autowired
public void setIntegralLeavingMapper(IntegralLeavingMyMapper integralLeavingMapper) {
this.integralLeavingMyMapper = integralLeavingMapper;
}
private static String DBType=PropertiesUtil.getValue("DBType");
@Autowired
SensitiveFilter sensitiveFilter;
@ -66,23 +82,27 @@ public class IntegralLevelMessageServiceImpl implements IntegralLevelMessageServ
}
@Override
@Transactional(value = "jtatransactionManager",timeout = 10)
public int commit(String userId, String positon, String message) {
int ret=1;
try{
String currentDate=PubTools.getCurrentDate();
message = sensitiveFilter.replaceSensitiveWord(message);
String sql="insert into INTEGRAL_LEAVEMESSAGE_TABLE(ID,USERID,POSITION,MESSAGE,CREATETIME,REPLYSTATUS) " +
" values((SELECT NVL(MAX(ID),0)+1 FROM INTEGRAL_LEAVEMESSAGE_TABLE ),(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='"+userId+"'),'"+positon+"','"+message+"',to_date('"+currentDate+"','YYYY-MM-DD HH24:MI:SS'),'N') ";
if("4".equals(DBType)) {
sql="insert into INTEGRAL_LEAVEMESSAGE_TABLE(ID,USERID,POSITION,MESSAGE,CREATETIME,REPLYSTATUS) " +
" values((SELECT COALESCE(MAX(tt.ID),0)+1 FROM INTEGRAL_LEAVEMESSAGE_TABLE tt ),(SELECT t.ID FROM WEIXN_USER_TABLE t WHERE t.OPENID='"+userId+"'),'"+positon+"','"+message+"',str_to_date('"+currentDate+"','%Y-%m-%d %H:%i:%s'),'N') ";
}
this.mapperI.insert(sql);
}catch (Exception e){
LogUtil.WriteLog_Error("插入反馈记录失败===>"+e.getMessage(),"IntegralLevelMessageServiceImpl");
return ret=-1;
String sqlTemp="SELECT COALESCE(MAX(ID),0)+1 as MAXID FROM INTEGRAL_LEAVEMESSAGE_TABLE ";
Map<String, Object> select = this.mapperI.select(sqlTemp);
int maxId = Integer.parseInt(select.get("MAXID").toString());
Map<String,Object> params=new HashMap<>();
params.put("DBTYPE",DBType);
params.put("maxId",maxId);
params.put("openId",userId);
params.put("positon",positon);
params.put("message",message);
params.put("currentDate",currentDate);
params.put("replyStatus","N");
ret=integralLeavingMapper.addIntegralLeaving(params);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
params.put("DBTYPEBAK",bakDBType);
ret=integralLeavingMyMapper.addIntegralLeaving(params);
}
return ret;
}

@ -1,7 +1,7 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.service.UserTableService;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;

@ -2,8 +2,13 @@ package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.service.IntegralLevelMessageService;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.mapperset.mysqlmapper.IntegralSignMyMapper;
import com.nmgs.mapperset.mysqlmapper.IntegrationListMyMapper;
import com.nmgs.mapperset.mysqlmapper.UserTableMysqlMapper;
import com.nmgs.mapperset.oraclemapper.IntegralSignMapper;
import com.nmgs.mapperset.oraclemapper.IntegrationListMapper;
import com.nmgs.mapperset.oraclemapper.UserTableMapper;
import com.nmgs.service.IntegralSignService;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;
@ -14,6 +19,7 @@ import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -21,6 +27,41 @@ import java.util.Map;
public class IntegralSignServiceImpl implements IntegralSignService {
@Autowired
public Mapper mapperI;
public IntegralSignMapper integralSignMapper;
@Autowired
public void setIntegralSignMapper(IntegralSignMapper integralSignMapper) {
this.integralSignMapper = integralSignMapper;
}
public IntegralSignMyMapper integralSignMyMapper;
@Autowired
public void setIntegralSignMyMapper(IntegralSignMyMapper integralSignMapper) {
this.integralSignMyMapper = integralSignMapper;
}
/*
public IntegrationListMapper integrationListMapper;
@Autowired
public void setIntegrationListMapper(IntegrationListMapper integrationListMapper) {
this.integrationListMapper = integrationListMapper;
}
public IntegrationListMyMapper integrationListMyMapper;
@Autowired
public void setIntegrationListMyMapper(IntegrationListMyMapper integrationListMyMapper) {
this.integrationListMyMapper = integrationListMyMapper;
}
public UserTableMapper userTableMapper;
@Autowired
public void setUserTableMapper(UserTableMapper userTableMapper) {
this.userTableMapper = userTableMapper;
}
public UserTableMysqlMapper userTableMysqlMapper;
@Autowired
public void setUserTableMysqlMapper(UserTableMysqlMapper userTableMysqlMapper) {
this.userTableMysqlMapper = userTableMysqlMapper;
}*/
private static String DBType= PropertiesUtil.getValue("DBType");
private String sql="SELECT ist.USERID,\n" +
"ist.MONTH,\n" +
@ -97,36 +138,46 @@ public class IntegralSignServiceImpl implements IntegralSignService {
}
@Override
@Transactional(isolation = Isolation.READ_COMMITTED )
@Transactional(value = "jtatransactionManager",timeout = 50)
public int commit(String userId, String signDate) {
int ret=-1;
String currentDate = PubTools.getCurrentDate().substring(0,10);
//判断是否是当前日
if(!signDate.equals(currentDate)){
return ret =2;
return 2;
}
try{
//先查询人员本月是否有签到记录
String yM=signDate.substring(0,7);
String yM=signDate.substring(0,7);
String date=signDate.substring(8);
String sqlExists=sql+" AND ist.USERID=(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='"+userId+"') AND ist.MONTH ='"+yM+"' ";
List list= this.mapperI.selectforlist(sqlExists);
if(list.size()>0){//说明已经有签到记录
String sqlTemp="UPDATE INTEGRAL_SIGN_TABLE SET DAY"+date+" ='Y'" +
" where USERID=(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='"+userId+"') AND MONTH ='"+yM+"'";
this.mapperI.insert(sqlTemp);
Map<String,Object> paramsUpdate=new HashMap<>();
paramsUpdate.put("dayvalue",date);
paramsUpdate.put("openId",userId);
paramsUpdate.put("month",yM);
ret=integralSignMapper.updateIntegralSign(paramsUpdate);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
paramsUpdate.put("DBTYPEBAK",bakDBType);
ret=integralSignMyMapper.updateIntegralSign(paramsUpdate);
}
}else{
String sqlTemp="insert into INTEGRAL_SIGN_TABLE(USERID,MONTH) " +
" values((SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='"+userId+"'),'"+yM+"') ";
this.mapperI.insert(sqlTemp);
String sqlTempUpdate="UPDATE INTEGRAL_SIGN_TABLE SET DAY"+date+" ='Y'" +
" where USERID=(SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='"+userId+"') AND MONTH ='"+yM+"'";
this.mapperI.insert(sqlTempUpdate);
Map<String,Object> paramsUpdate=new HashMap<>();
paramsUpdate.put("dayvalue",date);
paramsUpdate.put("openId",userId);
paramsUpdate.put("month",yM);
ret=integralSignMapper.addIntegralSign(paramsUpdate);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
paramsUpdate.put("DBTYPEBAK",bakDBType);
ret=integralSignMyMapper.addIntegralSign(paramsUpdate);
}
}
//查询签到一次加多少积分
String signIntegral="SELECT COALESCE(VALUE,0) AS PAYINTEGRAL FROM PAY_INTEGRATION_NUMBER_TABLE WHERE TYPE='AS'";
/* String signIntegral="SELECT COALESCE(VALUE,0) AS PAYINTEGRAL FROM PAY_INTEGRATION_NUMBER_TABLE WHERE TYPE='AS'";
Map<String, Object> select = this.mapperI.select(signIntegral);
double payIntegral=Double.parseDouble(select.get("PAYINTEGRAL").toString()) ;
if(payIntegral>0.0){
@ -167,21 +218,25 @@ public class IntegralSignServiceImpl implements IntegralSignService {
OGENABLEINTEGRATION= PubTools.doubleSave1(OGENABLEINTEGRATION+payIntegral*0.6);
CPENABLEINTEGRATION= PubTools.doubleSave1(CPENABLEINTEGRATION+payIntegral*0.4);
String cafterSql="INSERT INTO integration_list_table ( ID, USERID, LASTINTEGRATION,TOTALADDINTEGRATION, PAYINTEGRATION, RESTINTEGRATION, PAYTIME, PAYTYPE,CPENABLEINTEGRATION,OGENABLEINTEGRATION )\n" +
"VALUES\n" +
"\t(\n" +
"\t\t"+(maxId+1)+",\n" +
"\t\t"+userMainId+"," +
"\t\t"+PubTools.doubleSave1(Double.parseDouble(ENABLEINTEGRATION))+",\n" +
"\t\t"+PubTools.doubleSave1(totalAddIntegral+payIntegral)+",\n" +
"\t\t"+PubTools.doubleSave1(payIntegral)+",\n" +
"\t\t"+PubTools.doubleSave1((Double.parseDouble(ENABLEINTEGRATION)+payIntegral))+",\n" +
"\t\tto_date('"+PubTools.getCurrentDate()+"','yyyy-MM-dd HH24:mi:ss'),\n" +
"\t'"+payType+"',\n" +
"\t'"+PubTools.doubleSave1(CPENABLEINTEGRATION)+"', \n" +
"\t'"+PubTools.doubleSave1(OGENABLEINTEGRATION)+"' \n" +
"\t)";
this.mapperI.insert(cafterSql);
Map<String,Object> integralListParams=new HashMap<>();
integralListParams.put("DBTYPE",DBType);
integralListParams.put("maxid",(maxId+1));
integralListParams.put("userId",userId);
integralListParams.put("lastintegration",PubTools.doubleSave1(Double.parseDouble(ENABLEINTEGRATION)));
integralListParams.put("totalintegration",PubTools.doubleSave1(totalAddIntegral+payIntegral));
integralListParams.put("payintegration",PubTools.doubleSave1(payIntegral));
integralListParams.put("restintegration",PubTools.doubleSave1((Double.parseDouble(ENABLEINTEGRATION)+payIntegral)));
integralListParams.put("payTime",PubTools.getCurrentDate());
integralListParams.put("payType",payType);
integralListParams.put("cpenableintegration",PubTools.doubleSave1(CPENABLEINTEGRATION));
integralListParams.put("ogenableintegration",PubTools.doubleSave1(OGENABLEINTEGRATION));
this.integrationListMapper.addIntegralList(integralListParams);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
integralListParams.put("DBTYPEBAK",bakDBType);
ret=integrationListMyMapper.addIntegralList(integralListParams);
}
LogUtil.WriteLog_Info("人员签到积分流水记录已插入","IntegralSignServiceImpl");
//3、计算用户可用积分
String sql="select " +
@ -206,19 +261,20 @@ public class IntegralSignServiceImpl implements IntegralSignService {
BigDecimal bdco = BigDecimal.valueOf(enabledTOG+payIntegral*0.6);
bdco = bdco.setScale(1, BigDecimal.ROUND_HALF_UP);
double enabledTIOG =bdco.doubleValue();
String sqlUpdate="update WEIXN_USER_TABLE SET ENABLEINTEGRATION="+enabledTI+",CPENABLEINTEGRATION="+enabledTICp+",OGENABLEINTEGRATION="+enabledTIOG+" " +
" where 1=1 AND ID="+userMainId+"";
this.mapperI.update(sqlUpdate);
Map<String,Object> userTableParams=new HashMap<>();
userTableParams.put("enabledTI",enabledTI);
userTableParams.put("enabledTICp",enabledTICp);
userTableParams.put("enabledTIOG",enabledTIOG);
userTableParams.put("userId",userMainId);
this.userTableMapper.updateUserById(userTableParams);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
integralListParams.put("DBTYPEBAK",bakDBType);
ret=this.userTableMysqlMapper.updateUserById(userTableParams);
}
LogUtil.WriteLog_Info("用户更新可用积分完成","QCodeInfoServiceImpl");
}
}
ret=1;
}catch (Exception e){
LogUtil.WriteLog_Error("插入反馈记录失败===>"+e.getMessage(),"IntegralLevelMessageServiceImpl");
ret=-1;
}
}*/
return ret;
}
}

@ -1,16 +1,12 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PubTools;
import oracle.sql.CLOB;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Service
public class IntegralStarSetupServiceImpl {

@ -1,6 +1,6 @@
package com.nmgs.service.impl;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.service.IntegrationListService;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;

@ -3,7 +3,7 @@ package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.nmgs.entity.HttpParamDto;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.HttpClientUtil;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PubTools;

@ -3,14 +3,11 @@ package com.nmgs.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nmgs.entity.ServiceAreaOperators;
import com.nmgs.mapper.OperatorsMapper;
import com.nmgs.mapperset.mysqlmapper.OperatorsMyMapper;
import com.nmgs.mapperset.oraclemapper.OperatorsMapper;
import com.nmgs.service.IOperatorsService;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;
import com.nmgs.util.PubTools;
import com.trkf.PasswordEncryption.PassWordUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -22,14 +19,15 @@ import java.util.Map;
@Service
@Transactional
@Transactional(value = "jtatransactionManager", timeout = 100)
public class OperatorsServiceImpl implements IOperatorsService {
@Autowired
private OperatorsMapper operatorsMapper;
@Autowired
private OperatorsMyMapper operatorsMyMapper;
public static Logger logger = LoggerFactory.getLogger(OperatorsServiceImpl.class);
/**
@ -51,7 +49,7 @@ public class OperatorsServiceImpl implements IOperatorsService {
page = operatorsMapper.getOperatorsList(page,params);
//给密码解密
List<ServiceAreaOperators> records = page.getRecords();
if(null != records && records.size() > 0){
if (null != records && !records.isEmpty()) {
for (ServiceAreaOperators record : records) {
record.setPassWord(PassWordUtils.decrypt(record.getPassWord()));
}
@ -78,7 +76,7 @@ public class OperatorsServiceImpl implements IOperatorsService {
if(null == operators.getId()){
//先判断工号是否已经存在,存在不让保存数据
List<ServiceAreaOperators> operationByJobNumber = operatorsMapper.getOperationByJobNumber(operators.getJobNumber());
if(null != operationByJobNumber && operationByJobNumber.size() > 0){
if (null != operationByJobNumber && !operationByJobNumber.isEmpty()) {
return -2;
}
//查询当前数据中id的最大值,给id赋值
@ -109,7 +107,7 @@ public class OperatorsServiceImpl implements IOperatorsService {
}
//先判断工号是否已经存在,存在不让保存数据
List<ServiceAreaOperators> operationByJobNumber = operatorsMapper.getOperationByJobNumber(operators.getJobNumber());
if(null != operationByJobNumber && operationByJobNumber.size() > 0){
if (null != operationByJobNumber && !operationByJobNumber.isEmpty()) {
if(operationByJobNumber.get(0).getId() != operators.getId()){
return -2;
}
@ -144,7 +142,7 @@ public class OperatorsServiceImpl implements IOperatorsService {
public int deleteOperators(List<ServiceAreaOperators> operators)throws Exception {
//如果没有数据或数据为空直接返回0
if(null == operators || operators.size() == 0){
if (null == operators || operators.isEmpty()) {
return 0;
}
@ -199,7 +197,7 @@ public class OperatorsServiceImpl implements IOperatorsService {
//先根据工号查询用户信息
List<ServiceAreaOperators> operationByJobNumber = operatorsMapper.getOperationByJobNumber((String) params.get("jobNumber"));
//如果根据工号找到,再匹配密码是否正确
if(null != operationByJobNumber && operationByJobNumber.size() > 0){
if (null != operationByJobNumber && !operationByJobNumber.isEmpty()) {
ServiceAreaOperators serviceAreaOper=operationByJobNumber.get(0);
//String decryptPassWord = PassWordUtils.decrypt(operationByJobNumber.get(0).getPassWord());
String enPassWord = PassWordUtils.encrypt((String)params.get("password"));
@ -209,9 +207,9 @@ public class OperatorsServiceImpl implements IOperatorsService {
lambdaQueryWrapper.eq(null != serviceAreaOper.getId(),
ServiceAreaOperators::getId,
serviceAreaOper.getId());
return operatorsMapper.update(serviceAreaOper,lambdaQueryWrapper);
operatorsMapper.update(serviceAreaOper, lambdaQueryWrapper);
operatorsMyMapper.update(serviceAreaOper, lambdaQueryWrapper);
return 1;
}else{
return -1;

@ -1,219 +0,0 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.nmgs.entity.*;
import com.nmgs.mapper.*;
import com.nmgs.service.IPayIntegrationNumberService;
import com.nmgs.util.PropertiesUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
@Service
@Transactional
@Slf4j
public class PayIntegrationNumberServiceImpl implements IPayIntegrationNumberService {
@Autowired
private PayIntegrationNumberMapper payIntegrationNumberMapper;
@Autowired
private IntegrationListMapper integrationListMapper;
@Override
public List<PayIntegrationNumber> getPayIntegrationNumberList() {
List<PayIntegrationNumber> payList = payIntegrationNumberMapper.getPayIntegrationNumberList();
return payList;
}
@Override
public int savePayIntegrationNumber(List<PayIntegrationNumber> payIntegrationNumbers) {
int res = 0;
//如果数据为空,直接返回
if(null == payIntegrationNumbers || payIntegrationNumbers.isEmpty()){
return 0;
}
for (PayIntegrationNumber payIntegrationNumber : payIntegrationNumbers) {
payIntegrationNumber.setValue(payIntegrationNumber.getValue().multiply(new BigDecimal(100)));
//判断传回的值中id是否有值没有就是新增
if(null == payIntegrationNumber.getId()){
//查询当前数据中id的最大值,给id赋值
Integer maxId = payIntegrationNumberMapper.getMaxId();
//如果为空则赋值成1
if(null == maxId){
maxId = 1;
}else{
maxId = maxId+1;
}
//给密码加密
payIntegrationNumber.setId(maxId);
res = payIntegrationNumberMapper.insert(payIntegrationNumber);
}else{
//设置修改条件根据id修改
LambdaQueryWrapper<PayIntegrationNumber> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(null != payIntegrationNumber.getId(),
PayIntegrationNumber::getId,
payIntegrationNumber.getId());
res = payIntegrationNumberMapper.update(payIntegrationNumber,lambdaQueryWrapper);
}
}
return res;
}
@Override
public JSONArray getIntegrationGrowTotal(Map<String, Object> params) {
JSONArray jsonArray = new JSONArray();
//从配置文件中读取数据库连接类型
params.put("DBTYPE", PropertiesUtil.getValue("DBType"));
//判断是日统计还是月统计
Boolean greenTotalCollectionType = (Boolean) params.get("greenTotalCollectionType");
SimpleDateFormat format =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<Map<String, String>> collectionDate = new ArrayList<>();
Date currentDate = null;
Date endDate= null;
try {
currentDate= format.parse((String) params.get("classDateBeginQuery"));;//DateUtility.parse(startTime)
endDate= format.parse((String) params.get("classDateEndQuery")); //endTime.parse(endTime)
/* List<DateSplitUtils.DateSplit> dateSplits = new ArrayList<>();
dateSplits = DateSplitUtils.splitDate(currentDate, endDate, DateSplitUtils.IntervalType.DAY,1);
for (DateSplitUtils.DateSplit dateSplit : dateSplits) {
Map<String, String> date = new HashMap<>();
date.put("startTime", dateSplit.getStartDateTimeStr());
date.put("endTime", dateSplit.getEndDateTimeStr());
collectionDate.add(date);
}*/
//设置数据总条数
for (int i = 0; i < collectionDate.size(); i++) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate date = LocalDate.parse(collectionDate.get(i).get("startTime").substring(0,10), formatter);
int dayOfMonth = date.getDayOfMonth();
JSONObject dateTime = new JSONObject();
dateTime.put("dateName", dayOfMonth + "号");
dateTime.put("dateCount", 0);
jsonArray.add(dateTime);
}
for (int i = 0; i < collectionDate.size(); i++) {
Map<String, Object> param = new HashMap<>();
//从配置文件中读取数据库连接类型
param.put("DBTYPE", PropertiesUtil.getValue("DBType"));
//构建参数
param.put("startTime", collectionDate.get(i).get("startTime"));
param.put("endTime", collectionDate.get(i).get("endTime"));
//调用接口,取值
List<Map<String, Object>> userTotal = integrationListMapper.getIntegrationGrowTotal(param);
if (null != userTotal && !userTotal.isEmpty() && null != userTotal.get(0)) {
//给对应位置的时间段赋值
JSONObject jSONObject = (JSONObject) jsonArray.get(i);
jSONObject.put("dateCount", userTotal.get(0).get("TOTALCOUNT"));
}
}
} catch (Exception e) {
e.printStackTrace();
log.info("查询数据失败" + e);
}
return jsonArray;
}
@Override
public List<Map<String, Object>> getCarIntegrationGrowTotal(Map<String, Object> params) {
List<Map<String,Object>> res = new ArrayList<>();
//从配置文件中读取数据库连接类型
params.put("DBTYPE", PropertiesUtil.getValue("DBType"));
//判断是日统计还是月统计
SimpleDateFormat format =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
format.parse((String) params.get("classDateBeginQuery"));;//DateUtility.parse(startTime)
format.parse((String) params.get("classDateEndQuery")); //endTime.parse(endTime)
res = integrationListMapper.getCarIntegrationGrowTotal(params);
return res;
} catch (Exception e) {
log.info("查询数据失败" + e);
return res;
}
}
@Override
public Map<String, Object> getMonthFeeTotal(Map<String, Object> params) {
Map<String,Object> res = new HashMap<>();
//从配置文件中读取数据库连接类型
params.put("DBTYPE", PropertiesUtil.getValue("DBType"));
//判断是日统计还是月统计
SimpleDateFormat format =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
format.parse((String) params.get("classDateBeginQuery"));;//DateUtility.parse(startTime)
format.parse((String) params.get("classDateEndQuery")); //endTime.parse(endTime)
res = integrationListMapper.getMonthFeeTotal(params);
return res;
} catch (Exception e) {
log.info("查询数据失败" + e);
return res;
}
}
@Override
public List<Map<String, Object>> getFeeTypeTotal(Map<String, Object> params) {
List<Map<String,Object>> res = new ArrayList<>();
//从配置文件中读取数据库连接类型
params.put("DBTYPE", PropertiesUtil.getValue("DBType"));
//判断是日统计还是月统计
SimpleDateFormat format =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
format.parse((String) params.get("classDateBeginQuery"));;//DateUtility.parse(startTime)
format.parse((String) params.get("classDateEndQuery")); //endTime.parse(endTime)
res = integrationListMapper.getFeeTypeTotal(params);
return res;
} catch (Exception e) {
log.info("查询数据失败" + e);
return res;
}
}
@Override
public List<Map<String, Object>> getMileScoreType(Map<String, Object> params) {
List<Map<String,Object>> res = new ArrayList<>();
//从配置文件中读取数据库连接类型
params.put("DBTYPE", PropertiesUtil.getValue("DBType"));
//判断是日统计还是月统计
SimpleDateFormat format =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
format.parse((String) params.get("classDateBeginQuery"));;//DateUtility.parse(startTime)
format.parse((String) params.get("classDateEndQuery")); //endTime.parse(endTime)
//res = vehicleScoreMapper.getMileScoreType(params);
return res;
} catch (Exception e) {
log.info("查询数据失败" + e);
return res;
}
}
}

@ -1,6 +1,6 @@
package com.nmgs.service.impl;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;
import com.nmgs.util.PubTools;

@ -1,7 +1,7 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PubTools;
import org.springframework.beans.factory.annotation.Autowired;
@ -10,7 +10,6 @@ import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
*

@ -1,6 +1,6 @@
package com.nmgs.service.impl;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PubTools;
import org.springframework.beans.factory.annotation.Autowired;

@ -1,15 +1,12 @@
package com.nmgs.service.impl;
import com.nmgs.mapper.Mapper;
import com.nmgs.mapper.ServiceAreaPicMapper;
import com.nmgs.service.IServiceAreaService;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;
import com.nmgs.util.PubTools;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;

@ -1,9 +1,5 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nmgs.entity.*;
import com.nmgs.mapper.*;
import com.nmgs.mappercommon.*;
import com.nmgs.service.IServiceAreaService;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;
@ -11,13 +7,9 @@ import com.nmgs.util.PubTools;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import static com.nmgs.util.PubTools.ClobToString;
@Service
@Slf4j

@ -1,6 +1,6 @@
package com.nmgs.service.impl;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.service.IServiceAreaSpecialService;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PubTools;

@ -1,14 +1,12 @@
package com.nmgs.service.impl;
import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.*;

@ -1,7 +1,9 @@
package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.mapperset.mysqlmapper.UserTableMysqlMapper;
import com.nmgs.mapperset.oraclemapper.UserTableMapper;
import com.nmgs.service.UserTableService;
import com.nmgs.util.*;
import oracle.sql.CLOB;
@ -11,15 +13,28 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.sql.Blob;
import java.sql.Clob;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
//@Transactional
public class UserTableServiceImpl implements UserTableService {
@Autowired
public Mapper mapperI;
public UserTableMapper userTableMapperOracle;
public UserTableMysqlMapper userTableMysqlMapper;
@Autowired
public void setUserTableMapperOracle(UserTableMapper userTableMapperOracle) {
this.userTableMapperOracle = userTableMapperOracle;
}
@Autowired
public void setUserTableMysqlMapper(UserTableMysqlMapper userTableMysqlMapper) {
this.userTableMysqlMapper = userTableMysqlMapper;
}
private static String DBType= PropertiesUtil.getValue("DBType");
private static String sql="select " +
" ut.ID ,ut.OPENID ,ut.USERNAME ,ut.PHONE ," +
@ -77,15 +92,15 @@ public class UserTableServiceImpl implements UserTableService {
}
@Override
//@Transactional(rollbackFor={RuntimeException.class, Exception.class},propagation= Propagation.REQUIRED)
public synchronized int addUser(String openId, String userName) {
@Transactional(value = "jtatransactionManager",timeout = 10)
public int addUser(String openId, String userName) {
int ret=-1;
//查询全部人员给list赋值推荐码
List<String> retlist = new ArrayList();
if(PubTools.list.size()==0){
if(PubTools.list.isEmpty()){
String sqlTempQuery = "select ut.REFERRERCODE AS REFERRERCODE from WEIXN_USER_TABLE ut";
List list= this.mapperI.selectforlist(sqlTempQuery);
if(list.size()>0) {
if(!list.isEmpty()) {
for (Object obj : list) {
Map<String, Object> obj1 = (Map<String, Object>) obj;
Object o = PubTools.isEmpty(obj1.get("REFERRERCODE"))?"":obj1.get("REFERRERCODE");
@ -107,91 +122,100 @@ public class UserTableServiceImpl implements UserTableService {
if (select != null && select.get("MAXID") != null) {
userId = Integer.parseInt(select.get("MAXID").toString());
}
redisConfigUtil.set("USER_ID", userId + "");
redisConfigUtil.set("USER_ID", (userId+1) + "");
}
String sqlTemp="insert into WEIXN_USER_TABLE(ID,OPENID,USERNAME,CREATETIME,ENABLEINTEGRATION,STARLEVEL,OILENABLEINTEGRATION,GASENABLEINTEGRATION," +
" SPENABLEINTEGRATION,CAFENABLEINTEGRATION,CERTIFICATION,OGENABLEINTEGRATION,CPENABLEINTEGRATION,REFERRERCODE) values(" + (userId + 1) + ",'" + openId + "','" + userName + "',to_date('" + PubTools.getCurrentDate() + "','yyyy-MM-dd HH24:mi:ss'),0,0,0,0,0,0,0,0,0,'" + REFERRERCODE + "')";
if("4".equals(DBType)){
sqlTemp="insert into WEIXN_USER_TABLE(ID,OPENID,USERNAME,CREATETIME,ENABLEINTEGRATION,STARLEVEL,OILENABLEINTEGRATION,GASENABLEINTEGRATION," +
" SPENABLEINTEGRATION,CAFENABLEINTEGRATION,CERTIFICATION,OGENABLEINTEGRATION,CPENABLEINTEGRATION,REFERRERCODE) values(" + (userId + 1) + ",'" + openId + "','" + userName + "',str_to_date('" + PubTools.getCurrentDate() + "','%Y-%m-%d %H:%i:%s'),0,0,0,0,0,0,0,0,0,'" + REFERRERCODE + "')";
Map<String,Object> param=new HashMap<>();
param.put("DBTYPE",DBType);
param.put("userid",(userId+1));
param.put("openid",openId);
param.put("username",userName);
param.put("createTime", PubTools.getCurrentDate());
param.put("REFERRERCODE", REFERRERCODE);
/* if("4".equals(DBType)){//mysql
ret=this.userTableMysqlMapper.addUser(param);
}else if("2".equals(DBType)){//oracle
ret=this.userTableMapperOracle.addUser(param);
}
try{
ret= this.mapperI.insert(sqlTemp);
retlist.add(REFERRERCODE);
PubTools.list=retlist;
}catch (Exception e){
LogUtil.WriteLog_Error("根据微信openid新增用户失败===>"+e.getMessage(),"UserTableServiceImpl");
return ret=-1;
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
param.put("DBTYPEBAK",bakDBType);
if("4".equals(bakDBType)){//mysql
ret=this.userTableMysqlMapper.addUser(param);
}else if("2".equals(bakDBType)){//oracle
ret=this.userTableMapperOracle.addUser(param);
}
}*/
ret=this.userTableMapperOracle.addUser(param);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
param.put("DBTYPEBAK",bakDBType);
ret=this.userTableMysqlMapper.addUser(param);
}
retlist.add(REFERRERCODE);
PubTools.list=retlist;
return ret;
}
@Override
// @Transactional(rollbackFor = {Exception.class, RuntimeException.class},propagation = Propagation.REQUIRED)
@Transactional(value = "jtatransactionManager",timeout = 10)
public int updateUser(String userId,String idNumber,String phone,String realName,String numberPic) {
int ret=-1;
try{
int ret = 1;
//图片加水印
String fileName = userId + "NUMPIC" + ".jpg";
LogUtil.WriteLog_Info("用户实名认证修改附件水印=开始===" + PubTools.getCurrentDate() + "====", "UserController");
if (!PubTools.isNull(numberPic) && !numberPic.contains("NUMPIC")) {
/* if (!PubTools.isNull(numberPic) && !numberPic.contains("NUMPIC")) {
LogUtil.WriteLog_Info("用户实名认证修改附件水印===IF里面=" + PubTools.getCurrentDate() + "====", "UserController");
String permitpicPic = ImageUtils.addImageWaterMark(numberPic, "仅用于内蒙古交通货运车辆积分会员认证", fileName);
LogUtil.WriteLog_Info("用户实名认证修改附件水印=完成===" + PubTools.getCurrentDate() + "====", "UserController");
if(!PubTools.isNull(permitpicPic)){
numberPic=permitpicPic;
}
}
if("2".equals(DBType)){
numberPic=PubTools.StringToClob(numberPic);
}
fileName = PubTools.getCurrentDateYMD() + "/" + fileName;
String sql="update WEIXN_USER_TABLE " +
" set CERTIFICATION=2,CREATETIME=to_date('" + PubTools.getCurrentDate() + "','yyyy-MM-dd HH24:mi:ss'),NUMBERPICNAME='" + fileName + "'";
if (!PubTools.isNull(realName)) {
sql += ",REALNAME='" + realName + "'";
}
if (!PubTools.isNull(idNumber) && !idNumber.contains("*")) {
sql += ",IDNUMBER='" + idNumber + "'";
}
if (!PubTools.isNull(phone)) {
sql += ",PHONE='" + phone + "'";
}
/*if (!PubTools.isNull(numberPic)) {
sql += ",NUMBERPIC=" + numberPic + "";
}*/
sql += " where OPENID='" + userId + "'";
if("4".equals(DBType)){
sql="update WEIXN_USER_TABLE " +
" set CERTIFICATION=2,CREATETIME=str_to_date('" + PubTools.getCurrentDate() + "','%Y-%m-%d %H:%i:%s') ,NUMBERPICNAME='" + fileName + "'";
if (!PubTools.isNull(realName)) {
sql += ",REALNAME='" + realName + "'";
fileName = PubTools.getCurrentDateYMD() + "/" + fileName;
int certification = 2;//审核中
//20250324 修改审批状态根据OCR自动识别姓名和身份证号
if (PubTools.getEnabledOcr() == 1) {
String picUrl = PubTools.HTTPS + fileName;
JSONObject idCard = OcrUtil.getAllText(picUrl, "IdCard");
String status = idCard.get("status").toString();
if ("error".equals(status)) {
ret = -98;
return ret;
}
if (!PubTools.isNull(idNumber) && !idNumber.contains("*")) {
sql += ",IDNUMBER='" + idNumber + "'";
JSONObject data = (JSONObject) idCard.get("data");
String idNumber1 = data.get("idNumber").toString();
String name = data.get("name").toString();
if (!PubTools.isNull(realName) && name.equals(realName) && !PubTools.isNull(idNumber) && !idNumber.contains("*") && idNumber1.equals(idNumber)) {
certification = 1;
ret = 100;
}
if (!PubTools.isNull(phone)) {
sql += ",PHONE='" + phone + "'";
if (!PubTools.isNull(realName) && !name.equals(realName)) {
ret = -97;
return ret;
}
if (!PubTools.isNull(realName) && !idNumber.contains("*") && !idNumber1.equals(idNumber)) {
ret = -96;
return ret;
}
/* if (!PubTools.isNull(numberPic)) {
sql += ",NUMBERPIC='" + numberPic + "'";
}*/
sql += " where OPENID='" + userId + "'";
}
ret=this.mapperI.update(sql);
//人员实名认证之后,需要积分表中加一条流水
/* String sqlTemp="insert into integration_list_table(ID,USERID,LASTINTEGRATION,PAYINTEGRATION,RESTINTEGRATION,PAYTIME,PAYTYPE) " +
" values((select max(temp.id)+1 from integration_list_table temp),"+userId+",0,(select t.VALUE from pay_integration_number_table t where t.TYPE='AU'),0,to_date('"+PubTools.getCurrentDate()+"','YYYY-MM-DD HH24:MI:SS'),'AU')";
ret=this.mapperI.insert(sqlTemp);*/
//20250324 修改审批状态根据OCR自动识别姓名和身份证号 ,满足的话自动改成已审核
Map<String,Object> param=new HashMap<>();
param.put("DBTYPE",DBType);
param.put("certification",certification);
param.put("filename",fileName);
param.put("phone",phone);
param.put("realName", realName);
param.put("idNumber", idNumber);
param.put("createTime", PubTools.getCurrentDate());
param.put("openid", userId);
ret=this.userTableMapperOracle.updateUser(param);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
param.put("DBTYPEBAK",bakDBType);
ret=this.userTableMysqlMapper.updateUser(param);
}catch (Exception e){
LogUtil.WriteLog_Error("人员实名认证失败===>"+e.getMessage(),"UserTableServiceImpl");
return ret=-1;
//throw new RuntimeException();
}
}
return ret;
}
@ -292,6 +316,7 @@ public class UserTableServiceImpl implements UserTableService {
}
}
}catch (Exception e){
e.printStackTrace();
LogUtil.WriteLog_Error("根据微信openid查询用户详情失败===>"+e.getMessage(),"UserTableServiceImpl");
return retlist=null;
}

@ -2,21 +2,18 @@ package com.nmgs.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.mapperset.mysqlmapper.UserVehicleMyMapper;
import com.nmgs.mapperset.oraclemapper.UserVehicleMapper;
import com.nmgs.service.UserVehicleService;
import com.nmgs.util.ImageUtils;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;
import com.nmgs.util.PubTools;
import oracle.sql.CLOB;
import com.nmgs.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.sql.Blob;
import java.sql.Clob;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -25,6 +22,16 @@ public class UserVehicleServiceImpl implements UserVehicleService {
@Autowired
public Mapper mapperI;
public UserVehicleMapper userVehicleMapper;
@Autowired
public void setUserVehicleMapper(UserVehicleMapper userVehicleMapper) {
this.userVehicleMapper = userVehicleMapper;
}
public UserVehicleMyMapper userVehicleMyMapper;
@Autowired
public void setUserVehicleMyMapper(UserVehicleMyMapper userVehicleMyMapper) {
this.userVehicleMyMapper = userVehicleMyMapper;
}
private static String DBType= PropertiesUtil.getValue("DBType");
private static String sql="select " +
@ -76,10 +83,9 @@ public class UserVehicleServiceImpl implements UserVehicleService {
}
@Override
// @Transactional(rollbackFor = {Exception.class, RuntimeException.class},propagation = Propagation.REQUIRED)
@Transactional(value = "jtatransactionManager")
public int addUserVehicle(JSONArray jsonArray) {
int ret=1;
try{
String currentDate=PubTools.getCurrentDate();
if(jsonArray.size()>0){
String CREATETIME=PubTools.getCurrentDate() ;
@ -121,60 +127,80 @@ public class UserVehicleServiceImpl implements UserVehicleService {
ret=2;//车辆信息已经存在
break;
}
String sqlTemp2="insert into user_vehicle_table(USERID,ACARNO,CREATETIME,CERTIFICATION) " +
/* String sqlTemp2="insert into user_vehicle_table(USERID,ACARNO,CREATETIME,CERTIFICATION) " +
" values((SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='"+userId+"'),'"+aCarNo+"',to_date('"+CREATETIME+"','YYYY-MM-DD HH24:MI:SS'),0) ";
if("4".equals(DBType)){
sqlTemp2="insert into user_vehicle_table(USERID,ACARNO,CREATETIME,CERTIFICATION) " +
" values((SELECT ID FROM WEIXN_USER_TABLE WHERE OPENID='"+userId+"'),'"+aCarNo+"',str_to_date('"+CREATETIME+"','%Y-%m-%d %H:%i:%s'),0) ";
}
this.mapperI.insert(sqlTemp2);
}*/
Map<String,Object> params=new HashMap<>();
params.put("DBTYPE",DBType);
params.put("openid",userId);
params.put("aCarNo",aCarNo);
params.put("createTime",CREATETIME);
params.put("certification",0);
// this.mapperI.insert(sqlTemp2);
ret=userVehicleMapper.addUserVehicle(params);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
params.put("DBTYPEBAK",bakDBType);
userVehicleMyMapper.addUserVehicle(params);
}
}
}
}catch (Exception e){
LogUtil.WriteLog_Error("批量插入车牌失败===>"+e.getMessage(),"UserVehicleServiceImpl");
ret=-1;
throw new RuntimeException();
}
return ret;
}
@Override
@Transactional(value = "jtatransactionManager")
public int cancelUserVehicle(String userId, String aCarNo) {
int ret=1;
try{
String CREATETIME=PubTools.getCurrentDate() ;
String sqlQuery = "SELECT uvt.USERID,uvt.ACARNO,uvt.CERTIFICATION,uvt.PERMITPICNAME ,uvt.VEHICLEPICNAME ,uvt.LICENSEPICNAME from user_vehicle_table uvt where uvt.USERID=" + userId + " and uvt.ACARNO='" + aCarNo + "' AND uvt.CERTIFICATION not in(4)";
List selectforlist = this.mapperI.selectforlist(sqlQuery);
if(selectforlist.size()>0){
Map<String, Object> obj1 = (Map<String, Object>)selectforlist.get(0);
String certification = obj1.get("CERTIFICATION").toString();
if (Integer.parseInt(certification) != 1) {
String sqlDel = "DELETE FROM user_vehicle_table where USERID=" + userId + " and ACARNO='" + aCarNo + "' AND CERTIFICATION not in(1,4)";
this.mapperI.update(sqlDel);
if (!PubTools.isEmpty(obj1.get("PERMITPICNAME"))) {
//需要删除附件
ImageUtils.delFile(obj1.get("PERMITPICNAME").toString(), true);
}
if (!PubTools.isEmpty(obj1.get("VEHICLEPICNAME"))) {
//需要删除附件
ImageUtils.delFile(obj1.get("VEHICLEPICNAME").toString(), true);
}
if (!PubTools.isEmpty(obj1.get("LICENSEPICNAME"))) {
//需要删除附件
ImageUtils.delFile(obj1.get("LICENSEPICNAME").toString(), true);
}
}else{
String sqlTemp = "update user_vehicle_table set CERTIFICATION=4,CANCELTIME=to_date('" + CREATETIME + "','YYYY-MM-DD HH24:MI:SS') where USERID=" + userId + " and ACARNO='" + aCarNo + "' AND CERTIFICATION=1";
if ("4".equals(DBType)) {
sqlTemp = "update user_vehicle_table set CERTIFICATION=4,CANCELTIME=str_to_date('" + CREATETIME + "','%Y-%m-%d %H:%i:%s') where USERID=" + userId + " and ACARNO='" + aCarNo + "' AND CERTIFICATION=1";
}
this.mapperI.update(sqlTemp);
String CREATETIME=PubTools.getCurrentDate() ;
String sqlQuery = "SELECT uvt.USERID,uvt.ACARNO,uvt.CERTIFICATION,uvt.PERMITPICNAME ,uvt.VEHICLEPICNAME ,uvt.LICENSEPICNAME from user_vehicle_table uvt where uvt.USERID=" + userId + " and uvt.ACARNO='" + aCarNo + "' AND uvt.CERTIFICATION not in(4)";
List selectforlist = this.mapperI.selectforlist(sqlQuery);
if(selectforlist.size()>0){
Map<String, Object> obj1 = (Map<String, Object>)selectforlist.get(0);
String certification = obj1.get("CERTIFICATION").toString();
if (Integer.parseInt(certification) != 1) {
Map<String,Object> params=new HashMap<>();
params.put("DBTYPE",DBType);
params.put("userId",userId);
params.put("aCarNo",aCarNo);
params.put("commonCondition","CERTIFICATION not in(1,4)");
ret=this.userVehicleMapper.delUserVehcile(params);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
params.put("DBTYPEBAK",bakDBType);
ret=userVehicleMyMapper.delUserVehcile(params);
}
/* if (!PubTools.isEmpty(obj1.get("PERMITPICNAME"))) {
//需要删除附件
ImageUtils.delFile(obj1.get("PERMITPICNAME").toString(), true);
}
if (!PubTools.isEmpty(obj1.get("VEHICLEPICNAME"))) {
//需要删除附件
ImageUtils.delFile(obj1.get("VEHICLEPICNAME").toString(), true);
}
if (!PubTools.isEmpty(obj1.get("LICENSEPICNAME"))) {
//需要删除附件
ImageUtils.delFile(obj1.get("LICENSEPICNAME").toString(), true);
}*/
}else{
Map<String,Object> params=new HashMap<>();
params.put("DBTYPE",DBType);
params.put("certification",4);
params.put("cancelTime",PubTools.getCurrentDate());
params.put("userId",userId);
params.put("aCarNo",aCarNo);
params.put("commonCondition","CERTIFICATION=1");
ret=this.userVehicleMapper.updateUserVehicle(params);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
params.put("DBTYPEBAK",bakDBType);
ret=userVehicleMyMapper.updateUserVehicle(params);
}
}
}catch (Exception e){
LogUtil.WriteLog_Error("根据用户id和车牌号取消绑定失败===>"+e.getMessage(),"UserVehicleServiceImpl");
return ret=-1;
}
return ret;
}
@ -259,86 +285,56 @@ public class UserVehicleServiceImpl implements UserVehicleService {
return retlist;
}
@Override
//@Transactional(rollbackFor = {Exception.class, RuntimeException.class},propagation = Propagation.REQUIRED)
@Transactional(value = "jtatransactionManager")
public int updateUserVehicle(String userId,String aCarNo,String checkName,String checkUserNumber,String licensepic,
String permitpic,String vehiclePic,String certification,String referrerCode) {
int ret=1;
try{
String fileNamePre = userId + "-" + aCarNo + "-";
String fileNameAfter = ".jpg";
//图片加水印
/*//图片加水印
if (!PubTools.isNull(permitpic) && !permitpic.contains("PERPIC")) {
String permitpicPic = ImageUtils.addImageWaterMark(permitpic, "仅用于内蒙古交通货运车辆积分会员认证", fileNamePre + "PERPIC" + fileNameAfter);
if(!PubTools.isNull(permitpicPic)){
permitpic=permitpicPic;
}
}
//图片加水印
if (!PubTools.isNull(licensepic) && !licensepic.contains("LICPIC")) {
String permitpicPic = ImageUtils.addImageWaterMark(licensepic, "仅用于内蒙古交通货运车辆积分会员认证", fileNamePre + "LICPIC" + fileNameAfter);
if(!PubTools.isNull(permitpicPic)){
licensepic=permitpicPic;
}
}
//图片加水印
if (!PubTools.isNull(vehiclePic) && !vehiclePic.contains("VEHPIC")) {
String permitpicPic = ImageUtils.addImageWaterMark(vehiclePic, "仅用于内蒙古交通货运车辆积分会员认证", fileNamePre + "VEHPIC" + fileNameAfter);
if(!PubTools.isNull(permitpicPic)){
vehiclePic=permitpicPic;
}
}
String sql = "update user_vehicle_table " +
" set CERTIFICATION=" + certification + "";
if ("2".equals(DBType)) {
sql += ",CREATETIME=to_date('" + PubTools.getCurrentDate() + "','yyyy-MM-dd HH24:mi:ss')";
if (!PubTools.isNull(licensepic)) {
// licensepic = PubTools.StringToClob(licensepic);
// sql += ",LICENSEPIC=" + licensepic;
sql += ",LICENSEPICNAME='" + PubTools.getCurrentDateYMD() + "/" + fileNamePre + "LICPIC" + fileNameAfter + "'";
}
if (!PubTools.isNull(permitpic)) {
// permitpic = PubTools.StringToClob(permitpic);
// sql += ",PERMITPIC=" + permitpic;
sql += ",PERMITPICNAME='" + PubTools.getCurrentDateYMD() + "/" + fileNamePre + "PERPIC" + fileNameAfter + "'";
}
if (!PubTools.isNull(vehiclePic)) {
// vehiclePic = PubTools.StringToClob(vehiclePic);
// sql += ",VEHICLEPIC=" + vehiclePic;
sql += ",VEHICLEPICNAME='" + PubTools.getCurrentDateYMD() + "/" + fileNamePre + "VEHPIC" + fileNameAfter + "'";
}
} else if ("4".equals(DBType)) {
sql += ",CREATETIME=str_to_date('" + PubTools.getCurrentDate() + "','%Y-%m-%d %H:%i:%s')";
if (!PubTools.isNull(licensepic)) {
// sql += ",LICENSEPIC='" + licensepic + "'";
sql += ",LICENSEPICNAME='" + PubTools.getCurrentDateYMD() + "/" + fileNamePre + "LICPIC" + fileNameAfter + "'";
}
if (!PubTools.isNull(permitpic)) {
// sql += ",PERMITPIC='" + permitpic + "'";
sql += ",PERMITPICNAME='" + PubTools.getCurrentDateYMD() + "/" + fileNamePre + "PERPIC" + fileNameAfter + "'";
}*/
//20250324 修改审批状态根据OCR自动识别姓名
if (PubTools.getEnabledOcr() == 1) {
String picUrl = PubTools.HTTPS + PubTools.getCurrentDateYMD() + "/" + fileNamePre + "PERPIC" + fileNameAfter;
JSONObject idCard = OcrUtil.getAllText(picUrl, "VehicleLicense");
String status = idCard.get("status").toString();
if ("error".equals(status)) {
ret = -98;
return ret;
}
if (!PubTools.isNull(vehiclePic)) {
// sql += ",VEHICLEPIC='" + vehiclePic + "'";
sql += ",VEHICLEPICNAME='" + PubTools.getCurrentDateYMD() + "/" + fileNamePre + "VEHPIC" + fileNameAfter + "'";
JSONObject data = (JSONObject) idCard.get("data");
String name = data.get("name").toString();
if (!PubTools.isNull(checkName) && name.equals(checkName)) {
certification = "1";
ret = 100;
}
}
if (!PubTools.isNull(referrerCode)) {
sql += ",REFERRERCODE='" + referrerCode + "'";
}
if (!PubTools.isNull(checkName)) {
sql += ",CHECKUSERNAME='" + checkName + "'";
}
Map<String,Object> params=new HashMap<>();
params.put("DBTYPE",DBType);
params.put("certification",certification);
params.put("createTime",PubTools.getCurrentDate());
params.put("licensepic",PubTools.getCurrentDateYMD() + "/" + fileNamePre + "LICPIC" + fileNameAfter);
params.put("permitpic",PubTools.getCurrentDateYMD() + "/" + fileNamePre + "PERPIC" + fileNameAfter);
params.put("vehiclePic",PubTools.getCurrentDateYMD() + "/" + fileNamePre + "VEHPIC" + fileNameAfter);
params.put("referrerCode",referrerCode);
params.put("checkName",referrerCode);
params.put("userId",userId);
params.put("aCarNo",aCarNo);
if (!PubTools.isNull(checkUserNumber) && !checkUserNumber.contains("*")) {
sql += ",CHECKUSERNUMBER='" + checkUserNumber + "'";
}
if (!PubTools.isNull(referrerCode)) {
sql += ",REFERRERCODE='" + referrerCode + "'";
params.put("checkUserNumber",checkUserNumber);
}
sql += " where USERID=" + userId + " and ACARNO='" + aCarNo + "' AND CERTIFICATION not in(4)";
this.mapperI.insert(sql);
}catch (Exception e){
LogUtil.WriteLog_Error("批量修改车牌失败===>"+e.getMessage(),"UserVehicleServiceImpl");
return ret=-1;
params.put("commonCondition","CERTIFICATION not in(4)");
//this.mapperI.insert(sql);
ret = userVehicleMapper.updateUserVehicle(params);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
String bakDBType = PropertiesUtil.getValue("BakDBType");
params.put("DBTYPEBAK",bakDBType);
ret=userVehicleMyMapper.updateUserVehicle(params);
}
return ret;
}

@ -1,6 +1,6 @@
package com.nmgs.service.impl;
import com.nmgs.mapper.Mapper;
import com.nmgs.mappercommon.Mapper;
import com.nmgs.service.VehicleScoreService;
import com.nmgs.util.LogUtil;
import com.nmgs.util.PropertiesUtil;

@ -0,0 +1,48 @@
package com.nmgs.util;
import com.trkf.PasswordEncryption.PassWordUtils;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import javax.sql.DataSource;
@Component
public class DataSourceUtil {
public static JdbcTemplate Hikar_DataSource_MYSQL() {
HikariConfig config = new HikariConfig();
JdbcTemplate jdbcTemplate = null;
try {
//数据库类型1-sqlserver 2-oracle3-达梦4-mysql
String BakDBType = PropertiesUtil.getValue("BakDBType");
String driverName = "com.mysql.cj.jdbc.Driver";
if (BakDBType.equals("1")) {
driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
} else if (BakDBType.equals("2")) {
driverName = "oracle.jdbc.driver.OracleDriver";
} else if (BakDBType.equals("3")) {
driverName = "dm.jdbc.driver.DmDriver";
}
config.setDriverClassName(driverName);
config.setJdbcUrl(PropertiesUtil.getValue("BAKDBUrl"));
config.setUsername(PropertiesUtil.getValue("BAKDBUserName"));
config.setPoolName("DatebookHikariCPMysql");
config.setPassword(PassWordUtils.decrypt(PropertiesUtil.getValue("BAKDBPassWord")));
config.setMaximumPoolSize(10);
config.setMinimumIdle(2);
config.setConnectionTimeout(600000);
config.setConnectionTestQuery("select 1 from dual");
config.setAutoCommit(true);
DataSource ds = new HikariDataSource(config);
if ("Y".equals(PropertiesUtil.getValue("BAKEnabled"))) {
jdbcTemplate = new JdbcTemplate(ds);
PubTools.jdbcTemplate = jdbcTemplate;
}
} catch (Exception e) {
LogUtil.WriteLog_Error("小程序备份库连接失败{}" + e.getMessage(), "DataSourceUtil");
return null;
}
return jdbcTemplate;
}
}

@ -12,8 +12,6 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.net.URI;

@ -167,8 +167,7 @@ public class ImageUtils {
}
return retStr;
} catch (Exception e) {
e.printStackTrace();
return retStr="";
return "-9999";
} finally {
inputStream.close();
}

@ -0,0 +1,176 @@
package com.nmgs.util;
import com.alibaba.fastjson.JSONObject;
import com.aliyun.ocr_api20210707.models.RecognizeAllTextResponse;
import com.aliyun.ocr_api20210707.models.RecognizeAllTextResponseBody;
import com.aliyun.tea.TeaException;
import com.aliyun.teautil.Common;
import com.google.gson.internal.LinkedTreeMap;
import java.util.Date;
import java.util.List;
public class OcrUtil {
public static com.aliyun.ocr_api20210707.Client createClient() throws Exception {
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
// 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_ID。
//.setAccessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"))
.setAccessKeyId("LTAI5t7qiwNZSMADaRUPHa6z")
// 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_SECRET。
// .setAccessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"));
.setAccessKeySecret("yffcCbgV7Jl6QoeVYoLY7dpTMsecfo");
// 默认公网接入地址为"ocr-api.cn-hangzhou.aliyuncs.com"若您需要使用vpc域名访问请确保您的ecs建立在杭州regionvpc接入地址为"ocr-api-vpc.cn-hangzhou.aliyuncs.com"
config.endpoint = "ocr-api.cn-hangzhou.aliyuncs.com";
return new com.aliyun.ocr_api20210707.Client(config);
}
/**
*
*
* @param picUrl
* @param ocrType
* @return
* @throws Exception
*/
public static JSONObject getAllText(String picUrl, String ocrType) {
long starttime = new Date().getTime();
JSONObject retJson = new JSONObject();
try {
com.aliyun.ocr_api20210707.Client client = OcrUtil.createClient();
com.aliyun.ocr_api20210707.models.RecognizeAllTextRequest recognizeAllTextRequest = new com.aliyun.ocr_api20210707.models.RecognizeAllTextRequest()
.setUrl(picUrl)
.setType(ocrType);
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
if (PubTools.isNull(picUrl)) {
retJson.put("status", "error");
retJson.put("data", "图片未找到");
}
RecognizeAllTextResponse resp = client.recognizeAllTextWithOptions(recognizeAllTextRequest, runtime);
RecognizeAllTextResponseBody.RecognizeAllTextResponseBodyData data = resp.body.data;
List<RecognizeAllTextResponseBody.RecognizeAllTextResponseBodyDataSubImages> subImages = data.getSubImages();
/*String jsonString = Common.toJSONString(resp.body.data);
JSONObject parse = (JSONObject) JSONObject.parse(jsonString);*/
Object data1 = subImages.get(0).getKvInfo().data;
JSONObject obj = null;
switch (ocrType) {
case "IdCard"://身份证识别
obj = getDataByIdcard((LinkedTreeMap) data1);
break;
case "DrivingLicense"://驾驶证识别
obj = getDataByDrivingLicense((LinkedTreeMap) data1);
break;
case "VehicleLicense"://行驶证识别
obj = getDataByVehicleLicense((LinkedTreeMap) data1);
break;
}
long endtime = new Date().getTime();
System.out.println("OCR识别用时====" + (endtime - starttime));
retJson.put("status", "success");
retJson.put("data", obj);
} catch (TeaException error) {
LogUtil.WriteLog_Error("TeaException===>picUrl:{" + picUrl + "}===type:{" + ocrType + "}====>" + error.message, "OcrUtil");
retJson.put("status", "error");
retJson.put("data", "图片错误");
System.out.println("TeaException==========>" + error.getMessage());
// System.out.println("Recommend=====>" + error.getData().get("Recommend"));
// com.aliyun.teautil.Common.assertAsString(error.message);
} catch (Exception _error) {
TeaException error = new TeaException(_error.getMessage(), _error);
LogUtil.WriteLog_Error("TeaException(_error)===>picUrl:{" + picUrl + "}===type:{" + ocrType + "}====>" + error.message, "OcrUtil");
retJson.put("status", "error");
retJson.put("data", "图片错误");
System.out.println("Exception==========>" + error.getMessage());
}
return retJson;
}
//身份证解析
private static JSONObject getDataByIdcard(LinkedTreeMap resp) {
JSONObject jsonStr = new JSONObject();
//姓名
String name = PubTools.isEmpty(resp.get("name")) ? "" : resp.get("name").toString();
//住址
String address = PubTools.isEmpty(resp.get("address")) ? "" : resp.get("address").toString();
//民族
String ethnicity = PubTools.isEmpty(resp.get("ethnicity")) ? "" : resp.get("ethnicity").toString();
//性别
String sex = PubTools.isEmpty(resp.get("sex")) ? "" : resp.get("sex").toString();
//身份证号
String idNumber = PubTools.isEmpty(resp.get("idNumber")) ? "" : resp.get("idNumber").toString();
//出生日期
String birthDate = PubTools.isEmpty(resp.get("birthDate")) ? "" : resp.get("birthDate").toString();
jsonStr.put("name", name);
jsonStr.put("address", address);
jsonStr.put("ethnicity", ethnicity);
jsonStr.put("sex", sex);
jsonStr.put("idNumber", idNumber);
jsonStr.put("birthDate", birthDate);
return jsonStr;
}
//驾驶证解析
private static JSONObject getDataByDrivingLicense(LinkedTreeMap resp) {
JSONObject jsonStr = new JSONObject();
Integer subImageCount = (Integer) resp.get("subImageCount");
//住址
String address = PubTools.isEmpty(resp.get("address")) ? "" : resp.get("address").toString();
//民族
String ethnicity = PubTools.isEmpty(resp.get("ethnicity")) ? "" : resp.get("ethnicity").toString();
//性别
String sex = PubTools.isEmpty(resp.get("sex")) ? "" : resp.get("sex").toString();
//身份证号
String idNumber = PubTools.isEmpty(resp.get("licenseNumber")) ? "" : resp.get("licenseNumber").toString();
//出生日期
String birthDate = PubTools.isEmpty(resp.get("birthDate")) ? "" : resp.get("birthDate").toString();
//国籍
String nationality = PubTools.isEmpty(resp.get("nationality")) ? "" : resp.get("nationality").toString();
//初次领证日期
String initialIssueDate = PubTools.isEmpty(resp.get("initialIssueDate")) ? "" : resp.get("initialIssueDate").toString();
//准驾类型
String approvedType = PubTools.isEmpty(resp.get("approvedType")) ? "" : resp.get("approvedType").toString();
//发证单位
String issueAuthority = PubTools.isEmpty(resp.get("issueAuthority")) ? "" : resp.get("issueAuthority").toString();
//有效起始日期
String validFromDate = PubTools.isEmpty(resp.get("validFromDate")) ? "" : resp.get("validFromDate").toString();
//有效期限
String validPeriod = PubTools.isEmpty(resp.get("validPeriod")) ? "" : resp.get("validPeriod").toString();
jsonStr.put("address", address);
jsonStr.put("ethnicity", ethnicity);
jsonStr.put("sex", sex);
jsonStr.put("idNumber", idNumber);
jsonStr.put("nationality", nationality);
jsonStr.put("initialIssueDate", initialIssueDate);
jsonStr.put("approvedType", approvedType);
jsonStr.put("issueAuthority", issueAuthority);
jsonStr.put("validFromDate", validFromDate);
jsonStr.put("validPeriod", validPeriod);
return jsonStr;
}
//行驶证
private static JSONObject getDataByVehicleLicense(LinkedTreeMap resp) {
JSONObject jsonStr = new JSONObject();
//住址
String address = PubTools.isEmpty(resp.get("address")) ? "" : resp.get("address").toString();
//发证日期
String ethnicity = PubTools.isEmpty(resp.get("issueDate")) ? "" : resp.get("issueDate").toString();
//性别
String owner = PubTools.isEmpty(resp.get("owner")) ? "" : resp.get("owner").toString();
jsonStr.put("address", address);
jsonStr.put("ethnicity", ethnicity);
jsonStr.put("name", owner);
return jsonStr;
}
public static void main(String[] args_) throws Exception {
//String picUrl = "https://img.alicdn.com/tfs/TB1q5IeXAvoK1RjSZFNXXcxMVXa-483-307.jpg";
//String picUrl = "https://zhyw.nmgjtjt.com:9500/integralFile/20241204/029b1231163340f28b317cf158ec4f3dNUMPIC.jpg";
//String picUrl = "https://zhyw.nmgjtjt.com:9500/integralFile/20250324/3a12bfa8f49045d7be3242ae91bdd079NUMPIC.jpg";
//String ocrType = "IdCard";
String picUrl = "https://zhyw.nmgjtjt.com:9500/integralFile/20250324/12345678.jpg";
String ocrType = "DrivingLicense";
JSONObject allText = getAllText(picUrl, ocrType);
System.out.println(JSONObject.toJSONString(allText));
}
}

@ -3,6 +3,7 @@ package com.nmgs.util;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import oracle.sql.CLOB;
import org.springframework.jdbc.core.JdbcTemplate;
import java.io.File;
import java.lang.reflect.Array;
@ -21,6 +22,7 @@ public class PubTools {
static SimpleDateFormat dfYYD=new SimpleDateFormat("yyyy-MM-dd");
static SimpleDateFormat dfYMD = new SimpleDateFormat("yyyyMMdd");
public static JdbcTemplate jdbcTemplate = null;
public static String HTTPS = PropertiesUtil.getValue("domainInteger") + File.separator;
/**
@ -120,14 +122,18 @@ public class PubTools {
* @param diffType D S ,H M
* @return
*/
public static Long dateDiff(String startTime,String endTime,String diffType) throws ParseException {
public static Long dateDiff(String startTime,String endTime,String diffType) {
long nd = 1000 * 24 * 60 * 60; //一天的毫秒数
long nh = 1000 * 60 * 60;//一小时的毫秒数据
long nm = 1000 * 60; //一分钟毫秒数
long ns = 1000;
long diff;
long diff=0;
//获得两个时间的毫秒时间差异
diff = df.parse(endTime).getTime() - df.parse(startTime).getTime();
try{
diff = df.parse(endTime).getTime() - df.parse(startTime).getTime();
}catch (Exception e){
e.printStackTrace();
}
// 计算差多少天
long day = diff / nd;
// 计算差多少小时

@ -79,7 +79,7 @@ public class main {
// System.out.println(Long.parseLong(memo,16));
System.out.println(PassWordUtils.encrypt("2zhLmcL"));
System.out.println(PassWordUtils.encrypt("123456"));
System.out.println(PassWordUtils.decrypt("am5odi5AdTBvdGVIdEI3aHNyYms8ZD1C"));
System.out.println(PassWordUtils.decrypt("VHo1LVhrejBoRTtKgFp0TWVtcDxndXRx"));
// System.out.println(" 蒙K972X3 ".replace("","").trim());
// String str = "蒙蒙蒙蒙123456625";
// System.out.println(CRCUtil.CRC_AddData(10L,str));

@ -11,17 +11,42 @@ server.servlet.encoding.force=true
spring.messages.encoding=UTF-8
spring.profiles.active=dev
# ?????
spring.datasource.hikari.maximum-pool-size=100
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.idle-timeout=300000
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=600000
spring.datasource.hikari.connection-timeout=600000
spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.allow-pool-suspension=true
spring.datasource.hikari.register-mbeans=true
spring.datasource.hikari.leak-detection-threshold=600000
#??HikariCP??
spring.datasource.main.hikari.maximum-pool-size=100
spring.datasource.main.hikari.auto-commit=true
spring.datasource.main.hikari.idle-timeout=300000
spring.datasource.main.hikari.pool-name=DatebookHikariCP
spring.datasource.main.hikari.max-lifetime=600000
spring.datasource.main.hikari.connection-timeout=600000
spring.datasource.main.hikari.minimum-idle=15
spring.datasource.main.hikari.allow-pool-suspension=true
spring.datasource.main.hikari.register-mbeans=true
spring.datasource.main.hikari.leak-detection-threshold=300000
spring.datasource.primary.hikari.maximum-pool-size=100
spring.datasource.primary.hikari.auto-commit=true
spring.datasource.primary.hikari.idle-timeout=300000
spring.datasource.primary.hikari.pool-name=DatebookHikariCP
spring.datasource.primary.hikari.max-lifetime=600000
spring.datasource.primary.hikari.connection-timeout=600000
spring.datasource.primary.hikari.minimum-idle=15
spring.datasource.primary.hikari.allow-pool-suspension=true
spring.datasource.primary.hikari.register-mbeans=true
spring.datasource.primary.hikari.leak-detection-threshold=300000
spring.datasource.bak.hikari.maximum-pool-size=100
spring.datasource.bak.hikari.auto-commit=true
spring.datasource.bak.hikari.idle-timeout=300000
spring.datasource.bak.hikari.pool-name=DatebookHikariCP
spring.datasource.bak.hikari.max-lifetime=600000
spring.datasource.bak.hikari.connection-timeout=600000
spring.datasource.bak.hikari.minimum-idle=15
spring.datasource.bak.hikari.allow-pool-suspension=true
spring.datasource.bak.hikari.register-mbeans=true
spring.datasource.bak.hikari.leak-detection-threshold=300000
logging.level.com.zaxxer.hikari=DEBUG
spring.devtools.restart.enabled=true
spring.devtools.restart.additional-paths=src/main
@ -72,4 +97,8 @@ MySQLvalidationQuery=SELECT 1
spring.web.resources.static-locations= classpath:/static/View/
Downfilepth= classpath:/static/tt.txt
#??jta????
spring.jta.enabled=true
spring.jta.transaction-manager-id=integralManager
spring.jta.log-dir=classpath:/static/View/logs
spring.jta.atomikos.properties.log-base-name=IntegralManager.log

Loading…
Cancel
Save