113 changed files with 6225 additions and 0 deletions
-
8gold-system/.idea/.gitignore
-
24gold-system/.idea/compiler.xml
-
12gold-system/.idea/encodings.xml
-
9gold-system/.idea/gold-system.iml
-
20gold-system/.idea/jarRepositories.xml
-
15gold-system/.idea/misc.xml
-
8gold-system/.idea/modules.xml
-
124gold-system/.idea/uiDesigner.xml
-
6gold-system/.idea/vcs.xml
-
2gold-system/demo/.gitattributes
-
33gold-system/demo/.gitignore
-
19gold-system/demo/.mvn/wrapper/maven-wrapper.properties
-
2gold-system/demo/commons/.gitattributes
-
33gold-system/demo/commons/.gitignore
-
19gold-system/demo/commons/.mvn/wrapper/maven-wrapper.properties
-
259gold-system/demo/commons/mvnw
-
149gold-system/demo/commons/mvnw.cmd
-
67gold-system/demo/commons/pom.xml
-
25gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/Activity.java
-
25gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/Admin.java
-
25gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/Audit.java
-
44gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/Detail.java
-
13gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/Page.java
-
27gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/Rate.java
-
10gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/RateSearchRequest.java
-
34gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/Recharge.java
-
27gold-system/demo/commons/src/main/java/com/example/commons/domain/entity/User.java
-
38gold-system/demo/commons/src/main/java/com/example/commons/domain/vo/RechargeVo.java
-
44gold-system/demo/commons/src/main/java/com/example/commons/domain/vo/Result.java
-
17gold-system/demo/commons/src/main/java/com/example/commons/sevice/ActivityService.java
-
14gold-system/demo/commons/src/main/java/com/example/commons/sevice/AuditService.java
-
16gold-system/demo/commons/src/main/java/com/example/commons/sevice/RateService.java
-
16gold-system/demo/commons/src/main/java/com/example/commons/sevice/RechargeService.java
-
19gold-system/demo/commons/src/main/java/com/example/commons/sevice/RefundService.java
-
13gold-system/demo/commons/src/main/java/com/example/commons/sevice/UserSevice.java
-
13gold-system/demo/commons/src/test/java/com/example/commons/CommonsApplicationTests.java
-
259gold-system/demo/mvnw
-
149gold-system/demo/mvnw.cmd
-
104gold-system/demo/pom.xml
-
2gold-system/demo/recharge/.gitattributes
-
33gold-system/demo/recharge/.gitignore
-
19gold-system/demo/recharge/.mvn/wrapper/maven-wrapper.properties
-
259gold-system/demo/recharge/mvnw
-
149gold-system/demo/recharge/mvnw.cmd
-
73gold-system/demo/recharge/pom.xml
-
13gold-system/demo/recharge/src/main/java/com/example/recharge/RechargeApplication.java
-
68gold-system/demo/recharge/src/main/java/com/example/recharge/controller/ActivityController.java
-
41gold-system/demo/recharge/src/main/java/com/example/recharge/controller/AuditController.java
-
102gold-system/demo/recharge/src/main/java/com/example/recharge/controller/RateController.java
-
53gold-system/demo/recharge/src/main/java/com/example/recharge/controller/RechargeController.java
-
66gold-system/demo/recharge/src/main/java/com/example/recharge/mapper/ActivityMapper.java
-
36gold-system/demo/recharge/src/main/java/com/example/recharge/mapper/AuditMapper.java
-
67gold-system/demo/recharge/src/main/java/com/example/recharge/mapper/RateMapper.java
-
49gold-system/demo/recharge/src/main/java/com/example/recharge/mapper/RechargeMapper.java
-
68gold-system/demo/recharge/src/main/java/com/example/recharge/service/ActivityServiceImpl.java
-
35gold-system/demo/recharge/src/main/java/com/example/recharge/service/AuditServiceImpl.java
-
55gold-system/demo/recharge/src/main/java/com/example/recharge/service/RateServiceImpl.java
-
46gold-system/demo/recharge/src/main/java/com/example/recharge/service/RechargeServiceImpl.java
-
15gold-system/demo/recharge/src/main/resources/application.yml
-
13gold-system/demo/recharge/src/test/java/com/example/recharge/RechargeApplicationTests.java
-
33gold-system/demo/refund/.gitignore
-
73gold-system/demo/refund/pom.xml
-
13gold-system/demo/refund/src/main/java/org/example/refund/RefundApplication.java
-
68gold-system/demo/refund/src/main/java/org/example/refund/controller/RefundController.java
-
54gold-system/demo/refund/src/main/java/org/example/refund/mapper/RefundMapper.java
-
76gold-system/demo/refund/src/main/java/org/example/refund/service/RefundServiceImpl.java
-
15gold-system/demo/refund/src/main/resources/application.yml
-
6gold-system/demo/refund/src/main/resources/static/index.html
-
13gold-system/demo/refund/src/test/java/org/example/refund/RefundApplicationTests.java
-
2gold-system/demo/user/.gitattributes
-
33gold-system/demo/user/.gitignore
-
19gold-system/demo/user/.mvn/wrapper/maven-wrapper.properties
-
259gold-system/demo/user/mvnw
-
149gold-system/demo/user/mvnw.cmd
-
73gold-system/demo/user/pom.xml
-
13gold-system/demo/user/src/main/java/com/example/user/UserApplication.java
-
21gold-system/demo/user/src/main/java/com/example/user/controller/UserController.java
-
16gold-system/demo/user/src/main/java/com/example/user/mapper/UserMapper.java
-
33gold-system/demo/user/src/main/java/com/example/user/service/UserServiceImpl.java
-
14gold-system/demo/user/src/main/resources/application.yml
-
13gold-system/demo/user/src/test/java/com/example/user/UserApplicationTests.java
-
24gold-system/vue/gold-system/.gitignore
-
3gold-system/vue/gold-system/.vscode/extensions.json
-
5gold-system/vue/gold-system/README.md
-
13gold-system/vue/gold-system/index.html
-
1658gold-system/vue/gold-system/package-lock.json
-
24gold-system/vue/gold-system/package.json
-
1gold-system/vue/gold-system/public/vite.svg
-
9gold-system/vue/gold-system/src/App.vue
-
1gold-system/vue/gold-system/src/assets/vue.svg
-
BINgold-system/vue/gold-system/src/assets/金币管理系统logo.png
-
14gold-system/vue/gold-system/src/main.ts
-
42gold-system/vue/gold-system/src/router/index.js
-
79gold-system/vue/gold-system/src/style.css
-
13gold-system/vue/gold-system/src/views/audit/rechargeAudit.vue
-
13gold-system/vue/gold-system/src/views/audit/refundAudit.vue
-
13gold-system/vue/gold-system/src/views/consume/addConsume.vue
-
13gold-system/vue/gold-system/src/views/consume/allConsume.vue
-
110gold-system/vue/gold-system/src/views/index.vue
-
13gold-system/vue/gold-system/src/views/managerecharge/activity.vue
@ -0,0 +1,8 @@ |
|||||
|
# 默认忽略的文件 |
||||
|
/shelf/ |
||||
|
/workspace.xml |
||||
|
# 基于编辑器的 HTTP 客户端请求 |
||||
|
/httpRequests/ |
||||
|
# Datasource local storage ignored files |
||||
|
/dataSources/ |
||||
|
/dataSources.local.xml |
@ -0,0 +1,24 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="CompilerConfiguration"> |
||||
|
<annotationProcessing> |
||||
|
<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="recharge" /> |
||||
|
<module name="user" /> |
||||
|
<module name="commons" /> |
||||
|
<module name="refund" /> |
||||
|
</profile> |
||||
|
</annotationProcessing> |
||||
|
</component> |
||||
|
<component name="JavacSettings"> |
||||
|
<option name="ADDITIONAL_OPTIONS_OVERRIDE"> |
||||
|
<module name="commons" options="-parameters" /> |
||||
|
<module name="recharge" options="-parameters" /> |
||||
|
<module name="refund" options="-parameters" /> |
||||
|
<module name="user" options="-parameters" /> |
||||
|
</option> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8"> |
||||
|
<file url="file://$PROJECT_DIR$/demo/commons/src/main/java" charset="UTF-8" /> |
||||
|
<file url="file://$PROJECT_DIR$/demo/recharge/src/main/java" charset="UTF-8" /> |
||||
|
<file url="file://$PROJECT_DIR$/demo/refund/src/main/java" charset="UTF-8" /> |
||||
|
<file url="file://$PROJECT_DIR$/demo/refund/src/main/resources" charset="UTF-8" /> |
||||
|
<file url="file://$PROJECT_DIR$/demo/src/main/java" charset="UTF-8" /> |
||||
|
<file url="file://$PROJECT_DIR$/demo/src/main/resources" charset="UTF-8" /> |
||||
|
<file url="file://$PROJECT_DIR$/demo/user/src/main/java" charset="UTF-8" /> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,9 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<module type="JAVA_MODULE" version="4"> |
||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true"> |
||||
|
<exclude-output /> |
||||
|
<content url="file://$MODULE_DIR$" /> |
||||
|
<orderEntry type="inheritedJdk" /> |
||||
|
<orderEntry type="sourceFolder" forTests="false" /> |
||||
|
</component> |
||||
|
</module> |
@ -0,0 +1,20 @@ |
|||||
|
<?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="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,15 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" /> |
||||
|
<component name="MavenProjectsManager"> |
||||
|
<option name="originalFiles"> |
||||
|
<list> |
||||
|
<option value="$PROJECT_DIR$/demo/pom.xml" /> |
||||
|
<option value="$PROJECT_DIR$/demo/refund/pom.xml" /> |
||||
|
</list> |
||||
|
</option> |
||||
|
</component> |
||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK"> |
||||
|
<output url="file://$PROJECT_DIR$/out" /> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="ProjectModuleManager"> |
||||
|
<modules> |
||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/gold-system.iml" filepath="$PROJECT_DIR$/.idea/gold-system.iml" /> |
||||
|
</modules> |
||||
|
</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.svg" removable="false" auto-create-binding="false" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> |
||||
|
</item> |
||||
|
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> |
||||
|
<initial-values> |
||||
|
<property name="text" value="Button" /> |
||||
|
</initial-values> |
||||
|
</item> |
||||
|
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> |
||||
|
<initial-values> |
||||
|
<property name="text" value="RadioButton" /> |
||||
|
</initial-values> |
||||
|
</item> |
||||
|
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> |
||||
|
<initial-values> |
||||
|
<property name="text" value="CheckBox" /> |
||||
|
</initial-values> |
||||
|
</item> |
||||
|
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> |
||||
|
<initial-values> |
||||
|
<property name="text" value="Label" /> |
||||
|
</initial-values> |
||||
|
</item> |
||||
|
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
||||
|
<preferred-size width="150" height="-1" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
||||
|
<preferred-size width="150" height="-1" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> |
||||
|
<preferred-size width="150" height="-1" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
||||
|
<preferred-size width="150" height="50" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
||||
|
<preferred-size width="150" height="50" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
||||
|
<preferred-size width="150" height="50" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
||||
|
<preferred-size width="150" height="50" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> |
||||
|
<preferred-size width="150" height="50" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> |
||||
|
<preferred-size width="150" height="50" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> |
||||
|
<preferred-size width="200" height="200" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> |
||||
|
<preferred-size width="200" height="200" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> |
||||
|
<preferred-size width="-1" height="20" /> |
||||
|
</default-constraints> |
||||
|
</item> |
||||
|
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> |
||||
|
</item> |
||||
|
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false"> |
||||
|
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> |
||||
|
</item> |
||||
|
</group> |
||||
|
</component> |
||||
|
</project> |
@ -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,2 @@ |
|||||
|
/mvnw text eol=lf |
||||
|
*.cmd text eol=crlf |
@ -0,0 +1,33 @@ |
|||||
|
HELP.md |
||||
|
target/ |
||||
|
!.mvn/wrapper/maven-wrapper.jar |
||||
|
!**/src/main/**/target/ |
||||
|
!**/src/test/**/target/ |
||||
|
|
||||
|
### STS ### |
||||
|
.apt_generated |
||||
|
.classpath |
||||
|
.factorypath |
||||
|
.project |
||||
|
.settings |
||||
|
.springBeans |
||||
|
.sts4-cache |
||||
|
|
||||
|
### IntelliJ IDEA ### |
||||
|
.idea |
||||
|
*.iws |
||||
|
*.iml |
||||
|
*.ipr |
||||
|
|
||||
|
### NetBeans ### |
||||
|
/nbproject/private/ |
||||
|
/nbbuild/ |
||||
|
/dist/ |
||||
|
/nbdist/ |
||||
|
/.nb-gradle/ |
||||
|
build/ |
||||
|
!**/src/main/**/build/ |
||||
|
!**/src/test/**/build/ |
||||
|
|
||||
|
### VS Code ### |
||||
|
.vscode/ |
@ -0,0 +1,19 @@ |
|||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
wrapperVersion=3.3.2 |
||||
|
distributionType=only-script |
||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip |
@ -0,0 +1,2 @@ |
|||||
|
/mvnw text eol=lf |
||||
|
*.cmd text eol=crlf |
@ -0,0 +1,33 @@ |
|||||
|
HELP.md |
||||
|
target/ |
||||
|
!.mvn/wrapper/maven-wrapper.jar |
||||
|
!**/src/main/**/target/ |
||||
|
!**/src/test/**/target/ |
||||
|
|
||||
|
### STS ### |
||||
|
.apt_generated |
||||
|
.classpath |
||||
|
.factorypath |
||||
|
.project |
||||
|
.settings |
||||
|
.springBeans |
||||
|
.sts4-cache |
||||
|
|
||||
|
### IntelliJ IDEA ### |
||||
|
.idea |
||||
|
*.iws |
||||
|
*.iml |
||||
|
*.ipr |
||||
|
|
||||
|
### NetBeans ### |
||||
|
/nbproject/private/ |
||||
|
/nbbuild/ |
||||
|
/dist/ |
||||
|
/nbdist/ |
||||
|
/.nb-gradle/ |
||||
|
build/ |
||||
|
!**/src/main/**/build/ |
||||
|
!**/src/test/**/build/ |
||||
|
|
||||
|
### VS Code ### |
||||
|
.vscode/ |
@ -0,0 +1,19 @@ |
|||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
wrapperVersion=3.3.2 |
||||
|
distributionType=only-script |
||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip |
@ -0,0 +1,259 @@ |
|||||
|
#!/bin/sh |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Apache Maven Wrapper startup batch script, version 3.3.2 |
||||
|
# |
||||
|
# Optional ENV vars |
||||
|
# ----------------- |
||||
|
# JAVA_HOME - location of a JDK home dir, required when download maven via java source |
||||
|
# MVNW_REPOURL - repo url base for downloading maven distribution |
||||
|
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
||||
|
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
set -euf |
||||
|
[ "${MVNW_VERBOSE-}" != debug ] || set -x |
||||
|
|
||||
|
# OS specific support. |
||||
|
native_path() { printf %s\\n "$1"; } |
||||
|
case "$(uname)" in |
||||
|
CYGWIN* | MINGW*) |
||||
|
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" |
||||
|
native_path() { cygpath --path --windows "$1"; } |
||||
|
;; |
||||
|
esac |
||||
|
|
||||
|
# set JAVACMD and JAVACCMD |
||||
|
set_java_home() { |
||||
|
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched |
||||
|
if [ -n "${JAVA_HOME-}" ]; then |
||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ]; then |
||||
|
# IBM's JDK on AIX uses strange locations for the executables |
||||
|
JAVACMD="$JAVA_HOME/jre/sh/java" |
||||
|
JAVACCMD="$JAVA_HOME/jre/sh/javac" |
||||
|
else |
||||
|
JAVACMD="$JAVA_HOME/bin/java" |
||||
|
JAVACCMD="$JAVA_HOME/bin/javac" |
||||
|
|
||||
|
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then |
||||
|
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 |
||||
|
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 |
||||
|
return 1 |
||||
|
fi |
||||
|
fi |
||||
|
else |
||||
|
JAVACMD="$( |
||||
|
'set' +e |
||||
|
'unset' -f command 2>/dev/null |
||||
|
'command' -v java |
||||
|
)" || : |
||||
|
JAVACCMD="$( |
||||
|
'set' +e |
||||
|
'unset' -f command 2>/dev/null |
||||
|
'command' -v javac |
||||
|
)" || : |
||||
|
|
||||
|
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then |
||||
|
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 |
||||
|
return 1 |
||||
|
fi |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
# hash string like Java String::hashCode |
||||
|
hash_string() { |
||||
|
str="${1:-}" h=0 |
||||
|
while [ -n "$str" ]; do |
||||
|
char="${str%"${str#?}"}" |
||||
|
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) |
||||
|
str="${str#?}" |
||||
|
done |
||||
|
printf %x\\n $h |
||||
|
} |
||||
|
|
||||
|
verbose() { :; } |
||||
|
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } |
||||
|
|
||||
|
die() { |
||||
|
printf %s\\n "$1" >&2 |
||||
|
exit 1 |
||||
|
} |
||||
|
|
||||
|
trim() { |
||||
|
# MWRAPPER-139: |
||||
|
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. |
||||
|
# Needed for removing poorly interpreted newline sequences when running in more |
||||
|
# exotic environments such as mingw bash on Windows. |
||||
|
printf "%s" "${1}" | tr -d '[:space:]' |
||||
|
} |
||||
|
|
||||
|
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties |
||||
|
while IFS="=" read -r key value; do |
||||
|
case "${key-}" in |
||||
|
distributionUrl) distributionUrl=$(trim "${value-}") ;; |
||||
|
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; |
||||
|
esac |
||||
|
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
||||
|
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
||||
|
|
||||
|
case "${distributionUrl##*/}" in |
||||
|
maven-mvnd-*bin.*) |
||||
|
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ |
||||
|
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in |
||||
|
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; |
||||
|
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;; |
||||
|
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;; |
||||
|
:Linux*x86_64*) distributionPlatform=linux-amd64 ;; |
||||
|
*) |
||||
|
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 |
||||
|
distributionPlatform=linux-amd64 |
||||
|
;; |
||||
|
esac |
||||
|
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" |
||||
|
;; |
||||
|
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; |
||||
|
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; |
||||
|
esac |
||||
|
|
||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME |
||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
||||
|
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" |
||||
|
distributionUrlName="${distributionUrl##*/}" |
||||
|
distributionUrlNameMain="${distributionUrlName%.*}" |
||||
|
distributionUrlNameMain="${distributionUrlNameMain%-bin}" |
||||
|
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" |
||||
|
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" |
||||
|
|
||||
|
exec_maven() { |
||||
|
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : |
||||
|
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" |
||||
|
} |
||||
|
|
||||
|
if [ -d "$MAVEN_HOME" ]; then |
||||
|
verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
||||
|
exec_maven "$@" |
||||
|
fi |
||||
|
|
||||
|
case "${distributionUrl-}" in |
||||
|
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; |
||||
|
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; |
||||
|
esac |
||||
|
|
||||
|
# prepare tmp dir |
||||
|
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then |
||||
|
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } |
||||
|
trap clean HUP INT TERM EXIT |
||||
|
else |
||||
|
die "cannot create temp dir" |
||||
|
fi |
||||
|
|
||||
|
mkdir -p -- "${MAVEN_HOME%/*}" |
||||
|
|
||||
|
# Download and Install Apache Maven |
||||
|
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
||||
|
verbose "Downloading from: $distributionUrl" |
||||
|
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
|
||||
|
# select .zip or .tar.gz |
||||
|
if ! command -v unzip >/dev/null; then |
||||
|
distributionUrl="${distributionUrl%.zip}.tar.gz" |
||||
|
distributionUrlName="${distributionUrl##*/}" |
||||
|
fi |
||||
|
|
||||
|
# verbose opt |
||||
|
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' |
||||
|
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v |
||||
|
|
||||
|
# normalize http auth |
||||
|
case "${MVNW_PASSWORD:+has-password}" in |
||||
|
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
||||
|
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
||||
|
esac |
||||
|
|
||||
|
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then |
||||
|
verbose "Found wget ... using wget" |
||||
|
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" |
||||
|
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then |
||||
|
verbose "Found curl ... using curl" |
||||
|
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" |
||||
|
elif set_java_home; then |
||||
|
verbose "Falling back to use Java to download" |
||||
|
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" |
||||
|
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
cat >"$javaSource" <<-END |
||||
|
public class Downloader extends java.net.Authenticator |
||||
|
{ |
||||
|
protected java.net.PasswordAuthentication getPasswordAuthentication() |
||||
|
{ |
||||
|
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); |
||||
|
} |
||||
|
public static void main( String[] args ) throws Exception |
||||
|
{ |
||||
|
setDefault( new Downloader() ); |
||||
|
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); |
||||
|
} |
||||
|
} |
||||
|
END |
||||
|
# For Cygwin/MinGW, switch paths to Windows format before running javac and java |
||||
|
verbose " - Compiling Downloader.java ..." |
||||
|
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" |
||||
|
verbose " - Running Downloader.java ..." |
||||
|
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" |
||||
|
fi |
||||
|
|
||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
||||
|
if [ -n "${distributionSha256Sum-}" ]; then |
||||
|
distributionSha256Result=false |
||||
|
if [ "$MVN_CMD" = mvnd.sh ]; then |
||||
|
echo "Checksum validation is not supported for maven-mvnd." >&2 |
||||
|
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
||||
|
exit 1 |
||||
|
elif command -v sha256sum >/dev/null; then |
||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then |
||||
|
distributionSha256Result=true |
||||
|
fi |
||||
|
elif command -v shasum >/dev/null; then |
||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then |
||||
|
distributionSha256Result=true |
||||
|
fi |
||||
|
else |
||||
|
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 |
||||
|
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
if [ $distributionSha256Result = false ]; then |
||||
|
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 |
||||
|
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
fi |
||||
|
|
||||
|
# unzip and move |
||||
|
if command -v unzip >/dev/null; then |
||||
|
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" |
||||
|
else |
||||
|
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" |
||||
|
fi |
||||
|
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" |
||||
|
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" |
||||
|
|
||||
|
clean || : |
||||
|
exec_maven "$@" |
@ -0,0 +1,149 @@ |
|||||
|
<# : batch portion |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one |
||||
|
@REM or more contributor license agreements. See the NOTICE file |
||||
|
@REM distributed with this work for additional information |
||||
|
@REM regarding copyright ownership. The ASF licenses this file |
||||
|
@REM to you under the Apache License, Version 2.0 (the |
||||
|
@REM "License"); you may not use this file except in compliance |
||||
|
@REM with the License. You may obtain a copy of the License at |
||||
|
@REM |
||||
|
@REM http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
@REM |
||||
|
@REM Unless required by applicable law or agreed to in writing, |
||||
|
@REM software distributed under the License is distributed on an |
||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
@REM KIND, either express or implied. See the License for the |
||||
|
@REM specific language governing permissions and limitations |
||||
|
@REM under the License. |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Apache Maven Wrapper startup batch script, version 3.3.2 |
||||
|
@REM |
||||
|
@REM Optional ENV vars |
||||
|
@REM MVNW_REPOURL - repo url base for downloading maven distribution |
||||
|
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
||||
|
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) |
||||
|
@SET __MVNW_CMD__= |
||||
|
@SET __MVNW_ERROR__= |
||||
|
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% |
||||
|
@SET PSModulePath= |
||||
|
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( |
||||
|
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) |
||||
|
) |
||||
|
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% |
||||
|
@SET __MVNW_PSMODULEP_SAVE= |
||||
|
@SET __MVNW_ARG0_NAME__= |
||||
|
@SET MVNW_USERNAME= |
||||
|
@SET MVNW_PASSWORD= |
||||
|
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) |
||||
|
@echo Cannot start maven from wrapper >&2 && exit /b 1 |
||||
|
@GOTO :EOF |
||||
|
: end batch / begin powershell #> |
||||
|
|
||||
|
$ErrorActionPreference = "Stop" |
||||
|
if ($env:MVNW_VERBOSE -eq "true") { |
||||
|
$VerbosePreference = "Continue" |
||||
|
} |
||||
|
|
||||
|
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties |
||||
|
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl |
||||
|
if (!$distributionUrl) { |
||||
|
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" |
||||
|
} |
||||
|
|
||||
|
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { |
||||
|
"maven-mvnd-*" { |
||||
|
$USE_MVND = $true |
||||
|
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" |
||||
|
$MVN_CMD = "mvnd.cmd" |
||||
|
break |
||||
|
} |
||||
|
default { |
||||
|
$USE_MVND = $false |
||||
|
$MVN_CMD = $script -replace '^mvnw','mvn' |
||||
|
break |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME |
||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
||||
|
if ($env:MVNW_REPOURL) { |
||||
|
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } |
||||
|
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" |
||||
|
} |
||||
|
$distributionUrlName = $distributionUrl -replace '^.*/','' |
||||
|
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' |
||||
|
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" |
||||
|
if ($env:MAVEN_USER_HOME) { |
||||
|
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" |
||||
|
} |
||||
|
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' |
||||
|
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" |
||||
|
|
||||
|
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { |
||||
|
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
||||
|
exit $? |
||||
|
} |
||||
|
|
||||
|
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { |
||||
|
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" |
||||
|
} |
||||
|
|
||||
|
# prepare tmp dir |
||||
|
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile |
||||
|
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" |
||||
|
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null |
||||
|
trap { |
||||
|
if ($TMP_DOWNLOAD_DIR.Exists) { |
||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null |
||||
|
|
||||
|
# Download and Install Apache Maven |
||||
|
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
||||
|
Write-Verbose "Downloading from: $distributionUrl" |
||||
|
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
|
||||
|
$webclient = New-Object System.Net.WebClient |
||||
|
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { |
||||
|
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) |
||||
|
} |
||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
||||
|
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null |
||||
|
|
||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
||||
|
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum |
||||
|
if ($distributionSha256Sum) { |
||||
|
if ($USE_MVND) { |
||||
|
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." |
||||
|
} |
||||
|
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash |
||||
|
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { |
||||
|
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# unzip and move |
||||
|
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null |
||||
|
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null |
||||
|
try { |
||||
|
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null |
||||
|
} catch { |
||||
|
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { |
||||
|
Write-Error "fail to move MAVEN_HOME" |
||||
|
} |
||||
|
} finally { |
||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
||||
|
} |
||||
|
|
||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
@ -0,0 +1,67 @@ |
|||||
|
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>commons</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
<name>commons</name> |
||||
|
<description>commons</description> |
||||
|
|
||||
|
<parent> |
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>demo</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
</parent> |
||||
|
|
||||
|
<dependencies> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.mybatis.spring.boot</groupId> |
||||
|
<artifactId>mybatis-spring-boot-starter</artifactId> |
||||
|
<version>3.0.3</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-devtools</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
<optional>true</optional> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.mysql</groupId> |
||||
|
<artifactId>mysql-connector-j</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-test</artifactId> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.mybatis.spring.boot</groupId> |
||||
|
<artifactId>mybatis-spring-boot-starter-test</artifactId> |
||||
|
<version>3.0.3</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
<build> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
|
<configuration> |
||||
|
<excludes> |
||||
|
<exclude> |
||||
|
<groupId>org.projectlombok</groupId> |
||||
|
<artifactId>lombok</artifactId> |
||||
|
</exclude> |
||||
|
</excludes> |
||||
|
</configuration> |
||||
|
</plugin> |
||||
|
</plugins> |
||||
|
</build> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,25 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDate; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
@Data |
||||
|
|
||||
|
public class Activity { |
||||
|
private int activityId ; |
||||
|
private int adminId; |
||||
|
private String dept; |
||||
|
private LocalDate startTime; |
||||
|
private LocalDate endTime; |
||||
|
private String activityName; |
||||
|
private BigDecimal rechargeRatio; |
||||
|
private LocalDateTime createTime; |
||||
|
private int activityFlag; |
||||
|
|
||||
|
private String name; |
||||
|
private Integer status; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
public class Admin { |
||||
|
private Integer adminId; |
||||
|
private String name; |
||||
|
private String username; |
||||
|
private String password; |
||||
|
private String permission; |
||||
|
private String area; |
||||
|
private String adminFlag; |
||||
|
private Integer status; |
||||
|
private String reson; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
private Date createTime; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
public class Audit { |
||||
|
private Integer auditId; |
||||
|
private Integer homilyId; |
||||
|
private Integer rechargeId; |
||||
|
private Integer refundId; |
||||
|
private String name; |
||||
|
private String status; |
||||
|
private Integer AuditFlag; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
private Date createTime; |
||||
|
private Date startDate; |
||||
|
private Date endDate; |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.apache.catalina.util.StringUtil; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
public class Detail { |
||||
|
private Integer detailId; |
||||
|
private String name; |
||||
|
private String jwcode; |
||||
|
private String area; |
||||
|
private Integer activityId; |
||||
|
private String rechargeWay; |
||||
|
private String goods; |
||||
|
private String consumePlatform; |
||||
|
private String consumeType; |
||||
|
private String refundType; |
||||
|
private String refundGoods; |
||||
|
private Integer contactId; |
||||
|
private String remark; |
||||
|
private BigDecimal rechargeCoin; |
||||
|
private BigDecimal freeCoin; |
||||
|
private BigDecimal taskCoin; |
||||
|
private Integer adminId; |
||||
|
private String updateType; |
||||
|
private Integer detailFlag; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
private Date createTime; |
||||
|
|
||||
|
private String adminArea; |
||||
|
private String adminName; |
||||
|
private String userName; |
||||
|
private String auditStatus; |
||||
|
private String auditReson; |
||||
|
|
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class Page { |
||||
|
private Integer pageNum; |
||||
|
private Integer pageSize; |
||||
|
|
||||
|
private Rate rate; |
||||
|
private Detail detail; |
||||
|
private Activity activity; |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
public class Rate { |
||||
|
private Integer rateId; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private LocalDateTime startTime; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private LocalDateTime endTime; |
||||
|
private String currency; |
||||
|
private String exchangeRate; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private LocalDateTime createTime; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
private Integer adminId; |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class RateSearchRequest { |
||||
|
private Integer pageNum; |
||||
|
private Integer pageSize; |
||||
|
private Rate rate; |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
public class Recharge { |
||||
|
private Integer rechargeId; |
||||
|
private String homilyId; |
||||
|
private Integer activityId; |
||||
|
private Double paidGold; |
||||
|
private Double freeGold; |
||||
|
private Double rechargeGold; |
||||
|
private String payWay; |
||||
|
private String rechargeWay; |
||||
|
private Date rechargeTime; |
||||
|
private String rechargeVoucher; |
||||
|
private Integer adminId; |
||||
|
private String area; |
||||
|
|
||||
|
private String remark; |
||||
|
private Integer flag; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
private Date createTime; |
||||
|
private Date startDate; |
||||
|
private Date endDate; |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.example.commons.domain.entity; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
public class User { |
||||
|
private Integer userId; |
||||
|
private String name; |
||||
|
private String homilyId; |
||||
|
private String password; |
||||
|
private String phone; |
||||
|
private String email; |
||||
|
private String gender; |
||||
|
private Date birthday; |
||||
|
private String head; |
||||
|
private Integer UserFlag; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
private Date createTime; |
||||
|
private String signature; |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
package com.example.commons.domain.vo; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
public class RechargeVo { |
||||
|
|
||||
|
private Integer rechargeId; |
||||
|
private String homilyId; |
||||
|
private Integer activityId; |
||||
|
private Double paidGold; |
||||
|
private Double freeGold; |
||||
|
private Double rechargeGold; |
||||
|
private String payWay; |
||||
|
private String rechargeWay; |
||||
|
private Date rechargeTime; |
||||
|
private String rechargeVoucher; |
||||
|
private Integer adminId; |
||||
|
private String area; |
||||
|
|
||||
|
private String remark; |
||||
|
private Integer flag; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
private Date createTime; |
||||
|
private Date startDate; |
||||
|
private Date endDate; |
||||
|
private String username; |
||||
|
private String activityName; |
||||
|
private String name; |
||||
|
private Integer status; |
||||
|
private String reson; |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.example.commons.domain.vo; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JsonProcessingException; |
||||
|
import com.fasterxml.jackson.databind.ObjectMapper; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class Result { |
||||
|
private Integer code; |
||||
|
private String msg; |
||||
|
private Object data; |
||||
|
|
||||
|
public static Result success(Integer code, String msg, Object data) { |
||||
|
return new Result(code, msg, data); |
||||
|
} |
||||
|
public static Result success(Integer code, Object data) { |
||||
|
return success(code, "操作成功", data); |
||||
|
} |
||||
|
public static Result success(Object data){ |
||||
|
return success(200, data); |
||||
|
} |
||||
|
public static Result success(){ |
||||
|
return success(null); |
||||
|
} |
||||
|
|
||||
|
public static Result error(Integer code, String msg, Object data){ |
||||
|
return new Result(code, msg, data); |
||||
|
} |
||||
|
public static Result error(Integer code, String msg){ |
||||
|
return error(code, msg, null); |
||||
|
} |
||||
|
public static Result error(String msg){ |
||||
|
return error(0, msg); |
||||
|
} |
||||
|
|
||||
|
public String toJson() throws JsonProcessingException { |
||||
|
ObjectMapper mapper = new ObjectMapper(); |
||||
|
return mapper.writeValueAsString(this); |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.example.commons.sevice; |
||||
|
|
||||
|
|
||||
|
|
||||
|
import com.example.commons.domain.entity.Activity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface ActivityService { |
||||
|
|
||||
|
int add(Activity activity); |
||||
|
|
||||
|
int edit(Activity activity); |
||||
|
|
||||
|
List<Activity> search(Activity activity); |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.example.commons.sevice; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Audit; |
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface AuditService { |
||||
|
int add (Audit audit); |
||||
|
List<Audit> search(Audit audit) ; |
||||
|
PageInfo<Audit> searchForPage(Integer pageNum, Integer pageSize, Audit audit); |
||||
|
} |
||||
|
|
@ -0,0 +1,16 @@ |
|||||
|
package com.example.commons.sevice; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Rate; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
|
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface RateService { |
||||
|
int add(Rate rate) throws Exception; |
||||
|
int edit(Rate rate) ; |
||||
|
void delete(Integer rateId) throws Exception; |
||||
|
Rate getById(Integer rateId); |
||||
|
List<Rate> search(Rate rate); |
||||
|
PageInfo<Rate> searchForPage(Integer pageNum, Integer pageSize,Rate rate); |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.example.commons.sevice; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.example.commons.domain.vo.RechargeVo; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface RechargeService { |
||||
|
int add(Recharge recharge) throws Exception; |
||||
|
int edit(Recharge recharge) throws Exception; |
||||
|
|
||||
|
Recharge findById(int id) throws Exception; |
||||
|
List<RechargeVo> search(RechargeVo rechargeVo) ; |
||||
|
PageInfo<RechargeVo> searchForPage(Integer pageNum, Integer pageSize, RechargeVo rechargeVo); |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.example.commons.sevice; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Detail; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public interface RefundService { |
||||
|
int add(Detail detail) ; |
||||
|
void edit(Detail newDetail) ; |
||||
|
int softDelete(Integer detailId) ; |
||||
|
Detail selectByDetailId(Integer detailId); |
||||
|
List<Detail> search(Detail detail); |
||||
|
PageInfo<Detail> searchForPage(Integer pageNum, Integer pageSize, Detail detail); |
||||
|
|
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.example.commons.sevice; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.example.commons.domain.entity.User; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface UserSevice { |
||||
|
List<User> search(User user) ; |
||||
|
PageInfo<User> searchForPage(Integer pageNum, Integer pageSize, User User); |
||||
|
|
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.example.commons; |
||||
|
|
||||
|
import org.junit.jupiter.api.Test; |
||||
|
import org.springframework.boot.test.context.SpringBootTest; |
||||
|
|
||||
|
@SpringBootTest |
||||
|
class CommonsApplicationTests { |
||||
|
|
||||
|
@Test |
||||
|
void contextLoads() { |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,259 @@ |
|||||
|
#!/bin/sh |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Apache Maven Wrapper startup batch script, version 3.3.2 |
||||
|
# |
||||
|
# Optional ENV vars |
||||
|
# ----------------- |
||||
|
# JAVA_HOME - location of a JDK home dir, required when download maven via java source |
||||
|
# MVNW_REPOURL - repo url base for downloading maven distribution |
||||
|
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
||||
|
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
set -euf |
||||
|
[ "${MVNW_VERBOSE-}" != debug ] || set -x |
||||
|
|
||||
|
# OS specific support. |
||||
|
native_path() { printf %s\\n "$1"; } |
||||
|
case "$(uname)" in |
||||
|
CYGWIN* | MINGW*) |
||||
|
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" |
||||
|
native_path() { cygpath --path --windows "$1"; } |
||||
|
;; |
||||
|
esac |
||||
|
|
||||
|
# set JAVACMD and JAVACCMD |
||||
|
set_java_home() { |
||||
|
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched |
||||
|
if [ -n "${JAVA_HOME-}" ]; then |
||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ]; then |
||||
|
# IBM's JDK on AIX uses strange locations for the executables |
||||
|
JAVACMD="$JAVA_HOME/jre/sh/java" |
||||
|
JAVACCMD="$JAVA_HOME/jre/sh/javac" |
||||
|
else |
||||
|
JAVACMD="$JAVA_HOME/bin/java" |
||||
|
JAVACCMD="$JAVA_HOME/bin/javac" |
||||
|
|
||||
|
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then |
||||
|
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 |
||||
|
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 |
||||
|
return 1 |
||||
|
fi |
||||
|
fi |
||||
|
else |
||||
|
JAVACMD="$( |
||||
|
'set' +e |
||||
|
'unset' -f command 2>/dev/null |
||||
|
'command' -v java |
||||
|
)" || : |
||||
|
JAVACCMD="$( |
||||
|
'set' +e |
||||
|
'unset' -f command 2>/dev/null |
||||
|
'command' -v javac |
||||
|
)" || : |
||||
|
|
||||
|
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then |
||||
|
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 |
||||
|
return 1 |
||||
|
fi |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
# hash string like Java String::hashCode |
||||
|
hash_string() { |
||||
|
str="${1:-}" h=0 |
||||
|
while [ -n "$str" ]; do |
||||
|
char="${str%"${str#?}"}" |
||||
|
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) |
||||
|
str="${str#?}" |
||||
|
done |
||||
|
printf %x\\n $h |
||||
|
} |
||||
|
|
||||
|
verbose() { :; } |
||||
|
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } |
||||
|
|
||||
|
die() { |
||||
|
printf %s\\n "$1" >&2 |
||||
|
exit 1 |
||||
|
} |
||||
|
|
||||
|
trim() { |
||||
|
# MWRAPPER-139: |
||||
|
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. |
||||
|
# Needed for removing poorly interpreted newline sequences when running in more |
||||
|
# exotic environments such as mingw bash on Windows. |
||||
|
printf "%s" "${1}" | tr -d '[:space:]' |
||||
|
} |
||||
|
|
||||
|
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties |
||||
|
while IFS="=" read -r key value; do |
||||
|
case "${key-}" in |
||||
|
distributionUrl) distributionUrl=$(trim "${value-}") ;; |
||||
|
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; |
||||
|
esac |
||||
|
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
||||
|
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
||||
|
|
||||
|
case "${distributionUrl##*/}" in |
||||
|
maven-mvnd-*bin.*) |
||||
|
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ |
||||
|
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in |
||||
|
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; |
||||
|
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;; |
||||
|
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;; |
||||
|
:Linux*x86_64*) distributionPlatform=linux-amd64 ;; |
||||
|
*) |
||||
|
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 |
||||
|
distributionPlatform=linux-amd64 |
||||
|
;; |
||||
|
esac |
||||
|
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" |
||||
|
;; |
||||
|
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; |
||||
|
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; |
||||
|
esac |
||||
|
|
||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME |
||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
||||
|
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" |
||||
|
distributionUrlName="${distributionUrl##*/}" |
||||
|
distributionUrlNameMain="${distributionUrlName%.*}" |
||||
|
distributionUrlNameMain="${distributionUrlNameMain%-bin}" |
||||
|
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" |
||||
|
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" |
||||
|
|
||||
|
exec_maven() { |
||||
|
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : |
||||
|
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" |
||||
|
} |
||||
|
|
||||
|
if [ -d "$MAVEN_HOME" ]; then |
||||
|
verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
||||
|
exec_maven "$@" |
||||
|
fi |
||||
|
|
||||
|
case "${distributionUrl-}" in |
||||
|
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; |
||||
|
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; |
||||
|
esac |
||||
|
|
||||
|
# prepare tmp dir |
||||
|
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then |
||||
|
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } |
||||
|
trap clean HUP INT TERM EXIT |
||||
|
else |
||||
|
die "cannot create temp dir" |
||||
|
fi |
||||
|
|
||||
|
mkdir -p -- "${MAVEN_HOME%/*}" |
||||
|
|
||||
|
# Download and Install Apache Maven |
||||
|
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
||||
|
verbose "Downloading from: $distributionUrl" |
||||
|
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
|
||||
|
# select .zip or .tar.gz |
||||
|
if ! command -v unzip >/dev/null; then |
||||
|
distributionUrl="${distributionUrl%.zip}.tar.gz" |
||||
|
distributionUrlName="${distributionUrl##*/}" |
||||
|
fi |
||||
|
|
||||
|
# verbose opt |
||||
|
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' |
||||
|
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v |
||||
|
|
||||
|
# normalize http auth |
||||
|
case "${MVNW_PASSWORD:+has-password}" in |
||||
|
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
||||
|
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
||||
|
esac |
||||
|
|
||||
|
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then |
||||
|
verbose "Found wget ... using wget" |
||||
|
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" |
||||
|
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then |
||||
|
verbose "Found curl ... using curl" |
||||
|
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" |
||||
|
elif set_java_home; then |
||||
|
verbose "Falling back to use Java to download" |
||||
|
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" |
||||
|
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
cat >"$javaSource" <<-END |
||||
|
public class Downloader extends java.net.Authenticator |
||||
|
{ |
||||
|
protected java.net.PasswordAuthentication getPasswordAuthentication() |
||||
|
{ |
||||
|
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); |
||||
|
} |
||||
|
public static void main( String[] args ) throws Exception |
||||
|
{ |
||||
|
setDefault( new Downloader() ); |
||||
|
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); |
||||
|
} |
||||
|
} |
||||
|
END |
||||
|
# For Cygwin/MinGW, switch paths to Windows format before running javac and java |
||||
|
verbose " - Compiling Downloader.java ..." |
||||
|
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" |
||||
|
verbose " - Running Downloader.java ..." |
||||
|
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" |
||||
|
fi |
||||
|
|
||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
||||
|
if [ -n "${distributionSha256Sum-}" ]; then |
||||
|
distributionSha256Result=false |
||||
|
if [ "$MVN_CMD" = mvnd.sh ]; then |
||||
|
echo "Checksum validation is not supported for maven-mvnd." >&2 |
||||
|
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
||||
|
exit 1 |
||||
|
elif command -v sha256sum >/dev/null; then |
||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then |
||||
|
distributionSha256Result=true |
||||
|
fi |
||||
|
elif command -v shasum >/dev/null; then |
||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then |
||||
|
distributionSha256Result=true |
||||
|
fi |
||||
|
else |
||||
|
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 |
||||
|
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
if [ $distributionSha256Result = false ]; then |
||||
|
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 |
||||
|
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
fi |
||||
|
|
||||
|
# unzip and move |
||||
|
if command -v unzip >/dev/null; then |
||||
|
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" |
||||
|
else |
||||
|
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" |
||||
|
fi |
||||
|
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" |
||||
|
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" |
||||
|
|
||||
|
clean || : |
||||
|
exec_maven "$@" |
@ -0,0 +1,149 @@ |
|||||
|
<# : batch portion |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one |
||||
|
@REM or more contributor license agreements. See the NOTICE file |
||||
|
@REM distributed with this work for additional information |
||||
|
@REM regarding copyright ownership. The ASF licenses this file |
||||
|
@REM to you under the Apache License, Version 2.0 (the |
||||
|
@REM "License"); you may not use this file except in compliance |
||||
|
@REM with the License. You may obtain a copy of the License at |
||||
|
@REM |
||||
|
@REM http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
@REM |
||||
|
@REM Unless required by applicable law or agreed to in writing, |
||||
|
@REM software distributed under the License is distributed on an |
||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
@REM KIND, either express or implied. See the License for the |
||||
|
@REM specific language governing permissions and limitations |
||||
|
@REM under the License. |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Apache Maven Wrapper startup batch script, version 3.3.2 |
||||
|
@REM |
||||
|
@REM Optional ENV vars |
||||
|
@REM MVNW_REPOURL - repo url base for downloading maven distribution |
||||
|
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
||||
|
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) |
||||
|
@SET __MVNW_CMD__= |
||||
|
@SET __MVNW_ERROR__= |
||||
|
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% |
||||
|
@SET PSModulePath= |
||||
|
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( |
||||
|
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) |
||||
|
) |
||||
|
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% |
||||
|
@SET __MVNW_PSMODULEP_SAVE= |
||||
|
@SET __MVNW_ARG0_NAME__= |
||||
|
@SET MVNW_USERNAME= |
||||
|
@SET MVNW_PASSWORD= |
||||
|
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) |
||||
|
@echo Cannot start maven from wrapper >&2 && exit /b 1 |
||||
|
@GOTO :EOF |
||||
|
: end batch / begin powershell #> |
||||
|
|
||||
|
$ErrorActionPreference = "Stop" |
||||
|
if ($env:MVNW_VERBOSE -eq "true") { |
||||
|
$VerbosePreference = "Continue" |
||||
|
} |
||||
|
|
||||
|
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties |
||||
|
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl |
||||
|
if (!$distributionUrl) { |
||||
|
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" |
||||
|
} |
||||
|
|
||||
|
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { |
||||
|
"maven-mvnd-*" { |
||||
|
$USE_MVND = $true |
||||
|
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" |
||||
|
$MVN_CMD = "mvnd.cmd" |
||||
|
break |
||||
|
} |
||||
|
default { |
||||
|
$USE_MVND = $false |
||||
|
$MVN_CMD = $script -replace '^mvnw','mvn' |
||||
|
break |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME |
||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
||||
|
if ($env:MVNW_REPOURL) { |
||||
|
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } |
||||
|
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" |
||||
|
} |
||||
|
$distributionUrlName = $distributionUrl -replace '^.*/','' |
||||
|
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' |
||||
|
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" |
||||
|
if ($env:MAVEN_USER_HOME) { |
||||
|
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" |
||||
|
} |
||||
|
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' |
||||
|
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" |
||||
|
|
||||
|
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { |
||||
|
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
||||
|
exit $? |
||||
|
} |
||||
|
|
||||
|
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { |
||||
|
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" |
||||
|
} |
||||
|
|
||||
|
# prepare tmp dir |
||||
|
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile |
||||
|
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" |
||||
|
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null |
||||
|
trap { |
||||
|
if ($TMP_DOWNLOAD_DIR.Exists) { |
||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null |
||||
|
|
||||
|
# Download and Install Apache Maven |
||||
|
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
||||
|
Write-Verbose "Downloading from: $distributionUrl" |
||||
|
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
|
||||
|
$webclient = New-Object System.Net.WebClient |
||||
|
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { |
||||
|
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) |
||||
|
} |
||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
||||
|
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null |
||||
|
|
||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
||||
|
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum |
||||
|
if ($distributionSha256Sum) { |
||||
|
if ($USE_MVND) { |
||||
|
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." |
||||
|
} |
||||
|
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash |
||||
|
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { |
||||
|
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# unzip and move |
||||
|
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null |
||||
|
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null |
||||
|
try { |
||||
|
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null |
||||
|
} catch { |
||||
|
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { |
||||
|
Write-Error "fail to move MAVEN_HOME" |
||||
|
} |
||||
|
} finally { |
||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
||||
|
} |
||||
|
|
||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
@ -0,0 +1,104 @@ |
|||||
|
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>demo</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
<name>demo</name> |
||||
|
<description>demo</description> |
||||
|
|
||||
|
<parent> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-parent</artifactId> |
||||
|
<version>3.3.6</version> |
||||
|
</parent> |
||||
|
|
||||
|
<packaging>pom</packaging> |
||||
|
|
||||
|
<modules> |
||||
|
<module>recharge</module> |
||||
|
<module>commons</module> |
||||
|
<module>user</module> |
||||
|
</modules> |
||||
|
|
||||
|
<properties> |
||||
|
|
||||
|
<java.version>21</java.version> |
||||
|
|
||||
|
<spring-boot.version>3.3.6</spring-boot.version> |
||||
|
|
||||
|
<dubbo.version>3.3.0-beta.2</dubbo.version> |
||||
|
<seata.version>2.0.0</seata.version> |
||||
|
</properties> |
||||
|
|
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>com.github.pagehelper</groupId> |
||||
|
<artifactId>pagehelper-spring-boot-starter</artifactId> |
||||
|
<version>1.4.6</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.slf4j</groupId> |
||||
|
<artifactId>slf4j-simple</artifactId> |
||||
|
<version>2.0.0</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.projectlombok</groupId> |
||||
|
<artifactId>lombok</artifactId> |
||||
|
<optional>true</optional> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-web</artifactId> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
<dependencyManagement> |
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-dependencies</artifactId> |
||||
|
<version>${spring-boot.version}</version> |
||||
|
<type>pom</type> |
||||
|
<scope>import</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter</artifactId> |
||||
|
<version>${spring-boot.version}</version> |
||||
|
<exclusions> |
||||
|
<exclusion> |
||||
|
<artifactId>spring-boot-starter-logging</artifactId> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
</exclusion> |
||||
|
</exclusions> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.apache.dubbo</groupId> |
||||
|
<artifactId>dubbo-bom</artifactId> |
||||
|
<version>${dubbo.version}</version> |
||||
|
<type>pom</type> |
||||
|
<scope>import</scope> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
</dependencyManagement> |
||||
|
<build> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
|
<configuration> |
||||
|
<excludes> |
||||
|
<exclude> |
||||
|
<groupId>org.projectlombok</groupId> |
||||
|
<artifactId>lombok</artifactId> |
||||
|
</exclude> |
||||
|
</excludes> |
||||
|
</configuration> |
||||
|
</plugin> |
||||
|
</plugins> |
||||
|
</build> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,2 @@ |
|||||
|
/mvnw text eol=lf |
||||
|
*.cmd text eol=crlf |
@ -0,0 +1,33 @@ |
|||||
|
HELP.md |
||||
|
target/ |
||||
|
!.mvn/wrapper/maven-wrapper.jar |
||||
|
!**/src/main/**/target/ |
||||
|
!**/src/test/**/target/ |
||||
|
|
||||
|
### STS ### |
||||
|
.apt_generated |
||||
|
.classpath |
||||
|
.factorypath |
||||
|
.project |
||||
|
.settings |
||||
|
.springBeans |
||||
|
.sts4-cache |
||||
|
|
||||
|
### IntelliJ IDEA ### |
||||
|
.idea |
||||
|
*.iws |
||||
|
*.iml |
||||
|
*.ipr |
||||
|
|
||||
|
### NetBeans ### |
||||
|
/nbproject/private/ |
||||
|
/nbbuild/ |
||||
|
/dist/ |
||||
|
/nbdist/ |
||||
|
/.nb-gradle/ |
||||
|
build/ |
||||
|
!**/src/main/**/build/ |
||||
|
!**/src/test/**/build/ |
||||
|
|
||||
|
### VS Code ### |
||||
|
.vscode/ |
@ -0,0 +1,19 @@ |
|||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
wrapperVersion=3.3.2 |
||||
|
distributionType=only-script |
||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip |
@ -0,0 +1,259 @@ |
|||||
|
#!/bin/sh |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Apache Maven Wrapper startup batch script, version 3.3.2 |
||||
|
# |
||||
|
# Optional ENV vars |
||||
|
# ----------------- |
||||
|
# JAVA_HOME - location of a JDK home dir, required when download maven via java source |
||||
|
# MVNW_REPOURL - repo url base for downloading maven distribution |
||||
|
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
||||
|
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
set -euf |
||||
|
[ "${MVNW_VERBOSE-}" != debug ] || set -x |
||||
|
|
||||
|
# OS specific support. |
||||
|
native_path() { printf %s\\n "$1"; } |
||||
|
case "$(uname)" in |
||||
|
CYGWIN* | MINGW*) |
||||
|
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" |
||||
|
native_path() { cygpath --path --windows "$1"; } |
||||
|
;; |
||||
|
esac |
||||
|
|
||||
|
# set JAVACMD and JAVACCMD |
||||
|
set_java_home() { |
||||
|
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched |
||||
|
if [ -n "${JAVA_HOME-}" ]; then |
||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ]; then |
||||
|
# IBM's JDK on AIX uses strange locations for the executables |
||||
|
JAVACMD="$JAVA_HOME/jre/sh/java" |
||||
|
JAVACCMD="$JAVA_HOME/jre/sh/javac" |
||||
|
else |
||||
|
JAVACMD="$JAVA_HOME/bin/java" |
||||
|
JAVACCMD="$JAVA_HOME/bin/javac" |
||||
|
|
||||
|
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then |
||||
|
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 |
||||
|
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 |
||||
|
return 1 |
||||
|
fi |
||||
|
fi |
||||
|
else |
||||
|
JAVACMD="$( |
||||
|
'set' +e |
||||
|
'unset' -f command 2>/dev/null |
||||
|
'command' -v java |
||||
|
)" || : |
||||
|
JAVACCMD="$( |
||||
|
'set' +e |
||||
|
'unset' -f command 2>/dev/null |
||||
|
'command' -v javac |
||||
|
)" || : |
||||
|
|
||||
|
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then |
||||
|
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 |
||||
|
return 1 |
||||
|
fi |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
# hash string like Java String::hashCode |
||||
|
hash_string() { |
||||
|
str="${1:-}" h=0 |
||||
|
while [ -n "$str" ]; do |
||||
|
char="${str%"${str#?}"}" |
||||
|
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) |
||||
|
str="${str#?}" |
||||
|
done |
||||
|
printf %x\\n $h |
||||
|
} |
||||
|
|
||||
|
verbose() { :; } |
||||
|
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } |
||||
|
|
||||
|
die() { |
||||
|
printf %s\\n "$1" >&2 |
||||
|
exit 1 |
||||
|
} |
||||
|
|
||||
|
trim() { |
||||
|
# MWRAPPER-139: |
||||
|
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. |
||||
|
# Needed for removing poorly interpreted newline sequences when running in more |
||||
|
# exotic environments such as mingw bash on Windows. |
||||
|
printf "%s" "${1}" | tr -d '[:space:]' |
||||
|
} |
||||
|
|
||||
|
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties |
||||
|
while IFS="=" read -r key value; do |
||||
|
case "${key-}" in |
||||
|
distributionUrl) distributionUrl=$(trim "${value-}") ;; |
||||
|
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; |
||||
|
esac |
||||
|
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
||||
|
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
||||
|
|
||||
|
case "${distributionUrl##*/}" in |
||||
|
maven-mvnd-*bin.*) |
||||
|
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ |
||||
|
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in |
||||
|
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; |
||||
|
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;; |
||||
|
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;; |
||||
|
:Linux*x86_64*) distributionPlatform=linux-amd64 ;; |
||||
|
*) |
||||
|
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 |
||||
|
distributionPlatform=linux-amd64 |
||||
|
;; |
||||
|
esac |
||||
|
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" |
||||
|
;; |
||||
|
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; |
||||
|
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; |
||||
|
esac |
||||
|
|
||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME |
||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
||||
|
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" |
||||
|
distributionUrlName="${distributionUrl##*/}" |
||||
|
distributionUrlNameMain="${distributionUrlName%.*}" |
||||
|
distributionUrlNameMain="${distributionUrlNameMain%-bin}" |
||||
|
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" |
||||
|
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" |
||||
|
|
||||
|
exec_maven() { |
||||
|
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : |
||||
|
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" |
||||
|
} |
||||
|
|
||||
|
if [ -d "$MAVEN_HOME" ]; then |
||||
|
verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
||||
|
exec_maven "$@" |
||||
|
fi |
||||
|
|
||||
|
case "${distributionUrl-}" in |
||||
|
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; |
||||
|
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; |
||||
|
esac |
||||
|
|
||||
|
# prepare tmp dir |
||||
|
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then |
||||
|
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } |
||||
|
trap clean HUP INT TERM EXIT |
||||
|
else |
||||
|
die "cannot create temp dir" |
||||
|
fi |
||||
|
|
||||
|
mkdir -p -- "${MAVEN_HOME%/*}" |
||||
|
|
||||
|
# Download and Install Apache Maven |
||||
|
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
||||
|
verbose "Downloading from: $distributionUrl" |
||||
|
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
|
||||
|
# select .zip or .tar.gz |
||||
|
if ! command -v unzip >/dev/null; then |
||||
|
distributionUrl="${distributionUrl%.zip}.tar.gz" |
||||
|
distributionUrlName="${distributionUrl##*/}" |
||||
|
fi |
||||
|
|
||||
|
# verbose opt |
||||
|
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' |
||||
|
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v |
||||
|
|
||||
|
# normalize http auth |
||||
|
case "${MVNW_PASSWORD:+has-password}" in |
||||
|
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
||||
|
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
||||
|
esac |
||||
|
|
||||
|
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then |
||||
|
verbose "Found wget ... using wget" |
||||
|
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" |
||||
|
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then |
||||
|
verbose "Found curl ... using curl" |
||||
|
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" |
||||
|
elif set_java_home; then |
||||
|
verbose "Falling back to use Java to download" |
||||
|
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" |
||||
|
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
cat >"$javaSource" <<-END |
||||
|
public class Downloader extends java.net.Authenticator |
||||
|
{ |
||||
|
protected java.net.PasswordAuthentication getPasswordAuthentication() |
||||
|
{ |
||||
|
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); |
||||
|
} |
||||
|
public static void main( String[] args ) throws Exception |
||||
|
{ |
||||
|
setDefault( new Downloader() ); |
||||
|
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); |
||||
|
} |
||||
|
} |
||||
|
END |
||||
|
# For Cygwin/MinGW, switch paths to Windows format before running javac and java |
||||
|
verbose " - Compiling Downloader.java ..." |
||||
|
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" |
||||
|
verbose " - Running Downloader.java ..." |
||||
|
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" |
||||
|
fi |
||||
|
|
||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
||||
|
if [ -n "${distributionSha256Sum-}" ]; then |
||||
|
distributionSha256Result=false |
||||
|
if [ "$MVN_CMD" = mvnd.sh ]; then |
||||
|
echo "Checksum validation is not supported for maven-mvnd." >&2 |
||||
|
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
||||
|
exit 1 |
||||
|
elif command -v sha256sum >/dev/null; then |
||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then |
||||
|
distributionSha256Result=true |
||||
|
fi |
||||
|
elif command -v shasum >/dev/null; then |
||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then |
||||
|
distributionSha256Result=true |
||||
|
fi |
||||
|
else |
||||
|
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 |
||||
|
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
if [ $distributionSha256Result = false ]; then |
||||
|
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 |
||||
|
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
fi |
||||
|
|
||||
|
# unzip and move |
||||
|
if command -v unzip >/dev/null; then |
||||
|
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" |
||||
|
else |
||||
|
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" |
||||
|
fi |
||||
|
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" |
||||
|
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" |
||||
|
|
||||
|
clean || : |
||||
|
exec_maven "$@" |
@ -0,0 +1,149 @@ |
|||||
|
<# : batch portion |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one |
||||
|
@REM or more contributor license agreements. See the NOTICE file |
||||
|
@REM distributed with this work for additional information |
||||
|
@REM regarding copyright ownership. The ASF licenses this file |
||||
|
@REM to you under the Apache License, Version 2.0 (the |
||||
|
@REM "License"); you may not use this file except in compliance |
||||
|
@REM with the License. You may obtain a copy of the License at |
||||
|
@REM |
||||
|
@REM http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
@REM |
||||
|
@REM Unless required by applicable law or agreed to in writing, |
||||
|
@REM software distributed under the License is distributed on an |
||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
@REM KIND, either express or implied. See the License for the |
||||
|
@REM specific language governing permissions and limitations |
||||
|
@REM under the License. |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Apache Maven Wrapper startup batch script, version 3.3.2 |
||||
|
@REM |
||||
|
@REM Optional ENV vars |
||||
|
@REM MVNW_REPOURL - repo url base for downloading maven distribution |
||||
|
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
||||
|
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) |
||||
|
@SET __MVNW_CMD__= |
||||
|
@SET __MVNW_ERROR__= |
||||
|
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% |
||||
|
@SET PSModulePath= |
||||
|
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( |
||||
|
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) |
||||
|
) |
||||
|
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% |
||||
|
@SET __MVNW_PSMODULEP_SAVE= |
||||
|
@SET __MVNW_ARG0_NAME__= |
||||
|
@SET MVNW_USERNAME= |
||||
|
@SET MVNW_PASSWORD= |
||||
|
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) |
||||
|
@echo Cannot start maven from wrapper >&2 && exit /b 1 |
||||
|
@GOTO :EOF |
||||
|
: end batch / begin powershell #> |
||||
|
|
||||
|
$ErrorActionPreference = "Stop" |
||||
|
if ($env:MVNW_VERBOSE -eq "true") { |
||||
|
$VerbosePreference = "Continue" |
||||
|
} |
||||
|
|
||||
|
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties |
||||
|
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl |
||||
|
if (!$distributionUrl) { |
||||
|
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" |
||||
|
} |
||||
|
|
||||
|
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { |
||||
|
"maven-mvnd-*" { |
||||
|
$USE_MVND = $true |
||||
|
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" |
||||
|
$MVN_CMD = "mvnd.cmd" |
||||
|
break |
||||
|
} |
||||
|
default { |
||||
|
$USE_MVND = $false |
||||
|
$MVN_CMD = $script -replace '^mvnw','mvn' |
||||
|
break |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME |
||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
||||
|
if ($env:MVNW_REPOURL) { |
||||
|
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } |
||||
|
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" |
||||
|
} |
||||
|
$distributionUrlName = $distributionUrl -replace '^.*/','' |
||||
|
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' |
||||
|
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" |
||||
|
if ($env:MAVEN_USER_HOME) { |
||||
|
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" |
||||
|
} |
||||
|
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' |
||||
|
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" |
||||
|
|
||||
|
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { |
||||
|
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
||||
|
exit $? |
||||
|
} |
||||
|
|
||||
|
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { |
||||
|
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" |
||||
|
} |
||||
|
|
||||
|
# prepare tmp dir |
||||
|
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile |
||||
|
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" |
||||
|
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null |
||||
|
trap { |
||||
|
if ($TMP_DOWNLOAD_DIR.Exists) { |
||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null |
||||
|
|
||||
|
# Download and Install Apache Maven |
||||
|
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
||||
|
Write-Verbose "Downloading from: $distributionUrl" |
||||
|
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
|
||||
|
$webclient = New-Object System.Net.WebClient |
||||
|
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { |
||||
|
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) |
||||
|
} |
||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
||||
|
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null |
||||
|
|
||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
||||
|
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum |
||||
|
if ($distributionSha256Sum) { |
||||
|
if ($USE_MVND) { |
||||
|
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." |
||||
|
} |
||||
|
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash |
||||
|
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { |
||||
|
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# unzip and move |
||||
|
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null |
||||
|
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null |
||||
|
try { |
||||
|
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null |
||||
|
} catch { |
||||
|
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { |
||||
|
Write-Error "fail to move MAVEN_HOME" |
||||
|
} |
||||
|
} finally { |
||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
||||
|
} |
||||
|
|
||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
@ -0,0 +1,73 @@ |
|||||
|
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>recharge</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
<name>recharge</name> |
||||
|
<description>recharge</description> |
||||
|
|
||||
|
<parent> |
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>demo</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
</parent> |
||||
|
|
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>commons</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.mybatis.spring.boot</groupId> |
||||
|
<artifactId>mybatis-spring-boot-starter</artifactId> |
||||
|
<version>3.0.3</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-devtools</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
<optional>true</optional> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.mysql</groupId> |
||||
|
<artifactId>mysql-connector-j</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-test</artifactId> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.mybatis.spring.boot</groupId> |
||||
|
<artifactId>mybatis-spring-boot-starter-test</artifactId> |
||||
|
<version>3.0.3</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
<build> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
|
<configuration> |
||||
|
<excludes> |
||||
|
<exclude> |
||||
|
<groupId>org.projectlombok</groupId> |
||||
|
<artifactId>lombok</artifactId> |
||||
|
</exclude> |
||||
|
</excludes> |
||||
|
</configuration> |
||||
|
</plugin> |
||||
|
</plugins> |
||||
|
</build> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,13 @@ |
|||||
|
package com.example.recharge; |
||||
|
|
||||
|
import org.springframework.boot.SpringApplication; |
||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||
|
|
||||
|
@SpringBootApplication |
||||
|
public class RechargeApplication { |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
SpringApplication.run(RechargeApplication.class, args); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
package com.example.recharge.controller; |
||||
|
|
||||
|
|
||||
|
import com.example.commons.domain.entity.Activity; |
||||
|
import com.example.commons.domain.entity.Page; |
||||
|
import com.example.commons.domain.vo.Result; |
||||
|
import com.example.recharge.service.ActivityServiceImpl; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.util.ObjectUtils; |
||||
|
import java.util.Arrays; |
||||
|
|
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/recharge/activity") |
||||
|
//SpringMVC的,为当前类的所有处理器方法,添加路径映射的前缀 |
||||
|
@RequiredArgsConstructor |
||||
|
// lombok的,添加一个包含所有final属性的构造器 |
||||
|
@Slf4j //lombok的,自动添加log的对象,用于日志打印 |
||||
|
@CrossOrigin |
||||
|
public class ActivityController { |
||||
|
|
||||
|
@Autowired |
||||
|
ActivityServiceImpl activityService; |
||||
|
|
||||
|
//添加活动管理信息 |
||||
|
@PostMapping("/add") |
||||
|
public Result add(@RequestBody Activity activity) { |
||||
|
// try { |
||||
|
System.out.println("------6---"); |
||||
|
int result=activityService.add(activity); |
||||
|
System.out.println(result); |
||||
|
return Result.success(); |
||||
|
// } catch (Exception e) { |
||||
|
// log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
// return Result.error(e.getMessage()); |
||||
|
// } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
//修改活动管理信息 |
||||
|
@PostMapping("/edit") |
||||
|
public Result edit(@RequestBody Activity activity){ |
||||
|
|
||||
|
// try { |
||||
|
Integer num =activityService.edit(activity); |
||||
|
return Result.success(num); |
||||
|
// } catch (Exception e) { |
||||
|
//// log.error(""+e); |
||||
|
//// return Result.error(e.getMessage()); |
||||
|
//// } |
||||
|
} |
||||
|
//查询活动管理信息--模糊+分页查询 |
||||
|
@PostMapping("/select") |
||||
|
public Result search(@RequestBody Page page){ |
||||
|
Integer pageNum = page.getPageNum(); |
||||
|
Integer pageSize=page.getPageSize(); |
||||
|
Activity activity= page.getActivity(); |
||||
|
if (ObjectUtils.isEmpty(pageNum)){ |
||||
|
return Result.success(activityService.search(page.getActivity())); |
||||
|
} |
||||
|
return Result.success(activityService.searchForPage(pageNum,pageSize,activity)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.example.recharge.controller; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Audit; |
||||
|
import com.example.commons.domain.vo.Result; |
||||
|
import com.example.commons.sevice.AuditService; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.util.ObjectUtils; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/recharge/audit") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
@CrossOrigin |
||||
|
public class AuditController { |
||||
|
|
||||
|
private final AuditService auditService; |
||||
|
@PostMapping("/add") |
||||
|
public Result add(@RequestBody Audit audit){ |
||||
|
try { |
||||
|
auditService.add(audit); |
||||
|
return Result.success(); |
||||
|
}catch (Exception e){ |
||||
|
log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
@PostMapping |
||||
|
public Result search(Integer pageNum,Integer pageSize,@RequestBody Audit audit){ |
||||
|
if(ObjectUtils.isEmpty(pageNum)){ |
||||
|
return Result.success(auditService.search(audit)); |
||||
|
} |
||||
|
else { |
||||
|
return Result.success(auditService.searchForPage(pageNum,pageSize,audit)); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,102 @@ |
|||||
|
package com.example.recharge.controller; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Page; |
||||
|
import com.example.commons.domain.entity.Rate; |
||||
|
import com.example.commons.domain.entity.RateSearchRequest; |
||||
|
import com.example.commons.domain.vo.Result; |
||||
|
import com.example.commons.sevice.RateService; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
|
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.util.ObjectUtils; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/rates") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
@CrossOrigin |
||||
|
public class RateController { |
||||
|
private final RateService rateService; |
||||
|
|
||||
|
@PostMapping("/add") |
||||
|
public Result add(@RequestBody Rate rate) { |
||||
|
try { |
||||
|
rateService.add(rate); |
||||
|
return Result.success(); |
||||
|
} catch (Exception e) { |
||||
|
log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
@PostMapping("/update") // 将 PUT 改为 POST |
||||
|
public Result update(@RequestBody Rate rate) { |
||||
|
// try { |
||||
|
rateService.edit(rate); |
||||
|
return Result.success(); |
||||
|
// } catch (Exception e) { |
||||
|
// log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
// return Result.error(e.getMessage()); |
||||
|
// } |
||||
|
} |
||||
|
// @PutMapping("/update") |
||||
|
// public Result update(@RequestBody Rate rate) { |
||||
|
// try { |
||||
|
// rateService.edit(rate); |
||||
|
// return Result.success(); |
||||
|
// } catch (Exception e) { |
||||
|
// log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
// return Result.error(e.getMessage()); |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
@PostMapping("/delete/{rateId}") // 将 DELETE 改为 POST |
||||
|
public Result delete(@PathVariable("rateId") Integer rateId) { |
||||
|
try { |
||||
|
rateService.delete(rateId); |
||||
|
return Result.success(); |
||||
|
} catch (Exception e) { |
||||
|
log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
// @DeleteMapping("/{rateId}") |
||||
|
// public Result delete(@PathVariable("rateId") Integer rateId) { |
||||
|
// try { |
||||
|
// rateService.delete(rateId); |
||||
|
// return Result.success(); |
||||
|
// } catch (Exception e) { |
||||
|
// log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
// return Result.error(e.getMessage()); |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// @GetMapping("/{rateId}") |
||||
|
// public Result get(@PathVariable Integer rateId) { |
||||
|
// return Result.success(rateService.getById(rateId)); |
||||
|
// } |
||||
|
// |
||||
|
// @GetMapping |
||||
|
// public Result search(Integer pageNum, Integer pageSize,Rate rate) { |
||||
|
// if(ObjectUtils.isEmpty(pageNum)){ |
||||
|
// return Result.success(rateService.search(rate)); |
||||
|
// }else{ |
||||
|
// return Result.success(rateService.searchForPage(pageNum,pageSize,rate)); |
||||
|
// } |
||||
|
// } |
||||
|
@PostMapping("/search") // 改为 POST 请求 |
||||
|
public Result search(@RequestBody Page page) { |
||||
|
Integer pageNum = page.getPageNum(); |
||||
|
Integer pageSize = page.getPageSize(); |
||||
|
Rate rate = page.getRate(); |
||||
|
|
||||
|
if (ObjectUtils.isEmpty(pageNum)) { |
||||
|
return Result.success(rateService.search(rate)); |
||||
|
} else { |
||||
|
return Result.success(rateService.searchForPage(pageNum, pageSize, rate)); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
package com.example.recharge.controller; |
||||
|
|
||||
|
|
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.example.commons.domain.vo.RechargeVo; |
||||
|
import com.example.commons.domain.vo.Result; |
||||
|
import com.example.commons.sevice.RechargeService; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.util.ObjectUtils; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/recharge/recharge") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
@CrossOrigin |
||||
|
public class RechargeController { |
||||
|
|
||||
|
private final RechargeService rechargeService; |
||||
|
|
||||
|
@PostMapping("/add") |
||||
|
public Result add(@RequestBody Recharge recharge) { |
||||
|
try { |
||||
|
rechargeService.add(recharge); |
||||
|
return Result.success(); |
||||
|
} catch (Exception e) { |
||||
|
log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
@PostMapping("/edit") |
||||
|
public Result edit(@RequestBody Recharge recharge) { |
||||
|
try { |
||||
|
rechargeService.edit(recharge); |
||||
|
} catch (Exception e) { |
||||
|
log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
return Result.success(); |
||||
|
} |
||||
|
@PostMapping |
||||
|
public Result search(Integer pageNum, Integer pageSize,@RequestBody RechargeVo rechargeVo) { |
||||
|
if(ObjectUtils.isEmpty(pageNum)){ |
||||
|
return Result.success(rechargeService.search(rechargeVo)); |
||||
|
} |
||||
|
else { |
||||
|
return Result.success(rechargeService.searchForPage(pageNum,pageSize,rechargeVo)); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
package com.example.recharge.mapper; |
||||
|
|
||||
|
|
||||
|
import com.example.commons.domain.entity.Activity; |
||||
|
import org.apache.ibatis.annotations.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface ActivityMapper { |
||||
|
|
||||
|
//增加活动信息 |
||||
|
@Insert({"insert into activity", |
||||
|
"(admin_id,dept,start_time,end_time,recharge_ratio,activity_name,activity_flag,create_time) " , |
||||
|
"values", |
||||
|
"(#{adminId},#{dept},#{startTime},#{endTime},#{rechargeRatio},#{activityName},1,now())" |
||||
|
}) |
||||
|
@Options(useGeneratedKeys = true,keyColumn = "activity_id",keyProperty = "activityId") |
||||
|
int add(Activity activity); |
||||
|
|
||||
|
|
||||
|
// 修改活动信息 |
||||
|
@Update({ |
||||
|
"<script>", |
||||
|
"update activity", |
||||
|
"<set>", |
||||
|
"<if test='adminId != null'> admin_id = #{adminId}, </if>", |
||||
|
"<if test='dept != null '> dept= #{dept}, </if>", |
||||
|
"<if test='startTime != null '> start_time = #{startTime}, </if>", |
||||
|
"<if test='endTime != null '> end_time = #{endTime}, </if>", |
||||
|
"<if test='rechargeRatio != null '> recharge_ratio = #{rechargeRatio}, </if>", |
||||
|
"<if test='activityName != null and activityName.length>0'> activity_name = #{activityName}, </if>", |
||||
|
"<if test='activityFlag != null'> `activity_flag` = #{activityFlag}, </if>", |
||||
|
"<if test='status != null'> `status` = #{status}, </if>", |
||||
|
"</set>", |
||||
|
"where activity_id=#{activityId}", |
||||
|
"</script>" |
||||
|
}) |
||||
|
int edit(Activity activity); |
||||
|
|
||||
|
|
||||
|
//查询--根据活动id查询活动信息 |
||||
|
@Select({ |
||||
|
"select activity_id from activity where activity_id=#{activityId}" |
||||
|
}) |
||||
|
Activity selectById(Integer activityId); |
||||
|
|
||||
|
//模糊查询--根据活动id查询活动信息 |
||||
|
@Select({ |
||||
|
"<script>", |
||||
|
"select activity.*,admin.name from activity", |
||||
|
"inner join admin on activity.admin_id=admin.admin_id ", |
||||
|
"<where>", |
||||
|
"`activity_flag`=1", |
||||
|
"<if test='startTime!=null'>start_time=#{startTime}</if>", |
||||
|
"<if test='endTime!=null'>and end_time=#{endTime}</if>", |
||||
|
"<if test='activityName!=null'>and activity_name like concat('%','#{activityName}','%')</if>", |
||||
|
"</where>", |
||||
|
"</script>" |
||||
|
|
||||
|
}) |
||||
|
List<Activity> select(Activity activity); |
||||
|
// |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.example.recharge.mapper; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Audit; |
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.example.commons.sevice.AuditService; |
||||
|
import org.apache.ibatis.annotations.Insert; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Select; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface AuditMapper { |
||||
|
|
||||
|
@Insert({ |
||||
|
"INSERT INTO audit", |
||||
|
"(homily_id,recharge_id,refund_id,name,status,auditFlag)", |
||||
|
"values", |
||||
|
"(#{homilyId},#{rechargeId},#{refundId},#{name},#{status},1)" |
||||
|
}) |
||||
|
int insert(Audit audit); |
||||
|
@Select({ |
||||
|
"<script>", |
||||
|
"select * from audit", |
||||
|
"<where>", |
||||
|
|
||||
|
"<if test='homilyId!=null'>and homily_id=#{homilyId}</if>", |
||||
|
"<if test='startDate != null and endDate != null'>AND create_time BETWEEN #{startDate} AND #{endDate}</if>", |
||||
|
"<if test='rechargeId!=null'>and refund_id=#{fefundId}</if>", |
||||
|
"<if test='refundId!=null'>and refund_id=#{fefundId}</if>", |
||||
|
"<if test='status!=null'>and status=#{status}</if>", |
||||
|
"</where>", |
||||
|
"</script>" |
||||
|
}) |
||||
|
List<Audit> select(Audit Audit); |
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.example.recharge.mapper; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Rate; |
||||
|
import org.apache.ibatis.annotations.*; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface RateMapper { |
||||
|
|
||||
|
@Insert({ |
||||
|
"insert into rate", |
||||
|
"(start_time,end_time,currency,exchange_rate,create_time,update_time,admin_id)", |
||||
|
"values", |
||||
|
"(#{startTime},#{endTime},#{currency},#{exchangeRate},now(),#{updateTime},#{adminId})" |
||||
|
}) |
||||
|
// 获取自增主键 |
||||
|
@Options(useGeneratedKeys = true,keyColumn = "rate_id",keyProperty = "rateId") |
||||
|
int insert(Rate rate); |
||||
|
|
||||
|
@Delete({ |
||||
|
"delete from rate where rate_id=#{rateId}" |
||||
|
}) |
||||
|
int deleteById(Integer rateId); |
||||
|
|
||||
|
@Update({ |
||||
|
"<script>", |
||||
|
"update rate", |
||||
|
"<set>", |
||||
|
"<if test='startTime!=null'>start_time=#{startTime},</if>", |
||||
|
"<if test='endTime!=null'>end_time=#{endTime},</if>", |
||||
|
"<if test='currency!=null and currency.length>0'>currency=#{currency},</if>", |
||||
|
"<if test='exchangeRate!=null'>exchange_rate=#{exchangeRate},</if>", |
||||
|
"<if test='updateTime!=null'>update_time=#{updateTime},</if>", |
||||
|
"<if test='adminId!=null'>admin_id=#{adminId},</if>", |
||||
|
"</set>", |
||||
|
"where rate_id = #{rateId}", |
||||
|
"</script>" |
||||
|
}) |
||||
|
int update(Rate rate); |
||||
|
|
||||
|
@Select({ |
||||
|
"select rate_id from rate where rate_id=#{rateId}" |
||||
|
}) |
||||
|
Rate selectById(Integer rateId); |
||||
|
|
||||
|
@Select({ |
||||
|
"<script>", |
||||
|
"SELECT r.*, a.name AS adminName", |
||||
|
"FROM rate r", |
||||
|
"LEFT JOIN admin a ON r.admin_id = a.admin_id", |
||||
|
"<where>", |
||||
|
"<if test='rateId != null'>AND r.rate_id = #{rateId}</if>", |
||||
|
"<if test='startTime != null'>AND r.start_time >= #{startTime}</if>", |
||||
|
"<if test='endTime != null'>AND r.end_time <= #{endTime}</if>", |
||||
|
"<if test='currency != null and currency.length > 0'>AND r.currency LIKE CONCAT('%', #{currency}, '%')</if>", |
||||
|
"<if test='exchangeRate != null'>AND r.exchange_rate LIKE CONCAT('%', #{exchangeRate}, '%')</if>", |
||||
|
"<if test='updateTime != null'>AND r.update_time LIKE CONCAT('%', #{updateTime}, '%')</if>", |
||||
|
"<if test='adminId != null'>AND r.admin_id = #{adminId}</if>", |
||||
|
"</where>", |
||||
|
"</script>" |
||||
|
|
||||
|
}) |
||||
|
List<Rate> select(Rate rate); |
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
package com.example.recharge.mapper; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.example.commons.domain.vo.RechargeVo; |
||||
|
import org.apache.ibatis.annotations.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface RechargeMapper { |
||||
|
|
||||
|
@Insert({ |
||||
|
"INSERT INTO recharge", |
||||
|
"(homily_id,activity_id,paid_gold,free_gold,recharge_gold,pay_way,recharge_way,recharge_time,recharge_voucher,admin_id,area,remark,flag)", |
||||
|
"values ", |
||||
|
"(#{homilyId},#{activityId},#{paidGold},#{freeGold},#{rechargeGold},#{payWay},#{rechargeWay},#{rechargeTime},#{rechargeVoucher},#{adminId},#{area},#{remark},1)" |
||||
|
}) |
||||
|
int insert(Recharge recharge); |
||||
|
|
||||
|
@Update({ |
||||
|
"<script>", |
||||
|
"UPDATE recharge", |
||||
|
"<set>", |
||||
|
"<if test= 'flag!=null '>flag=#{flag},</if>", |
||||
|
"</set>", |
||||
|
"where recharge_id=#{rechargeId}", |
||||
|
"</script>" |
||||
|
}) |
||||
|
int update(Recharge recharge); |
||||
|
|
||||
|
@Select({ |
||||
|
"<script>", |
||||
|
"SELECT user.`name` as user_name , recharge.*,activity.activity_name,audit.`status`, admin.`name` FROM recharge", |
||||
|
"INNER JOIN audit ON recharge.recharge_id = audit.recharge_id", |
||||
|
"INNER JOIN `user` ON recharge.homily_id = `user`.homily_id", |
||||
|
"INNER JOIN activity on recharge.activity_id = activity.activity_id", |
||||
|
"INNER JOIN admin on recharge.admin_id = admin.admin_id", |
||||
|
"<where>", |
||||
|
"flag='1'", |
||||
|
"<if test='activityId!=null'>and activity_id=#{activityId}</if>", |
||||
|
"<if test='startDate != null and endDate != null'>AND create_time BETWEEN #{startDate} AND #{endDate}</if>", |
||||
|
"<if test='rechargeWay!=null and rechargeWay.length>0 '>and recharge_way like concat('%',#{rechargeWay},'%')</if>", |
||||
|
"<if test='area!=null and area.length>0'>and area like concat('%',#{area},'%')</if>", |
||||
|
"<if test='status!=null'>and audit.status=#{status}</if>", |
||||
|
"</where>", |
||||
|
"</script>" |
||||
|
}) |
||||
|
List<RechargeVo> select(RechargeVo rechargeVo); |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
package com.example.recharge.service; |
||||
|
|
||||
|
|
||||
|
import com.example.commons.domain.entity.Activity; |
||||
|
import com.example.commons.domain.entity.Page; |
||||
|
import com.example.commons.domain.entity.Rate; |
||||
|
import com.example.commons.sevice.ActivityService; |
||||
|
import com.example.recharge.mapper.ActivityMapper; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
@Transactional |
||||
|
@RequiredArgsConstructor |
||||
|
public class ActivityServiceImpl implements ActivityService { |
||||
|
|
||||
|
@Autowired |
||||
|
ActivityMapper activityMapper; |
||||
|
@Override |
||||
|
public int add(Activity activity) { |
||||
|
return activityMapper.add(activity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int edit(Activity activity) { |
||||
|
return activityMapper.edit(activity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<Activity> search(Activity activity) { |
||||
|
return activityMapper.select(activity); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
public PageInfo<Activity> searchForPage(Integer pageNum, Integer pageSize, Activity activity) { |
||||
|
// PageHelper.startPage(pageNum, pageSize); |
||||
|
// List<Activity> list = activityMapper.select(activity); |
||||
|
// return new PageInfo<>(list); |
||||
|
|
||||
|
PageHelper.startPage(pageNum, pageSize); |
||||
|
List<Activity> list = activityMapper.select(activity); |
||||
|
LocalDate nowDate = LocalDate.now(); // 获取当前的 LocalDate |
||||
|
list.stream() |
||||
|
.forEach(activity1 -> { |
||||
|
if (nowDate.isBefore(activity1.getStartTime())) { |
||||
|
// 假设 Activity 类有一个 setStatus 方法来设置状态 |
||||
|
activity1.setStatus(0); // 设置新的状态 |
||||
|
activityMapper.edit(activity1); // 保存修改后的对象 |
||||
|
} |
||||
|
else if(nowDate.isAfter(activity1.getEndTime())) { |
||||
|
// 假设 Activity 类有一个 setStatus 方法来设置状态 |
||||
|
activity1.setStatus(2); // 设置新的状态 |
||||
|
activityMapper.edit(activity1); // 保存修改后的对象 |
||||
|
} |
||||
|
}); |
||||
|
return new PageInfo<>(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.example.recharge.service; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Audit; |
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.example.commons.sevice.AuditService; |
||||
|
import com.example.recharge.mapper.AuditMapper; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class AuditServiceImpl implements AuditService { |
||||
|
private final AuditMapper auditMapper; |
||||
|
|
||||
|
@Override |
||||
|
public int add(Audit audit) { |
||||
|
return auditMapper.insert(audit); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<Audit> search(Audit audit) { |
||||
|
return auditMapper.select(audit); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageInfo<Audit> searchForPage(Integer pageNum, Integer pageSize, Audit audit) { |
||||
|
PageHelper.startPage(pageNum,pageSize); |
||||
|
List<Audit> list= auditMapper.select(audit); |
||||
|
return new PageInfo<>(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
package com.example.recharge.service; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Rate; |
||||
|
import com.example.commons.sevice.RateService; |
||||
|
import com.example.recharge.mapper.RateMapper; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
|
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
|
||||
|
public class RateServiceImpl implements RateService { |
||||
|
private final RateMapper rateMapper; |
||||
|
@Override |
||||
|
public int add(Rate rate) { |
||||
|
return rateMapper.insert(rate); |
||||
|
} |
||||
|
|
||||
|
@Transactional |
||||
|
@Override |
||||
|
public int edit(Rate rate) { |
||||
|
return rateMapper.update(rate); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void delete(Integer rateId) throws Exception { |
||||
|
int result = rateMapper.deleteById(rateId); |
||||
|
if(result == 0){ |
||||
|
throw new Exception("未找到对应的记录,删除失败"); |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Rate getById(Integer rateId) { |
||||
|
return rateMapper.selectById(rateId); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<Rate> search(Rate rate) { |
||||
|
return rateMapper.select(rate); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageInfo<Rate> searchForPage(Integer pageNum, Integer pageSize, Rate rate) { |
||||
|
PageHelper.startPage(pageNum, pageSize); |
||||
|
List<Rate> list = rateMapper.select(rate); |
||||
|
return new PageInfo<>(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
package com.example.recharge.service; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.example.commons.domain.vo.RechargeVo; |
||||
|
import com.example.commons.sevice.RechargeService; |
||||
|
import com.example.recharge.mapper.RechargeMapper; |
||||
|
|
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class RechargeServiceImpl implements RechargeService { |
||||
|
|
||||
|
private final RechargeMapper rechargeMapper; |
||||
|
@Override |
||||
|
public int add(Recharge recharge) throws Exception { |
||||
|
return rechargeMapper.insert(recharge); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int edit(Recharge recharge) throws Exception { |
||||
|
return rechargeMapper.update(recharge); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Recharge findById(int id) throws Exception { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<RechargeVo> search(RechargeVo rechargeVo) { |
||||
|
return rechargeMapper.select(rechargeVo); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageInfo<RechargeVo> searchForPage(Integer pageNum, Integer pageSize, RechargeVo rechargeVo) { |
||||
|
PageHelper.startPage(pageNum, pageSize); |
||||
|
List<RechargeVo> list= rechargeMapper.select(rechargeVo); |
||||
|
return new PageInfo<>(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
server: |
||||
|
port: 10010 |
||||
|
|
||||
|
spring: |
||||
|
datasource: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://39.101.133.168/hwgold?&serverTimezone=Asia/Shanghai |
||||
|
username: hwgold |
||||
|
password: 'AGX4Z3YMxiCG3GR2' |
||||
|
application: |
||||
|
name: recharge |
||||
|
mybatis: |
||||
|
configuration: |
||||
|
map-underscore-to-camel-case: true |
||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
@ -0,0 +1,13 @@ |
|||||
|
package com.example.recharge; |
||||
|
|
||||
|
import org.junit.jupiter.api.Test; |
||||
|
import org.springframework.boot.test.context.SpringBootTest; |
||||
|
|
||||
|
@SpringBootTest |
||||
|
class RechargeApplicationTests { |
||||
|
|
||||
|
@Test |
||||
|
void contextLoads() { |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
HELP.md |
||||
|
target/ |
||||
|
!.mvn/wrapper/maven-wrapper.jar |
||||
|
!**/src/main/**/target/ |
||||
|
!**/src/test/**/target/ |
||||
|
|
||||
|
### STS ### |
||||
|
.apt_generated |
||||
|
.classpath |
||||
|
.factorypath |
||||
|
.project |
||||
|
.settings |
||||
|
.springBeans |
||||
|
.sts4-cache |
||||
|
|
||||
|
### IntelliJ IDEA ### |
||||
|
.idea |
||||
|
*.iws |
||||
|
*.iml |
||||
|
*.ipr |
||||
|
|
||||
|
### NetBeans ### |
||||
|
/nbproject/private/ |
||||
|
/nbbuild/ |
||||
|
/dist/ |
||||
|
/nbdist/ |
||||
|
/.nb-gradle/ |
||||
|
build/ |
||||
|
!**/src/main/**/build/ |
||||
|
!**/src/test/**/build/ |
||||
|
|
||||
|
### VS Code ### |
||||
|
.vscode/ |
@ -0,0 +1,73 @@ |
|||||
|
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>refund</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
<name>refund</name> |
||||
|
<description>refund</description> |
||||
|
|
||||
|
<parent> |
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>demo</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
</parent> |
||||
|
|
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>commons</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.mybatis.spring.boot</groupId> |
||||
|
<artifactId>mybatis-spring-boot-starter</artifactId> |
||||
|
<version>3.0.3</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-devtools</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
<optional>true</optional> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.mysql</groupId> |
||||
|
<artifactId>mysql-connector-j</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-test</artifactId> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.mybatis.spring.boot</groupId> |
||||
|
<artifactId>mybatis-spring-boot-starter-test</artifactId> |
||||
|
<version>3.0.3</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
<build> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
|
<configuration> |
||||
|
<excludes> |
||||
|
<exclude> |
||||
|
<groupId>org.projectlombok</groupId> |
||||
|
<artifactId>lombok</artifactId> |
||||
|
</exclude> |
||||
|
</excludes> |
||||
|
</configuration> |
||||
|
</plugin> |
||||
|
</plugins> |
||||
|
</build> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,13 @@ |
|||||
|
package org.example.refund; |
||||
|
|
||||
|
import org.springframework.boot.SpringApplication; |
||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||
|
|
||||
|
@SpringBootApplication |
||||
|
public class RefundApplication { |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
SpringApplication.run(RefundApplication.class, args); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
package org.example.refund.controller; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Detail; |
||||
|
import com.example.commons.domain.entity.Page; |
||||
|
import com.example.commons.domain.vo.Result; |
||||
|
import com.example.commons.sevice.RefundService; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.util.ObjectUtils; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/refund") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
@CrossOrigin |
||||
|
public class RefundController { |
||||
|
private final RefundService refundService; |
||||
|
|
||||
|
@PostMapping("/add") |
||||
|
public Result add(@RequestBody Detail detail) { |
||||
|
// try { |
||||
|
refundService.add(detail); |
||||
|
return Result.success(); |
||||
|
// } catch (Exception e) { |
||||
|
// log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
// return Result.error(e.getMessage()); |
||||
|
//// } |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/softDelete") |
||||
|
public Result softDelete(@RequestParam Integer detailId) { |
||||
|
// try { |
||||
|
refundService.softDelete(detailId); |
||||
|
return Result.success(); |
||||
|
// } catch (Exception e) { |
||||
|
// log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
// return Result.error(e.getMessage()); |
||||
|
// } |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/update") |
||||
|
public Result update(@RequestBody Detail newDetail) { |
||||
|
try { |
||||
|
refundService.edit(newDetail); |
||||
|
return Result.success(); |
||||
|
} catch (Exception e) { |
||||
|
log.warn(Arrays.toString(e.getStackTrace())); |
||||
|
return Result.error(e.getMessage()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/search") |
||||
|
public Result search(@RequestBody Page page) { |
||||
|
Integer pageNum = page.getPageNum(); |
||||
|
Integer pageSize = page.getPageSize(); |
||||
|
Detail detail = page.getDetail(); |
||||
|
|
||||
|
if (ObjectUtils.isEmpty(detail)) { |
||||
|
return Result.success(refundService.search(detail)); |
||||
|
}else{ |
||||
|
return Result.success(refundService.searchForPage(pageNum, pageSize,detail)); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
package org.example.refund.mapper; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Detail; |
||||
|
import org.apache.ibatis.annotations.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface RefundMapper { |
||||
|
|
||||
|
@Insert({ |
||||
|
"insert into detail", |
||||
|
"(jwcode,refund_type,refund_goods,recharge_coin,free_coin,task_coin,remark,admin_id,create_time)", |
||||
|
"values", |
||||
|
"(#{jwcode},#{refundType},#{refundGoods},#{rechargeCoin},#{freeCoin},#{taskCoin},#{remark},#{adminId},now())" |
||||
|
}) |
||||
|
@Options(useGeneratedKeys = true, keyColumn = "detail_id", keyProperty = "detailId") |
||||
|
int insert(Detail detail); |
||||
|
|
||||
|
@Update("update detail set detail_flag = 0 where detail_id = #{detailId}") |
||||
|
int update(@Param("detailId") Integer detailId); |
||||
|
|
||||
|
@Select("select * from detail where detail_id = #{detailId} and detail_flag = 1") |
||||
|
Detail selectByDetailId(Integer detailId); |
||||
|
|
||||
|
|
||||
|
@Select({ |
||||
|
"<script>", |
||||
|
"SELECT d.*,", |
||||
|
" a.area AS adminArea, a.name AS adminName,", |
||||
|
" u.name AS userName,", |
||||
|
" au.status AS auditStatus, au.reson AS auditReson", |
||||
|
"FROM detail d", |
||||
|
"LEFT JOIN admin a ON d.admin_id = a.admin_id", |
||||
|
"LEFT JOIN user u ON d.jwcode = u.jwcode", |
||||
|
"LEFT JOIN audit au ON d.detail_id = au.refund_id", |
||||
|
"WHERE d.detail_flag = 1", |
||||
|
"<if test='jwcode != null'>AND d.jwcode = #{jwcode}</if>", |
||||
|
"<if test='refundType != null'>AND d.refund_type LIKE CONCAT('%', #{refundType}, '%')</if>", |
||||
|
"<if test='refundGoods != null'>AND d.refund_goods = #{refundGoods}</if>", |
||||
|
"<if test='rechargeCoin != null'>AND d.recharge_coin = #{rechargeCoin}</if>", |
||||
|
"<if test='freeCoin != null'>AND d.free_coin = #{freeCoin}</if>", |
||||
|
"<if test='taskCoin != null'>AND d.task_coin = #{taskCoin}</if>", |
||||
|
"<if test='remark != null'>AND d.remark LIKE CONCAT('%', #{remark}, '%')</if>", |
||||
|
"<if test='adminId != null'>AND d.admin_id = #{adminId}</if>", |
||||
|
"<if test='adminArea != null'>AND a.area = #{adminArea}</if>", // admin表字段过滤 |
||||
|
"<if test='adminName != null'>AND a.name LIKE CONCAT('%', #{adminName}, '%')</if>", // admin表字段过滤 |
||||
|
"<if test='userName != null'>AND u.name LIKE CONCAT('%', #{userName}, '%')</if>", // user表字段过滤 |
||||
|
"<if test='auditStatus != null'>AND au.status = #{auditStatus}</if>", // audit 表字段过滤 |
||||
|
"<if test='auditReson != null'>AND au.reson LIKE CONCAT('%', #{auditReson}, '%')</if>", // audit表字段过滤 |
||||
|
"</script>" |
||||
|
}) |
||||
|
List<Detail> select(Detail detail); |
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
package org.example.refund.service; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Detail; |
||||
|
import com.example.commons.sevice.RefundService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.example.refund.mapper.RefundMapper; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
@RequiredArgsConstructor |
||||
|
@Transactional |
||||
|
@Service |
||||
|
public class RefundServiceImpl implements RefundService { |
||||
|
private final RefundMapper refundMapper; |
||||
|
@Override |
||||
|
public int add(Detail detail) { |
||||
|
return refundMapper.insert(detail); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
//自动软删除数据加更新数据 |
||||
|
@Override |
||||
|
public void edit(Detail newDetail) { |
||||
|
// 获取旧的明细记录 |
||||
|
Detail oldDetail = refundMapper.selectByDetailId(newDetail.getDetailId()); |
||||
|
|
||||
|
if (oldDetail == null || oldDetail.getDetailFlag() ==0) { |
||||
|
throw new IllegalArgumentException("该记录不存在或已被隐藏!"); |
||||
|
} |
||||
|
|
||||
|
// 软删除旧记录 |
||||
|
refundMapper.update(oldDetail.getDetailId()); |
||||
|
|
||||
|
// 将新的字段值复制到旧记录中,未修改的字段保持旧值 |
||||
|
if (newDetail.getJwcode() == null) newDetail.setJwcode(oldDetail.getJwcode()); |
||||
|
if (newDetail.getRefundType() == null) newDetail.setRefundType(oldDetail.getRefundType()); |
||||
|
if (newDetail.getRefundGoods() == null) newDetail.setRefundGoods(oldDetail.getRefundGoods()); |
||||
|
if (newDetail.getRechargeCoin() == null) newDetail.setRechargeCoin(oldDetail.getRechargeCoin()); |
||||
|
if (newDetail.getFreeCoin() == null) newDetail.setFreeCoin(oldDetail.getFreeCoin()); |
||||
|
if (newDetail.getTaskCoin() == null) newDetail.setTaskCoin(oldDetail.getTaskCoin()); |
||||
|
if (newDetail.getRemark() == null) newDetail.setRemark(oldDetail.getRemark()); |
||||
|
if (newDetail.getAdminId() == null) newDetail.setAdminId(oldDetail.getAdminId()); |
||||
|
|
||||
|
// 插入新记录 |
||||
|
newDetail.setDetailId(null); // 清空 ID,让其自动生成 |
||||
|
newDetail.setDetailFlag(1); // 确保新记录未被删除 |
||||
|
refundMapper.insert(newDetail); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int softDelete(Integer detailId) { |
||||
|
return refundMapper.update(detailId); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Detail selectByDetailId(Integer detailId) { |
||||
|
return refundMapper.selectByDetailId(detailId); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<Detail> search(Detail detail) { |
||||
|
return refundMapper.select(detail); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageInfo<Detail> searchForPage(Integer pageNum, Integer pageSize, Detail detail) { |
||||
|
PageHelper.startPage(pageNum, pageSize); |
||||
|
List<Detail> list = refundMapper.select(detail); |
||||
|
return new PageInfo<>(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
server: |
||||
|
port: 10040 |
||||
|
|
||||
|
spring: |
||||
|
datasource: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://39.101.133.168/hwgold?&serverTimezone=Asia/Shanghai |
||||
|
username: hwgold |
||||
|
password: 'AGX4Z3YMxiCG3GR2' |
||||
|
application: |
||||
|
name: refund |
||||
|
mybatis: |
||||
|
configuration: |
||||
|
map-underscore-to-camel-case: true |
||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
@ -0,0 +1,6 @@ |
|||||
|
<html> |
||||
|
<body> |
||||
|
<h1>hello word!!!</h1> |
||||
|
<p>this is a html page</p> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,13 @@ |
|||||
|
package org.example.refund; |
||||
|
|
||||
|
import org.junit.jupiter.api.Test; |
||||
|
import org.springframework.boot.test.context.SpringBootTest; |
||||
|
|
||||
|
@SpringBootTest |
||||
|
class RefundApplicationTests { |
||||
|
|
||||
|
@Test |
||||
|
void contextLoads() { |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,2 @@ |
|||||
|
/mvnw text eol=lf |
||||
|
*.cmd text eol=crlf |
@ -0,0 +1,33 @@ |
|||||
|
HELP.md |
||||
|
target/ |
||||
|
!.mvn/wrapper/maven-wrapper.jar |
||||
|
!**/src/main/**/target/ |
||||
|
!**/src/test/**/target/ |
||||
|
|
||||
|
### STS ### |
||||
|
.apt_generated |
||||
|
.classpath |
||||
|
.factorypath |
||||
|
.project |
||||
|
.settings |
||||
|
.springBeans |
||||
|
.sts4-cache |
||||
|
|
||||
|
### IntelliJ IDEA ### |
||||
|
.idea |
||||
|
*.iws |
||||
|
*.iml |
||||
|
*.ipr |
||||
|
|
||||
|
### NetBeans ### |
||||
|
/nbproject/private/ |
||||
|
/nbbuild/ |
||||
|
/dist/ |
||||
|
/nbdist/ |
||||
|
/.nb-gradle/ |
||||
|
build/ |
||||
|
!**/src/main/**/build/ |
||||
|
!**/src/test/**/build/ |
||||
|
|
||||
|
### VS Code ### |
||||
|
.vscode/ |
@ -0,0 +1,19 @@ |
|||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
wrapperVersion=3.3.2 |
||||
|
distributionType=only-script |
||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip |
@ -0,0 +1,259 @@ |
|||||
|
#!/bin/sh |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Apache Maven Wrapper startup batch script, version 3.3.2 |
||||
|
# |
||||
|
# Optional ENV vars |
||||
|
# ----------------- |
||||
|
# JAVA_HOME - location of a JDK home dir, required when download maven via java source |
||||
|
# MVNW_REPOURL - repo url base for downloading maven distribution |
||||
|
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
||||
|
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
set -euf |
||||
|
[ "${MVNW_VERBOSE-}" != debug ] || set -x |
||||
|
|
||||
|
# OS specific support. |
||||
|
native_path() { printf %s\\n "$1"; } |
||||
|
case "$(uname)" in |
||||
|
CYGWIN* | MINGW*) |
||||
|
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" |
||||
|
native_path() { cygpath --path --windows "$1"; } |
||||
|
;; |
||||
|
esac |
||||
|
|
||||
|
# set JAVACMD and JAVACCMD |
||||
|
set_java_home() { |
||||
|
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched |
||||
|
if [ -n "${JAVA_HOME-}" ]; then |
||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ]; then |
||||
|
# IBM's JDK on AIX uses strange locations for the executables |
||||
|
JAVACMD="$JAVA_HOME/jre/sh/java" |
||||
|
JAVACCMD="$JAVA_HOME/jre/sh/javac" |
||||
|
else |
||||
|
JAVACMD="$JAVA_HOME/bin/java" |
||||
|
JAVACCMD="$JAVA_HOME/bin/javac" |
||||
|
|
||||
|
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then |
||||
|
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 |
||||
|
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 |
||||
|
return 1 |
||||
|
fi |
||||
|
fi |
||||
|
else |
||||
|
JAVACMD="$( |
||||
|
'set' +e |
||||
|
'unset' -f command 2>/dev/null |
||||
|
'command' -v java |
||||
|
)" || : |
||||
|
JAVACCMD="$( |
||||
|
'set' +e |
||||
|
'unset' -f command 2>/dev/null |
||||
|
'command' -v javac |
||||
|
)" || : |
||||
|
|
||||
|
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then |
||||
|
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 |
||||
|
return 1 |
||||
|
fi |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
# hash string like Java String::hashCode |
||||
|
hash_string() { |
||||
|
str="${1:-}" h=0 |
||||
|
while [ -n "$str" ]; do |
||||
|
char="${str%"${str#?}"}" |
||||
|
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) |
||||
|
str="${str#?}" |
||||
|
done |
||||
|
printf %x\\n $h |
||||
|
} |
||||
|
|
||||
|
verbose() { :; } |
||||
|
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } |
||||
|
|
||||
|
die() { |
||||
|
printf %s\\n "$1" >&2 |
||||
|
exit 1 |
||||
|
} |
||||
|
|
||||
|
trim() { |
||||
|
# MWRAPPER-139: |
||||
|
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. |
||||
|
# Needed for removing poorly interpreted newline sequences when running in more |
||||
|
# exotic environments such as mingw bash on Windows. |
||||
|
printf "%s" "${1}" | tr -d '[:space:]' |
||||
|
} |
||||
|
|
||||
|
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties |
||||
|
while IFS="=" read -r key value; do |
||||
|
case "${key-}" in |
||||
|
distributionUrl) distributionUrl=$(trim "${value-}") ;; |
||||
|
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; |
||||
|
esac |
||||
|
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
||||
|
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
||||
|
|
||||
|
case "${distributionUrl##*/}" in |
||||
|
maven-mvnd-*bin.*) |
||||
|
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ |
||||
|
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in |
||||
|
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; |
||||
|
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;; |
||||
|
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;; |
||||
|
:Linux*x86_64*) distributionPlatform=linux-amd64 ;; |
||||
|
*) |
||||
|
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 |
||||
|
distributionPlatform=linux-amd64 |
||||
|
;; |
||||
|
esac |
||||
|
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" |
||||
|
;; |
||||
|
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; |
||||
|
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; |
||||
|
esac |
||||
|
|
||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME |
||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
||||
|
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" |
||||
|
distributionUrlName="${distributionUrl##*/}" |
||||
|
distributionUrlNameMain="${distributionUrlName%.*}" |
||||
|
distributionUrlNameMain="${distributionUrlNameMain%-bin}" |
||||
|
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" |
||||
|
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" |
||||
|
|
||||
|
exec_maven() { |
||||
|
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : |
||||
|
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" |
||||
|
} |
||||
|
|
||||
|
if [ -d "$MAVEN_HOME" ]; then |
||||
|
verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
||||
|
exec_maven "$@" |
||||
|
fi |
||||
|
|
||||
|
case "${distributionUrl-}" in |
||||
|
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; |
||||
|
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; |
||||
|
esac |
||||
|
|
||||
|
# prepare tmp dir |
||||
|
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then |
||||
|
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } |
||||
|
trap clean HUP INT TERM EXIT |
||||
|
else |
||||
|
die "cannot create temp dir" |
||||
|
fi |
||||
|
|
||||
|
mkdir -p -- "${MAVEN_HOME%/*}" |
||||
|
|
||||
|
# Download and Install Apache Maven |
||||
|
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
||||
|
verbose "Downloading from: $distributionUrl" |
||||
|
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
|
||||
|
# select .zip or .tar.gz |
||||
|
if ! command -v unzip >/dev/null; then |
||||
|
distributionUrl="${distributionUrl%.zip}.tar.gz" |
||||
|
distributionUrlName="${distributionUrl##*/}" |
||||
|
fi |
||||
|
|
||||
|
# verbose opt |
||||
|
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' |
||||
|
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v |
||||
|
|
||||
|
# normalize http auth |
||||
|
case "${MVNW_PASSWORD:+has-password}" in |
||||
|
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
||||
|
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
||||
|
esac |
||||
|
|
||||
|
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then |
||||
|
verbose "Found wget ... using wget" |
||||
|
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" |
||||
|
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then |
||||
|
verbose "Found curl ... using curl" |
||||
|
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" |
||||
|
elif set_java_home; then |
||||
|
verbose "Falling back to use Java to download" |
||||
|
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" |
||||
|
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
cat >"$javaSource" <<-END |
||||
|
public class Downloader extends java.net.Authenticator |
||||
|
{ |
||||
|
protected java.net.PasswordAuthentication getPasswordAuthentication() |
||||
|
{ |
||||
|
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); |
||||
|
} |
||||
|
public static void main( String[] args ) throws Exception |
||||
|
{ |
||||
|
setDefault( new Downloader() ); |
||||
|
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); |
||||
|
} |
||||
|
} |
||||
|
END |
||||
|
# For Cygwin/MinGW, switch paths to Windows format before running javac and java |
||||
|
verbose " - Compiling Downloader.java ..." |
||||
|
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" |
||||
|
verbose " - Running Downloader.java ..." |
||||
|
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" |
||||
|
fi |
||||
|
|
||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
||||
|
if [ -n "${distributionSha256Sum-}" ]; then |
||||
|
distributionSha256Result=false |
||||
|
if [ "$MVN_CMD" = mvnd.sh ]; then |
||||
|
echo "Checksum validation is not supported for maven-mvnd." >&2 |
||||
|
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
||||
|
exit 1 |
||||
|
elif command -v sha256sum >/dev/null; then |
||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then |
||||
|
distributionSha256Result=true |
||||
|
fi |
||||
|
elif command -v shasum >/dev/null; then |
||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then |
||||
|
distributionSha256Result=true |
||||
|
fi |
||||
|
else |
||||
|
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 |
||||
|
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
if [ $distributionSha256Result = false ]; then |
||||
|
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 |
||||
|
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
fi |
||||
|
|
||||
|
# unzip and move |
||||
|
if command -v unzip >/dev/null; then |
||||
|
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" |
||||
|
else |
||||
|
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" |
||||
|
fi |
||||
|
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" |
||||
|
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" |
||||
|
|
||||
|
clean || : |
||||
|
exec_maven "$@" |
@ -0,0 +1,149 @@ |
|||||
|
<# : batch portion |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one |
||||
|
@REM or more contributor license agreements. See the NOTICE file |
||||
|
@REM distributed with this work for additional information |
||||
|
@REM regarding copyright ownership. The ASF licenses this file |
||||
|
@REM to you under the Apache License, Version 2.0 (the |
||||
|
@REM "License"); you may not use this file except in compliance |
||||
|
@REM with the License. You may obtain a copy of the License at |
||||
|
@REM |
||||
|
@REM http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
@REM |
||||
|
@REM Unless required by applicable law or agreed to in writing, |
||||
|
@REM software distributed under the License is distributed on an |
||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
@REM KIND, either express or implied. See the License for the |
||||
|
@REM specific language governing permissions and limitations |
||||
|
@REM under the License. |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Apache Maven Wrapper startup batch script, version 3.3.2 |
||||
|
@REM |
||||
|
@REM Optional ENV vars |
||||
|
@REM MVNW_REPOURL - repo url base for downloading maven distribution |
||||
|
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
||||
|
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) |
||||
|
@SET __MVNW_CMD__= |
||||
|
@SET __MVNW_ERROR__= |
||||
|
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% |
||||
|
@SET PSModulePath= |
||||
|
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( |
||||
|
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) |
||||
|
) |
||||
|
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% |
||||
|
@SET __MVNW_PSMODULEP_SAVE= |
||||
|
@SET __MVNW_ARG0_NAME__= |
||||
|
@SET MVNW_USERNAME= |
||||
|
@SET MVNW_PASSWORD= |
||||
|
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) |
||||
|
@echo Cannot start maven from wrapper >&2 && exit /b 1 |
||||
|
@GOTO :EOF |
||||
|
: end batch / begin powershell #> |
||||
|
|
||||
|
$ErrorActionPreference = "Stop" |
||||
|
if ($env:MVNW_VERBOSE -eq "true") { |
||||
|
$VerbosePreference = "Continue" |
||||
|
} |
||||
|
|
||||
|
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties |
||||
|
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl |
||||
|
if (!$distributionUrl) { |
||||
|
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" |
||||
|
} |
||||
|
|
||||
|
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { |
||||
|
"maven-mvnd-*" { |
||||
|
$USE_MVND = $true |
||||
|
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" |
||||
|
$MVN_CMD = "mvnd.cmd" |
||||
|
break |
||||
|
} |
||||
|
default { |
||||
|
$USE_MVND = $false |
||||
|
$MVN_CMD = $script -replace '^mvnw','mvn' |
||||
|
break |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME |
||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
||||
|
if ($env:MVNW_REPOURL) { |
||||
|
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } |
||||
|
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" |
||||
|
} |
||||
|
$distributionUrlName = $distributionUrl -replace '^.*/','' |
||||
|
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' |
||||
|
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" |
||||
|
if ($env:MAVEN_USER_HOME) { |
||||
|
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" |
||||
|
} |
||||
|
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' |
||||
|
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" |
||||
|
|
||||
|
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { |
||||
|
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
||||
|
exit $? |
||||
|
} |
||||
|
|
||||
|
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { |
||||
|
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" |
||||
|
} |
||||
|
|
||||
|
# prepare tmp dir |
||||
|
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile |
||||
|
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" |
||||
|
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null |
||||
|
trap { |
||||
|
if ($TMP_DOWNLOAD_DIR.Exists) { |
||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null |
||||
|
|
||||
|
# Download and Install Apache Maven |
||||
|
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
||||
|
Write-Verbose "Downloading from: $distributionUrl" |
||||
|
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
||||
|
|
||||
|
$webclient = New-Object System.Net.WebClient |
||||
|
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { |
||||
|
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) |
||||
|
} |
||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
||||
|
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null |
||||
|
|
||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
||||
|
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum |
||||
|
if ($distributionSha256Sum) { |
||||
|
if ($USE_MVND) { |
||||
|
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." |
||||
|
} |
||||
|
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash |
||||
|
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { |
||||
|
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# unzip and move |
||||
|
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null |
||||
|
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null |
||||
|
try { |
||||
|
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null |
||||
|
} catch { |
||||
|
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { |
||||
|
Write-Error "fail to move MAVEN_HOME" |
||||
|
} |
||||
|
} finally { |
||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
||||
|
} |
||||
|
|
||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
@ -0,0 +1,73 @@ |
|||||
|
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>user</artifactId> |
||||
|
<version>0.0.1-SNAPSHOT</version> |
||||
|
<name>user</name> |
||||
|
<description>user</description> |
||||
|
|
||||
|
<parent> |
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>demo</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
</parent> |
||||
|
|
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>com.example</groupId> |
||||
|
<artifactId>commons</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
</dependency> |
||||
|
|
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.mybatis.spring.boot</groupId> |
||||
|
<artifactId>mybatis-spring-boot-starter</artifactId> |
||||
|
<version>3.0.3</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-devtools</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
<optional>true</optional> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.mysql</groupId> |
||||
|
<artifactId>mysql-connector-j</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-test</artifactId> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.mybatis.spring.boot</groupId> |
||||
|
<artifactId>mybatis-spring-boot-starter-test</artifactId> |
||||
|
<version>3.0.3</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
<build> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
|
<configuration> |
||||
|
<excludes> |
||||
|
<exclude> |
||||
|
<groupId>org.projectlombok</groupId> |
||||
|
<artifactId>lombok</artifactId> |
||||
|
</exclude> |
||||
|
</excludes> |
||||
|
</configuration> |
||||
|
</plugin> |
||||
|
</plugins> |
||||
|
</build> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,13 @@ |
|||||
|
package com.example.user; |
||||
|
|
||||
|
import org.springframework.boot.SpringApplication; |
||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||
|
|
||||
|
@SpringBootApplication |
||||
|
public class UserApplication { |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
SpringApplication.run(UserApplication.class, args); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.example.user.controller; |
||||
|
|
||||
|
import com.example.commons.domain.entity.User; |
||||
|
import com.example.commons.domain.vo.Result; |
||||
|
import com.example.commons.sevice.UserSevice; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/recharge/user") |
||||
|
@RequiredArgsConstructor |
||||
|
@Slf4j |
||||
|
@CrossOrigin |
||||
|
public class UserController { |
||||
|
private final UserSevice userSevice; |
||||
|
@PostMapping |
||||
|
public Result User(@RequestBody User user) { |
||||
|
return Result.success(userSevice.search(user)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.example.user.mapper; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Audit; |
||||
|
import com.example.commons.domain.entity.User; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Select; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface UserMapper { |
||||
|
@Select({ |
||||
|
"select * from user where homily_id=#{homilyId}" |
||||
|
}) |
||||
|
List<User> select(User user); |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.example.user.service; |
||||
|
|
||||
|
import com.example.commons.domain.entity.Recharge; |
||||
|
import com.example.commons.domain.entity.User; |
||||
|
import com.example.commons.sevice.UserSevice; |
||||
|
import com.example.user.mapper.UserMapper; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
@RequiredArgsConstructor |
||||
|
public class UserServiceImpl implements UserSevice { |
||||
|
|
||||
|
private final UserMapper userMapper; |
||||
|
|
||||
|
@Override |
||||
|
public List<User> search(User user) { |
||||
|
return userMapper.select(user); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageInfo<User> searchForPage(Integer pageNum, Integer pageSize, User user) { |
||||
|
PageHelper.startPage(pageNum,pageSize); |
||||
|
List<User> list= userMapper.select(user); |
||||
|
return new PageInfo<>(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
server: |
||||
|
port: 10020 |
||||
|
spring: |
||||
|
datasource: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://39.101.133.168/hwgold?serverTimezone=GMT%2b8 |
||||
|
username: hwgold |
||||
|
password: 'AGX4Z3YMxiCG3GR2' |
||||
|
application: |
||||
|
name: recharge |
||||
|
mybatis: |
||||
|
configuration: |
||||
|
map-underscore-to-camel-case: true |
||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
@ -0,0 +1,13 @@ |
|||||
|
package com.example.user; |
||||
|
|
||||
|
import org.junit.jupiter.api.Test; |
||||
|
import org.springframework.boot.test.context.SpringBootTest; |
||||
|
|
||||
|
@SpringBootTest |
||||
|
class UserApplicationTests { |
||||
|
|
||||
|
@Test |
||||
|
void contextLoads() { |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
# Logs |
||||
|
logs |
||||
|
*.log |
||||
|
npm-debug.log* |
||||
|
yarn-debug.log* |
||||
|
yarn-error.log* |
||||
|
pnpm-debug.log* |
||||
|
lerna-debug.log* |
||||
|
|
||||
|
node_modules |
||||
|
dist |
||||
|
dist-ssr |
||||
|
*.local |
||||
|
|
||||
|
# Editor directories and files |
||||
|
.vscode/* |
||||
|
!.vscode/extensions.json |
||||
|
.idea |
||||
|
.DS_Store |
||||
|
*.suo |
||||
|
*.ntvs* |
||||
|
*.njsproj |
||||
|
*.sln |
||||
|
*.sw? |
@ -0,0 +1,3 @@ |
|||||
|
{ |
||||
|
"recommendations": ["Vue.volar"] |
||||
|
} |
@ -0,0 +1,5 @@ |
|||||
|
# Vue 3 + TypeScript + Vite |
||||
|
|
||||
|
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more. |
||||
|
|
||||
|
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup). |
@ -0,0 +1,13 @@ |
|||||
|
<!doctype html> |
||||
|
<html lang="en"> |
||||
|
<head> |
||||
|
<meta charset="UTF-8" /> |
||||
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||
|
<title>财务金币管理系统</title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div id="app"></div> |
||||
|
<script type="module" src="/src/main.ts"></script> |
||||
|
</body> |
||||
|
</html> |
1658
gold-system/vue/gold-system/package-lock.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,24 @@ |
|||||
|
{ |
||||
|
"name": "gold-system", |
||||
|
"private": true, |
||||
|
"version": "0.0.0", |
||||
|
"type": "module", |
||||
|
"scripts": { |
||||
|
"dev": "vite", |
||||
|
"build": "vue-tsc -b && vite build", |
||||
|
"preview": "vite preview" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"@element-plus/icons-vue": "^2.3.1", |
||||
|
"axios": "^1.7.8", |
||||
|
"element-plus": "^2.8.8", |
||||
|
"vue": "^3.5.12", |
||||
|
"vue-router": "^4.5.0" |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"@vitejs/plugin-vue": "^5.1.4", |
||||
|
"typescript": "~5.6.2", |
||||
|
"vite": "^5.4.10", |
||||
|
"vue-tsc": "^2.1.8" |
||||
|
} |
||||
|
} |
@ -0,0 +1 @@ |
|||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg> |
@ -0,0 +1,9 @@ |
|||||
|
<script setup> |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<router-view></router-view> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1 @@ |
|||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg> |
After Width: 47 | Height: 47 | Size: 2.0 KiB |
@ -0,0 +1,14 @@ |
|||||
|
import { createApp } from 'vue' |
||||
|
import App from './App.vue' |
||||
|
import router from './router' |
||||
|
import ElementPlus from 'element-plus' |
||||
|
import 'element-plus/dist/index.css' |
||||
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
||||
|
|
||||
|
const app = createApp(App) |
||||
|
|
||||
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
||||
|
app.component(key, component) |
||||
|
} |
||||
|
|
||||
|
app.use(ElementPlus).use(router).mount('#app'); |
@ -0,0 +1,42 @@ |
|||||
|
import { createRouter,createWebHashHistory } from 'vue-router'; |
||||
|
|
||||
|
const router=createRouter({ |
||||
|
history:createWebHashHistory(), |
||||
|
routes:[ |
||||
|
{path:'/',redirect:"/index"}, |
||||
|
{ |
||||
|
path:'/index',component:()=>import("../views/index.vue"), |
||||
|
children:[ |
||||
|
// 工作台
|
||||
|
{path:'/workspace',component:()=>import("../views/workspace/index.vue")}, |
||||
|
// 充值审核
|
||||
|
{path:'/rechargeAudit',component:()=>import("../views/audit/rechargeAudit.vue")}, |
||||
|
// 退款审核
|
||||
|
{path:'/refundAudit',component:()=>import("../views/audit/refundAudit.vue")}, |
||||
|
// 新增消费
|
||||
|
{path:'/addConsume',component:()=>import("../views/consume/addConsume.vue")}, |
||||
|
// 所有消费明细
|
||||
|
{path:'/allConsume',component:()=>import("../views/consume/allConsume.vue")}, |
||||
|
// 活动管理
|
||||
|
{path:'/activity',component:()=>import("../views/managerecharge/activity.vue")}, |
||||
|
// 汇率管理
|
||||
|
{path:'/rate',component:()=>import("../views/managerecharge/rate.vue")}, |
||||
|
// 新增充值
|
||||
|
{path:'/addRecharge',component:()=>import("../views/recharge/addRecharge.vue")}, |
||||
|
// 客户充值明细
|
||||
|
{path:'/adminRecharge',component:()=>import("../views/recharge/adminRecharge.vue")}, |
||||
|
// 所有充值明细
|
||||
|
{path:'/allRecharge',component:()=>import("../views/recharge/allRecharge.vue")}, |
||||
|
// 新增退款
|
||||
|
{path:'/addRefund',component:()=>import("../views/refund/addRefund.vue")}, |
||||
|
// 退款明细
|
||||
|
{path:'/allRefund',component:()=>import("../views/refund/allRefund.vue")}, |
||||
|
// 客户金币明细
|
||||
|
{path:'/usergold',component:()=>import("../views/usergold/index.vue")}, |
||||
|
] |
||||
|
}, |
||||
|
|
||||
|
] |
||||
|
}); |
||||
|
|
||||
|
export default router; |
@ -0,0 +1,79 @@ |
|||||
|
:root { |
||||
|
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; |
||||
|
line-height: 1.5; |
||||
|
font-weight: 400; |
||||
|
|
||||
|
color-scheme: light dark; |
||||
|
color: rgba(255, 255, 255, 0.87); |
||||
|
background-color: #242424; |
||||
|
|
||||
|
font-synthesis: none; |
||||
|
text-rendering: optimizeLegibility; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
|
||||
|
a { |
||||
|
font-weight: 500; |
||||
|
color: #646cff; |
||||
|
text-decoration: inherit; |
||||
|
} |
||||
|
a:hover { |
||||
|
color: #535bf2; |
||||
|
} |
||||
|
|
||||
|
body { |
||||
|
margin: 0; |
||||
|
display: flex; |
||||
|
place-items: center; |
||||
|
min-width: 320px; |
||||
|
min-height: 100vh; |
||||
|
} |
||||
|
|
||||
|
h1 { |
||||
|
font-size: 3.2em; |
||||
|
line-height: 1.1; |
||||
|
} |
||||
|
|
||||
|
button { |
||||
|
border-radius: 8px; |
||||
|
border: 1px solid transparent; |
||||
|
padding: 0.6em 1.2em; |
||||
|
font-size: 1em; |
||||
|
font-weight: 500; |
||||
|
font-family: inherit; |
||||
|
background-color: #1a1a1a; |
||||
|
cursor: pointer; |
||||
|
transition: border-color 0.25s; |
||||
|
} |
||||
|
button:hover { |
||||
|
border-color: #646cff; |
||||
|
} |
||||
|
button:focus, |
||||
|
button:focus-visible { |
||||
|
outline: 4px auto -webkit-focus-ring-color; |
||||
|
} |
||||
|
|
||||
|
.card { |
||||
|
padding: 2em; |
||||
|
} |
||||
|
|
||||
|
#app { |
||||
|
max-width: 1280px; |
||||
|
margin: 0 auto; |
||||
|
padding: 2rem; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
@media (prefers-color-scheme: light) { |
||||
|
:root { |
||||
|
color: #213547; |
||||
|
background-color: #ffffff; |
||||
|
} |
||||
|
a:hover { |
||||
|
color: #747bff; |
||||
|
} |
||||
|
button { |
||||
|
background-color: #f9f9f9; |
||||
|
} |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
<script setup> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<h1>Recharge Audit</h1> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,13 @@ |
|||||
|
<script setup> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<h1>refundAudit</h1> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,13 @@ |
|||||
|
<script setup> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<h1>Add Consume</h1> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,13 @@ |
|||||
|
<script setup> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<h1>All Consume</h1> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,110 @@ |
|||||
|
<script setup> |
||||
|
import { ref, onMounted, reactive, computed } from "vue"; |
||||
|
import { useRouter } from "vue-router"; |
||||
|
import ElementPlus from "element-plus"; |
||||
|
|
||||
|
const router = useRouter(); |
||||
|
|
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div class="common-layout"> |
||||
|
<el-container> |
||||
|
<el-aside> |
||||
|
<div class="logo"> |
||||
|
<img src="../assets/金币管理系统logo.png" alt="logo" style="width: 30px;height: 30px;"/> |
||||
|
<div style="font-size: 16px; font-weight: bold;">海外金币管理系统</div> |
||||
|
</div> |
||||
|
<el-menu |
||||
|
router="true" |
||||
|
background-color="#08193d" |
||||
|
active-text-color="#ffd04b" |
||||
|
text-color="white" |
||||
|
class="el-menu-vertical-demo" |
||||
|
default-active="2" |
||||
|
@open="handleOpen" |
||||
|
@close="handleClose" |
||||
|
> |
||||
|
<el-menu-item index="/workspace"> |
||||
|
<el-icon><Folder /></el-icon> |
||||
|
工作台 |
||||
|
</el-menu-item> |
||||
|
|
||||
|
<el-sub-menu index="2"> |
||||
|
<template #title> |
||||
|
<el-icon><Folder /></el-icon> |
||||
|
<span>财务审核</span> |
||||
|
</template> |
||||
|
<el-menu-item index="/rechargeAudit">充值审核</el-menu-item> |
||||
|
<el-menu-item index="/refundAudit">退款审核</el-menu-item> |
||||
|
</el-sub-menu> |
||||
|
|
||||
|
<el-sub-menu index="3"> |
||||
|
<template #title> |
||||
|
<el-icon><Folder /></el-icon> |
||||
|
<span>充值管理</span> |
||||
|
</template> |
||||
|
<el-menu-item index="/activity">活动管理</el-menu-item> |
||||
|
<el-menu-item index="/rate">汇率管理</el-menu-item> |
||||
|
</el-sub-menu> |
||||
|
|
||||
|
<el-sub-menu index="4"> |
||||
|
<template #title> |
||||
|
<el-icon><Folder /></el-icon> |
||||
|
<span>金币充值</span> |
||||
|
</template> |
||||
|
<el-menu-item index="/addRecharge">新增充值</el-menu-item> |
||||
|
<el-menu-item index="/adminRecharge">客服充值明细</el-menu-item> |
||||
|
<el-menu-item index="/allRecharge">所有充值明细</el-menu-item> |
||||
|
</el-sub-menu> |
||||
|
|
||||
|
<el-sub-menu index="5"> |
||||
|
<template #title> |
||||
|
<el-icon><Folder /></el-icon> |
||||
|
<span>金币消费</span> |
||||
|
</template> |
||||
|
<el-menu-item index="/addConsume">新增消费</el-menu-item> |
||||
|
<el-menu-item index="/allConsume">所有消费明细</el-menu-item> |
||||
|
</el-sub-menu> |
||||
|
|
||||
|
<el-sub-menu index="6"> |
||||
|
<template #title> |
||||
|
<el-icon><Folder /></el-icon> |
||||
|
<span>金币退款</span> |
||||
|
</template> |
||||
|
<el-menu-item index="/addRefund">新增退款</el-menu-item> |
||||
|
<el-menu-item index="/allRefund">退款明细</el-menu-item> |
||||
|
</el-sub-menu> |
||||
|
|
||||
|
<el-menu-item index="/usergold"> |
||||
|
<el-icon><Folder /></el-icon> |
||||
|
客户金币明细 |
||||
|
</el-menu-item> |
||||
|
|
||||
|
</el-menu> |
||||
|
</el-aside> |
||||
|
<el-container> |
||||
|
<el-header> 用戶信息 </el-header> |
||||
|
<el-main> |
||||
|
<router-view></router-view> |
||||
|
</el-main> |
||||
|
</el-container> |
||||
|
</el-container> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
.el-aside { |
||||
|
background-color: #08193d; |
||||
|
height: 100vh; |
||||
|
width: 200px; |
||||
|
} |
||||
|
.logo{ |
||||
|
color: white; |
||||
|
margin: 20px 0px 20px 20px; |
||||
|
display: flex; |
||||
|
} |
||||
|
|
||||
|
</style> |
@ -0,0 +1,13 @@ |
|||||
|
<script setup> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<h1>Activity</h1> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue