Showing
3 changed files
with
29 additions
and
8 deletions
| ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' | ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' |
| 2 | 2 | ||
| 3 | ext { | 3 | ext { |
| 4 | PUBLISH_GROUP_ID = 'ly.warp' | 4 | PUBLISH_GROUP_ID = 'ly.warp' |
| 5 | - PUBLISH_VERSION = '4.5.4.6rc71' | 5 | + PUBLISH_VERSION = '4.5.4.6rc72' |
| 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
| 7 | } | 7 | } |
| 8 | 8 | ... | ... |
| ... | @@ -90,12 +90,26 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl | ... | @@ -90,12 +90,26 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl |
| 90 | if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) { | 90 | if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) { |
| 91 | final ExecutorService executor = Executors.newFixedThreadPool(1); | 91 | final ExecutorService executor = Executors.newFixedThreadPool(1); |
| 92 | executor.submit(() -> { | 92 | executor.submit(() -> { |
| 93 | - for (UnifiedCoupon unicoupon : WarplyManagerHelper.getMarketCoupons()) { | 93 | +// for (UnifiedCoupon unicoupon : WarplyManagerHelper.getMarketCoupons()) { |
| 94 | - if (unicoupon.getCoupons() != null && unicoupon.getCoupons().size() > 0) { | 94 | +// if (unicoupon.getCoupons() != null && unicoupon.getCoupons().size() > 0) { |
| 95 | - for (Coupon inncoupon : unicoupon.getCoupons()) { | 95 | +// for (Coupon inncoupon : unicoupon.getCoupons()) { |
| 96 | - if (inncoupon.getStatus() == 0) { | 96 | +// if (inncoupon.getStatus() == 0) { |
| 97 | - countValue += Float.valueOf(inncoupon.getDiscount()); | 97 | +// countValue += Float.valueOf(inncoupon.getDiscount()); |
| 98 | - mExpiredMarketCoupons.add(inncoupon); | 98 | +// mExpiredMarketCoupons.add(inncoupon); |
| 99 | +// } | ||
| 100 | +// } | ||
| 101 | +// } | ||
| 102 | +// } | ||
| 103 | + | ||
| 104 | + if (WarplyManagerHelper.getCouponRedeemedList().size() > 0) { | ||
| 105 | + if (WarplyManagerHelper.getCouponsetsDeals().size() > 0) { | ||
| 106 | + for (Couponset couset : WarplyManagerHelper.getCouponsetsDeals()) { | ||
| 107 | + for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) { | ||
| 108 | + if (cou.getCouponsetUuid().equals(couset.getUuid())) { | ||
| 109 | + countValue += Float.valueOf(cou.getDiscount()); | ||
| 110 | + mExpiredMarketCoupons.add(cou); | ||
| 111 | + break; | ||
| 112 | + } | ||
| 99 | } | 113 | } |
| 100 | } | 114 | } |
| 101 | } | 115 | } | ... | ... |
| ... | @@ -529,7 +529,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -529,7 +529,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
| 529 | } | 529 | } |
| 530 | 530 | ||
| 531 | // Third Expandable Banner | 531 | // Third Expandable Banner |
| 532 | - if (WarplyManagerHelper.getMarketCoupons().size() > 0) { | 532 | + if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) { |
| 533 | countValue = 0.0f; | 533 | countValue = 0.0f; |
| 534 | // for (UnifiedCoupon unicou : WarplyManagerHelper.getMarketCoupons()) { | 534 | // for (UnifiedCoupon unicou : WarplyManagerHelper.getMarketCoupons()) { |
| 535 | // if (unicou.getCoupons() != null && unicou.getCoupons().size() > 0) { | 535 | // if (unicou.getCoupons() != null && unicou.getCoupons().size() > 0) { |
| ... | @@ -547,6 +547,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -547,6 +547,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
| 547 | for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) { | 547 | for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) { |
| 548 | if (cou.getCouponsetUuid().equals(couset.getUuid())) { | 548 | if (cou.getCouponsetUuid().equals(couset.getUuid())) { |
| 549 | countValue += Float.valueOf(cou.getDiscount()); | 549 | countValue += Float.valueOf(cou.getDiscount()); |
| 550 | + cou.setDescription(couset.getShortDescription()); | ||
| 551 | + cou.setImage(couset.getImgPreview()); | ||
| 552 | + cou.setName(couset.getName()); | ||
| 553 | + cou.setMerchantUuid(couset.getMerchantUuid()); | ||
| 554 | + cou.setInnerText(couset.getInnerText()); | ||
| 555 | + cou.setDiscount_type(couset.getDiscount_type()); | ||
| 556 | + cou.setFinal_price(couset.getFinal_price()); | ||
| 550 | break; | 557 | break; |
| 551 | } | 558 | } |
| 552 | } | 559 | } | ... | ... |
-
Please register or login to post a comment