26e08672f4f0007e50 ">11c6982627 return user_id for some api 10 年 前   Brightcells 0110c29272 rename api name 10 年 前   Brightcells 7a17d0fb90 add api wxpay & add redis relative 10 年 前   Brightcells 62aff0cb2f move status code into errno_utils.py to unified management 10 年 前   Brightcells a121b75ff2 add db_index=True for status field 10 年 前   Brightcells b5be31c6cd Fix Bug: Field name photo_path is not valid for model PhotosInfo 10 年 前   Brightcells 0786f22bad order_by('-pk') replace of order_by('-created_at') 10 年 前   Brightcells 62ef679981 add ret photo_url and photo_thumbnail_url 10 年 前   Brightcells d3088e1fec add ret msg_type_desc 10 年 前   Brightcells 464c31b794 support POST method for message relative api 10 年 前   Brightcells 8f83bd22be add param user_id for msg relative api 10 年 前   Brightcells 928a51477c 'UserMessageInfo' object has no attribute 'title' 10 年 前   Brightcells 8f14561134 UserMessageInfo in admin.py 10 年 前   Brightcells 89094aa77b if user exists, update user info, in api wx_authorize_api 10 年 前   Brightcells ba7bc03f03 adjust sex value 10 年 前   Brightcells 30daca135b add api message_list_api/message_type_list_api/message_read_api 10 年 前   Brightcells 03561aaa5f modify api comment_submit_api/comment_list_api 10 年 前   Brightcells c72d89f6e5 add api comment_submit_api/comment_list_api/thumbup_submit_api/thumbup_list_api/thumbup_cancel_api 10 年 前   Brightcells df1df69fe3 add api upgrade/splash 10 年 前   Brightcells 3253626936 change DOMAIN and IMG_DOMAIN to pai.ai 10 年 前   Brightcells e5721d434c add URL_CONFIG for domain pai.ai 10 年 前   Brightcells 2b831a139f CONN_MAX_AGE & cached.Loader 10 年 前   Brightcells 2fb52216da Fix Bug: wx authorize doesn't store wx_uid 10 年 前   Brightcells 48d2e93b70 return nickname for userinfo data 10 年 前   Brightcells 814ed79bfc add api group_unlock_api 10 年 前   Brightcells 1c25788dbf add group_name for group_create_api 10 年 前   Brightcells 8b5ea74192 add location /fly 10 年 前   Brightcells 4afdb94e20 add avatar for GroupUserInfo 10 年 前   Brightcells 5ef425fee7 add api wx_authorize_api 10 年 前   Brightcells d3798a39f1 update session_detail_api 10 年 前   Brightcells ce10db91f9 thumbnail_utils make_thumb 10 年 前   Brightcells f587f0a48f user can just see photo after he joined the group & zh_Hans replace zh_CN in settings.py 10 年 前   Brightcells 42df840f43 return current_id for api flyimg_upload/flyimg_list 10 年 前   Brightcells 9077a53317 return next_id for api flyimg_upload/flyimg_list 10 年 前   Brightcells f58bde298b add api flyimg_upload/flyimg_list 10 年 前   Brightcells 7fd74ed1e4 add group_join_api direct pass 10 年 前   Brightcells 7467a3e68a add api group_update/group_remove 10 年 前   Brightcells 7e305483ab add api group_detail/group_lock/group_pass/group_refuse 10 年 前   Brightcells e184e7dd5b add api group_create/group_join 10 年 前   Brightcells 6e77deb909 https://pypi.python.org/pypi/django-curtail-uuid 10 年 前   Brightcells e7d461ade5 upload photo with photo_id 10 年 前   Brightcells ca16dc830e alias .img.xfoto.com.cn/photo 10 年 前   Brightcells 7ddb9f0b5e change to use img.xfoto.com.cn as photo domain 10 年 前   Brightcells 3454610bb7 add api of user signup/login 10 年 前   Brightcells 00e8234de9 add api photo_standard_api 10 年 前   Brightcells e0ba30f506 add api session_detail_api 10 年 前   Brightcells 4a8b4f8819 add watermark 10 年 前   Brightcells b9c2997666 change server name .api.xfoto.com.cn before .xfoto.com.cn 10 年 前   Brightcells ca8b65a77e nginx conf & requirements 10 年 前   Brightcells 434468279f add api of lesman login & update other api 10 年 前   Brightcells 52ce35cbfc add api uuid_init/uuid 10 年 前   Brightcells 4defb80fdc gogs first init 10 年 前
共有1 個のファイルを変更した8 個の追加1 個の削除を含む
  1. 8 1
      member/models.py

+ 8 - 1
member/models.py

@@ -13,6 +13,7 @@ from TimeConvert import TimeConvert as tc
13 13
 from coupon.models import CouponInfo
14 14
 from kodo.basemodels import BrandInfoMixin
15 15
 from mch.models import ModelInfo
16
+from account.models import LensmanInfo
16 17
 from simditor.fields import RichTextField
17 18
 from utils.qiniucdn import qiniu_file_url
18 19
 
@@ -997,6 +998,12 @@ class MemberActivityContributionInfo(BaseModelMixin, BrandInfoMixin):
997 998
     def admindata(self):
998 999
         unlock_welfares = MemberActivityContributionWelfareUnlockingInfo.objects.filter(activity_id=self.activity_id, user_id=self.user_id)
999 1000
         unlock_welfares = [unlock_welfare.data for unlock_welfare in unlock_welfares]
1001
+        act = MemberActivityInfo.objects.get(activity_id=self.activity_id, status=True)
1002
+
1003
+        if act.activity_type == 4:
1004
+            user_name = LensmanInfo.objects.get(user_id=self.user_id, status=True).name
1005
+        else:
1006
+            user_name = self.user_name
1000 1007
         return {
1001 1008
             'contribution_id': self.contribution_id,
1002 1009
             'brand_id': self.brand_id,
@@ -1007,7 +1014,7 @@ class MemberActivityContributionInfo(BaseModelMixin, BrandInfoMixin):
1007 1014
             'content_type': self.content_type,
1008 1015
             'title': self.title,
1009 1016
             'content': self.content,
1010
-            'user_name': self.user_name,
1017
+            'user_name': user_name,
1011 1018
             'user_avatar': self.final_user_avatar,
1012 1019
             'images': self.final_images,
1013 1020
             'video_url': self.video_url or '',

Entrar - Gogs: Go Git Service

Entrar

kodo - Gogs: Go Git Service

Няма описание

huangqimin: 3bbfc60c06 :art: Support del_clerk_sale_submit_api преди 6 години
..
migrations 211ab99a32 :art: member/user/coupon/detail & member/user/coupon/use преди 6 години
__init__.py a8239c077f :art: CouponInfo for coupon app преди 6 години
admin.py 211ab99a32 :art: member/user/coupon/detail & member/user/coupon/use преди 6 години
apps.py a8239c077f :art: CouponInfo for coupon app преди 6 години
models.py fbfe62a2fe user_id преди 6 години
tests.py 3bbfc60c06 :art: Support del_clerk_sale_submit_api преди 6 години
views.py 3bbfc60c06 :art: Support del_clerk_sale_submit_api преди 6 години