+ 'orders': orders, 187
+            'left': left,
188
+        },
189
+    })
190
+
191
+
192
+@logit
193
+@transaction.atomic
194
+def wx_order_detail_api(request):
195
+    """
196
+    订单详情
197
+    :param request:
198
+    :return:
199
+    """
200
+    user_id = request.POST.get('user_id', '')
201
+    order_id = request.POST.get('order_id', '')
202
+
203
+    try:
204
+        order = OrderInfo.objects.get(order_id=order_id)
205
+    except OrderInfo.DoesNotExist:
206
+        return response(OrderStatusCode.WX_ORDER_NOT_FOUND)
207
+
208
+    if user_id not in [order.from_uid, order.to_lid, order.to_uid]:
209
+        return response(OrderStatusCode.NO_DETAIL_PERMISSION)
210
+
211
+    return JsonResponse({
212
+        'status': 200,
213
+        'message': u'获取订单详情成功',
214
+        'data': {
215
+            'order': order.data,
216
+        },
217
+    })
218
+
219
+
220
+@logit
221
+@transaction.atomic
166 222
 def wx_notify_url_api(request):
167 223
     """
168 224
     支付异步通知回调地址

+ 1 - 0
utils/error/errno_utils.py

@@ -69,6 +69,7 @@ class OrderStatusCode(BaseStatusCode):
69 69
     WX_ORDER_PAYING = StatusCodeField(404003, u'WX Order Paying', description=u'订单支付中')
70 70
     WX_ORDER_PAY_FAIL = StatusCodeField(404009, u'WX Order Pay Fail', description=u'微信支付失败')
71 71
     SIGN_CHECK_FAIL = StatusCodeField(404010, u'Sign Check Fail', description=u'签名校验失败')
72
+    NO_DETAIL_PERMISSION = StatusCodeField(404015, u'No Detail Permission', description=u'没有详情权限')
72 73
 
73 74
 
74 75
 class MessageStatusCode(BaseStatusCode):

+ 4 - 0
utils/redis/rkeys.py

@@ -18,5 +18,9 @@ GROUP_USERS_QUIT_SET = 'group:users:quit:set:%s'  # SET,群组用户退出集
18 18
 GROUP_PHOTO_THUMB_UP = 'group:photo:thumb:up:%s:%s'  # STRING,群组照片用户点赞记录,photo_id、user_id
19 19
 GROUP_LAST_PHOTO_PK = 'group:last:photo:pk:%s'  # STRING,群组最后一张照片PK,group_id
20 20
 
21
+# 摄影师照片相关
22
+LESMAN_PHOTO_PRICE = 'lesman:photo:price:%s:%s:%s'  # STRING,摄影师照片价格,photo_id、user_id、photo_type
23
+LESMAN_PHOTO_HAGGLE_TIMES = 'lesman:photo:haggle:times:%s:%s:%s'  # STRING,摄影师照片价格,photo_id、user_id、photo_type
24
+
21 25
 # 系统消息相关
22 26
 SYSTEM_MESSAGE_DELETED_INFO = 'system:message:deleted:info:%s'  # STRING,系统消息删除信息,user_id

adminSystem - Gogs: Go Git Service

Nav apraksta

LICENSE 1.5KB

    BSD 3-Clause License Copyright (c) 2017, Baidu Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.