ss="lines-code">
+
7
+# Create your tests here.

+ 7 - 0
maintenance/views.py

@@ -0,0 +1,7 @@
1
+# -*- coding: utf-8 -*-
2
+from __future__ import unicode_literals
3
+
4
+from django.shortcuts import render
5
+
6
+
7
+# Create your views here.

pai2 - Gogs: Go Git Service

拍爱

rbrief.py 712B

    # -*- coding: utf-8 -*- from isoweek import Week from TimeConvert import TimeConvert as tc from utils.redis.connect import r from utils.redis.rkeys import TODAY_INCOME, TOTAL_INCOME, WEEK_INCOME, WEEK_SOLD def set_brief_info(uid, ptype, fee, dt=None): """ 更新简报信息 """ ymd, week = (tc.local_string(tc.to_local_datetime(dt), format='%Y%m%d'), Week.withdate(dt)) if dt else (tc.local_string(format='%Y%m%d'), Week.thisweek().isoformat()) # 总收入 r.incr(TOTAL_INCOME % (uid, ptype), fee) # 周收入 r.incr(WEEK_INCOME % (uid, ptype, week), fee) # 日收入 r.incr(TODAY_INCOME % (uid, ptype, ymd), fee) # 周售出 r.incr(WEEK_SOLD % (uid, ptype, week))