/issues"> Issues 0 Pull Requests 0 Commits 335 Releases 0

拍爱

rprice.py 851B

    # -*- coding: utf-8 -*- import json from django.conf import settings from account.models import LensmanInfo from utils.redis.rkeys import LENSMAN_PHOTO_PRICE_FIXED r = settings.REDIS_CACHE # 最新 APP 相关 def set_lensman_price_fixed(user_id): """ 设置摄影师价格设定 """ try: lensman = LensmanInfo.objects.get(lensman_id=user_id) except LensmanInfo.DoesNotExist: lensman = None price_fixed = { 'nomark': (lensman and lensman.nomark) or 299, 'origin': (lensman and lensman.origin) or 999, } r.set(LENSMAN_PHOTO_PRICE_FIXED % user_id, json.dumps(price_fixed)) return price_fixed def get_lensman_price_fixed(user_id): """ 获取摄影师价格设定 """ return json.loads(r.get(LENSMAN_PHOTO_PRICE_FIXED % user_id) or '{}') or set_lensman_price_fixed(user_id)
kodo - Gogs: Go Git Service

No Description

Brightcells: 208fc20a24 Change to use django-response 8 years ago
..
migrations a7cbbf15a7 Update max_length for CharField 8 years ago
__init__.py 30daca135b add api message_list_api/message_type_list_api/message_read_api 10 years ago
admin.py ee7388cd15 add src for SystemMessageInfo 10 years ago
models.py a7cbbf15a7 Update max_length for CharField 8 years ago
tests.py fabef63211 set line_length=200 for isort 10 years ago
views.py 208fc20a24 Change to use django-response 8 years ago