Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions http/PaymentSystem/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@

# Created by https://www.gitignore.io/api/java,intellij
# Edit at https://www.gitignore.io/?templates=java,intellij

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
*.iml
User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
#auto-import.
.idea/modules.xml
.idea/*.iml
.idea/modules

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721


modules.xml
.idea/misc.xml
*.ipr
*.iml
# Sonarlint plugin
.idea/sonarlint

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# End of https://www.gitignore.io/api/java,intellij
2 changes: 2 additions & 0 deletions http/PaymentSystem/PaymentSystem.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />
50 changes: 50 additions & 0 deletions http/PaymentSystem/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>payment-system</groupId>
<artifactId>payment-system</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.26</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.8</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.8</version>
</dependency>
</dependencies>
</project>
135 changes: 135 additions & 0 deletions http/PaymentSystem/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Запросы
### Добавить пользователя
POST /user\
input:
```json
{
"login": "alol",
"password": "123"
}
```
output:
```json
{
"status": "OK",
"description": "description"
}
```


### Выдать все кошельки для всех пользователей
GET /users\
output: - массив логинов
```json
["user1", "user2", "user3"]
```

### Перевод от одного пользователя к другому
POST /send\
input:
```json
{
"fromLogin":"loginFrom",
"fromPassword":"passwordTo",
"toLogin":"loginTo",
"count":20
}
```

output:
```json
{
"status": "OK",
"description": "description"
}
```


### Запросить перевод
POST /send
input:
```json
{
"fromLogin":"loginFrom",
"fromPassword":"passwordTo",
"toLogin":"loginTo",
"count":20
}
```

output:
```json
{
"status": "OK",
"description": "",
"entityId": "p626u7copf2tha8rc3yz"
}
```

### Реакция на запрос перевода перевода
POST /accept
input
```json
{
"login":"login",
"password":"123",
"key":"qe2bmngpw41niaa6junt",
"actionType":"ACCEPT"
}
```
output:
```json
{
"status": "OK",
"description": ""
}
```

### Проверить состояние кошелька
POST /wallet
input:
```json
{
"login": "alol",
"password": "123"
}
```
output:
```json
{
"login": "olya2",
"count": 88
}
```

### Просмотреть все запросы
POST /request
input:
```json
{
"login": "alol",
"password": "123"
}
```
output:
```json
[
{
"from": "fromLogin",
"key": "ulrrp3ebqfq0nsrjdaz1",
"count": 30
},
{
"from": "user2",
"key": "5sqwz36u0gtf0v91mxfx",
"count": 20
}
]
```







Loading