commit
4c8a4389ef
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
@ -0,0 +1,13 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="exploded-war" name="community-manage-provider:Web exploded">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/community_manage_provider_Web_exploded</output-path>
|
||||
<root id="root">
|
||||
<element id="javaee-facet-resources" facet="community-manage-provider/web/Web" />
|
||||
<element id="directory" name="WEB-INF">
|
||||
<element id="directory" name="classes">
|
||||
<element id="module-output" name="community-manage-provider" />
|
||||
</element>
|
||||
</element>
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="community-mapper" />
|
||||
<module name="community-api" />
|
||||
<module name="community-model" />
|
||||
<module name="community-admin-consumer" />
|
||||
<module name="community-common" />
|
||||
<module name="community-app-provider" />
|
||||
<module name="community-butlerApp-provider" />
|
||||
<module name="community-butlerApp-consumer" />
|
||||
<module name="community-manage-provider" />
|
||||
<module name="community-app-consumer" />
|
||||
<module name="community-merchant-consumer" />
|
||||
<module name="community-merchant-provider" />
|
||||
<module name="community-admin-provider" />
|
||||
<module name="community-manage-consumer" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="community-admin-order-provider" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="community-admin-consumer" options="-parameters" />
|
||||
<module name="community-admin-order-provider" options="-parameters" />
|
||||
<module name="community-admin-provider" options="-parameters" />
|
||||
<module name="community-api" options="-parameters" />
|
||||
<module name="community-app-consumer" options="-parameters" />
|
||||
<module name="community-app-provider" options="-parameters" />
|
||||
<module name="community-butlerApp-consumer" options="-parameters" />
|
||||
<module name="community-butlerApp-provider" options="-parameters" />
|
||||
<module name="community-common" options="-parameters" />
|
||||
<module name="community-manage-consumer" options="-parameters" />
|
||||
<module name="community-manage-provider" options="-parameters" />
|
||||
<module name="community-mapper" options="-parameters" />
|
||||
<module name="community-merchant-consumer" options="-parameters" />
|
||||
<module name="community-merchant-provider" options="-parameters" />
|
||||
<module name="community-model" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="SaasIntelligentCommunity@localhost" uuid="fd5de293-1af1-466e-803d-43e87a54f033">
|
||||
<driver-ref>mysql.8</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mysql://localhost:3306/SaasIntelligentCommunity</jdbc-url>
|
||||
<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="ProjectDictionaryState">
|
||||
<dictionary name="AKU001" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/community-admin-consumer/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-admin-provider/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-api/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-app-consumer/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-app-provider/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-butlerApp-consumer/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-butlerApp-provider/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-manage-consumer/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-manage-provider/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-mapper/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-mapper/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-merchant-consumer/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-merchant-provider/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/community-model/src/main/java" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxProjectSettings">
|
||||
<option name="commitMessageIssueKeyValidationOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
<option name="commitMessageValidationConfigOverride">
|
||||
<CommitMessageValidationOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</CommitMessageValidationOverride>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,9 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="SerializableHasSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreAnonymousInnerClasses" value="false" />
|
||||
<option name="superClassString" value="java.awt.Component" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectPlainTextFileTypeManager">
|
||||
<file url="file://$PROJECT_DIR$/community-app-provider/src/main/resources/config/application-upload.yml" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="TemplatesSettings">
|
||||
<option name="templateConfigs">
|
||||
<TemplateContext>
|
||||
<option name="projectPath" value="$PROJECT_DIR$" />
|
||||
</TemplateContext>
|
||||
</option>
|
||||
</component>
|
||||
</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.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-admin-consumer</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>community-admin-consumer</name>
|
||||
<url>http://www.example.com</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- *************************** api模块依赖 ***************************************** -->
|
||||
<dependency>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-api</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- *************************** api模块依赖 ***************************************** -->
|
||||
|
||||
<!-- *************************** model模块依赖 ***************************************** -->
|
||||
<dependency>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-model</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- *************************** model模块依赖 ***************************************** -->
|
||||
|
||||
<!-- *************************** common模块依赖 ***************************************** -->
|
||||
<dependency>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- *************************** common模块依赖 ***************************************** -->
|
||||
|
||||
<!-- *************************** minio依赖 ***************************************** -->
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- *************************** minio依赖 ***************************************** -->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>community-admin-consumer</finalName>
|
||||
<!-- xxx.jar没有主清单属性-->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.2.2.RELEASE</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,16 @@
|
||||
package com.saas.consumer.admin.aop.checkAuthority;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* admin检查权限注解
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface AdminCheckAuthorityAnnotation {
|
||||
// 权限编号
|
||||
String jurisdictionId() default "";
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.saas.consumer.admin.aop.log;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 管理员操作日志注解
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface AdminLogAnnotation {
|
||||
// 业务类型
|
||||
String businessType() default "";
|
||||
|
||||
// 操作名称
|
||||
String operationName() default "";
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.saas.consumer.admin.controller.customerList;
|
||||
|
||||
import com.saas.api.admin.service.customerList.ICustomerListService;
|
||||
import com.saas.common.utils.page.PageInfo;
|
||||
import com.saas.common.utils.result.Result;
|
||||
import com.saas.common.utils.result.ResultPageInfo;
|
||||
import com.saas.consumer.admin.aop.log.AdminLogAnnotation;
|
||||
import com.saas.dto.admin.customerList.CustomerListDTO;
|
||||
import com.saas.vo.admin.customerList.CustomerDetailsVo;
|
||||
import com.saas.vo.admin.customerList.CustomerListVo;
|
||||
import org.apache.dubbo.config.annotation.Reference;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 客户列表
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/user/customerList")
|
||||
public class CustomerListController {
|
||||
@Reference
|
||||
ICustomerListService customerListService;
|
||||
|
||||
/**
|
||||
* 查询所有的客户信息
|
||||
* @param customerListDTO 客户列表list传参DTO
|
||||
* @return 客户信息
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@AdminLogAnnotation(businessType = "客户列表",operationName = "查询客户列表记录")
|
||||
public ResultPageInfo<CustomerListVo> list(CustomerListDTO customerListDTO){
|
||||
return ResultPageInfo.success(customerListService.list(customerListDTO),"请求成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户主键id查询详情
|
||||
* @param id 客户主键id
|
||||
* @return 客户详情
|
||||
*/
|
||||
@GetMapping("/findDetailsById")
|
||||
public Result<CustomerDetailsVo> findDetailsById(Integer id){
|
||||
return Result.success(customerListService.findDetailsById(id),"请求成功");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.saas.consumer.admin.controller.order;
|
||||
|
||||
import com.saas.api.admin.service.order.IFinancialStatementsService;
|
||||
import com.saas.common.utils.page.PageInfo;
|
||||
import com.saas.common.utils.result.HttpStatusEnum;
|
||||
import com.saas.common.utils.result.Result;
|
||||
import com.saas.common.utils.result.ResultPageInfo;
|
||||
import com.saas.dto.admin.order.AdminFunctionOrderDTO;
|
||||
import com.saas.dto.admin.order.FinancialStatementsDTO;
|
||||
import com.saas.dto.admin.order.FinancialStatementsRefundDTO;
|
||||
import com.saas.vo.admin.order.AdminFunctionOrderListVo;
|
||||
import com.saas.vo.admin.order.FinancialStatementsDetailsVo;
|
||||
import com.saas.vo.admin.order.FinancialStatementsFBIVo;
|
||||
import com.saas.vo.admin.order.FinancialStatementsVo;
|
||||
import org.apache.dubbo.config.annotation.Reference;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 财务账单
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/user/financialStatements")
|
||||
public class FinancialStatementsController {
|
||||
@Reference
|
||||
IFinancialStatementsService financialStatementsService;
|
||||
|
||||
/**
|
||||
* 查询所有财务账单
|
||||
* @param financialStatementsDTO 财务账单List传参DTO
|
||||
* @return 财务账单信息
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResultPageInfo<FinancialStatementsVo> list(FinancialStatementsDTO financialStatementsDTO){
|
||||
return ResultPageInfo.success(financialStatementsService.list(financialStatementsDTO),"请求成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询财务详情
|
||||
* @param id 财务账单主键id
|
||||
* @return 财务账单信息
|
||||
*/
|
||||
@GetMapping("/findDetails")
|
||||
public Result<FinancialStatementsDetailsVo> findDetails(Integer id){
|
||||
return Result.success(financialStatementsService.findDetails(id),"请求成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款页面回显
|
||||
* @param id 财务账单主键id
|
||||
* @return 退款页面回显信息
|
||||
*/
|
||||
@GetMapping("/findById")
|
||||
public Result<FinancialStatementsFBIVo> findById(Integer id){
|
||||
return Result.success(financialStatementsService.findById(id),"请求成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款
|
||||
* @param financialStatementsRefundDTO 财务账单退款传参DTO
|
||||
* @return 退款结果
|
||||
*/
|
||||
@PostMapping("/refund")
|
||||
public Result<String> refund(@RequestBody FinancialStatementsRefundDTO financialStatementsRefundDTO){
|
||||
if (financialStatementsService.refund(financialStatementsRefundDTO)){
|
||||
return Result.success(null,"操作成功");
|
||||
}else {
|
||||
//操作失败
|
||||
return Result.fail(HttpStatusEnum.OPERATION_FAILED);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.saas.consumer.admin.controller.telCode;
|
||||
|
||||
import com.saas.api.admin.service.telCode.IAdminTelCodeService;
|
||||
import com.saas.common.utils.result.HttpStatusEnum;
|
||||
import com.saas.common.utils.result.Result;
|
||||
import com.saas.consumer.admin.aop.log.AdminLogAnnotation;
|
||||
import com.saas.dto.admin.telCode.SettledTelCodeDTO;
|
||||
import org.apache.dubbo.config.annotation.Reference;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 手机验证码
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/user/telCode")
|
||||
public class TelCodeController {
|
||||
@Reference
|
||||
IAdminTelCodeService adminTelCodeService;
|
||||
|
||||
|
||||
/**
|
||||
* 平台用户发送入驻申请手机号验证码
|
||||
* @param settledTelCodeDTO 入驻申请手机验证码传参DTO
|
||||
* @return 手机号验证码
|
||||
*/
|
||||
@PostMapping("/sendSettledTelCode")
|
||||
@AdminLogAnnotation(businessType = "手机验证码",operationName = "发送入驻申请手机号验证码")
|
||||
public Result<String> sendSettledTelCode(@RequestBody SettledTelCodeDTO settledTelCodeDTO){
|
||||
//生成验证码code
|
||||
String code = String.valueOf(new Random().nextInt(899999) + 100000);
|
||||
//验证码类型
|
||||
Integer type = 1;//验证码类型:1.入驻申请
|
||||
|
||||
if (settledTelCodeDTO.getTel() == null){
|
||||
return Result.fail(HttpStatusEnum.CUSTOM_EXCEPTION,"手机号不可为空");
|
||||
}
|
||||
|
||||
//验证手机号格式
|
||||
Pattern p=Pattern.compile("^1[3456789]\\d{9}$");
|
||||
Matcher m=p.matcher(settledTelCodeDTO.getTel());
|
||||
boolean matches = m.matches();
|
||||
if (!matches){
|
||||
return Result.fail(HttpStatusEnum.CUSTOM_EXCEPTION,"手机号格式有误");
|
||||
}
|
||||
|
||||
if (adminTelCodeService.sendSettledTelCode(settledTelCodeDTO,type, code)){
|
||||
return Result.success(null,"发送成功");
|
||||
}else {
|
||||
//登录失败,账户或密码错误
|
||||
return Result.fail(HttpStatusEnum.SEND_TEL_CODE_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.saas.consumer.admin.controller.upload;
|
||||
|
||||
import com.saas.common.utils.minio.MinioUtil;
|
||||
import com.saas.common.utils.result.Result;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 平台上传照片
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/user/upload")
|
||||
public class AdminUploadController {
|
||||
|
||||
/**
|
||||
* 上传平台照片
|
||||
* @param file 上传文件
|
||||
* @return map
|
||||
*/
|
||||
@PostMapping("/uploadImg")
|
||||
public Result<String> uploadImg(@RequestParam("file") MultipartFile file){
|
||||
MinioUtil minioUtil = new MinioUtil();
|
||||
String upload = minioUtil.upload(file,"admin");
|
||||
return Result.success(upload,"上传成功");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package com.saas.consumer.admin.exception;
|
||||
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.common.utils.result.HttpStatusEnum;
|
||||
import com.saas.common.utils.result.Result;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.validation.ObjectError;
|
||||
import org.springframework.web.HttpRequestMethodNotSupportedException;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
import javax.xml.bind.ValidationException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 自定义全局异常处理的类 @ControllerAdvice 该注解表示开启了全局异常的捕获
|
||||
*/
|
||||
@ControllerAdvice
|
||||
@Slf4j
|
||||
public class GlobalExceptionHandler {
|
||||
/**
|
||||
* 处理自定义的业务异常
|
||||
* @param req 请求
|
||||
* @param e 异常
|
||||
* @return
|
||||
*/
|
||||
@ExceptionHandler(value = BizException.class)
|
||||
@ResponseBody
|
||||
public Result<String> bizExceptionHandler(HttpServletRequest req, BizException e){
|
||||
log.error("发生业务异常!原因是:{}",e.getMessage());
|
||||
return Result.fail(e.getCode(),e.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理运行时异常异常
|
||||
* @param req 请求
|
||||
* @param e 异常
|
||||
* @return
|
||||
*/
|
||||
@ExceptionHandler(value = RuntimeException.class)
|
||||
@ResponseBody
|
||||
public Result<String> runtimeExceptionHandler(HttpServletRequest req, RuntimeException e){
|
||||
log.error("发生运行时异常!原因是:{}",e.getMessage());
|
||||
return Result.fail(HttpStatusEnum.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理空指针的异常
|
||||
* @param req 请求
|
||||
* @param e 异常
|
||||
* @return
|
||||
*/
|
||||
@ExceptionHandler(value =NullPointerException.class)
|
||||
@ResponseBody
|
||||
public Result<String> exceptionHandler(HttpServletRequest req, NullPointerException e){
|
||||
log.error("发生空指针异常!原因是:",e);
|
||||
return Result.fail(HttpStatusEnum.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求方法异常
|
||||
*
|
||||
* @param req 请求
|
||||
* @param e 异常
|
||||
* @return
|
||||
*/
|
||||
@ExceptionHandler(value = HttpRequestMethodNotSupportedException.class)
|
||||
@ResponseBody
|
||||
public Result<String> httpRequestMethodNotSupportedException(HttpServletRequest req, HttpRequestMethodNotSupportedException e) {
|
||||
log.error("请求方法异常!原因是:",e);
|
||||
return Result.fail(HttpStatusEnum.METHOD_NOT_ALLOWED);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理其他异常
|
||||
* @param req 请求
|
||||
* @param e 异常
|
||||
* @return
|
||||
*/
|
||||
@ExceptionHandler(value =Exception.class)
|
||||
@ResponseBody
|
||||
public Result<String> exceptionHandler(HttpServletRequest req, Exception e){
|
||||
log.error("未知异常!原因是:",e);
|
||||
return Result.fail(HttpStatusEnum.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理参数校验注解异常
|
||||
* @param e 异常
|
||||
* @return
|
||||
*/
|
||||
@ExceptionHandler(value = {BindException.class, ValidationException.class, MethodArgumentNotValidException.class})
|
||||
@ResponseBody
|
||||
public Result<String> handleValidatedException(Exception e) {
|
||||
Result<String> result = null;
|
||||
if (e instanceof MethodArgumentNotValidException) {
|
||||
MethodArgumentNotValidException ex =(MethodArgumentNotValidException) e;
|
||||
result = Result.fail(HttpStatusEnum.MISSING_FIELD_INFO,
|
||||
ex.getBindingResult().getAllErrors().stream()
|
||||
.map(ObjectError::getDefaultMessage)
|
||||
.collect(Collectors.joining(";"))
|
||||
);
|
||||
} else if (e instanceof ConstraintViolationException){
|
||||
ConstraintViolationException ex = (ConstraintViolationException) e;
|
||||
result = Result.fail(HttpStatusEnum.MISSING_FIELD_INFO,
|
||||
ex.getConstraintViolations().stream()
|
||||
.map(ConstraintViolation::getMessage)
|
||||
.collect(Collectors.joining("; "))
|
||||
);
|
||||
}else if (e instanceof BindException) {
|
||||
BindException ex = (BindException ) e;
|
||||
result = Result.fail(HttpStatusEnum.MISSING_FIELD_INFO,
|
||||
ex.getAllErrors().stream()
|
||||
.map(ObjectError::getDefaultMessage)
|
||||
.collect(Collectors.joining("; "))
|
||||
);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.saas.consumer.admin.interceptor;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Configuration
|
||||
public class AdminInterceptorConfig extends WebMvcConfigurationSupport {
|
||||
@Resource
|
||||
AdminLoginInterceptor adminLoginInterceptor;
|
||||
@Override
|
||||
protected void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(adminLoginInterceptor).addPathPatterns("/admin/user/**");
|
||||
super.addInterceptors(registry);
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
# 防止端口冲突
|
||||
server:
|
||||
port: 8002
|
||||
|
||||
#dubbo:
|
||||
# application:
|
||||
# # 应用名称
|
||||
# name: adminConsumer
|
||||
# registry:
|
||||
# protocol: zookeeper
|
||||
# # 注册中心地址
|
||||
# address: zookeeper://127.0.0.1:2181
|
||||
# metadata-report:
|
||||
# #元数据中心地址
|
||||
# address: zookeeper://127.0.0.1:2181
|
||||
# consumer:
|
||||
# version: 1.0
|
||||
# retries: -1 #防止消费者多次调用提供者
|
||||
|
||||
spring:
|
||||
#springboot 自带的jackson配置
|
||||
jackson:
|
||||
#配置springboot时区
|
||||
time-zone: GMT+8
|
||||
#配置时间格式 格式化日期 格式化时间
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
#中转站,用于切换 【本地,服务器,测试】
|
||||
profiles:
|
||||
include: transfer
|
||||
# profiles:
|
||||
# #开发环境(本地开发,目前只开发了这个)
|
||||
# include: dev
|
||||
# #测试环境(测试服务器)
|
||||
# # include: test
|
||||
# #生产环境(正式服务器)
|
||||
# # include: pro
|
@ -0,0 +1,4 @@
|
||||
#开发环境配置文件导入
|
||||
spring:
|
||||
profiles:
|
||||
include: devRes,devLog,devZookeeper
|
@ -0,0 +1,19 @@
|
||||
#logging debug
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com:
|
||||
api:
|
||||
dao: debug
|
||||
butlerApp:
|
||||
dao: DEBUG
|
||||
file:
|
||||
# 输出的log文件名
|
||||
name: community-admin-consumer
|
||||
# 输出的文件的路径
|
||||
path: log/logs/admin-consumer
|
||||
# 限制日志文件的大小
|
||||
max-size: 10MB
|
||||
# 日志的保存天数
|
||||
max-history: 7
|
||||
config: classpath:logback-spring.xml
|
@ -0,0 +1,14 @@
|
||||
dubbo:
|
||||
application:
|
||||
# 应用名称
|
||||
name: adminConsumer
|
||||
registry:
|
||||
protocol: zookeeper
|
||||
# 注册中心地址
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
metadata-report:
|
||||
#元数据中心地址
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
consumer:
|
||||
version: 1.0
|
||||
retries: -1 #防止消费者多次调用提供者
|
@ -0,0 +1,4 @@
|
||||
#生产环境配置文件导入
|
||||
spring:
|
||||
profiles:
|
||||
include: proRes,proLog
|
@ -0,0 +1,17 @@
|
||||
#logging debug
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com:
|
||||
api:
|
||||
dao: debug
|
||||
file:
|
||||
# 输出的log文件名
|
||||
name: intelligent-community
|
||||
# 输出的文件的路径
|
||||
path: /www/wwwroot/community.kadalai.com/apache-tomcat-8.5.61/webapps/logs
|
||||
# 限制日志文件的大小
|
||||
max-size: 100MB
|
||||
# 日志的保存天数
|
||||
max-history: 15
|
||||
config: classpath:logback-spring.xml
|
@ -0,0 +1,4 @@
|
||||
#测试环境配置文件导入
|
||||
spring:
|
||||
profiles:
|
||||
include: testRes,testLog,testZookeeper
|
@ -0,0 +1,17 @@
|
||||
#logging debug
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com:
|
||||
api:
|
||||
dao: debug
|
||||
file:
|
||||
# 输出的log文件名
|
||||
name: admin-consumer
|
||||
# 输出的文件的路径
|
||||
path: /www/wwwroot/communitySaas/logs/adminConsumer
|
||||
# 限制日志文件的大小
|
||||
max-size: 100MB
|
||||
# 日志的保存天数
|
||||
max-history: 7
|
||||
config: classpath:logback-spring.xml
|
@ -0,0 +1,14 @@
|
||||
dubbo:
|
||||
application:
|
||||
# 应用名称
|
||||
name: adminConsumer
|
||||
registry:
|
||||
protocol: zookeeper
|
||||
# 注册中心地址
|
||||
address: zookeeper://121.41.26.225:2181
|
||||
metadata-report:
|
||||
#元数据中心地址
|
||||
address: zookeeper://121.41.26.225:2181
|
||||
consumer:
|
||||
version: 1.0
|
||||
retries: -1 #防止消费者多次调用提供者
|
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-admin-provider</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>community-admin-provider</name>
|
||||
<url>http://www.example.com</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- *************************** api模块依赖 ***************************************** -->
|
||||
<dependency>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-api</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- *************************** api模块依赖 ***************************************** -->
|
||||
|
||||
<!-- *************************** model模块依赖 ***************************************** -->
|
||||
<dependency>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-model</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- *************************** model模块依赖 ***************************************** -->
|
||||
|
||||
<!-- *************************** mapper模块依赖 ***************************************** -->
|
||||
<dependency>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-mapper</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- *************************** mapper模块依赖 ***************************************** -->
|
||||
|
||||
<!-- *************************** common模块依赖 ***************************************** -->
|
||||
<dependency>
|
||||
<groupId>com.saas</groupId>
|
||||
<artifactId>community-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- *************************** common模块依赖 ***************************************** -->
|
||||
|
||||
<!-- *************************** 支付宝sdk ********************************************** -->
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-sdk-java</artifactId>
|
||||
</dependency>
|
||||
<!-- *************************** 支付宝sdk ********************************************** -->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>community-admin-provider</finalName>
|
||||
<!-- xxx.jar没有主清单属性-->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.2.2.RELEASE</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
package com.saas.admin.provider;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@MapperScan({"com.saas.mapper"})
|
||||
@SpringBootApplication
|
||||
public class AdminProviderApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AdminProviderApplication.class);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.saas.admin.provider.config.mybatisPlus;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MyMetaObjectHandler implements MetaObjectHandler {
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
log.info("start insert fill ....");
|
||||
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now()); // 起始版本 3.3.0(推荐使用)
|
||||
// 或者
|
||||
// this.strictInsertFill(metaObject, "createTime", () -> LocalDateTime.now(), LocalDateTime.class); // 起始版本 3.3.3(推荐)
|
||||
// 或者
|
||||
// this.fillStrategy(metaObject, "createTime", LocalDateTime.now()); // 也可以使用(3.3.0 该方法有bug)
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
log.info("start update fill ....");
|
||||
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now()); // 起始版本 3.3.0(推荐)
|
||||
// 或者
|
||||
// this.strictUpdateFill(metaObject, "updateTime", () -> LocalDateTime.now(), LocalDateTime.class); // 起始版本 3.3.3(推荐)
|
||||
// 或者
|
||||
// this.fillStrategy(metaObject, "updateTime", LocalDateTime.now()); // 也可以使用(3.3.0 该方法有bug)
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.saas.admin.provider.service.authority;
|
||||
|
||||
import com.saas.api.admin.service.authority.IAdminCheckAuthorityService;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
|
||||
@Service(interfaceClass = IAdminCheckAuthorityService.class)
|
||||
public class AdminCheckAuthorityServiceImpl implements IAdminCheckAuthorityService {
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.saas.admin.provider.service.balance;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.saas.api.admin.service.balance.IAdminBalanceService;
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.common.utils.PropertyUtils;
|
||||
import com.saas.common.utils.page.PageInfo;
|
||||
import com.saas.dto.admin.balance.AdminBalanceDTO;
|
||||
import com.saas.mapper.entity.AdminUserBalanceBillRecordMapper;
|
||||
import com.saas.mapper.entity.SysCommunityMapper;
|
||||
import com.saas.mapper.entity.SysCompanyMapper;
|
||||
import com.saas.pojo.AdminUser;
|
||||
import com.saas.pojo.AdminUserBalanceBillRecord;
|
||||
import com.saas.pojo.SysCommunity;
|
||||
import com.saas.pojo.SysCompany;
|
||||
import com.saas.vo.manage.balance.AdminBalanceRecordListVo;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service(interfaceClass = IAdminBalanceService.class)
|
||||
public class AdminBalanceServiceImpl implements IAdminBalanceService {
|
||||
@Resource
|
||||
SysCompanyMapper sysCompanyMapper;
|
||||
@Resource
|
||||
AdminUserBalanceBillRecordMapper adminUserBalanceBillRecordMapper;
|
||||
@Resource
|
||||
SysCommunityMapper sysCommunityMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<AdminBalanceRecordListVo> list(AdminBalanceDTO adminBalanceDTO, AdminUser adminUser) throws BizException {
|
||||
ArrayList<AdminBalanceRecordListVo> adminBalanceRecordListVos = new ArrayList<>();
|
||||
|
||||
QueryWrapper<AdminUserBalanceBillRecord> queryWrapper = new QueryWrapper<>();
|
||||
if (adminUser.getType() == 3){//3.平台入驻公司管理账号
|
||||
//查询该平台用户下通过的公司
|
||||
QueryWrapper<SysCompany> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("admin_user_id",adminUser.getId());
|
||||
queryWrapper2.eq("status",2);//2.通过
|
||||
SysCompany sysCompany2 = sysCompanyMapper.selectOne(queryWrapper2);
|
||||
if (sysCompany2 == null){
|
||||
//封装成分页格式回显
|
||||
return new PageInfo<>(1, adminBalanceRecordListVos,0);
|
||||
}
|
||||
|
||||
//查询通过的公司下的小区
|
||||
ArrayList<Integer> communityIds = new ArrayList<>();
|
||||
QueryWrapper<SysCommunity> queryWrapper3 = new QueryWrapper<>();
|
||||
queryWrapper3.eq("company_id",sysCompany2.getId());
|
||||
List<SysCommunity> sysCommunities = sysCommunityMapper.selectList(queryWrapper3);
|
||||
if (sysCommunities != null && sysCommunities.size()>0){
|
||||
for (SysCommunity sysCommunity : sysCommunities) {
|
||||
communityIds.add(sysCommunity.getId());
|
||||
}
|
||||
}else {
|
||||
//封装成分页格式回显
|
||||
return new PageInfo<>(1, adminBalanceRecordListVos,0);
|
||||
}
|
||||
queryWrapper.in("community_id",communityIds);
|
||||
}
|
||||
|
||||
Page<AdminUserBalanceBillRecord> page = new Page<>(adminBalanceDTO.getPageNum(), adminBalanceDTO.getSize());
|
||||
|
||||
//数据查询
|
||||
Page<AdminUserBalanceBillRecord> adminUserBalanceBillRecordPage = adminUserBalanceBillRecordMapper.selectPage(page, queryWrapper);
|
||||
List<AdminUserBalanceBillRecord> records = adminUserBalanceBillRecordPage.getRecords();
|
||||
if (records != null && records.size()>0){
|
||||
for (AdminUserBalanceBillRecord record : records) {
|
||||
AdminBalanceRecordListVo adminBalanceRecordListVo = new AdminBalanceRecordListVo();
|
||||
PropertyUtils.copyProperties(record,adminBalanceRecordListVo);
|
||||
|
||||
//查询小区名称
|
||||
if (record.getCommunityId() != null){
|
||||
SysCompany sysCompany = sysCompanyMapper.selectById(record.getCommunityId());
|
||||
if (sysCompany != null){
|
||||
adminBalanceRecordListVo.setCommunityName(sysCompany.getCompanyName());
|
||||
}
|
||||
}
|
||||
adminBalanceRecordListVos.add(adminBalanceRecordListVo);
|
||||
}
|
||||
}
|
||||
|
||||
//封装成分页格式回显
|
||||
return new PageInfo<>(adminUserBalanceBillRecordPage.getPages(), adminBalanceRecordListVos, adminUserBalanceBillRecordPage.getTotal());
|
||||
}
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
package com.saas.admin.provider.service.city;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.saas.api.admin.service.city.ICityService;
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.common.utils.PropertyUtils;
|
||||
import com.saas.common.utils.result.HttpStatusEnum;
|
||||
import com.saas.mapper.entity.AdminCityMapper;
|
||||
import com.saas.pojo.AdminCity;
|
||||
import com.saas.vo.admin.city.AllCityVo;
|
||||
import com.saas.vo.admin.city.CityVo;
|
||||
import com.saas.vo.app.city.AppAllCityVo;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service(interfaceClass = ICityService.class)
|
||||
public class CityServiceImpl implements ICityService {
|
||||
@Resource
|
||||
AdminCityMapper adminCityMapper;
|
||||
@Resource
|
||||
private RedisTemplate<Object,Object> redisTemplate;
|
||||
|
||||
@Override
|
||||
public List<CityVo> findByType(Integer type) {
|
||||
//搜索条件
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("type",type);
|
||||
//数据查询
|
||||
List<AdminCity> adminCities = adminCityMapper.selectByMap(map);
|
||||
//DO转VO
|
||||
ArrayList<CityVo> cityVoList = new ArrayList<>();
|
||||
if (adminCities != null && adminCities.size()>0){
|
||||
for (AdminCity adminCity : adminCities) {
|
||||
CityVo cityVo = new CityVo();
|
||||
PropertyUtils.copyProperties(adminCity,cityVo);
|
||||
cityVoList.add(cityVo);
|
||||
}
|
||||
}
|
||||
|
||||
return cityVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CityVo> findByParentId(Integer parentId) {
|
||||
//搜索条件
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("parent_id",parentId);
|
||||
//数据查询
|
||||
List<AdminCity> adminCities = adminCityMapper.selectByMap(map);
|
||||
//DO转VO
|
||||
ArrayList<CityVo> cityVoList = new ArrayList<>();
|
||||
if (adminCities != null && adminCities.size()>0){
|
||||
for (AdminCity adminCity : adminCities) {
|
||||
CityVo cityVo = new CityVo();
|
||||
PropertyUtils.copyProperties(adminCity,cityVo);
|
||||
cityVoList.add(cityVo);
|
||||
}
|
||||
}
|
||||
|
||||
return cityVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AllCityVo> allCity() {
|
||||
try {
|
||||
if (redisTemplate.hasKey("cityList")){
|
||||
Object cityList = redisTemplate.opsForValue().get("cityList");
|
||||
return JSONArray.parseArray(cityList.toString(), AllCityVo.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BizException(HttpStatusEnum.CUSTOM_EXCEPTION,"redis出错");
|
||||
}
|
||||
List<AllCityVo> allCityRe = findAllCityRe();
|
||||
String s = JSONArray.toJSONString(allCityRe);
|
||||
redisTemplate.opsForValue().set("cityList",s);
|
||||
return allCityRe;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部的城市信息
|
||||
* @return 城市信息
|
||||
*/
|
||||
private List<AllCityVo> findAllCityRe() {
|
||||
//先查询所有的城市信息
|
||||
QueryWrapper<AdminCity> queryWrapper2 = new QueryWrapper<>();
|
||||
List<AdminCity> adminCities = adminCityMapper.selectList(queryWrapper2);
|
||||
|
||||
//查询县
|
||||
ArrayList<AllCityVo> allCityVos = new ArrayList<>();
|
||||
for (AdminCity adminCity : adminCities) {
|
||||
if (adminCity.getType() == 3){
|
||||
AllCityVo allCityVo2 = new AllCityVo();
|
||||
PropertyUtils.copyProperties(adminCity,allCityVo2);
|
||||
allCityVos.add(allCityVo2);
|
||||
}
|
||||
}
|
||||
|
||||
//查询市
|
||||
ArrayList<AllCityVo> allCityVos2 = new ArrayList<>();
|
||||
for (AdminCity adminCity : adminCities) {
|
||||
if (adminCity.getType() == 2){
|
||||
AllCityVo allCityVo2 = new AllCityVo();
|
||||
PropertyUtils.copyProperties(adminCity,allCityVo2);
|
||||
List<AllCityVo> cityList = allCityVo2.getCityList();
|
||||
for (AllCityVo allCityVo : allCityVos) {
|
||||
if (adminCity.getId().equals(allCityVo.getParentId())){
|
||||
if (cityList == null){
|
||||
cityList = new ArrayList<>();
|
||||
}
|
||||
cityList.add(allCityVo);
|
||||
}
|
||||
}
|
||||
allCityVo2.setCityList(cityList);
|
||||
allCityVos2.add(allCityVo2);
|
||||
}
|
||||
}
|
||||
|
||||
//查询省
|
||||
ArrayList<AllCityVo> allCityVos3 = new ArrayList<>();
|
||||
for (AdminCity adminCity : adminCities) {
|
||||
if (adminCity.getType() == 1){
|
||||
AllCityVo allCityVo2 = new AllCityVo();
|
||||
PropertyUtils.copyProperties(adminCity,allCityVo2);
|
||||
List<AllCityVo> cityList = allCityVo2.getCityList();
|
||||
for (AllCityVo allCityVo : allCityVos2) {
|
||||
if (adminCity.getId().equals(allCityVo.getParentId())){
|
||||
if (cityList == null){
|
||||
cityList = new ArrayList<>();
|
||||
}
|
||||
cityList.add(allCityVo);
|
||||
}
|
||||
}
|
||||
allCityVo2.setCityList(cityList);
|
||||
allCityVos3.add(allCityVo2);
|
||||
}
|
||||
}
|
||||
|
||||
return allCityVos3;
|
||||
}
|
||||
}
|
@ -0,0 +1,316 @@
|
||||
package com.saas.admin.provider.service.community;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.saas.admin.provider.utils.upload.AdminUploadToDbUtil;
|
||||
import com.saas.api.admin.service.community.ICommunityService;
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.common.utils.PropertyUtils;
|
||||
import com.saas.common.utils.page.PageInfo;
|
||||
import com.saas.common.utils.result.HttpStatusEnum;
|
||||
import com.saas.dto.admin.community.*;
|
||||
import com.saas.mapper.entity.AdminCityMapper;
|
||||
import com.saas.mapper.entity.AdminFunctionOrderMapper;
|
||||
import com.saas.mapper.entity.SysCommunityMapper;
|
||||
import com.saas.mapper.entity.SysCompanyMapper;
|
||||
import com.saas.pojo.*;
|
||||
import com.saas.vo.admin.community.CommunityFBIVo;
|
||||
import com.saas.vo.admin.community.CommunityInfoVo;
|
||||
import com.saas.vo.admin.community.CommunityListVo;
|
||||
import com.saas.vo.admin.upload.ResourcesImgAdminVo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
@Service(interfaceClass = ICommunityService.class)
|
||||
public class CommunityServiceImpl implements ICommunityService {
|
||||
private static StringBuilder stringBuilder = null;
|
||||
@Resource
|
||||
AdminCityMapper adminCityMapper;
|
||||
@Resource
|
||||
SysCommunityMapper sysCommunityMapper;
|
||||
@Resource
|
||||
SysCompanyMapper sysCompanyMapper;
|
||||
@Resource
|
||||
AdminFunctionOrderMapper adminFunctionOrderMapper;
|
||||
|
||||
@Override
|
||||
public PageInfo<CommunityListVo> list(CommunityListDTO communityListDTO) throws BizException {
|
||||
ArrayList<CommunityListVo> communityListVoList = new ArrayList<>();
|
||||
|
||||
QueryWrapper<SysCommunity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.like(StringUtils.isNotBlank(communityListDTO.getCommunityName()),"name",communityListDTO.getCommunityName());
|
||||
//数据分页
|
||||
Page<SysCommunity> page = new Page<>(communityListDTO.getPageNum(), communityListDTO.getSize());
|
||||
|
||||
//数据查询
|
||||
Page<SysCommunity> sysCommunityPage = sysCommunityMapper.selectPage(page, queryWrapper);
|
||||
List<SysCommunity> records = sysCommunityPage.getRecords();
|
||||
if (records != null && records.size() >0){
|
||||
for (SysCommunity sysCommunity : records) {
|
||||
CommunityListVo communityListVo = new CommunityListVo();
|
||||
PropertyUtils.copyProperties(sysCommunity,communityListVo);
|
||||
|
||||
//查询公司信息
|
||||
SysCompany sysCompany = sysCompanyMapper.selectById(sysCommunity.getCompanyId());
|
||||
if (sysCompany != null){
|
||||
communityListVo.setCompanyName(sysCompany.getCompanyName());
|
||||
}
|
||||
|
||||
//查询小区地址
|
||||
StringBuilder stringBuilder = findCityAddressDetails(true, sysCommunity.getAddress());
|
||||
stringBuilder.append(sysCommunity.getAddressDetails());//拼接公司详细地址
|
||||
communityListVo.setAddressName(stringBuilder.toString());//填入公司地址
|
||||
|
||||
//查询小区图片
|
||||
AdminUploadToDbUtil adminUploadToDbUtil = new AdminUploadToDbUtil();
|
||||
List<ResourcesImgAdminVo> imgByDate = adminUploadToDbUtil.findImgByDate("sys_community", sysCommunity.getId(), "logImg");
|
||||
communityListVo.setCommunityImgList(imgByDate);
|
||||
|
||||
|
||||
communityListVoList.add(communityListVo);
|
||||
}
|
||||
}
|
||||
|
||||
//封装成分页格式回显
|
||||
return new PageInfo<>(sysCommunityPage.getPages(), communityListVoList, sysCommunityPage.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean insertAdmin(CommunityInsertAdminDTO communityInsertAdminDTO, Integer id) throws BizException {
|
||||
//添加小区信息
|
||||
SysCommunity sysCommunity = new SysCommunity();
|
||||
sysCommunity.setCompanyId(communityInsertAdminDTO.getCompanyId());
|
||||
sysCommunity.setName(communityInsertAdminDTO.getName());
|
||||
sysCommunity.setCode(UUID.randomUUID().toString().replace("-",""));//填入生成的小区识别码
|
||||
sysCommunity.setAddress(communityInsertAdminDTO.getAddress());
|
||||
sysCommunity.setAddressDetails(communityInsertAdminDTO.getAddressDetails());
|
||||
sysCommunity.setCreateId(-1);
|
||||
sysCommunity.setCreateDate(new Date());
|
||||
int insert = sysCommunityMapper.insert(sysCommunity);
|
||||
|
||||
AdminUploadToDbUtil adminUploadToDbUtil = new AdminUploadToDbUtil();
|
||||
adminUploadToDbUtil.saveUrlToDB(communityInsertAdminDTO.getCommunityUrls(),"sys_community",sysCommunity.getId(),"logImg");
|
||||
|
||||
return insert > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommunityFBIVo findByIdAdmin(Integer communityId, AdminUser adminUser) throws BizException {
|
||||
CommunityFBIVo communityFBIVo = new CommunityFBIVo();
|
||||
|
||||
SysCommunity sysCommunity = sysCommunityMapper.selectById(communityId);
|
||||
if (sysCommunity == null){
|
||||
throw new BizException(HttpStatusEnum.RECORD_NOT_EXIST);
|
||||
}
|
||||
|
||||
communityFBIVo.setId(sysCommunity.getId());
|
||||
communityFBIVo.setName(sysCommunity.getName());
|
||||
communityFBIVo.setAddressDetails(sysCommunity.getAddressDetails());
|
||||
communityFBIVo.setCompanyId(sysCommunity.getCompanyId());
|
||||
//查询入驻公司信息
|
||||
SysCompany sysCompany = sysCompanyMapper.selectById(sysCommunity.getCompanyId());
|
||||
communityFBIVo.setCompanyName(sysCompany.getCompanyName());
|
||||
//查询省市县信息
|
||||
///查询县
|
||||
AdminCity county = adminCityMapper.selectById(sysCommunity.getAddress());
|
||||
communityFBIVo.setCountyId(county.getId());
|
||||
communityFBIVo.setCountyName(county.getName());
|
||||
///查询市
|
||||
AdminCity city = adminCityMapper.selectById(county.getParentId());
|
||||
communityFBIVo.setCityId(city.getId());
|
||||
communityFBIVo.setCityName(city.getName());
|
||||
///查询省
|
||||
AdminCity province = adminCityMapper.selectById(city.getParentId());
|
||||
communityFBIVo.setProvinceId(province.getId());
|
||||
communityFBIVo.setProvinceName(province.getName());
|
||||
|
||||
//查询小区正门图片
|
||||
AdminUploadToDbUtil adminUploadToDbUtil = new AdminUploadToDbUtil();
|
||||
List<ResourcesImgAdminVo> imgByDate = adminUploadToDbUtil.findImgByDate("sys_community", sysCommunity.getId(), "logImg");
|
||||
communityFBIVo.setImgList(imgByDate);
|
||||
|
||||
return communityFBIVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean updateAdmin(CommunityUpdateAdminDTO communityUpdateAdminDTO, Integer id) throws BizException {
|
||||
SysCommunity sysCommunity = sysCommunityMapper.selectById(communityUpdateAdminDTO.getId());
|
||||
if (sysCommunity == null){
|
||||
throw new BizException(HttpStatusEnum.RECORD_NOT_EXIST);
|
||||
}
|
||||
|
||||
PropertyUtils.copyProperties(communityUpdateAdminDTO,sysCommunity);
|
||||
int update = sysCommunityMapper.updateById(sysCommunity);
|
||||
|
||||
AdminUploadToDbUtil adminUploadToDbUtil = new AdminUploadToDbUtil();
|
||||
adminUploadToDbUtil.delete("sys_community",communityUpdateAdminDTO.getId(),"logImg");
|
||||
adminUploadToDbUtil.saveUrlToDB(communityUpdateAdminDTO.getCommunityUrls(),"sys_community",sysCommunity.getId(),"logImg");
|
||||
|
||||
return update >0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean insert(CommunityInsertDTO communityInsertDTO, Integer id) throws BizException {
|
||||
//根据用户主键id查询所在公司
|
||||
//搜索条件
|
||||
QueryWrapper<SysCompany> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("admin_user_id",id);
|
||||
queryWrapper.eq("status",2);//2.通过
|
||||
//数据查询
|
||||
SysCompany sysCompany = sysCompanyMapper.selectOne(queryWrapper);
|
||||
if (sysCompany == null){
|
||||
throw new BizException(HttpStatusEnum.CUSTOM_EXCEPTION,"公司未添加或未通过");
|
||||
}
|
||||
|
||||
//添加小区信息
|
||||
SysCommunity sysCommunity = new SysCommunity();
|
||||
sysCommunity.setCompanyId(sysCompany.getId());
|
||||
sysCommunity.setName(communityInsertDTO.getName());
|
||||
sysCommunity.setCode(UUID.randomUUID().toString().replace("-",""));//填入生成的小区识别码
|
||||
sysCommunity.setAddress(communityInsertDTO.getAddress());
|
||||
sysCommunity.setAddressDetails(communityInsertDTO.getAddressDetails());
|
||||
sysCommunity.setCreateId(-1);
|
||||
sysCommunity.setCreateDate(new Date());
|
||||
int insert = sysCommunityMapper.insert(sysCommunity);
|
||||
|
||||
AdminUploadToDbUtil adminUploadToDbUtil = new AdminUploadToDbUtil();
|
||||
adminUploadToDbUtil.saveUrlToDB(communityInsertDTO.getCommunityUrls(),"sys_community",sysCommunity.getId(),"logImg");
|
||||
|
||||
return insert > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean update(CommunityUpdateDTO communityUpdateDTO, AdminUser adminUser) throws BizException {
|
||||
//根据用户主键id查询所在公司
|
||||
//搜索条件
|
||||
QueryWrapper<SysCompany> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("admin_user_id",adminUser.getId());
|
||||
queryWrapper.eq("status",2);//2.通过
|
||||
//数据查询
|
||||
SysCompany sysCompany = sysCompanyMapper.selectOne(queryWrapper);
|
||||
if (sysCompany == null){
|
||||
throw new BizException(HttpStatusEnum.CUSTOM_EXCEPTION,"公司未添加或未通过");
|
||||
}
|
||||
|
||||
QueryWrapper<SysCommunity> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("company_id",sysCompany.getId());
|
||||
queryWrapper2.eq("id",communityUpdateDTO.getId());
|
||||
SysCommunity sysCommunity = sysCommunityMapper.selectOne(queryWrapper2);
|
||||
if (sysCommunity == null){
|
||||
throw new BizException(HttpStatusEnum.RECORD_NOT_EXIST);
|
||||
}
|
||||
|
||||
PropertyUtils.copyProperties(communityUpdateDTO,sysCommunity);
|
||||
int update = sysCommunityMapper.updateById(sysCommunity);
|
||||
|
||||
AdminUploadToDbUtil adminUploadToDbUtil = new AdminUploadToDbUtil();
|
||||
adminUploadToDbUtil.delete("sys_community",sysCommunity.getId(),"logImg");
|
||||
adminUploadToDbUtil.saveUrlToDB(communityUpdateDTO.getCommunityUrls(),"sys_community",sysCommunity.getId(),"logImg");
|
||||
|
||||
return update > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommunityInfoVo> getAllCommunityInfo(String keyword, Integer id) {
|
||||
//查询公司信息
|
||||
QueryWrapper<SysCompany> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("admin_user_id",id);
|
||||
queryWrapper.eq("status",2);//2.通过
|
||||
queryWrapper.like(StringUtils.isNotBlank(keyword),"name",keyword);
|
||||
SysCompany sysCompany = sysCompanyMapper.selectOne(queryWrapper);
|
||||
if (sysCompany == null){
|
||||
throw new BizException(HttpStatusEnum.RECORD_NOT_EXIST);
|
||||
}
|
||||
|
||||
//查询小区信息
|
||||
QueryWrapper<SysCommunity> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("company_id",sysCompany.getId());
|
||||
List<SysCommunity> sysCommunities = sysCommunityMapper.selectList(queryWrapper2);
|
||||
ArrayList<CommunityInfoVo> communityInfoVoList = new ArrayList<>();
|
||||
if (sysCommunities != null && sysCommunities.size()>0){
|
||||
for (SysCommunity sysCommunity : sysCommunities) {
|
||||
CommunityInfoVo communityInfoVo = new CommunityInfoVo();
|
||||
PropertyUtils.copyProperties(sysCommunity,communityInfoVo);
|
||||
|
||||
//查询是否有绑定订单
|
||||
QueryWrapper<AdminFunctionOrder> queryWrapper3 = new QueryWrapper<>();
|
||||
queryWrapper3.eq("company_id",sysCompany.getId());
|
||||
queryWrapper3.eq("community_id",sysCommunity.getId());
|
||||
List<AdminFunctionOrder> adminFunctionOrders = adminFunctionOrderMapper.selectList(queryWrapper3);
|
||||
//查询所有已绑定的订单号
|
||||
if (adminFunctionOrders != null && adminFunctionOrders.size() >0){
|
||||
communityInfoVo.setBindOrder(true);
|
||||
ArrayList<String> bindOrderCodes = new ArrayList<>();
|
||||
for (AdminFunctionOrder adminFunctionOrder : adminFunctionOrders) {
|
||||
bindOrderCodes.add(adminFunctionOrder.getCode());
|
||||
}
|
||||
communityInfoVo.setBindOrderCodeList(bindOrderCodes);
|
||||
}else {
|
||||
communityInfoVo.setBindOrder(false);
|
||||
}
|
||||
|
||||
communityInfoVoList.add(communityInfoVo);
|
||||
}
|
||||
}
|
||||
|
||||
return communityInfoVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommunityInfoVo> getCommunityInfoByCompanyId(Integer companyId) throws BizException {
|
||||
//查询小区信息
|
||||
QueryWrapper<SysCommunity> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("company_id",companyId);
|
||||
List<SysCommunity> sysCommunities = sysCommunityMapper.selectList(queryWrapper2);
|
||||
ArrayList<CommunityInfoVo> communityInfoVoList = new ArrayList<>();
|
||||
if (sysCommunities != null && sysCommunities.size()>0){
|
||||
for (SysCommunity sysCommunity : sysCommunities) {
|
||||
CommunityInfoVo communityInfoVo = new CommunityInfoVo();
|
||||
PropertyUtils.copyProperties(sysCommunity,communityInfoVo);
|
||||
communityInfoVoList.add(communityInfoVo);
|
||||
}
|
||||
}
|
||||
|
||||
return communityInfoVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysCommunity findById(Integer communityId) {
|
||||
return sysCommunityMapper.selectById(communityId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysCommunity findByCode(String communityCode) {
|
||||
QueryWrapper<SysCommunity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("code",communityCode);
|
||||
return sysCommunityMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询城市地址
|
||||
* @param isCreate 是否需要创建了StringBuild对象
|
||||
* @param cityAddress 城市地址主键Id
|
||||
* @return 城市地址StringBuild对象
|
||||
*/
|
||||
private StringBuilder findCityAddressDetails(boolean isCreate,Integer cityAddress) {
|
||||
if (isCreate){
|
||||
//创建StringBuild对象
|
||||
stringBuilder = new StringBuilder();
|
||||
}
|
||||
AdminCity adminCity = adminCityMapper.selectById(cityAddress);
|
||||
if (adminCity.getParentId() != 0){
|
||||
findCityAddressDetails(false,adminCity.getParentId());//后续循环不需要创建StringBuild对象
|
||||
stringBuilder.append(adminCity.getName()).append(" ");//拼接公司省县市地址
|
||||
}
|
||||
|
||||
return stringBuilder;
|
||||
}
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package com.saas.admin.provider.service.customerList;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.saas.admin.provider.utils.upload.AdminUploadToDbUtil;
|
||||
import com.saas.api.admin.service.customerList.ICustomerListService;
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.common.utils.PropertyUtils;
|
||||
import com.saas.common.utils.page.PageInfo;
|
||||
import com.saas.common.utils.result.HttpStatusEnum;
|
||||
import com.saas.dto.admin.customerList.CustomerListDTO;
|
||||
import com.saas.mapper.entity.AdminCityMapper;
|
||||
import com.saas.mapper.entity.AdminUserMapper;
|
||||
import com.saas.pojo.AdminCity;
|
||||
import com.saas.pojo.AdminUser;
|
||||
import com.saas.pojo.SysCompany;
|
||||
import com.saas.vo.admin.customerList.CustomerDetailsVo;
|
||||
import com.saas.vo.admin.customerList.CustomerListVo;
|
||||
import com.saas.mapper.entity.SysCompanyMapper;
|
||||
import com.saas.vo.admin.upload.ResourcesImgAdminVo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service(interfaceClass = ICustomerListService.class)
|
||||
public class CustomerListServiceImpl implements ICustomerListService {
|
||||
private static StringBuilder stringBuilder = null;
|
||||
@Resource
|
||||
SysCompanyMapper sysCompanyMapper;
|
||||
@Resource
|
||||
AdminUserMapper adminUserMapper;
|
||||
@Resource
|
||||
AdminCityMapper adminCityMapper;
|
||||
|
||||
@Override
|
||||
public PageInfo<CustomerListVo> list(CustomerListDTO customerListDTO) {
|
||||
QueryWrapper<SysCompany> queryWrapper = new QueryWrapper<>();
|
||||
//数据条件搜索
|
||||
queryWrapper.eq("status",2);//只查询出2.通过的客户信息
|
||||
queryWrapper.and(StringUtils.isNotBlank(customerListDTO.getName()),wrapper -> wrapper.like("company_name",customerListDTO.getName())
|
||||
.or().like("contacts_name",customerListDTO.getName()));
|
||||
//数据分页
|
||||
Page<SysCompany> page = new Page<>(customerListDTO.getPageNum(), customerListDTO.getSize());
|
||||
|
||||
//数据查询
|
||||
Page<SysCompany> sysCompanyPage = sysCompanyMapper.selectPage(page, queryWrapper);
|
||||
List<SysCompany> companyList = sysCompanyPage.getRecords();
|
||||
ArrayList<CustomerListVo> customerListVoList = new ArrayList<>();
|
||||
//DO 转 VO
|
||||
if (companyList != null && companyList.size() >0){
|
||||
for (SysCompany sysCompany : companyList) {
|
||||
CustomerListVo customerListVo = new CustomerListVo();
|
||||
PropertyUtils.copyProperties(sysCompany,customerListVo);
|
||||
customerListVoList.add(customerListVo);
|
||||
}
|
||||
}
|
||||
|
||||
//封装成分页格式回显
|
||||
return new PageInfo<>(sysCompanyPage.getPages(), customerListVoList, sysCompanyPage.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomerDetailsVo findDetailsById(Integer id) throws BizException {
|
||||
CustomerDetailsVo customerDetailsVo = new CustomerDetailsVo();
|
||||
//查询客户信息
|
||||
SysCompany sysCompany = sysCompanyMapper.selectById(id);
|
||||
if (sysCompany == null){
|
||||
throw new BizException(HttpStatusEnum.RECORD_NOT_EXIST);
|
||||
}
|
||||
AdminUser adminUser = adminUserMapper.selectById(sysCompany.getAdminUserId());
|
||||
if (adminUser == null){
|
||||
throw new BizException(HttpStatusEnum.USER_NOT_EXIST);
|
||||
}
|
||||
//填入关联账号
|
||||
customerDetailsVo.setUserName(adminUser.getUserName());
|
||||
customerDetailsVo.setPassword(adminUser.getPassword());
|
||||
//DO 转 VO
|
||||
PropertyUtils.copyProperties(sysCompany,customerDetailsVo);
|
||||
|
||||
//查询城市地址
|
||||
StringBuilder stringBuilder = findCityAddressDetails(true,sysCompany.getCompanyAddress());
|
||||
stringBuilder.append(sysCompany.getCompanyAddressDetail());//拼接公司详细地址
|
||||
customerDetailsVo.setCompanyAddressDetails(stringBuilder.toString());//填入公司地址
|
||||
|
||||
//查询联系人地址
|
||||
StringBuilder stringBuilder2 = findCityAddressDetails(true,sysCompany.getContactsAddress());
|
||||
stringBuilder2.append(sysCompany.getContactsAddressDetail());//拼接联系人详细地址
|
||||
customerDetailsVo.setContactsAddressDetails(stringBuilder2.toString());//填入联系人地址
|
||||
|
||||
//查询照片信息
|
||||
AdminUploadToDbUtil adminUploadToDbUtil = new AdminUploadToDbUtil();
|
||||
//查询身份证正面集合信息
|
||||
List<ResourcesImgAdminVo> imgByDate = adminUploadToDbUtil.findImgByDate("sys_company", id, "idCardFront");
|
||||
customerDetailsVo.setIdCardFrontImgList(imgByDate);
|
||||
//身份证背面集合信息
|
||||
List<ResourcesImgAdminVo> imgByDate2 = adminUploadToDbUtil.findImgByDate("sys_company", id, "idCardBack");
|
||||
customerDetailsVo.setIdCardBackImgList(imgByDate2);
|
||||
//公司营业执照集合信息
|
||||
List<ResourcesImgAdminVo> imgByDate3 = adminUploadToDbUtil.findImgByDate("sys_company", id, "businessLicense");
|
||||
customerDetailsVo.setBusinessLicenseImgList(imgByDate3);
|
||||
//其他附件集合信息
|
||||
List<ResourcesImgAdminVo> imgByDate4 = adminUploadToDbUtil.findImgByDate("sys_company", id, "others");
|
||||
customerDetailsVo.setOthersImgList(imgByDate4);
|
||||
|
||||
return customerDetailsVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询城市地址
|
||||
* @param isCreate 是否需要创建了StringBuild对象
|
||||
* @param cityAddress 城市地址主键Id
|
||||
* @return 城市地址StringBuild对象
|
||||
*/
|
||||
private StringBuilder findCityAddressDetails(boolean isCreate,Integer cityAddress) {
|
||||
if (isCreate){
|
||||
//创建StringBuild对象
|
||||
stringBuilder = new StringBuilder();
|
||||
}
|
||||
AdminCity adminCity = adminCityMapper.selectById(cityAddress);
|
||||
if (adminCity.getParentId() != 0){
|
||||
findCityAddressDetails(false,adminCity.getParentId());//后续循环不需要创建StringBuild对象
|
||||
stringBuilder.append(adminCity.getName()).append(" ");//拼接公司省县市地址
|
||||
}
|
||||
|
||||
return stringBuilder;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.saas.admin.provider.service.log;
|
||||
|
||||
import com.saas.api.admin.service.log.IAdminUserOperationLogService;
|
||||
import com.saas.pojo.AdminUserOperationLog;
|
||||
import com.saas.mapper.entity.AdminUserOperationLogMapper;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service(interfaceClass = IAdminUserOperationLogService.class)
|
||||
public class AdminUserOperationLogServiceImpl implements IAdminUserOperationLogService {
|
||||
@Resource
|
||||
AdminUserOperationLogMapper adminUserOperationLogMapper;
|
||||
|
||||
@Override
|
||||
public Integer insert(AdminUserOperationLog adminLog) {
|
||||
return adminUserOperationLogMapper.insert(adminLog);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.saas.admin.provider.service.login;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.saas.api.admin.service.login.IAdminTokenLoginService;
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.pojo.AdminTokenLogin;
|
||||
import com.saas.mapper.entity.AdminTokenLoginMapper;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service(interfaceClass = IAdminTokenLoginService.class)
|
||||
public class AdminTokenLoginServiceImpl implements IAdminTokenLoginService {
|
||||
@Resource
|
||||
AdminTokenLoginMapper adminTokenLoginMapper;
|
||||
|
||||
@Override
|
||||
public AdminTokenLogin findByTokenId(Long tokenId) throws BizException {
|
||||
|
||||
QueryWrapper<AdminTokenLogin> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("login_session",tokenId);
|
||||
|
||||
return adminTokenLoginMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateById(AdminTokenLogin tokenByTokenId) {
|
||||
return adminTokenLoginMapper.updateById(tokenByTokenId);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.saas.admin.provider.service.login;
|
||||
|
||||
import com.saas.api.admin.service.login.IAdminUserService;
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.pojo.AdminUser;
|
||||
import com.saas.mapper.entity.AdminUserMapper;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service(interfaceClass = IAdminUserService.class)
|
||||
public class AdminUserServiceImpl implements IAdminUserService {
|
||||
@Resource
|
||||
AdminUserMapper adminUserMapper;
|
||||
|
||||
@Override
|
||||
public AdminUser findById(Integer sysUserId) throws BizException {
|
||||
return adminUserMapper.selectById(sysUserId);
|
||||
}
|
||||
}
|
@ -0,0 +1,329 @@
|
||||
package com.saas.admin.provider.service.order;
|
||||
|
||||
import com.alipay.api.AlipayApiException;
|
||||
import com.alipay.api.AlipayClient;
|
||||
import com.alipay.api.DefaultAlipayClient;
|
||||
import com.alipay.api.request.AlipayTradeRefundRequest;
|
||||
import com.alipay.api.response.AlipayTradeRefundResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.saas.api.admin.service.order.IFinancialStatementsService;
|
||||
import com.saas.common.config.AlipayConfig;
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.common.utils.IdWorker;
|
||||
import com.saas.common.utils.PropertyUtils;
|
||||
import com.saas.common.utils.page.PageInfo;
|
||||
import com.saas.common.utils.result.HttpStatusEnum;
|
||||
import com.saas.dto.admin.order.FinancialStatementsDTO;
|
||||
import com.saas.dto.admin.order.FinancialStatementsRefundDTO;
|
||||
import com.saas.mapper.entity.*;
|
||||
import com.saas.pojo.*;
|
||||
import com.saas.vo.admin.order.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service(interfaceClass = IFinancialStatementsService.class)
|
||||
@Slf4j
|
||||
public class FinancialStatementsServiceImpl implements IFinancialStatementsService {
|
||||
private static StringBuilder stringBuilder = null;
|
||||
@Resource
|
||||
AdminFunctionOrderMapper adminFunctionOrderMapper;
|
||||
@Resource
|
||||
AdminFunctionOrderDetailsMapper adminFunctionOrderDetailsMapper;
|
||||
@Resource
|
||||
SysMenusMapper sysMenusMapper;
|
||||
@Resource
|
||||
SysCompanyMapper sysCompanyMapper;
|
||||
@Resource
|
||||
AdminUserMapper adminUserMapper;
|
||||
@Resource
|
||||
SysCommunityMapper sysCommunityMapper;
|
||||
@Resource
|
||||
AdminCityMapper adminCityMapper;
|
||||
@Resource
|
||||
AdminFunctionOrderRefundMapper adminFunctionOrderRefundMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<FinancialStatementsVo> list(FinancialStatementsDTO financialStatementsDTO) {
|
||||
QueryWrapper<FinancialStatementsDTO> queryWrapper = new QueryWrapper<>();
|
||||
//数据条件搜索
|
||||
queryWrapper.like(StringUtils.isNotBlank(financialStatementsDTO.getCode()), "afo.code", financialStatementsDTO.getCode());
|
||||
queryWrapper.like(StringUtils.isNotBlank(financialStatementsDTO.getName()),"sc.company_name", financialStatementsDTO.getName());
|
||||
queryWrapper.ge(financialStatementsDTO.getCreateDateStart() != null,"afo.create_date", financialStatementsDTO.getCreateDateStart());
|
||||
queryWrapper.le(financialStatementsDTO.getCreateDateEnd() != null,"afo.create_date", financialStatementsDTO.getCreateDateEnd());
|
||||
queryWrapper.ge(financialStatementsDTO.getBuyingDateStart() != null,"afo.buying_date", financialStatementsDTO.getBuyingDateStart());
|
||||
queryWrapper.le(financialStatementsDTO.getBuyingDateEnd() != null,"afo.buying_date", financialStatementsDTO.getBuyingDateEnd());
|
||||
queryWrapper.eq("afo.status",2);//2.交易成功
|
||||
//数据分页
|
||||
Page<FinancialStatementsDTO> page = new Page<>(financialStatementsDTO.getPageNum(), financialStatementsDTO.getSize());
|
||||
|
||||
//数据查询
|
||||
IPage<FinancialStatementsVo> statementsList = adminFunctionOrderMapper.findFinancialStatementsList(page, queryWrapper);
|
||||
List<FinancialStatementsVo> statementsListRecords = statementsList.getRecords();
|
||||
ArrayList<FinancialStatementsVo> statementsListVoList = new ArrayList<>();
|
||||
//DO 转 VO
|
||||
if (statementsListRecords != null && statementsListRecords.size()>0){
|
||||
for (FinancialStatementsVo statementsListRecord : statementsListRecords) {
|
||||
//进行Do To Vo 数据转换
|
||||
FinancialStatementsVo statementsListVo = new FinancialStatementsVo();
|
||||
PropertyUtils.copyProperties(statementsListRecord,statementsListVo);
|
||||
|
||||
//数据条件搜索
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("function_order_id",statementsListRecord.getId());
|
||||
ArrayList<String> includeFunctionModel = new ArrayList<>();
|
||||
List<AdminFunctionOrderDetails> adminFunctionOrderDetailsList = adminFunctionOrderDetailsMapper.selectByMap(map);
|
||||
if (adminFunctionOrderDetailsList != null && adminFunctionOrderDetailsList.size()>0){
|
||||
for (AdminFunctionOrderDetails adminFunctionOrderDetail : adminFunctionOrderDetailsList) {
|
||||
SysMenus sysMenus = sysMenusMapper.selectById(adminFunctionOrderDetail.getChargingFunctionId());
|
||||
includeFunctionModel.add(sysMenus.getName());
|
||||
}
|
||||
}
|
||||
|
||||
statementsListVo.setIncludeFunctionModelList(includeFunctionModel);
|
||||
statementsListVoList.add(statementsListVo);
|
||||
}
|
||||
}
|
||||
//封装成分页格式回显
|
||||
return new PageInfo<>(statementsList.getPages(), statementsListVoList, statementsList.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public FinancialStatementsDetailsVo findDetails(Integer id) {
|
||||
FinancialStatementsDetailsVo financialStatementsDetailsVo = new FinancialStatementsDetailsVo();
|
||||
//查询订单信息
|
||||
AdminFunctionOrder adminFunctionOrder = adminFunctionOrderMapper.selectById(id);
|
||||
if (adminFunctionOrder == null){
|
||||
throw new BizException(HttpStatusEnum.RECORD_NOT_EXIST);
|
||||
}
|
||||
//数据DO 转 VO
|
||||
financialStatementsDetailsVo.setCode(adminFunctionOrder.getCode());//填入订单号
|
||||
financialStatementsDetailsVo.setRemakes(adminFunctionOrder.getRemakes());//填入时间备注
|
||||
financialStatementsDetailsVo.setPayType(adminFunctionOrder.getPayType());//填入支付方式
|
||||
financialStatementsDetailsVo.setPrice(adminFunctionOrder.getPrice());//填入支付金额
|
||||
financialStatementsDetailsVo.setBuyingDate(adminFunctionOrder.getBuyingDate());//填入购买日期
|
||||
financialStatementsDetailsVo.setExpirationDate(adminFunctionOrder.getExpirationDate());//填入到期日期
|
||||
|
||||
//数据条件搜索
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("function_order_id",id);
|
||||
ArrayList<String> includeFunctionModel = new ArrayList<>();
|
||||
List<AdminFunctionOrderDetails> adminFunctionOrderDetailsList = adminFunctionOrderDetailsMapper.selectByMap(map);
|
||||
if (adminFunctionOrderDetailsList != null && adminFunctionOrderDetailsList.size()>0){
|
||||
for (AdminFunctionOrderDetails adminFunctionOrderDetail : adminFunctionOrderDetailsList) {
|
||||
SysMenus sysMenus = sysMenusMapper.selectById(adminFunctionOrderDetail.getChargingFunctionId());
|
||||
includeFunctionModel.add(sysMenus.getName());
|
||||
}
|
||||
}
|
||||
financialStatementsDetailsVo.setIncludeFunctionModelList(includeFunctionModel);//填入包含功能模块(一级)
|
||||
|
||||
//查询公司信息
|
||||
SysCompany sysCompany = sysCompanyMapper.selectById(adminFunctionOrder.getCompanyId());
|
||||
financialStatementsDetailsVo.setCompanyName(sysCompany.getCompanyName());//填入公司名称
|
||||
|
||||
//查询绑定账户
|
||||
AdminUser adminUser = adminUserMapper.selectById(sysCompany.getAdminUserId());
|
||||
financialStatementsDetailsVo.setUserName(adminUser.getUserName());//填入绑定账户
|
||||
|
||||
//查询绑定小区
|
||||
if (adminFunctionOrder.getCommunityId() != null){
|
||||
SysCommunity sysCommunity = sysCommunityMapper.selectById(adminFunctionOrder.getCommunityId());
|
||||
if (sysCommunity != null){
|
||||
financialStatementsDetailsVo.setCommunityName(sysCommunity.getName());
|
||||
//查询城市地址
|
||||
StringBuilder stringBuilder = findCityAddressDetails(true,sysCommunity.getAddress());
|
||||
stringBuilder.append(sysCompany.getCompanyAddressDetail());//拼接公司详细地址
|
||||
financialStatementsDetailsVo.setCommunityAddress(stringBuilder.toString());//填入公司地址
|
||||
}
|
||||
}
|
||||
|
||||
//查询退款记录
|
||||
ArrayList<FinancialStatementsDetailRefundVo> statementsDetailRefundVoList = new ArrayList<>();
|
||||
BigDecimal refundTotal = BigDecimal.ZERO;
|
||||
QueryWrapper<AdminFunctionOrderRefund> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("function_order_id",id);
|
||||
List<AdminFunctionOrderRefund> functionOrderRefundList = adminFunctionOrderRefundMapper.selectList(queryWrapper);
|
||||
if (functionOrderRefundList != null && functionOrderRefundList.size()>0){
|
||||
//DO 转 VO
|
||||
for (AdminFunctionOrderRefund adminFunctionOrderRefund : functionOrderRefundList) {
|
||||
FinancialStatementsDetailRefundVo statementsDetailRefundVo = new FinancialStatementsDetailRefundVo();
|
||||
PropertyUtils.copyProperties(adminFunctionOrderRefund,statementsDetailRefundVo);
|
||||
statementsDetailRefundVoList.add(statementsDetailRefundVo);//添加退款记录
|
||||
refundTotal = refundTotal.add(adminFunctionOrderRefund.getPrice());//增加退款总计
|
||||
}
|
||||
}
|
||||
financialStatementsDetailsVo.setFinancialStatementsDetailRefundVoList(statementsDetailRefundVoList);//填入财务账单details退款记录Vo
|
||||
financialStatementsDetailsVo.setRefundTotal(refundTotal);//填入退款总计
|
||||
return financialStatementsDetailsVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FinancialStatementsFBIVo findById(Integer id) throws BizException {
|
||||
FinancialStatementsFBIVo financialStatementsFBIVo = new FinancialStatementsFBIVo();
|
||||
//查询订单信息
|
||||
AdminFunctionOrder adminFunctionOrder = adminFunctionOrderMapper.selectById(id);
|
||||
if (adminFunctionOrder == null){
|
||||
throw new BizException(HttpStatusEnum.RECORD_NOT_EXIST);
|
||||
}
|
||||
//数据DO 转 VO
|
||||
financialStatementsFBIVo.setId(adminFunctionOrder.getId());
|
||||
financialStatementsFBIVo.setCode(adminFunctionOrder.getCode());
|
||||
|
||||
//查询公司信息
|
||||
SysCompany sysCompany = sysCompanyMapper.selectById(adminFunctionOrder.getCompanyId());
|
||||
financialStatementsFBIVo.setCompanyName(sysCompany.getCompanyName());//填入公司名称
|
||||
|
||||
|
||||
//查询绑定小区
|
||||
if (adminFunctionOrder.getCommunityId() != null){
|
||||
SysCommunity sysCommunity = sysCommunityMapper.selectById(adminFunctionOrder.getCommunityId());
|
||||
if (sysCommunity != null){
|
||||
financialStatementsFBIVo.setCommunityName(sysCommunity.getName());
|
||||
//查询城市地址
|
||||
StringBuilder stringBuilder = findCityAddressDetails(true,sysCommunity.getAddress());
|
||||
stringBuilder.append(sysCompany.getCompanyAddressDetail());//拼接公司详细地址
|
||||
financialStatementsFBIVo.setCommunityAddress(stringBuilder.toString());//填入公司地址
|
||||
}
|
||||
}
|
||||
|
||||
//查询拥有的功能模块
|
||||
//数据条件搜索
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("function_order_id",id);
|
||||
ArrayList<ChooseFunctionModelVo> chooseFunctionModelVoList = new ArrayList<>();
|
||||
List<AdminFunctionOrderDetails> adminFunctionOrderDetailsList = adminFunctionOrderDetailsMapper.selectByMap(map);
|
||||
if (adminFunctionOrderDetailsList != null && adminFunctionOrderDetailsList.size()>0){
|
||||
for (AdminFunctionOrderDetails adminFunctionOrderDetail : adminFunctionOrderDetailsList) {
|
||||
ChooseFunctionModelVo chooseFunctionModelVo = new ChooseFunctionModelVo();
|
||||
SysMenus sysMenus = sysMenusMapper.selectById(adminFunctionOrderDetail.getChargingFunctionId());
|
||||
chooseFunctionModelVo.setId(sysMenus.getId());
|
||||
chooseFunctionModelVo.setName(sysMenus.getName());
|
||||
chooseFunctionModelVoList.add(chooseFunctionModelVo);
|
||||
}
|
||||
}
|
||||
financialStatementsFBIVo.setChooseFunctionModelVoList(chooseFunctionModelVoList);//填入选择的功能模块信息Vo回显
|
||||
|
||||
return financialStatementsFBIVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean refund(FinancialStatementsRefundDTO financialStatementsRefundDTO) throws BizException {
|
||||
|
||||
AdminFunctionOrderRefund adminFunctionOrderRefund = new AdminFunctionOrderRefund();
|
||||
//填入条件
|
||||
adminFunctionOrderRefund.setFunctionOrderId(financialStatementsRefundDTO.getFunctionOrderId());
|
||||
adminFunctionOrderRefund.setChargingFunctionIds(financialStatementsRefundDTO.getChargingFunctionIds());
|
||||
adminFunctionOrderRefund.setPrice(financialStatementsRefundDTO.getPrice());
|
||||
adminFunctionOrderRefund.setReason(financialStatementsRefundDTO.getReason());
|
||||
adminFunctionOrderRefund.setType(financialStatementsRefundDTO.getType());
|
||||
adminFunctionOrderRefund.setRefundDate(new Date());
|
||||
String out_request_no= String.valueOf(new IdWorker(1,1,1).nextId());//随机数[退款单号] 不是全额退款,部分退款必须使用该参数
|
||||
adminFunctionOrderRefund.setCode(out_request_no);
|
||||
int insert = adminFunctionOrderRefundMapper.insert(adminFunctionOrderRefund);
|
||||
if (insert <= 0){
|
||||
throw new BizException(HttpStatusEnum.OPERATION_FAILED);
|
||||
}
|
||||
|
||||
//平台购买功能订单主键id
|
||||
Integer functionOrderId = financialStatementsRefundDTO.getFunctionOrderId();
|
||||
//收费功能模块主键id
|
||||
String chargingFunctionIds = financialStatementsRefundDTO.getChargingFunctionIds();
|
||||
String[] split = chargingFunctionIds.split(",");
|
||||
if (split.length <= 0){
|
||||
throw new BizException(HttpStatusEnum.MISSING_FIELD_INFO);
|
||||
}
|
||||
|
||||
//循环删除订单中对应退款的模块
|
||||
for (String s : split) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("function_order_id",functionOrderId);
|
||||
map.put("charging_function_id",Integer.valueOf(s));
|
||||
int i = adminFunctionOrderDetailsMapper.deleteByMap(map);
|
||||
if (i <= 0){
|
||||
throw new BizException(HttpStatusEnum.CUSTOM_EXCEPTION,"该模块退款失败");
|
||||
}
|
||||
}
|
||||
//查询订单信息
|
||||
AdminFunctionOrder adminFunctionOrder = adminFunctionOrderMapper.selectById(financialStatementsRefundDTO.getFunctionOrderId());
|
||||
if (adminFunctionOrder == null){
|
||||
throw new BizException(HttpStatusEnum.RECORD_NOT_EXIST);
|
||||
}
|
||||
|
||||
//修改套餐价格
|
||||
BigDecimal price = adminFunctionOrder.getPrice();//套餐金额
|
||||
BigDecimal refundPrice = financialStatementsRefundDTO.getPrice();//退款金额
|
||||
if (price.compareTo(refundPrice) <= 0){
|
||||
throw new BizException(HttpStatusEnum.OPERATION_FAILED);//金额不足
|
||||
}
|
||||
adminFunctionOrder.setPrice(price.subtract(refundPrice));//填入退款后的套餐金额
|
||||
adminFunctionOrderMapper.updateById(adminFunctionOrder);//修改套餐价格
|
||||
|
||||
|
||||
//判断是线上还是线下,如果线上则进行线上支付宝或微信退款
|
||||
if (financialStatementsRefundDTO.getType() ==2){//2.支付宝
|
||||
|
||||
//支付宝退款
|
||||
AlipayClient alipayClient = new DefaultAlipayClient(AlipayConfig.ALIPAY_GATEWAY, AlipayConfig.ALIPAY_APP_ID, AlipayConfig.RSA_PRIVAT_KEY, AlipayConfig.ALIPAY_FORMAT, AlipayConfig.ALIPAY_CHARSET, AlipayConfig.RSA_ALIPAY_PUBLIC_KEY, AlipayConfig.SIGN_TYPE);
|
||||
AlipayTradeRefundRequest request = new AlipayTradeRefundRequest();
|
||||
request.setBizContent("{" +
|
||||
"\"out_trade_no\":\"" + adminFunctionOrder.getCode() + "\"," +
|
||||
"\"trade_no\":" + null + "," +
|
||||
"\"refund_amount\":\"" + financialStatementsRefundDTO.getPrice() + "\"," +
|
||||
|
||||
"\"out_request_no\":\"" + out_request_no+ "\"," +
|
||||
"\"refund_reason\":\"正常退款\"" +
|
||||
" }");
|
||||
AlipayTradeRefundResponse response;
|
||||
try {
|
||||
response = alipayClient.execute(request);
|
||||
} catch (AlipayApiException e) {
|
||||
e.printStackTrace();
|
||||
throw new BizException(HttpStatusEnum.OPERATION_FAILED);
|
||||
}
|
||||
if (response.isSuccess()) {
|
||||
log.info("支付宝退款成功");
|
||||
} else {
|
||||
log.info(response.getSubMsg());//失败会记录错误信息
|
||||
throw new BizException(HttpStatusEnum.ALIPAY_REFUND_FAILED);
|
||||
}
|
||||
}else if (financialStatementsRefundDTO.getType() == 1){//1.线下
|
||||
log.info("线下退款成功");
|
||||
}else {
|
||||
throw new BizException(HttpStatusEnum.NOT_CHOOSE_PAY_TYPE);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询城市地址
|
||||
* @param isCreate 是否需要创建了StringBuild对象
|
||||
* @param cityAddress 城市地址主键Id
|
||||
* @return 城市地址StringBuild对象
|
||||
*/
|
||||
private StringBuilder findCityAddressDetails(boolean isCreate,Integer cityAddress) {
|
||||
if (isCreate){
|
||||
//创建StringBuild对象
|
||||
stringBuilder = new StringBuilder();
|
||||
}
|
||||
AdminCity adminCity = adminCityMapper.selectById(cityAddress);
|
||||
if (adminCity.getParentId() != 0){
|
||||
findCityAddressDetails(false,adminCity.getParentId());//后续循环不需要创建StringBuild对象
|
||||
stringBuilder.append(adminCity.getName()).append(" ");//拼接公司省县市地址
|
||||
}
|
||||
|
||||
return stringBuilder;
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.saas.admin.provider.service.telCode;
|
||||
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.saas.api.admin.service.telCode.IAdminTelCodeService;
|
||||
import com.saas.common.exception.BizException;
|
||||
import com.saas.common.utils.PropertyUtils;
|
||||
import com.saas.common.utils.result.HttpStatusEnum;
|
||||
import com.saas.common.utils.sms.SmsSendUtil;
|
||||
import com.saas.dto.admin.telCode.SettledTelCodeDTO;
|
||||
import com.saas.mapper.entity.AdminTelCodeMapper;
|
||||
import com.saas.mapper.entity.AdminUserMapper;
|
||||
import com.saas.pojo.AdminTelCode;
|
||||
import com.saas.pojo.AdminUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
|
||||
@Service(interfaceClass = IAdminTelCodeService.class)
|
||||
@Slf4j
|
||||
public class IAdminTelCodeServiceImpl implements IAdminTelCodeService {
|
||||
@Resource
|
||||
AdminUserMapper adminUserMapper;
|
||||
@Resource
|
||||
AdminTelCodeMapper adminTelCodeMapper;
|
||||
|
||||
@Override
|
||||
public boolean sendSettledTelCode(SettledTelCodeDTO settledTelCodeDTO,Integer type, String code) {
|
||||
//根据手机号查询平台用户信息
|
||||
QueryWrapper<AdminUser> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("tel",settledTelCodeDTO.getTel());
|
||||
AdminUser adminUser = adminUserMapper.selectOne(queryWrapper);
|
||||
if (adminUser == null){
|
||||
throw new BizException(HttpStatusEnum.USER_NOT_EXIST);
|
||||
}
|
||||
if (adminUser.getIsDelete() == 0){
|
||||
throw new BizException(HttpStatusEnum.USER_IS_DELETE);
|
||||
}
|
||||
|
||||
//根据手机号查询平台用户验证码
|
||||
QueryWrapper<AdminTelCode> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("type",type);//验证码类型
|
||||
queryWrapper2.eq("tel",adminUser.getTel());//手机号
|
||||
AdminTelCode adminTelCode = adminTelCodeMapper.selectOne(queryWrapper2);
|
||||
|
||||
int send = 0;
|
||||
if (adminTelCode != null){
|
||||
//如果有相关手机验证码信息,修改验证码和验证码发送时间
|
||||
adminTelCode.setCode(code);//填入验证码
|
||||
adminTelCode.setCodeSendDate(new Date());//填入验证码发送时间
|
||||
send = adminTelCodeMapper.updateById(adminTelCode);
|
||||
}else {
|
||||
//如果没有相关手机验证码信息,将验证码和验证码发送时间存入数据库
|
||||
AdminTelCode adminTelCode2 = new AdminTelCode();
|
||||
adminTelCode2.setTel(settledTelCodeDTO.getTel());
|
||||
adminTelCode2.setCode(code);//填入验证码
|
||||
adminTelCode2.setType(type);//填入验证码类型
|
||||
adminTelCode2.setCodeSendDate(new Date());//填入验证码发送时间
|
||||
send = adminTelCodeMapper.insert(adminTelCode2);
|
||||
}
|
||||
|
||||
if (send <= 0){
|
||||
log.info("数据库修改或添加验证码失败");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 发送短信工具类
|
||||
try {
|
||||
SmsSendUtil.sendSms(code, settledTelCodeDTO.getTel());
|
||||
} catch (ClientException e) {
|
||||
e.printStackTrace();
|
||||
log.info("短信工具发送失败");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
# 防止端口冲突
|
||||
server:
|
||||
port: 8001
|
||||
|
||||
#中转站,用于切换 【本地,服务器,测试】
|
||||
spring:
|
||||
profiles:
|
||||
include: transfer
|
||||
|
@ -0,0 +1,19 @@
|
||||
#logging debug
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com:
|
||||
api:
|
||||
dao: debug
|
||||
butlerApp:
|
||||
dao: DEBUG
|
||||
file:
|
||||
# 输出的log文件名
|
||||
name: community-admin-provider
|
||||
# 输出的文件的路径
|
||||
path: log/logs/admin-provider
|
||||
# 限制日志文件的大小
|
||||
max-size: 10MB
|
||||
# 日志的保存天数
|
||||
max-history: 7
|
||||
config: classpath:logback-spring.xml
|
@ -0,0 +1,25 @@
|
||||
dubbo:
|
||||
application:
|
||||
# 应用名称
|
||||
name: adminProvider
|
||||
registry:
|
||||
protocol: zookeeper
|
||||
# 注册中心地址
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
# 超时时间,单位毫秒
|
||||
timeout: 10000
|
||||
metadata-report:
|
||||
#元数据中心地址
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
protocol:
|
||||
# 协议名称
|
||||
name: dubbo
|
||||
# 协议端口
|
||||
port: 20880
|
||||
scan:
|
||||
# 扫描包的位置
|
||||
base-packages: com.saas.admin.provider.service
|
||||
provider:
|
||||
version: 1.0
|
||||
# 调用超时时间,单位毫秒
|
||||
timeout: 10000
|
@ -0,0 +1,13 @@
|
||||
spring:
|
||||
# 数据库源
|
||||
datasource:
|
||||
#本地数据库连接
|
||||
url: jdbc:mysql://39.103.177.88:3306/saas_community?useUnicode=true&characterEncoding=utf8&useSSL=false
|
||||
username: saas_community
|
||||
password: jlw15906763698
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
minimum-idle: 3
|
||||
maximum-pool-size: 10
|
||||
max-lifetime: 0
|
@ -0,0 +1,17 @@
|
||||
#logging debug
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com:
|
||||
api:
|
||||
dao: debug
|
||||
file:
|
||||
# 输出的log文件名
|
||||
name: intelligent-community
|
||||
# 输出的文件的路径
|
||||
path: /www/wwwroot/community.kadalai.com/apache-tomcat-8.5.61/webapps/logs
|
||||
# 限制日志文件的大小
|
||||
max-size: 100MB
|
||||
# 日志的保存天数
|
||||
max-history: 15
|
||||
config: classpath:logback-spring.xml
|
@ -0,0 +1,12 @@
|
||||
spring:
|
||||
# 数据库源
|
||||
datasource:
|
||||
#南宁本地数据库版本
|
||||
url: jdbc:mysql://localhost:3306/smart_community?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
minimum-idle: 3
|
||||
maximum-pool-size: 10
|
||||
max-lifetime: 0
|
@ -0,0 +1,21 @@
|
||||
#极光推送
|
||||
jg:
|
||||
#极光app密钥
|
||||
appKey: 00e20fef79ee804d5c9abb54
|
||||
#极光主密钥
|
||||
masterSecret: 236de00049f87c76d28d63be
|
||||
#管家app密钥
|
||||
butlerAppKey: 028adb7b9eda661fefdf3072
|
||||
#管家app主密钥
|
||||
butlerMasterSecret: d8b9c1cbc6812e81453151f3
|
||||
|
||||
|
||||
aliyun:
|
||||
sms:
|
||||
#产品名称:云通信短信API产品,开发者无需替换
|
||||
product: "Dysmsapi"
|
||||
#产品域名,开发者无需替换
|
||||
domain: "dysmsapi.aliyuncs.com"
|
||||
#此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
|
||||
accessKeyId: "LTAI4GD3BFj2WBDSiywy9sZG"
|
||||
accessKeySecret: "dNdS9urtnmMfewe8QlGWKECXkEVLVf"
|
@ -0,0 +1,17 @@
|
||||
#logging debug
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com:
|
||||
api:
|
||||
dao: debug
|
||||
file:
|
||||
# 输出的log文件名
|
||||
name: admin-provider
|
||||
# 输出的文件的路径
|
||||
path: /www/wwwroot/communitySaas/logs/adminProvider
|
||||
# 限制日志文件的大小
|
||||
max-size: 100MB
|
||||
# 日志的保存天数
|
||||
max-history: 7
|
||||
config: classpath:logback-spring.xml
|
@ -0,0 +1,25 @@
|
||||
dubbo:
|
||||
application:
|
||||
# 应用名称
|
||||
name: adminProvider
|
||||
registry:
|
||||
protocol: zookeeper
|
||||
# 注册中心地址
|
||||
address: zookeeper://121.41.26.225:2181
|
||||
# 超时时间,单位毫秒
|
||||
timeout: 10000
|
||||
metadata-report:
|
||||
#元数据中心地址
|
||||
address: zookeeper://121.41.26.225:2181
|
||||
protocol:
|
||||
# 协议名称
|
||||
name: dubbo
|
||||
# 协议端口
|
||||
port: 20880
|
||||
scan:
|
||||
# 扫描包的位置
|
||||
base-packages: com.saas.admin.provider.service
|
||||
provider:
|
||||
version: 1.0
|
||||
# 调用超时时间,单位毫秒
|
||||
timeout: 10000
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue