@@ -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() |
@@ -438,9 +438,6 @@ COMPONENT_CALLBACK_CONFIG = {
|
||
| 438 | 438 |
# 测试文件 |
| 439 | 439 |
TESTING_ZBAR = os.path.join(BASE_DIR, 'utils/zbar/zbar.jpg').replace('\\', '/')
|
| 440 | 440 |
|
| 441 |
-# 一物一码设置 |
|
| 442 |
-KODO_MARKET_CODE_ENABLED = False |
|
| 443 |
- |
|
| 444 | 441 |
# 开发调试相关配置 |
| 445 | 442 |
if DEBUG: |
| 446 | 443 |
try: |