1
0
forked from erp-dev/erp

feat: error_code + api doc + printing-job fields

This commit is contained in:
2026-07-06 23:13:57 +08:00
parent 740d23d04b
commit ddbf798665
21 changed files with 977 additions and 17 deletions

View File

@@ -0,0 +1,22 @@
from django.core.management.base import BaseCommand
from flower.app_version import set_cached_app_version_payload
class Command(BaseCommand):
help = "更新 App 最新版本信息缓存"
def add_arguments(self, parser):
parser.add_argument("--major", type=int, required=True)
parser.add_argument("--minor", type=int, required=True)
parser.add_argument("--build", type=int, required=True)
parser.add_argument("--download-url", required=True)
def handle(self, *args, **options):
payload = set_cached_app_version_payload(
major=options["major"],
minor=options["minor"],
build=options["build"],
download_url=options["download_url"],
)
self.stdout.write(self.style.SUCCESS(str(payload)))

View File

@@ -8,7 +8,15 @@ class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('--limit', type=int, default=100)
parser.add_argument(
'--no-advance-cursor',
action='store_true',
help='只拉取并同步本批 records不推进外部 cursor。适合本地/测试环境检查。',
)
def handle(self, *args, **options):
payload = sync_external_printing_records.run(limit=options['limit'])
payload = sync_external_printing_records.run(
limit=options['limit'],
advance_cursor=not options['no_advance_cursor'],
)
self.stdout.write(self.style.SUCCESS(str(payload)))