Commit a6483d05 authored by jianglx's avatar jianglx

修改钱包佣金部分

parent ea7fc7e0
......@@ -74,7 +74,7 @@ public class ApiConfig {
public static String HTTP_URR_USER_POINT = RvFrameConfig.HOST + "/api/activity/integralUserTotal/getByUser";
public static String HTTP_URL_POINT_LIST = RvFrameConfig.HOST + "/api/activity/integralRule/list";
public static String HTTP_URL_POINT_LIST = RvFrameConfig.HOST + "/api/activity/integralRule/list?page=1&limit=1000";
public static String HTTP_URL_POINT_SIGN_RULER = RvFrameConfig.HOST + "/api/activity/integralRule/one?code=%s";
......
......@@ -22,20 +22,28 @@ public class IncomeListAdapter extends BaseQuickAdapter<IncomeRecordsBean.Income
@Override
protected void convert(BaseViewHolder helper, IncomeRecordsBean.IncomeItem item) {
StringBuilder buffer = new StringBuilder();
buffer.append(dealName(item.getUsername())).append("成交").append(item.getPrice()).append("元");
helper.setText(R.id.tv_consume_name, buffer.toString());
if (item.getStatus() == 0) {
buffer.append(dealName(item.getUsername())).append("成交").append(item.getPrice()).append("元");
} else if (item.getStatus() == 1) {
buffer.append(dealName(item.getUsername())).append("退款").append(item.getPrice()).append("元");
}
helper.setText(R.id.tv_consume_name, buffer.toString());
helper.setText(R.id.tv_income_time, DateUtils.timestampToString1(item.getCrtTime()));
if (item.getWaiting() == 1) {
if (item.getWaiting() == 1 && item.getStatus() == 0) {
StringBuilder builder = new StringBuilder();
builder.append("+").append(item.getCommission()).append("元");
helper.setText(R.id.tv_amount, builder.toString());
} else if (item.getWaiting() == 1 && item.getStatus() == 1) {
StringBuilder builder = new StringBuilder();
builder.append("-").append(item.getCommission()).append("元");
helper.setText(R.id.tv_amount, builder.toString());
} else {
helper.setText(R.id.tv_amount, "进行中");
}
}
private String dealName(String name) {
if (!TextUtils.isEmpty(name)) {
if (name.length() == 11) {
......
......@@ -4,10 +4,12 @@ import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Log;
import android.widget.LinearLayout;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.frame.rv.config.RvFrameConfig;
import com.google.gson.Gson;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseFragment;
import com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout;
......@@ -68,6 +70,7 @@ public class CommisionAllFragment extends BaseFragment<CommonPresenter> implemen
public void onShowResult(int requestType, BaseBean result) {
if (requestType == 0) {
IncomeRecordsBean bean = (IncomeRecordsBean) result;
Log.e("xxxxxxx", new Gson().toJson(bean));
if (bean.isRel() && bean.getData() != null && bean.getData().getSellingWaters() != null) {
if (currentPage == 1) {
pageTotal = bean.getData().getTotalPage();
......@@ -97,7 +100,8 @@ public class CommisionAllFragment extends BaseFragment<CommonPresenter> implemen
@Override
public void onRefresh() {
currentPage = 1;
getIncomeData();
}
private void getIncomeData() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment