@@ -190,7 +190,6 @@ def good_exchange(request): |
||
190 | 190 |
good_ids.append(good_id) |
191 | 191 |
|
192 | 192 |
goods = [] |
193 |
- |
|
194 | 193 |
for good_id in good_ids: |
195 | 194 |
try: |
196 | 195 |
good = GoodsInfo.objects.select_for_update().get(good_id=good_id) |
@@ -209,11 +208,10 @@ def good_exchange(request): |
||
209 | 208 |
# 校验重复兑换 |
210 | 209 |
if good.only_once and GoodsOrderInfo.objects.filter(user_id=user_id, good_id=good_id, status=True).exists(): |
211 | 210 |
return response(MemberGoodStatusCode.GOOD_EXCHANGE_ONLY_ONCE) |
212 |
- |
|
211 |
+ |
|
213 | 212 |
if good.good_type == GoodsInfo.PHYSICAL and address == '': |
214 | 213 |
return response(MemberGoodStatusCode.GOOD_NO_ADDRESS) |
215 | 214 |
|
216 |
- |
|
217 | 215 |
user.integral -= good.integral |
218 | 216 |
user.save() |
219 | 217 |
|
@@ -225,8 +225,7 @@ def DJANGO_FILE_UPLOAD_BASE_PATH_CALLBACK_FUNC(request): |
||
225 | 225 |
if zbar2: |
226 | 226 |
return 'zbar2' |
227 | 227 |
|
228 |
- file_type = request.POST.get('file_type', '') |
|
229 |
- return file_type |
|
228 |
+ return request.POST.get('file_type', '') |
|
230 | 229 |
|
231 | 230 |
|
232 | 231 |
def DJANGO_FILE_UPLOAD_CALLBACK_FUNC(request, file_path=None, file_url=None): |