@@ -4,6 +4,7 @@ from django.conf.urls import include, url |
||
4 | 4 |
|
5 | 5 |
from api.activity import contribution_admin_views |
6 | 6 |
|
7 |
+ |
|
7 | 8 |
urlpatterns = [ |
8 | 9 |
url(r'^admin/member/activity/contribute/delete$', contribution_admin_views.member_activity_contribution_delete_api, name='member_activity_contribution_delete_api'), |
9 |
-] |
|
10 |
+] |
@@ -5,10 +5,10 @@ from django_query import get_query_value |
||
5 | 5 |
from django_response import response |
6 | 6 |
|
7 | 7 |
from kodo.decorators import check_admin |
8 |
- |
|
9 | 8 |
from member.models import MemberActivityContributionInfo |
10 | 9 |
from utils.error.errno_utils import MemberActivityContributionStatusCode |
11 | 10 |
|
11 |
+ |
|
12 | 12 |
@check_admin |
13 | 13 |
@transaction.atomic |
14 | 14 |
def member_activity_contribution_delete_api(request, administrator): |
@@ -22,4 +22,4 @@ def member_activity_contribution_delete_api(request, administrator): |
||
22 | 22 |
contribution.status = False |
23 | 23 |
contribution.save() |
24 | 24 |
|
25 |
- return response(200, 'Member Activity Contribution Delete Success', u'会员活动投稿删除成功') |
|
25 |
+ return response(200, 'Member Activity Contribution Delete Success', u'会员活动投稿删除成功') |
@@ -4,19 +4,19 @@ from django.conf import settings |
||
4 | 4 |
from django_logit import logit |
5 | 5 |
from django_response import response |
6 | 6 |
|
7 |
-from kodo.decorators import check_admin |
|
8 |
-from utils.error.errno_utils import ContractStatusCode, TencentCloudStatusCode |
|
9 |
-from utils.tencentcloud.ess import describe_file_urls |
|
10 |
- |
|
7 |
+from account.models import LensmanInfo, UserInfo |
|
11 | 8 |
from api.lensman import contract_mp_views |
12 |
- |
|
13 | 9 |
from apps.contract.models import LensmanContributionContractInfo |
14 |
-from account.models import LensmanInfo, UserInfo |
|
10 |
+from kodo.decorators import check_admin |
|
15 | 11 |
from member.models import MemberActivityInfo |
16 | 12 |
from pre.custom_message import sendwxasubscribemessage |
13 |
+from utils.error.errno_utils import ContractStatusCode, TencentCloudStatusCode |
|
14 |
+from utils.tencentcloud.ess import describe_file_urls |
|
15 |
+ |
|
17 | 16 |
|
18 | 17 |
WECHAT = settings.WECHAT |
19 | 18 |
|
19 |
+ |
|
20 | 20 |
@logit(res=True) |
21 | 21 |
@check_admin |
22 | 22 |
def get_signed_contribtion_contract_file_api(request, administrator): |
@@ -84,4 +84,4 @@ def start_contribution_contract_sign_api(request, administrator): |
||
84 | 84 |
|
85 | 85 |
res = sendwxasubscribemessage(openid=user.openid_miniapp, template_id=settings.TEMPLATE_ID_CONTRIBUTION_CONTRACT, data=data, miniprogram_state=None, lang=None, page='/pages/member/activity/activity?flow_id={}&contribution_id={}'.format(flow_id, contribution_id)) |
86 | 86 |
|
87 |
- return response(200, 'Start Contribution Contract Sign Success', u'发起投稿授权书签署成功', data={}) |
|
87 |
+ return response(200, 'Start Contribution Contract Sign Success', u'发起投稿授权书签署成功', data={}) |
@@ -72,6 +72,7 @@ def get_contribtion_contract_api(request): |
||
72 | 72 |
'scheme_url': scheme_url |
73 | 73 |
}) |
74 | 74 |
|
75 |
+ |
|
75 | 76 |
def get_contribtion_contract_sign_mppath_api(request): |
76 | 77 |
user_id = request.POST.get('user_id', '') |
77 | 78 |
flow_id = request.POST.get('flow_id', '') |
@@ -165,8 +166,7 @@ def create_contribution_contract_flow(lensman): |
||
165 | 166 |
|
166 | 167 |
def create_contribution_contract_document(lensman, contribution_id, file_ids, FlowId): |
167 | 168 |
# 创建电子签文档 https://qian.tencent.com/developers/companyApis/startFlows/CreateDocument |
168 |
- IMAGE_COMPONENTIDS = ['ComponentId_37', 'ComponentId_38','ComponentId_39','ComponentId_40','ComponentId_41','ComponentId_42', |
|
169 |
- 'ComponentId_43','ComponentId_44','ComponentId_45','ComponentId_46','ComponentId_47','ComponentId_48','ComponentId_49','ComponentId_50','ComponentId_51','ComponentId_52','ComponentId_53','ComponentId_54','ComponentId_55', 'ComponentId_55', 'ComponentId_56', 'ComponentId_57', 'ComponentId_58', 'ComponentId_59', 'ComponentId_60', 'ComponentId_9', 'ComponentId_10', 'ComponentId_11', 'ComponentId_12', 'ComponentId_13', 'ComponentId_14', 'ComponentId_15', 'ComponentId_16', 'ComponentId_17', 'ComponentId_18', 'ComponentId_19', 'ComponentId_20', 'ComponentId_21', 'ComponentId_22', 'ComponentId_23', 'ComponentId_24', 'ComponentId_25', 'ComponentId_26', 'ComponentId_27', 'ComponentId_28','ComponentId_29', 'ComponentId_30', 'ComponentId_31', 'ComponentId_32'] |
|
169 |
+ IMAGE_COMPONENTIDS = ['ComponentId_37', 'ComponentId_38', 'ComponentId_39', 'ComponentId_40', 'ComponentId_41', 'ComponentId_42', 'ComponentId_43', 'ComponentId_44', 'ComponentId_45', 'ComponentId_46', 'ComponentId_47', 'ComponentId_48', 'ComponentId_49', 'ComponentId_50', 'ComponentId_51', 'ComponentId_52', 'ComponentId_53', 'ComponentId_54', 'ComponentId_55', 'ComponentId_55', 'ComponentId_56', 'ComponentId_57', 'ComponentId_58', 'ComponentId_59', 'ComponentId_60', 'ComponentId_9', 'ComponentId_10', 'ComponentId_11', 'ComponentId_12', 'ComponentId_13', 'ComponentId_14', 'ComponentId_15', 'ComponentId_16', 'ComponentId_17', 'ComponentId_18', 'ComponentId_19', 'ComponentId_20', 'ComponentId_21', 'ComponentId_22', 'ComponentId_23', 'ComponentId_24', 'ComponentId_25', 'ComponentId_26', 'ComponentId_27', 'ComponentId_28', 'ComponentId_29', 'ComponentId_30', 'ComponentId_31', 'ComponentId_32'] |
|
170 | 170 |
|
171 | 171 |
try: |
172 | 172 |
amount = LensmanContributionActivityIncomeExpensesInfo.objects.get(contribution_id=contribution_id, lensman_id=lensman.lensman_id).amount |
@@ -9,7 +9,7 @@ urlpatterns = [ |
||
9 | 9 |
url(r'^mp/lensman/contribution/contract/get$', contract_mp_views.get_contribtion_contract_api, name='get_contribtion_contract_api'), |
10 | 10 |
url(r'^mp/lensman/contribution/contract/status/get$', contract_mp_views.get_contribtion_contract_status_api, name='get_contribtion_contract_status_api'), |
11 | 11 |
url(r'^mp/lensman/contribution/contract/sign/mppach/get$', contract_mp_views.get_contribtion_contract_sign_mppath_api, name='get_contribtion_contract_sign_mppath_api'), |
12 |
- |
|
12 |
+ |
|
13 | 13 |
url(r'^mp/ess/callback$', contract_mp_views.ess_callback, name='ess_callback'), |
14 | 14 |
] |
15 | 15 |
|
@@ -75,6 +75,7 @@ def lensman_audit(request, administrator): |
||
75 | 75 |
|
76 | 76 |
return response(200, 'Lensman Audit Pass Suceess', u'摄影师审核通过') |
77 | 77 |
|
78 |
+ |
|
78 | 79 |
@logit |
79 | 80 |
@check_admin |
80 | 81 |
def lensman_delete(request, administrator): |
@@ -393,4 +393,4 @@ urlpatterns += [ |
||
393 | 393 |
# 会员活动模块 |
394 | 394 |
urlpatterns += [ |
395 | 395 |
url(r'', include(('api.activity.activity_urls', 'activity'), namespace='activity')), |
396 |
-] |
|
396 |
+] |
@@ -112,7 +112,7 @@ class MaintenaceInfo(BaseModelMixin): |
||
112 | 112 |
'model_id': self.model_id, |
113 | 113 |
'model_name': model.model_name if model else '', |
114 | 114 |
'model_full_name': model.model_full_name if model else '', |
115 |
- #'model_image_url': model.image2_url, |
|
115 |
+ # 'model_image_url': model.image2_url, |
|
116 | 116 |
'log_id': self.log_id, |
117 | 117 |
'sn': self.sn, |
118 | 118 |
'desc': self.desc, |
@@ -153,7 +153,7 @@ def activity_contribute_create(request): |
||
153 | 153 |
try: |
154 | 154 |
lensman = LensmanInfo.objects.get(user_id=user_id, status=True) |
155 | 155 |
user_name = lensman.name |
156 |
- except: |
|
156 |
+ except LensmanInfo.DoesNotExist: |
|
157 | 157 |
pass |
158 | 158 |
|
159 | 159 |
try: |
@@ -44,7 +44,6 @@ def upload_document_files(files, file_type='png'): |
||
44 | 44 |
file_ids = file_ids + res.FileIds |
45 | 45 |
_files = _files[20:] |
46 | 46 |
|
47 |
- |
|
48 | 47 |
return file_ids |
49 | 48 |
|
50 | 49 |
|