+ bean + " error:" + e); 58 56
         }
59 57
         return false;
60 58
     }
61 59
 
62 60
     @Override
63 61
     protected void onPostExecute(Boolean result) {
64
-        if(listener!=null){
65
-            if(result){
66
-                LogHelper.d(TAG, "上传 UploadTask  photo path:"+photoPath+ "  success ");
67
-                listener.onPhotoUploadSucceed(photoPath);
68
-            }else{
69
-                LogHelper.d(TAG, "上传 UploadTask  photo path:"+photoPath+ "  fail ");
70
-                listener.onPhotoUploadFail(photoPath,groupId);
62
+        if (listener != null) {
63
+            if (result) {
64
+                LogHelper.d(TAG, "上传 UploadTask " + bean + "  success ");
65
+                listener.onPhotoUploadSucceed(bean);
66
+            } else {
67
+                LogHelper.d(TAG, "上传 UploadTask " + bean + "  fail ");
68
+                listener.onPhotoUploadFail(bean);
71 69
             }
72 70
         }
73 71
     }
74 72
 
75 73
     public interface OnPhotoUploadListener {
76
-        void onPhotoUploadSucceed(String photoPath);
77
-        void onPhotoUploadFail(String photoPath, String groupId);
74
+        void onPhotoUploadSucceed(PhotoBean bean);
75
+
76
+        void onPhotoUploadFail(PhotoBean bean);
78 77
     }
79 78
 }

+ 6 - 0
app/src/main/java/ai/pai/lensman/upload/UploadPresenter.java

@@ -1,12 +1,16 @@
1 1
 package ai.pai.lensman.upload;
2 2
 
3
+import android.content.Intent;
4
+
3 5
 import java.text.SimpleDateFormat;
4 6
 import java.util.ArrayList;
5 7
 import java.util.Date;
6 8
 
9
+import ai.pai.lensman.App;
7 10
 import ai.pai.lensman.base.BaseInteractor;
8 11
 import ai.pai.lensman.bean.SessionBean;
9 12
 import ai.pai.lensman.db.DBService;
13
+import ai.pai.lensman.service.UploadService;
10 14
 
11 15
 public class UploadPresenter implements UploadContract.Presenter,BaseInteractor.InteractorListener<ArrayList<String>> {
12 16
 
@@ -43,6 +47,8 @@ public class UploadPresenter implements UploadContract.Presenter,BaseInteractor.
43 47
             uploadView.refreshSessionViews(sessionList);
44 48
         }
45 49
         sessionSeq = sessionList.size();
50
+
51
+        App.getAppContext().startService(new Intent(App.getAppContext(), UploadService.class));
46 52
     }
47 53
 
48 54
     @Override

MEMBER_SEND_COUPON_LIST · 104cd654f1 - Gogs: Go Git Service

MEMBER_SEND_COUPON_LIST

huangqimin 6 anni fa
parent
commit
104cd654f1
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      api/mch_views.py
  2. 1 1
      commands/management/commands/membercoupon.py

+ 2 - 2
api/mch_views.py

@@ -19,7 +19,7 @@ from statistic.models import ConsumeModelSaleStatisticInfo, ConsumeSaleStatistic
19 19
 from utils.error.errno_utils import (AdministratorStatusCode, OperatorStatusCode, ProductBrandStatusCode,
20 20
                                      ProductModelStatusCode, UserStatusCode)
21 21
 from utils.redis.connect import r
22
-from utils.redis.rkeys import MINI_PROGRAM_GIS_LIST
22
+from utils.redis.rkeys import MEMBER_SEND_COUPON_LIST, MINI_PROGRAM_GIS_LIST
23 23
 
24 24
 
25 25
 WECHAT = settings.WECHAT
@@ -403,7 +403,7 @@ def consumer_info_api(request):
403 403
         if user.level < UserInfo.MEMBER_BLACK_GOLD:
404 404
             user.level += 1
405 405
             # 发放会员权益
406
-            r.rpushjson({
406
+            r.rpushjson(MEMBER_SEND_COUPON_LIST, {
407 407
                 'brand_id': brand.brand_id,
408 408
                 'user_id': user_id,
409 409
             })

+ 1 - 1
commands/management/commands/membercoupon.py

@@ -19,7 +19,7 @@ logger = logging.getLogger('console')
19 19
 class Command(CompatibilityBaseCommand):
20 20
     def handle(self, *args, **options):
21 21
 
22
-        logger.info('Gis is dealing')
22
+        logger.info('Member coupon is dealing')
23 23
 
24 24
         while True:
25 25
             # r.rpushjson('TEMPLET_CMD_KEY', {