@@ -17,6 +17,7 @@ from message.models import UserMessageInfo  | 
            ||
| 17 | 17 | 
                from utils.error.errno_utils import GroupPhotoStatusCode, GroupStatusCode, GroupUserStatusCode, UserStatusCode  | 
            
| 18 | 18 | 
                from utils.error.response_utils import response  | 
            
| 19 | 19 | 
                from utils.group_photo_utils import get_current_photos  | 
            
| 20 | 
                +from utils.price_utils import get_group_photo_price  | 
            |
| 20 | 21 | 
                from utils.qiniucdn import qiniu_file_url  | 
            
| 21 | 22 | 
                from utils.redis.connect import r  | 
            
| 22 | 23 | 
                from utils.redis.rgroup import (del_group_photo_thumbup_flag, get_group_info, get_group_photo_comment_list,  | 
            
                @@ -27,7 +28,6 @@ from utils.redis.rgroup import (del_group_photo_thumbup_flag, get_group_info, ge  | 
            ||
| 27 | 28 | 
                from utils.redis.rkeys import GROUP_LAST_PHOTO_PK, GROUP_PHOTO_WATCHER_SET, GROUP_USERS_PASSED_SET  | 
            
| 28 | 29 | 
                from utils.redis.rlock import upload_lock  | 
            
| 29 | 30 | 
                from utils.redis.rorder import get_lensman_order_record  | 
            
| 30 | 
                -from utils.redis.rprice import get_lensman_price_fixed  | 
            |
| 31 | 31 | 
                from utils.sql.raw import PAI2_HOME_API  | 
            
| 32 | 32 | 
                from utils.storage_qiniu_utils import file_save  | 
            
| 33 | 33 | 
                from utils.time_utils import origin_expired_stamps  | 
            
                @@ -677,11 +677,8 @@ def lensman_photo_price(request):  | 
            ||
| 677 | 677 | 
                except GroupPhotoInfo.DoesNotExist:  | 
            
| 678 | 678 | 
                return response(GroupPhotoStatusCode.GROUP_PHOTO_NOT_FOUND)  | 
            
| 679 | 679 | 
                 | 
            
| 680 | 
                - # 获取摄影师定价  | 
            |
| 681 | 
                - price = get_lensman_price_fixed(group_photo.user_id).get(photo_type, 999)  | 
            |
| 682 | 
                -  | 
            |
| 683 | 680 | 
                     return response(200, 'Get Price Success', u'获取价格成功', {
               | 
            
| 684 | 
                - 'price': price  | 
            |
| 681 | 
                + 'price': get_group_photo_price(group_photo, photo_type)  | 
            |
| 685 | 682 | 
                })  | 
            
| 686 | 683 | 
                 | 
            
| 687 | 684 | 
                 | 
            
                @@ -19,6 +19,7 @@ from photo.models import PhotosInfo  | 
            ||
| 19 | 19 | 
                from utils.error.errno_utils import (GroupPhotoStatusCode, OrderStatusCode, UserStatusCode, WechatStatusCode,  | 
            
| 20 | 20 | 
                WithdrawStatusCode)  | 
            
| 21 | 21 | 
                from utils.error.response_utils import response  | 
            
| 22 | 
                +from utils.price_utils import get_group_photo_price  | 
            |
| 22 | 23 | 
                from utils.redis.rbrief import set_brief_info  | 
            
| 23 | 24 | 
                from utils.redis.rorder import set_lensman_order_record  | 
            
| 24 | 25 | 
                from utils.wx_utils import get_trade_type, get_user_openid  | 
            
                @@ -58,8 +59,8 @@ def wx_order_create_api(request):  | 
            ||
| 58 | 59 | 
                     total_fee = int(request.POST.get('total_fee', 0))  # 总金额,单位分
               | 
            
| 59 | 60 | 
                 | 
            
| 60 | 61 | 
                # 金额校验  | 
            
| 61 | 
                - # if r.getint(LENSMAN_PHOTO_PRICE % (user_id, photo_id, photo_type)) != total_fee:  | 
            |
| 62 | 
                - # return response(OrderStatusCode.FEE_CHECK_FAIL)  | 
            |
| 62 | 
                + if get_group_photo_price(group_photo, photo_type) != total_fee:  | 
            |
| 63 | 
                + return response(OrderStatusCode.FEE_CHECK_FAIL)  | 
            |
| 63 | 64 | 
                 | 
            
| 64 | 65 | 
                # 获取 from_uid, to_uid  | 
            
| 65 | 66 | 
                from_uid = user_id  | 
            
                @@ -0,0 +1,9 @@  | 
            ||
| 1 | 
                +# -*- coding: utf-8 -*-  | 
            |
| 2 | 
                +  | 
            |
| 3 | 
                +  | 
            |
| 4 | 
                +def get_group_photo_price(group_photo, photo_type):  | 
            |
| 5 | 
                + if photo_type == 'origin':  | 
            |
| 6 | 
                + return group_photo.origin  | 
            |
| 7 | 
                + elif photo_type == 'nomark':  | 
            |
| 8 | 
                + return group_photo.nomark  | 
            |
| 9 | 
                + return 0  |