|
@@ -57,16 +57,16 @@ class StoreViewSet(CustomModelViewSet):
|
|
@action(methods=['post'], detail=False)
|
|
@action(methods=['post'], detail=False)
|
|
def check(self, request, pk):
|
|
def check(self, request, pk):
|
|
# 审核
|
|
# 审核
|
|
- report_status = request.POST.get('report_status')
|
|
|
|
|
|
+ status = request.POST.get('status')
|
|
try:
|
|
try:
|
|
instance = Store.objects.filter(id=pk).first()
|
|
instance = Store.objects.filter(id=pk).first()
|
|
if not instance:
|
|
if not instance:
|
|
raise CustomError('当前门店信息有误!')
|
|
raise CustomError('当前门店信息有误!')
|
|
- if instance.report_status > settings.NOT_CHECKED :
|
|
|
|
|
|
+ if instance.status > settings.NOT_CHECKED :
|
|
raise CustomError('当前企业已审核!')
|
|
raise CustomError('当前企业已审核!')
|
|
|
|
|
|
instance.check_user = self.request.user
|
|
instance.check_user = self.request.user
|
|
- instance.report_status = report_status
|
|
|
|
|
|
+ instance.status = status
|
|
instance.check_time = timezone.now()
|
|
instance.check_time = timezone.now()
|
|
instance.save()
|
|
instance.save()
|
|
except CustomError as e:
|
|
except CustomError as e:
|