Merge branch 'develop'

pull/117/head
13621160019@163.com 2022-01-12 22:28:16 +08:00
commit 4fe812cde2
2 changed files with 9 additions and 8 deletions

View File

@ -70,17 +70,15 @@ cp example.env .env
docker build -t myems/myems-api .
```
* Run a Docker container
On Windows host, bind-mount a share upload folder at c:\upload to the container,
On Windows host, bind-mount a share upload folder at c:\myems-upload to the container,
and also bind-mount the .env to the container.
```bash
mkdir c:\upload
docker run -d -p 8000:8000 -v c:\upload:/var/www/html/admin/upload -v c:\myems-api\.env:/code/.env --restart always --name myems-api myems/myems-api
docker run -d -p 8000:8000 -v c:\myems-upload:/var/www/html/admin/upload -v c:\myems-api\.env:/code/.env --restart always --name myems-api myems/myems-api
```
On Linux host, bind-mount a share upload file folder at /upload to the container,
On Linux host, bind-mount a share upload file folder at /myems-upload to the container,
and also bind-mount the .env to the container.
```bash
mkdir /upload
docker run -d -p 8000:8000 -v /upload:/var/www/html/admin/upload -v /myems-api/.env:/.env --restart always --name myems-api myems/myems-api
docker run -d -p 8000:8000 -v /myems-upload:/var/www/html/admin/upload -v /myems-api/.env:/.env --restart always --name myems-api myems/myems-api
```
* -d Run container in background and print container ID
@ -1678,6 +1676,7 @@ Result
| contact | Object | Contact Object |
| cost_center | Object | Cost Center Object |
| description | string | Store description |
| qrcode | string | QRCode in String |
* GET All Stores
```bash

View File

@ -83,7 +83,8 @@ class StoreCollection:
"is_input_counted": bool(row['is_input_counted']),
"contact": contact,
"cost_center": cost_center,
"description": row['description']}
"description": row['description'],
"qrcode": 'store:' + row['uuid']}
result.append(meta_result)
cursor.close()
@ -329,7 +330,8 @@ class StoreItem:
"is_input_counted": bool(row['is_input_counted']),
"contact": contact,
"cost_center": cost_center,
"description": row['description']}
"description": row['description'],
"qrcode": 'store:' + row['uuid']}
resp.text = json.dumps(meta_result)