| @@ -348,9 +348,9 @@ def lensman_brief_api(request): | ||
| 348 | 348 | week = Week.thisweek().isoformat() | 
| 349 | 349 |  | 
| 350 | 350 | # 周收入 | 
| 351 | - week_income = int(r.get(WEEK_INCOME % (user_id, week)) or 0) | |
| 351 | + origin_week_income = int(r.get(WEEK_INCOME % (user_id, OrderInfo.ORIGIN, week)) or 0) | |
| 352 | 352 | # 日收入 | 
| 353 | - today_income = int(r.get(TODAY_INCOME % (user_id, ymd)) or 0) | |
| 353 | + nomark_today_income = int(r.get(TODAY_INCOME % (user_id, OrderInfo.NOMARK, ymd)) or 0) | |
| 354 | 354 | # 日上传 | 
| 355 | 355 | today_upload = int(r.get(TODAY_UPLOAD_PHOTO_AMOUNT % (user_id, ymd)) or 0) | 
| 356 | 356 | # 周售出 | 
| @@ -367,8 +367,8 @@ def lensman_brief_api(request): | ||
| 367 | 367 | orders = [order.data(user_id) for order in orders] | 
| 368 | 368 |  | 
| 369 | 369 |      return response(200, 'Get Lensman Brief Success', u'获取摄影师简报成功', { | 
| 370 | - 'week_income': week_income, | |
| 371 | - 'today_income': today_income, | |
| 370 | + 'origin_week_income': origin_week_income, | |
| 371 | + 'nomark_today_income': nomark_today_income, | |
| 372 | 372 | 'today_upload': today_upload, | 
| 373 | 373 | 'week_sold': week_sold, | 
| 374 | 374 |          'messages': { | 
| @@ -143,11 +143,11 @@ def order_paid_success(order): | ||
| 143 | 143 | week = Week.thisweek().isoformat() | 
| 144 | 144 |  | 
| 145 | 145 | # 总收入 | 
| 146 | - r.incr(TOTAL_INCOME % to_uid, total_fee) | |
| 146 | + r.incr(TOTAL_INCOME % (to_uid, order.photo_type), total_fee) | |
| 147 | 147 | # 周收入 | 
| 148 | - r.incr(WEEK_INCOME % (to_uid, week), total_fee) | |
| 148 | + r.incr(WEEK_INCOME % (to_uid, order.photo_type, week), total_fee) | |
| 149 | 149 | # 日收入 | 
| 150 | - r.incr(TODAY_INCOME % (to_uid, ymd), total_fee) | |
| 150 | + r.incr(TODAY_INCOME % (to_uid, order.photo_type, ymd), total_fee) | |
| 151 | 151 |  | 
| 152 | 152 | # 周售出 | 
| 153 | 153 | r.incr(WEEK_SOLD % (order.photo_type, to_uid, week)) | 
| @@ -32,9 +32,9 @@ LENSMAN_PHOTO_ORDER_RECORD = 'lensman:photo:order:record:%s:%s' # STRING,摄 | ||
| 32 | 32 |  | 
| 33 | 33 | # 摄影师简报相关 | 
| 34 | 34 | # 收入 | 
| 35 | -TOTAL_INCOME = 'total:income:%s' # STRING,总收入,user_id | |
| 36 | -WEEK_INCOME = 'week:income:%s:%s' # STRING,周收入,user_id、Week.thisweek().isoformat() | |
| 37 | -TODAY_INCOME = 'today:income:%s:%s' # STRING,日收入,user_id、tc.local_string(format='%Y%m%d') | |
| 35 | +TOTAL_INCOME = 'total:income:%s:%s' # STRING,总收入,user_id、photo_type | |
| 36 | +WEEK_INCOME = 'week:income:%s:%s:%s' # STRING,周收入,user_id、photo_type、Week.thisweek().isoformat() | |
| 37 | +TODAY_INCOME = 'today:income:%s:%s:%s' # STRING,日收入,user_id、photo_type、tc.local_string(format='%Y%m%d') | |
| 38 | 38 | # 上传 | 
| 39 | 39 | TODAY_UPLOAD_PHOTO_AMOUNT = 'today:upload:photo:amount:%s:%s' # STRING,日上传照片数量,user_id、tc.local_string(format='%Y%m%d') | 
| 40 | 40 | # 售出 |