@@ -38,6 +38,7 @@ CIPHER_PREFIX = { |
||
38 | 38 |
def encrypt(request): |
39 | 39 |
plaintext = request.POST.get('plaintext', '') |
40 | 40 |
optor_id = request.POST.get('optor_id', '') |
41 |
+ marketcode = request.POST.get('marketcode', '') |
|
41 | 42 |
|
42 | 43 |
# brand_id#model_id#distributor_id#sn#time |
43 | 44 |
# AAAA#AAAAAA#AAAAA#AAAAAAAAAAAAAA#180224 |
@@ -45,7 +46,7 @@ def encrypt(request): |
||
45 | 46 |
|
46 | 47 |
mieli, created_at = MchInfoEncryptLogInfo.objects.get_or_create(plaintext=plaintext) |
47 | 48 |
|
48 |
- if settings.KODO_MARKET_CODE_ENABLED: |
|
49 |
+ if marketcode: |
|
49 | 50 |
if created_at or not mieli.code: |
50 | 51 |
with transaction.atomic(): |
51 | 52 |
marketcode = MarketCodeInfo.objects.select_for_update().filter(has_used=False).first() |
@@ -427,9 +427,6 @@ COMPONENT_CALLBACK_CONFIG = { |
||
427 | 427 |
# 测试文件 |
428 | 428 |
TESTING_ZBAR = os.path.join(BASE_DIR, 'utils/zbar/zbar.jpg').replace('\\', '/') |
429 | 429 |
|
430 |
-# 一物一码设置 |
|
431 |
-KODO_MARKET_CODE_ENABLED = False |
|
432 |
- |
|
433 | 430 |
# 开发调试相关配置 |
434 | 431 |
if DEBUG: |
435 | 432 |
try: |