Преглед изворни кода

1.钱包明细增加时分秒,修复支付状态不正确的bug

ZhangXinYu пре 6 година
родитељ
комит
3c31219df9

+ 2 - 2
app/build.gradle

@@ -24,8 +24,8 @@ android {
         targetSdkVersion rootProject.ext.targetSdkVersion
         multiDexEnabled true
         multiDexKeepProguard file("multidexKeep.pro")//腾讯bugly的类放到主Dex
-        versionCode 337
-        versionName "3.3.7"
+        versionCode 320
+        versionName "3.2.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         flavorDimensions "versionCode"
         ndk {

+ 2 - 1
app/src/main/java/com/tongyu/luck/happywork/ui/activity/cclient/mine/WalletActivity.java

@@ -36,12 +36,13 @@ public class WalletActivity extends BaseActivity<WalletPresenter> implements Wal
         return new WalletPresenter(this);
     }
 
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         initActionBarNewStyle();
         setTitle(R.string.mine_wallet);
-//        setActionBarMenuText(onActionBarMenuClickListener, R.string.detail);
+        setActionBarMenuText(onActionBarMenuClickListener, R.string.detail);
         mvpPresenter.init();
     }
 

+ 4 - 5
app/src/main/java/com/tongyu/luck/happywork/ui/adapter/cclient/listview/WalletDetailAdapter.java

@@ -9,7 +9,6 @@ import android.widget.TextView;
 
 import com.tongyu.luck.happywork.R;
 import com.tongyu.luck.happywork.baselibrary.AppConstant;
-import com.tongyu.luck.happywork.baselibrary.utils.DateUtils;
 import com.tongyu.luck.happywork.bean.WalletBean;
 import com.tongyu.luck.happywork.ui.base.BaseViewHolder;
 
@@ -103,14 +102,14 @@ public class WalletDetailAdapter extends BaseAdapter {
                     case AppConstant.WALLET_IN_REWARD:
                         tvTitle.setText(R.string.mine_wallet_in_reward);
                         break;
-                    case AppConstant.WALLET_OPEM_MEMBER:
+                    case AppConstant.WALLET_OPEN_MEMBER:
                         tvTitle.setText(R.string.mine_wallet_open_member);
                         break;
                     case AppConstant.WALLET_CASH_PAYMENT:
                         tvTitle.setText(R.string.mine_wallet_cash_payment);
                         break;
                 }
-                tvDate.setText(TextUtils.isEmpty(bean.getUpdateDate()) ? "" : DateUtils.getFormatStrToStrYMD(bean.getUpdateDate()));
+                tvDate.setText(TextUtils.isEmpty(bean.getUpdateDate()) ? "" : bean.getUpdateDate());
                 //积分
                 int money = 0;
                 if (!TextUtils.isEmpty(bean.getMoney())) {
@@ -119,8 +118,8 @@ public class WalletDetailAdapter extends BaseAdapter {
                     } catch (Exception e) {//防止类型转换错误
                     }
                 }
-                if (money < 0) {//扣积分
-                    tvMoney.setText(bean.getMoney() + "");
+                if (AppConstant.WALLET_WITHDRAWAL == bean.getMoneyType() || AppConstant.WALLET_OPEN_MEMBER == bean.getMoneyType() || AppConstant.WALLET_CASH_PAYMENT == bean.getMoneyType()) {//扣积分
+                    tvMoney.setText("-" + bean.getMoney());
                     tvMoney.setTextColor(mContext.getResources().getColorStateList(R.color.text_black));
                 } else {
                     tvMoney.setText("+" + bean.getMoney());

+ 1 - 1
baselibrary/src/main/java/com/tongyu/luck/happywork/baselibrary/AppConstant.java

@@ -97,7 +97,7 @@ public class AppConstant {
     public static final int WALLET_CASH_BACK = 3;
     public static final int WALLET_SALARY_REWARD = 4;
     public static final int WALLET_IN_REWARD = 5;
-    public static final int WALLET_OPEM_MEMBER = 6;
+    public static final int WALLET_OPEN_MEMBER = 6;
     public static final int WALLET_CASH_PAYMENT = 7;
 
     //支付类型 0 余额 1:微信 2:支付宝