Procházet zdrojové kódy

提现与消费记录

zengjiebin před 8 roky
rodič
revize
265a586078

+ 12 - 13
app/src/main/java/com/kfzs/duanduan/fragment/AbsFgtMyMoney.java

@@ -7,21 +7,17 @@ import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.ConsumptionLog;
-import com.sheep.gamegroup.model.entity.Friend;
+import com.sheep.gamegroup.model.entity.ILog;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.util.BtStatusUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.TimeUtil;
 import com.sheep.gamegroup.view.adapter.ArrayAdapter;
 import com.sheep.gamegroup.view.customview.RefreshLayout;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 
 import java.util.List;
-import java.util.Locale;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
@@ -46,25 +42,26 @@ public abstract class AbsFgtMyMoney extends BaseFragment {
         return R.layout.list_has_empty;
     }
 
-    private List<ConsumptionLog> list = ListUtil.emptyList();
-    private ArrayAdapter<ConsumptionLog> adapter;
+    private List<ILog> list = ListUtil.emptyList();
+    private ArrayAdapter<ILog> adapter;
     @Override
     public void onViewCreated() {
         ButterKnife.bind(this, mView);
         if(getActivity() != null) {
             swipe_container.setFooterView(getActivity(), list_view, R.layout.listview_footer);
-            adapter = new ArrayAdapter<ConsumptionLog>(getActivity(), R.layout.x_my_money_act_layout_item, list){
+            adapter = new ArrayAdapter<ILog>(getActivity(), R.layout.x_my_money_act_layout_item, list){
                 @Override
-                public boolean convert(int position, View convertView, ViewGroup parent, ConsumptionLog item) {
+                public boolean convert(int position, View convertView, ViewGroup parent, ILog item) {
                     View my_money_item_top = convertView.findViewById(R.id.my_money_item_top);
                     View my_money_item_center = convertView.findViewById(R.id.my_money_item_center);
                     View my_money_item_bottom = convertView.findViewById(R.id.my_money_item_bottom);
                     TextView my_money_item_recharge_amount = convertView.findViewById(R.id.my_money_item_recharge_amount);
                     TextView my_money_item_recharge_status = convertView.findViewById(R.id.my_money_item_recharge_status);
                     TextView my_money_item_recharge_time = convertView.findViewById(R.id.my_money_item_recharge_time);
-                    my_money_item_recharge_amount.setText(BtStatusUtil.getConsumtionLog(item));
-                    my_money_item_recharge_status.setText(BtStatusUtil.getConsumtionStatus(item));
-                    my_money_item_recharge_time.setText(TimeUtil.TimeStamp2Date(item.getCreateTime(), "yyyy/MM/dd HH:mm"));
+                    my_money_item_recharge_amount.setText(item.getEventText());
+                    my_money_item_recharge_status.setText(item.getStateText());
+                    my_money_item_recharge_status.setTextColor(item.isEventSuccess() ? 0xff282828 : 0xffff2e4b);
+                    my_money_item_recharge_time.setText(TimeUtil.TimeStamp2Date(item.getEventTime(), "yyyy/MM/dd HH:mm"));
                     boolean isFirst = position == 0;
                     boolean isLast = ListUtil.isLastPosition(list, position);
                     my_money_item_top.setVisibility(isFirst ? View.VISIBLE : View.GONE);
@@ -106,7 +103,7 @@ public abstract class AbsFgtMyMoney extends BaseFragment {
                 .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
                     @Override
                     public void onNext(BaseMessage baseMessage) {
-                        List<ConsumptionLog> newList = baseMessage.getDatas(ConsumptionLog.class);
+                        List<? extends ILog> newList = getDatas(baseMessage);
                         if(newList == null) {
                             baseMessage.setMsg("服务器数据错误");
                             onError(baseMessage);
@@ -129,6 +126,8 @@ public abstract class AbsFgtMyMoney extends BaseFragment {
                 });
     }
 
+    protected abstract List<? extends ILog> getDatas(BaseMessage baseMessage);
+
     protected abstract Observable<BaseMessage> initObservable(int page, int per_page);
 
     private void notifyDataSetChanged() {

+ 9 - 1
app/src/main/java/com/kfzs/duanduan/fragment/FgtMyMoney1.java

@@ -1,8 +1,11 @@
 package com.kfzs.duanduan.fragment;
 
 import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.RechargeBalanceLog;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 
+import java.util.List;
+
 import rx.Observable;
 
 /**
@@ -12,7 +15,12 @@ import rx.Observable;
  */
 public class FgtMyMoney1 extends AbsFgtMyMoney {
     @Override
+    protected List<RechargeBalanceLog> getDatas(BaseMessage baseMessage) {
+        return baseMessage.getDatas(RechargeBalanceLog.class);
+    }
+
+    @Override
     protected Observable<BaseMessage> initObservable(int page, int per_page) {
-        return SheepApp.getInstance().getNetComponent().getApiService().getRecharge_log(page, per_page);
+        return SheepApp.getInstance().getNetComponent().getApiService().getRechargeBalanceLog(page, per_page);
     }
 }

+ 11 - 2
app/src/main/java/com/kfzs/duanduan/fragment/FgtMyMoney2.java

@@ -1,19 +1,28 @@
 package com.kfzs.duanduan.fragment;
 
 import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.ILog;
+import com.sheep.gamegroup.model.entity.WithdrawalEty;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 
+import java.util.List;
+
 import rx.Observable;
 
 /**
- * 我的资产 --> 提现&消费记录
+ * 我的资产 --> 充值记录
  * Created by realicing on 2018/5/9.
  * realicing@sina.com
  */
 public class FgtMyMoney2 extends AbsFgtMyMoney {
 
     @Override
+    protected List<WithdrawalEty> getDatas(BaseMessage baseMessage) {
+        return baseMessage.getDatas(WithdrawalEty.class);
+    }
+
+    @Override
     protected Observable<BaseMessage> initObservable(int page, int per_page) {
-        return SheepApp.getInstance().getNetComponent().getApiService().getConsumption_log(page, per_page);
+        return SheepApp.getInstance().getNetComponent().getApiService().goWithdrawal(page, per_page,"",System.currentTimeMillis()+"");
     }
 }

+ 26 - 0
app/src/main/java/com/kfzs/duanduan/fragment/FgtMyMoney3.java

@@ -0,0 +1,26 @@
+package com.kfzs.duanduan.fragment;
+
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.RechargeQQLog;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.List;
+
+import rx.Observable;
+
+/**
+ * 我的资产 --> 充值Q币记录
+ * Created by realicing on 2018/5/9.
+ * realicing@sina.com
+ */
+public class FgtMyMoney3 extends AbsFgtMyMoney {
+    @Override
+    protected List<RechargeQQLog> getDatas(BaseMessage baseMessage) {
+        return baseMessage.getDatas(RechargeQQLog.class);
+    }
+
+    @Override
+    protected Observable<BaseMessage> initObservable(int page, int per_page) {
+        return SheepApp.getInstance().getNetComponent().getApiService().getRechargeQQLog(page, per_page);
+    }
+}

+ 6 - 6
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -319,15 +319,15 @@ public interface ApiService {
     @GET("app/user/my_assets")
     Observable<BaseMessage> getMyAssets();
     /**
-     * 获取用户充值记录
+     * 充值记录
      */
-    @GET("app/user/recharge_log")
-    Observable<BaseMessage> getRecharge_log(@Query("page") int page, @Query("per_page") int per_page);
+    @GET("app/recharge/recharge_balance_log")
+    Observable<BaseMessage> getRechargeBalanceLog(@Query("page") int page, @Query("per_page") int per_page);
     /**
-     * 获取用户提现&消费记录
+     * 充值q币记录
      */
-    @GET("app/user/consumption_log")
-    Observable<BaseMessage> getConsumption_log(@Query("page") int page, @Query("per_page") int per_page);
+    @GET("app/recharge/recharge_qq_log")
+    Observable<BaseMessage> getRechargeQQLog(@Query("page") int page, @Query("per_page") int per_page);
 
 
 

+ 0 - 105
app/src/main/java/com/sheep/gamegroup/model/entity/ConsumptionLog.java

@@ -1,105 +0,0 @@
-package com.sheep.gamegroup.model.entity;
-
-
-/**
- * Created by realicing on 2018/5/9.
- * realicing@sina.com
- */
-public class ConsumptionLog {
-    private int Type;
-
-    private int UserId;
-
-    private double SurplusAmount;
-
-    private String WxAccount;
-
-    private String Amount;
-
-    private int CreateTime;
-
-    private int RelateUser;
-
-    private int Id;
-
-    private int ReleaseTaskId;
-
-    private int From1;
-
-    private String DetailDesc;
-
-    public void setType(int Type){
-        this.Type = Type;
-    }
-    public int getType(){
-        return this.Type;
-    }
-    public void setUserId(int UserId){
-        this.UserId = UserId;
-    }
-    public int getUserId(){
-        return this.UserId;
-    }
-    public void setSurplusAmount(double SurplusAmount){
-        this.SurplusAmount = SurplusAmount;
-    }
-    public double getSurplusAmount(){
-        return this.SurplusAmount;
-    }
-    public void setWxAccount(String WxAccount){
-        this.WxAccount = WxAccount;
-    }
-    public String getWxAccount(){
-        return this.WxAccount;
-    }
-    public void setAmount(String Amount){
-        this.Amount = Amount;
-    }
-    public String getAmount(){
-        return this.Amount;
-    }
-    public void setCreateTime(int CreateTime){
-        this.CreateTime = CreateTime;
-    }
-    public int getCreateTime(){
-        return this.CreateTime;
-    }
-    public void setRelateUser(int RelateUser){
-        this.RelateUser = RelateUser;
-    }
-    public int getRelateUser(){
-        return this.RelateUser;
-    }
-    public void setId(int Id){
-        this.Id = Id;
-    }
-    public int getId(){
-        return this.Id;
-    }
-    public void setReleaseTaskId(int ReleaseTaskId){
-        this.ReleaseTaskId = ReleaseTaskId;
-    }
-    public int getReleaseTaskId(){
-        return this.ReleaseTaskId;
-    }
-
-    public int getFrom1() {
-        return From1;
-    }
-
-    public void setFrom1(int from1) {
-        From1 = from1;
-    }
-
-    public void setDetailDesc(String DetailDesc){
-        this.DetailDesc = DetailDesc;
-    }
-    public String getDetailDesc(){
-        return this.DetailDesc;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return obj instanceof ConsumptionLog && ((ConsumptionLog) obj).getId() == Id;
-    }
-}

+ 16 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/ILog.java

@@ -0,0 +1,16 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/5/11.
+ * realicing@sina.com
+ */
+public interface ILog {
+
+    String getStateText();
+
+    String getEventText();
+
+    boolean isEventSuccess();
+
+    long getEventTime();
+}

+ 107 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/RechargeBalanceLog.java

@@ -0,0 +1,107 @@
+package com.sheep.gamegroup.model.entity;
+
+
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2018/5/9.
+ * realicing@sina.com
+ */
+public class RechargeBalanceLog implements ILog{
+    private int UserId;
+
+    private int PayType;
+
+    private float Amount;
+
+    private int CreateTime;
+
+    private int UpdateTime;
+
+    private String ThirdNo;
+
+    private String OrderNo;
+
+    private int Id;
+
+    private int Status;
+
+    public void setUserId(int UserId){
+        this.UserId = UserId;
+    }
+    public int getUserId(){
+        return this.UserId;
+    }
+    public void setPayType(int PayType){
+        this.PayType = PayType;
+    }
+    public int getPayType(){
+        return this.PayType;
+    }
+    public void setAmount(float Amount){
+        this.Amount = Amount;
+    }
+    public float getAmount(){
+        return this.Amount;
+    }
+    public void setCreateTime(int CreateTime){
+        this.CreateTime = CreateTime;
+    }
+    public int getCreateTime(){
+        return this.CreateTime;
+    }
+    public void setUpdateTime(int UpdateTime){
+        this.UpdateTime = UpdateTime;
+    }
+    public int getUpdateTime(){
+        return this.UpdateTime;
+    }
+    public void setThirdNo(String ThirdNo){
+        this.ThirdNo = ThirdNo;
+    }
+    public String getThirdNo(){
+        return this.ThirdNo;
+    }
+    public void setOrderNo(String OrderNo){
+        this.OrderNo = OrderNo;
+    }
+    public String getOrderNo(){
+        return this.OrderNo;
+    }
+    public void setId(int Id){
+        this.Id = Id;
+    }
+    public int getId(){
+        return this.Id;
+    }
+    public void setStatus(int Status){
+        this.Status = Status;
+    }
+    public int getStatus(){
+        return this.Status;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj instanceof RechargeBalanceLog && ((RechargeBalanceLog) obj).Id == Id;
+    }
+    @Override
+    public String getStateText() {
+        return "充值成功";
+    }
+
+    @Override
+    public String getEventText() {
+        return String.format(Locale.CHINA,"充值金额%.2f元", Amount);
+    }
+
+    @Override
+    public boolean isEventSuccess() {
+        return true;
+    }
+
+    @Override
+    public long getEventTime() {
+        return UpdateTime;
+    }
+}

+ 126 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/RechargeQQLog.java

@@ -0,0 +1,126 @@
+package com.sheep.gamegroup.model.entity;
+
+
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2018/5/9.
+ * realicing@sina.com
+ */
+public class RechargeQQLog implements ILog{
+    private float amount;
+
+    private int status;
+
+    private int discount;
+
+    private int id;
+
+    private int success_time;
+
+    private String qq;
+
+    private String order_no;
+
+    private int from;
+
+    private int user_id;
+
+    private int create_time;
+
+    public void setAmount(float amount){
+        this.amount = amount;
+    }
+    public float getAmount(){
+        return this.amount;
+    }
+    public void setStatus(int status){
+        this.status = status;
+    }
+    public int getStatus(){
+        return this.status;
+    }
+    public void setDiscount(int discount){
+        this.discount = discount;
+    }
+    public int getDiscount(){
+        return this.discount;
+    }
+    public void setId(int id){
+        this.id = id;
+    }
+    public int getId(){
+        return this.id;
+    }
+    public void setSuccess_time(int success_time){
+        this.success_time = success_time;
+    }
+    public int getSuccess_time(){
+        return this.success_time;
+    }
+    public void setQq(String qq){
+        this.qq = qq;
+    }
+    public String getQq(){
+        return this.qq;
+    }
+    public void setOrder_no(String order_no){
+        this.order_no = order_no;
+    }
+    public String getOrder_no(){
+        return this.order_no;
+    }
+    public void setFrom(int from){
+        this.from = from;
+    }
+    public int getFrom(){
+        return this.from;
+    }
+    public void setUser_id(int user_id){
+        this.user_id = user_id;
+    }
+    public int getUser_id(){
+        return this.user_id;
+    }
+    public void setCreate_time(int create_time){
+        this.create_time = create_time;
+    }
+    public int getCreate_time(){
+        return this.create_time;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj instanceof RechargeQQLog && ((RechargeQQLog) obj).id == id;
+    }
+
+    /**
+     * status 1充值中 2成功 3失败
+     * @return
+     */
+    @Override
+    public String getStateText() {
+        switch (status){
+            case 1:
+                return "充值中";
+            case 3:
+                return "充值失败";
+        }
+        return "充值成功";
+    }
+
+    @Override
+    public String getEventText() {
+        return String.format(Locale.CHINA,"Q币充值%.2f元", amount);
+    }
+
+    @Override
+    public boolean isEventSuccess() {
+        return status == 2;
+    }
+
+    @Override
+    public long getEventTime() {
+        return success_time;
+    }
+}

+ 37 - 7
app/src/main/java/com/sheep/gamegroup/model/entity/WithdrawalEty.java

@@ -1,11 +1,15 @@
 package com.sheep.gamegroup.model.entity;
 
+import com.sheep.gamegroup.util.CommonUtil;
+
+import java.util.Locale;
+
 /**
  * Created by ljy on 2018/3/21.
  */
 
-public class WithdrawalEty {
-    private String amount;// 0,
+public class WithdrawalEty implements ILog{
+    private float amount;// 0,
     private String create_time;// 0,
     private String desc;// "string",
     private int id;// 0,
@@ -16,16 +20,16 @@ public class WithdrawalEty {
     private String surplus_amount;// 0,
     private String total_amount;// 0,
     private String type;// 0,
-    private String update_time;// 0,
+    private int update_time;// 0,
     private String user_id;// 0,
     private String wx_resp_content;// "string"
     private UserEntity user;
 
-    public String getAmount() {
+    public float getAmount() {
         return amount;
     }
 
-    public void setAmount(String amount) {
+    public void setAmount(float amount) {
         this.amount = amount;
     }
 
@@ -109,11 +113,11 @@ public class WithdrawalEty {
         this.type = type;
     }
 
-    public String getUpdate_time() {
+    public int getUpdate_time() {
         return update_time;
     }
 
-    public void setUpdate_time(String update_time) {
+    public void setUpdate_time(int update_time) {
         this.update_time = update_time;
     }
 
@@ -140,4 +144,30 @@ public class WithdrawalEty {
     public void setUser(UserEntity user) {
         this.user = user;
     }
+
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj instanceof WithdrawalEty && ((WithdrawalEty) obj).id == id;
+    }
+
+    @Override
+    public String getStateText() {
+        return CommonUtil.getInstance().returnAuditResult(this);
+    }
+
+    @Override
+    public String getEventText() {
+        return String.format(Locale.CHINA,"提现金额%.2f元", amount);
+    }
+
+    @Override
+    public boolean isEventSuccess() {
+        return pay_status == 2;
+    }
+
+    @Override
+    public long getEventTime() {
+        return update_time;
+    }
 }

+ 0 - 43
app/src/main/java/com/sheep/gamegroup/util/BtStatusUtil.java

@@ -2,11 +2,8 @@ package com.sheep.gamegroup.util;
 
 import android.text.TextUtils;
 
-import com.sheep.gamegroup.model.entity.ConsumptionLog;
 import com.sheep.gamegroup.model.entity.CreditCardProgressQuery;
 
-import java.util.Locale;
-
 /**
  * Created by realicing on 2018/4/27.
  * realicing@sina.com
@@ -42,44 +39,4 @@ public class BtStatusUtil {
     public static String getUploadText(CreditCardProgressQuery creditCardProgressQuery) {
         return TextUtils.isEmpty(creditCardProgressQuery.getRemarks()) ? getUploadText(creditCardProgressQuery.getStatus()) : creditCardProgressQuery.getRemarks();
     }
-    //1:完成任务
-// 2提现审核不通过退钱
-// 3微信挂机赚钱 
-// 4下级完成任务提成
-// 5贷款 
-// 6注册奖励
-//  7旧版同步过来的
-//  8第三方充值
-// 9新手任务
-// 10 代理
-// 11:提现
-// 12游戏充值
-//  13 购买APP Store充值卡
-    //只会使用 8,11,12,13
-    public static String getConsumtionLog(ConsumptionLog item) {
-        switch (item.getFrom1()){
-            case 8:
-                return String.format(Locale.CHINA,"充值金额%s元", item.getAmount());
-            case 11:
-                return String.format(Locale.CHINA,"申请提现%s元", item.getAmount());
-            case 12:
-                return String.format(Locale.CHINA,"充值游戏%s元", item.getAmount());
-            case 13:
-                return String.format(Locale.CHINA,"购买充值卡%s元", item.getAmount());
-        }
-        return item.getDetailDesc();
-    }
-    public static String getConsumtionStatus(ConsumptionLog item) {
-        switch (item.getType()){
-            case 8:
-                return "充值成功";
-            case 11:
-                return "提现成功";
-            case 12:
-                return "充值游戏成功";
-            case 13:
-                return "消费成功";
-        }
-        return item.getDetailDesc();
-    }
 }

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/util/ListUtil.java

@@ -25,7 +25,7 @@ public class ListUtil {
         return new ArrayList<>();
     }
 
-    public static <T> int addAll(List<T> list, List<T> elements) {
+    public static <T> int addAll(List<T> list, List<? extends T> elements) {
         int count = 0;
         for (T element : elements) {
             int index = list.indexOf(element);

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -50,8 +50,8 @@ public class ViewUtil {
         Window window = dialog.getWindow();
         if(window != null) {
             android.view.WindowManager.LayoutParams p = window.getAttributes();
-            p.height = G.WIDTH+activity.getResources().getDimensionPixelSize(R.dimen.content_padding_80);
-            p.width = G.WIDTH;
+            p.height = WindowManager.LayoutParams.WRAP_CONTENT;
+            p.width = WindowManager.LayoutParams.MATCH_PARENT;
             dialog.getWindow().setAttributes(p);     //设置生效
         }
         iv.setOnClickListener(new View.OnClickListener() {

+ 5 - 2
app/src/main/java/com/sheep/gamegroup/view/activity/ActMyMoney.java

@@ -13,6 +13,7 @@ import android.widget.TextView;
 import com.alibaba.fastjson.JSON;
 import com.kfzs.duanduan.fragment.FgtMyMoney1;
 import com.kfzs.duanduan.fragment.FgtMyMoney2;
+import com.kfzs.duanduan.fragment.FgtMyMoney3;
 import com.kfzs.duanduan.mine.GiftpackListAdapter;
 import com.kfzs.duanduan.utils.StatusBarUtils;
 import com.sheep.gamegroup.absBase.BaseActivity;
@@ -74,13 +75,15 @@ public class ActMyMoney extends BaseActivity {
                 .setTitleFinish(this);
         mAdapter = new GiftpackListAdapter(getSupportFragmentManager(), getApplicationContext());
         mAdapter.add(new FgtMyMoney1(), "充值记录");
-        mAdapter.add(new FgtMyMoney2(), "提现&消费记录");
+        mAdapter.add(new FgtMyMoney2(), "提现记录");
+        mAdapter.add(new FgtMyMoney3(), "消费记录");
         pager.setAdapter(mAdapter);
         new_tab();
     }
     private void new_tab(){
         indicator.addTab(indicator.newTab().setCustomView(tab_icon("充值记录",R.drawable.selector_tab_my_money1)));
-        indicator.addTab(indicator.newTab().setCustomView(tab_icon("提现&消费记录",R.drawable.selector_tab_my_money2)));
+        indicator.addTab(indicator.newTab().setCustomView(tab_icon("提现记录",R.drawable.selector_tab_my_money2)));
+        indicator.addTab(indicator.newTab().setCustomView(tab_icon("消费记录",R.drawable.selector_tab_my_money2)));
         //Tablayout自定义view绑定ViewPager
         pager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(indicator));
         indicator.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(pager));

+ 6 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/RechargeAct.java

@@ -12,6 +12,7 @@ import com.sheep.gamegroup.model.entity.RechargeEntity;
 import com.sheep.gamegroup.model.entity.RechargePriceEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.MyGridview;
 import com.sheep.gamegroup.view.adapter.RechargeAdapter;
 import com.sheep.gamegroup.view.adapter.RechargePriceAdapter;
@@ -119,6 +120,11 @@ public class RechargeAct extends BaseActivity {
                         hideProgress();
                         List<RechargeEntity> list = baseMessage.getDatas(RechargeEntity.class);
                         rechargeAdapter.addAll(list);
+                        if(!list.isEmpty()) {
+                            mPayType = list.get(0).getId();
+                            rechargeAdapter.setSelect(0);
+                            rechargeAdapter.notifyDataSetChanged();
+                        }
                     }
 
                     @Override

+ 3 - 2
app/src/main/java/com/sheep/gamegroup/view/adapter/WithdrawalListAdp.java

@@ -14,6 +14,7 @@ import com.sheep.gamegroup.util.TimeUtil;
 import com.sheep.jiuyan.samllsheep.R;
 
 import java.util.List;
+import java.util.Locale;
 
 /**
  * Created by ljy on 2018/3/21.
@@ -61,11 +62,11 @@ public class WithdrawalListAdp extends BaseAdapter {
         WithdrawalEty ety = (WithdrawalEty) getItem(position);
         holder.name_tv.setText(TextUtils.isEmpty(ety.getDesc())?"提现":ety.getDesc());
         try {
-            holder.date_tv.setText(TimeUtil.getDate(TimeUtil.FORMAT, Long.valueOf(ety.getUpdate_time()))+"");
+            holder.date_tv.setText(TimeUtil.getDate(TimeUtil.FORMAT, ety.getUpdate_time()));
         }catch (Exception e){
             e.printStackTrace();
         }
-        holder.price_tv.setText("-" + ety.getAmount()+"元");
+        holder.price_tv.setText(String.format(Locale.CHINA,"-%.2f元", ety.getAmount()));
         holder.state_tv.setText(CommonUtil.getInstance().returnAuditResult(ety));
 
         return convertView;

+ 16 - 14
app/src/main/res/layout/x_ask_qr_dialog.xml

@@ -14,23 +14,25 @@
         />
 
     <RelativeLayout
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_margin="20dp"
         android:layout_gravity="center">
-     <ImageView
-         android:id="@+id/iv_qr"
-         android:layout_width="wrap_content"
-         android:layout_height="wrap_content"
-         android:layout_centerInParent="true"
-         android:src="@drawable/loading"
-         />
-     <ImageView
-         android:id="@+id/iv_qr_small"
-         android:layout_width="wrap_content"
-         android:layout_height="wrap_content"
-         android:layout_centerInParent="true"
-         />
+         <ImageView
+             android:id="@+id/iv_qr"
+             android:layout_width="match_parent"
+             android:layout_height="wrap_content"
+             android:scaleType="fitXY"
+             android:adjustViewBounds="true"
+             android:layout_centerInParent="true"
+             android:src="@drawable/loading"
+             />
+         <ImageView
+             android:id="@+id/iv_qr_small"
+             android:layout_width="wrap_content"
+             android:layout_height="wrap_content"
+             android:layout_centerInParent="true"
+             />
 
     </RelativeLayout>
     <TextView

+ 3 - 3
app/src/main/res/layout/x_my_money_act_layout_item.xml

@@ -22,7 +22,7 @@
             android:id="@+id/my_money_item_recharge_amount"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_weight="2"
+            android:layout_weight="1"
             android:gravity="start"
             android:singleLine="true"
             android:text="充值金额100.00元"
@@ -42,9 +42,9 @@
 
         <TextView
             android:id="@+id/my_money_item_recharge_time"
-            android:layout_width="wrap_content"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginStart="5dp"
+            android:layout_weight="1"
             android:gravity="end"
             android:singleLine="true"
             android:text="2018/05/07 20:59"