|
@@ -116,15 +116,7 @@ class TenantViewSet(CustomModelViewSet):
|
|
instance.reject_reason = reject_reason
|
|
instance.reject_reason = reject_reason
|
|
instance.save()
|
|
instance.save()
|
|
BizLog.objects.addnew(None, request.user, BizLog.INSERT, u'审核企业[%s]状态为[%s],id=%d' % (instance.company_name, status, instance.id))
|
|
BizLog.objects.addnew(None, request.user, BizLog.INSERT, u'审核企业[%s]状态为[%s],id=%d' % (instance.company_name, status, instance.id))
|
|
- except CustomError as e:
|
|
|
|
- return response_error(e.get_error_msg())
|
|
|
|
- except Exception as e:
|
|
|
|
- return response_error(str(e))
|
|
|
|
- return response_ok('审核完成!')
|
|
|
|
|
|
|
|
- @action(methods=['get'], detail=True)
|
|
|
|
- def get_wxapp_code(self, request, pk):
|
|
|
|
- try:
|
|
|
|
tenant = Tenant.objects.filter(id=pk).first()
|
|
tenant = Tenant.objects.filter(id=pk).first()
|
|
if tenant:
|
|
if tenant:
|
|
company_no = tenant.company_no
|
|
company_no = tenant.company_no
|
|
@@ -138,7 +130,7 @@ class TenantViewSet(CustomModelViewSet):
|
|
|
|
|
|
return response_ok(tenant.wxapp_img)
|
|
return response_ok(tenant.wxapp_img)
|
|
except CustomError as e:
|
|
except CustomError as e:
|
|
- return response_error(str(e))
|
|
|
|
|
|
+ return response_error(e.get_error_msg())
|
|
except Exception as e:
|
|
except Exception as e:
|
|
- traceback.print_exc()
|
|
|
|
- return response_error(u'支付失败', request)
|
|
|
|
|
|
+ return response_error(str(e))
|
|
|
|
+ return response_ok('审核完成!')
|