version:4.5
fix: update:支付回调,咨询页面修改,通过分类获取资讯,我的订单详情
This commit is contained in:
@@ -191,12 +191,16 @@
|
||||
android:screenOrientation="userPortrait" />
|
||||
<activity
|
||||
android:name=".activity.OrderActivity"
|
||||
android:screenOrientation="userPortrait"
|
||||
android:launchMode="singleTask" />
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="userPortrait" />
|
||||
<activity
|
||||
android:name=".activity.PayActivity"
|
||||
android:screenOrientation="userPortrait"
|
||||
android:launchMode="singleTask" />
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="userPortrait" />
|
||||
<activity
|
||||
android:name=".activity.OrderListActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="userPortrait" />
|
||||
|
||||
<receiver
|
||||
android:name=".receiver.BootReceiver"
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.uiuios.aios.activity;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.uiuios.aios.R;
|
||||
import com.uiuios.aios.adapter.OrderAdapter;
|
||||
import com.uiuios.aios.base.BaseDataBindingActivity;
|
||||
import com.uiuios.aios.bean.BaseResponse;
|
||||
import com.uiuios.aios.bean.OrderIndexBean;
|
||||
import com.uiuios.aios.bean.OrderIndexData;
|
||||
import com.uiuios.aios.databinding.ActivityOrderListBinding;
|
||||
import com.uiuios.aios.network.NetInterfaceManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
public class OrderListActivity extends BaseDataBindingActivity {
|
||||
private static final String TAG = OrderListActivity.class.getSimpleName();
|
||||
|
||||
private ActivityOrderListBinding mBinding;
|
||||
private OrderAdapter mOrderAdapter;
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
*/
|
||||
@Override
|
||||
public void initView() {
|
||||
mBinding = DataBindingUtil.setContentView(this, R.layout.activity_order_list);
|
||||
|
||||
mOrderAdapter = new OrderAdapter();
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
|
||||
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mBinding.rvOrder.setLayoutManager(linearLayoutManager);
|
||||
mBinding.rvOrder.setAdapter(mOrderAdapter);
|
||||
|
||||
mBinding.tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
@Override
|
||||
public void onTabSelected(TabLayout.Tab tab) {
|
||||
mBinding.rvOrder.scrollToPosition(0);
|
||||
String title = tab.getText().toString();
|
||||
Log.e(TAG, "onTabSelected: " + title);
|
||||
switch (title) {
|
||||
default:
|
||||
case "全部":
|
||||
getAllOrderList();
|
||||
break;
|
||||
case "待付款":
|
||||
getOrderIndexList(0);
|
||||
break;
|
||||
case "待发货":
|
||||
getOrderIndexList(1);
|
||||
break;
|
||||
case "待收货":
|
||||
getOrderIndexList(2);
|
||||
break;
|
||||
case "已签收":
|
||||
getOrderIndexList(3);
|
||||
break;
|
||||
case "已评价":
|
||||
getOrderIndexList(4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabUnselected(TabLayout.Tab tab) {
|
||||
Log.e(TAG, "onTabUnselected: " + tab.getText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabReselected(TabLayout.Tab tab) {
|
||||
Log.e(TAG, "onTabReselected: " + tab.getText());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
@Override
|
||||
public void initData() {
|
||||
getAllOrderList();
|
||||
}
|
||||
|
||||
private void getAllOrderList() {
|
||||
NetInterfaceManager.getInstance().getAllOrderObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, ActivityEvent.DESTROY))
|
||||
.subscribe(getOrderListObserver());
|
||||
}
|
||||
|
||||
private void getOrderIndexList(int status) {
|
||||
NetInterfaceManager.getInstance().getOrderIndexObservable(status)
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, ActivityEvent.DESTROY))
|
||||
.subscribe(getOrderListObserver());
|
||||
}
|
||||
|
||||
private Observer<BaseResponse<OrderIndexData>> getOrderListObserver() {
|
||||
return new Observer<BaseResponse<OrderIndexData>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getAllOrderListObserver", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<OrderIndexData> baseResponse) {
|
||||
Log.e("getAllOrderListObserver", "onNext: " + baseResponse);
|
||||
if (baseResponse.code == 200) {
|
||||
OrderIndexData orderIndexData = baseResponse.data;
|
||||
List<OrderIndexBean> orderIndexBeanList = orderIndexData.getData();
|
||||
mOrderAdapter.setOrderIndexBeans(orderIndexBeanList);
|
||||
}else {
|
||||
mOrderAdapter.setOrderIndexBeans(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getAllOrderListObserver", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getAllOrderListObserver", "onComplete: ");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,12 @@ public class PayActivity extends BaseDataBindingActivity {
|
||||
getWechatPayQrcode(mOrderBean);
|
||||
}
|
||||
});
|
||||
mBinding.ivExit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,6 +112,7 @@ public class PayActivity extends BaseDataBindingActivity {
|
||||
mCountdownSubscribe.dispose();
|
||||
}
|
||||
mCountdownSubscribe = Observable.interval(1, TimeUnit.SECONDS)
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, ActivityEvent.DESTROY))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<Long>() {
|
||||
@@ -135,10 +142,10 @@ public class PayActivity extends BaseDataBindingActivity {
|
||||
mCheckOrderSubscribe.dispose();
|
||||
}
|
||||
mCheckOrderSubscribe = Observable.interval(5, TimeUnit.SECONDS)
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, ActivityEvent.DESTROY))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<Long>() {
|
||||
|
||||
@Override
|
||||
public void accept(Long aLong) throws Exception {
|
||||
NetInterfaceManager.getInstance()
|
||||
@@ -180,6 +187,4 @@ public class PayActivity extends BaseDataBindingActivity {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
90
app/src/main/java/com/uiuios/aios/adapter/OrderAdapter.java
Normal file
90
app/src/main/java/com/uiuios/aios/adapter/OrderAdapter.java
Normal file
@@ -0,0 +1,90 @@
|
||||
package com.uiuios.aios.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.uiuios.aios.R;
|
||||
import com.uiuios.aios.bean.OrderGoods;
|
||||
import com.uiuios.aios.bean.OrderIndexBean;
|
||||
import com.uiuios.aios.utils.GlideLoadUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class OrderAdapter extends RecyclerView.Adapter<OrderAdapter.OrderHolder> {
|
||||
|
||||
private Context mContext;
|
||||
private List<OrderIndexBean> mOrderIndexBeans;
|
||||
|
||||
public void setOrderIndexBeans(List<OrderIndexBean> orderIndexBeans) {
|
||||
mOrderIndexBeans = orderIndexBeans;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public OrderHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
mContext = parent.getContext();
|
||||
return new OrderAdapter.OrderHolder(LayoutInflater.from(mContext).inflate(R.layout.item_order, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull OrderHolder holder, int position) {
|
||||
OrderIndexBean orderIndexBean = mOrderIndexBeans.get(position);
|
||||
OrderGoods orderGoods = orderIndexBean.getGoods();
|
||||
int status = orderIndexBean.getStatus();
|
||||
switch (status) {
|
||||
default:
|
||||
case 0:
|
||||
holder.tv_statu.setText("待付款");
|
||||
break;
|
||||
case 1:
|
||||
holder.tv_statu.setText("待发货");
|
||||
break;
|
||||
case 2:
|
||||
holder.tv_statu.setText("待收货");
|
||||
break;
|
||||
case 3:
|
||||
holder.tv_statu.setText("已签收");
|
||||
break;
|
||||
case 20:
|
||||
holder.tv_statu.setText("已取消");
|
||||
break;
|
||||
}
|
||||
GlideLoadUtils.getInstance().glideLoad(mContext, orderGoods.getImage(), holder.iv_goods, R.drawable.he999);
|
||||
holder.tv_title.setText(orderGoods.getGoods_name());
|
||||
holder.tv_unit_price.setText("¥" + orderGoods.getBuy_price());
|
||||
holder.tv_amount.setText(String.valueOf(orderIndexBean.getGoods_total()));
|
||||
holder.tv_paid.setText("实付:¥" + orderIndexBean.getPrice_total() + "元");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mOrderIndexBeans == null ? 0 : mOrderIndexBeans.size();
|
||||
}
|
||||
|
||||
class OrderHolder extends RecyclerView.ViewHolder {
|
||||
TextView tv_statu, tv_title, tv_unit_price, tv_amount, tv_paid, tv_express;
|
||||
ImageView iv_goods;
|
||||
|
||||
public OrderHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
tv_statu = itemView.findViewById(R.id.tv_statu);
|
||||
tv_title = itemView.findViewById(R.id.tv_title);
|
||||
tv_unit_price = itemView.findViewById(R.id.tv_unit_price);
|
||||
tv_amount = itemView.findViewById(R.id.tv_amount);
|
||||
tv_paid = itemView.findViewById(R.id.tv_paid);
|
||||
tv_express = itemView.findViewById(R.id.tv_express);
|
||||
iv_goods = itemView.findViewById(R.id.iv_goods);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
26
app/src/main/java/com/uiuios/aios/bean/AdminInfo.java
Normal file
26
app/src/main/java/com/uiuios/aios/bean/AdminInfo.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.uiuios.aios.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AdminInfo implements Serializable {
|
||||
private static final long serialVersionUID = -4113446564225253506L;
|
||||
|
||||
int id;
|
||||
String username;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
}
|
||||
26
app/src/main/java/com/uiuios/aios/bean/ExpressInfo.java
Normal file
26
app/src/main/java/com/uiuios/aios/bean/ExpressInfo.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.uiuios.aios.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ExpressInfo implements Serializable {
|
||||
private static final long serialVersionUID = 8208144013177074189L;
|
||||
|
||||
int id;
|
||||
String express_name;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getExpress_name() {
|
||||
return express_name;
|
||||
}
|
||||
|
||||
public void setExpress_name(String express_name) {
|
||||
this.express_name = express_name;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
|
||||
public class GoodsDetails implements Serializable {
|
||||
private static final long serialVersionUID = 8555224831444328502L;
|
||||
|
||||
int id;
|
||||
String goods_name;
|
||||
String img;
|
||||
|
||||
89
app/src/main/java/com/uiuios/aios/bean/OrderGoods.java
Normal file
89
app/src/main/java/com/uiuios/aios/bean/OrderGoods.java
Normal file
@@ -0,0 +1,89 @@
|
||||
package com.uiuios.aios.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class OrderGoods implements Serializable {
|
||||
private static final long serialVersionUID = 7257019166037379938L;
|
||||
|
||||
int id;
|
||||
String order_id;
|
||||
String goods_id;
|
||||
String goods_name;
|
||||
String price;// 原价
|
||||
int num;
|
||||
String buy_price;// 抢购价
|
||||
String pay_price;// 实付款
|
||||
String image;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getOrder_id() {
|
||||
return order_id;
|
||||
}
|
||||
|
||||
public void setOrder_id(String order_id) {
|
||||
this.order_id = order_id;
|
||||
}
|
||||
|
||||
public String getGoods_id() {
|
||||
return goods_id;
|
||||
}
|
||||
|
||||
public void setGoods_id(String goods_id) {
|
||||
this.goods_id = goods_id;
|
||||
}
|
||||
|
||||
public String getGoods_name() {
|
||||
return goods_name;
|
||||
}
|
||||
|
||||
public void setGoods_name(String goods_name) {
|
||||
this.goods_name = goods_name;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public int getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(int num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getBuy_price() {
|
||||
return buy_price;
|
||||
}
|
||||
|
||||
public void setBuy_price(String buy_price) {
|
||||
this.buy_price = buy_price;
|
||||
}
|
||||
|
||||
public String getPay_price() {
|
||||
return pay_price;
|
||||
}
|
||||
|
||||
public void setPay_price(String pay_price) {
|
||||
this.pay_price = pay_price;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
}
|
||||
297
app/src/main/java/com/uiuios/aios/bean/OrderIndexBean.java
Normal file
297
app/src/main/java/com/uiuios/aios/bean/OrderIndexBean.java
Normal file
@@ -0,0 +1,297 @@
|
||||
package com.uiuios.aios.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class OrderIndexBean implements Serializable {
|
||||
private static final long serialVersionUID = 4544929539747251262L;
|
||||
|
||||
int id;
|
||||
String order_sn;
|
||||
String sn_id;
|
||||
String sn;
|
||||
String user_id;
|
||||
String fullname;// 购买人
|
||||
String tel;// 电话
|
||||
String province_id;
|
||||
String city_id;
|
||||
String county_id;
|
||||
String address; // 详细地址
|
||||
int status;// 订单状态: 0 待付款 1 待发货 2 待收货 3 已签收 20 已取消
|
||||
String express_id;
|
||||
int goods_total;// 商品数量
|
||||
String price_total;// 总额
|
||||
String remark;
|
||||
String express_no;// 快递单号
|
||||
String created_at;//下单时间
|
||||
String pay_at; // 支付时间 未支付时为null
|
||||
String send_at;// 发货时间 未发货时为null
|
||||
int is_cancel;
|
||||
String receive_at;
|
||||
String apply_cancel_at;
|
||||
String cancel_at;
|
||||
String audit_at;
|
||||
int audit_admin_id;
|
||||
String reason;
|
||||
String area_name;// 区域
|
||||
String latest_transport;// 最新物流信息,为空的话,不显示
|
||||
OrderGoods goods;
|
||||
ExpressInfo express;// 未发货时为null
|
||||
AdminInfo admin;// 关联企业
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getOrder_sn() {
|
||||
return order_sn;
|
||||
}
|
||||
|
||||
public void setOrder_sn(String order_sn) {
|
||||
this.order_sn = order_sn;
|
||||
}
|
||||
|
||||
public String getSn_id() {
|
||||
return sn_id;
|
||||
}
|
||||
|
||||
public void setSn_id(String sn_id) {
|
||||
this.sn_id = sn_id;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getFullname() {
|
||||
return fullname;
|
||||
}
|
||||
|
||||
public void setFullname(String fullname) {
|
||||
this.fullname = fullname;
|
||||
}
|
||||
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getProvince_id() {
|
||||
return province_id;
|
||||
}
|
||||
|
||||
public void setProvince_id(String province_id) {
|
||||
this.province_id = province_id;
|
||||
}
|
||||
|
||||
public String getCity_id() {
|
||||
return city_id;
|
||||
}
|
||||
|
||||
public void setCity_id(String city_id) {
|
||||
this.city_id = city_id;
|
||||
}
|
||||
|
||||
public String getCounty_id() {
|
||||
return county_id;
|
||||
}
|
||||
|
||||
public void setCounty_id(String county_id) {
|
||||
this.county_id = county_id;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getExpress_id() {
|
||||
return express_id;
|
||||
}
|
||||
|
||||
public void setExpress_id(String express_id) {
|
||||
this.express_id = express_id;
|
||||
}
|
||||
|
||||
public int getGoods_total() {
|
||||
return goods_total;
|
||||
}
|
||||
|
||||
public void setGoods_total(int goods_total) {
|
||||
this.goods_total = goods_total;
|
||||
}
|
||||
|
||||
public String getPrice_total() {
|
||||
return price_total;
|
||||
}
|
||||
|
||||
public void setPrice_total(String price_total) {
|
||||
this.price_total = price_total;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getExpress_no() {
|
||||
return express_no;
|
||||
}
|
||||
|
||||
public void setExpress_no(String express_no) {
|
||||
this.express_no = express_no;
|
||||
}
|
||||
|
||||
public String getCreated_at() {
|
||||
return created_at;
|
||||
}
|
||||
|
||||
public void setCreated_at(String created_at) {
|
||||
this.created_at = created_at;
|
||||
}
|
||||
|
||||
public String getPay_at() {
|
||||
return pay_at;
|
||||
}
|
||||
|
||||
public void setPay_at(String pay_at) {
|
||||
this.pay_at = pay_at;
|
||||
}
|
||||
|
||||
public String getSend_at() {
|
||||
return send_at;
|
||||
}
|
||||
|
||||
public void setSend_at(String send_at) {
|
||||
this.send_at = send_at;
|
||||
}
|
||||
|
||||
public int getIs_cancel() {
|
||||
return is_cancel;
|
||||
}
|
||||
|
||||
public void setIs_cancel(int is_cancel) {
|
||||
this.is_cancel = is_cancel;
|
||||
}
|
||||
|
||||
public String getReceive_at() {
|
||||
return receive_at;
|
||||
}
|
||||
|
||||
public void setReceive_at(String receive_at) {
|
||||
this.receive_at = receive_at;
|
||||
}
|
||||
|
||||
public String getApply_cancel_at() {
|
||||
return apply_cancel_at;
|
||||
}
|
||||
|
||||
public void setApply_cancel_at(String apply_cancel_at) {
|
||||
this.apply_cancel_at = apply_cancel_at;
|
||||
}
|
||||
|
||||
public String getCancel_at() {
|
||||
return cancel_at;
|
||||
}
|
||||
|
||||
public void setCancel_at(String cancel_at) {
|
||||
this.cancel_at = cancel_at;
|
||||
}
|
||||
|
||||
public String getAudit_at() {
|
||||
return audit_at;
|
||||
}
|
||||
|
||||
public void setAudit_at(String audit_at) {
|
||||
this.audit_at = audit_at;
|
||||
}
|
||||
|
||||
public int getAudit_admin_id() {
|
||||
return audit_admin_id;
|
||||
}
|
||||
|
||||
public void setAudit_admin_id(int audit_admin_id) {
|
||||
this.audit_admin_id = audit_admin_id;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getArea_name() {
|
||||
return area_name;
|
||||
}
|
||||
|
||||
public void setArea_name(String area_name) {
|
||||
this.area_name = area_name;
|
||||
}
|
||||
|
||||
public String getLatest_transport() {
|
||||
return latest_transport;
|
||||
}
|
||||
|
||||
public void setLatest_transport(String latest_transport) {
|
||||
this.latest_transport = latest_transport;
|
||||
}
|
||||
|
||||
public OrderGoods getGoods() {
|
||||
return goods;
|
||||
}
|
||||
|
||||
public void setGoods(OrderGoods goods) {
|
||||
this.goods = goods;
|
||||
}
|
||||
|
||||
public ExpressInfo getExpress() {
|
||||
return express;
|
||||
}
|
||||
|
||||
public void setExpress(ExpressInfo express) {
|
||||
this.express = express;
|
||||
}
|
||||
|
||||
public AdminInfo getAdmin() {
|
||||
return admin;
|
||||
}
|
||||
|
||||
public void setAdmin(AdminInfo admin) {
|
||||
this.admin = admin;
|
||||
}
|
||||
}
|
||||
27
app/src/main/java/com/uiuios/aios/bean/OrderIndexData.java
Normal file
27
app/src/main/java/com/uiuios/aios/bean/OrderIndexData.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.uiuios.aios.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class OrderIndexData implements Serializable {
|
||||
private static final long serialVersionUID = -5597311809527387712L;
|
||||
|
||||
int current_page;
|
||||
List<OrderIndexBean> data;
|
||||
|
||||
public int getCurrent_page() {
|
||||
return current_page;
|
||||
}
|
||||
|
||||
public void setCurrent_page(int current_page) {
|
||||
this.current_page = current_page;
|
||||
}
|
||||
|
||||
public List<OrderIndexBean> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<OrderIndexBean> data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.blankj.utilcode.util.NetworkUtils;
|
||||
import com.uiui.video.bean.VideoInfo;
|
||||
import com.uiuios.aios.R;
|
||||
import com.uiuios.aios.activity.OrderListActivity;
|
||||
import com.uiuios.aios.adapter.KnowledgeVideoAdapter;
|
||||
import com.uiuios.aios.adapter.LivenVideoAdapter;
|
||||
import com.uiuios.aios.adapter.NewArticleAdapter;
|
||||
@@ -282,7 +283,7 @@ public class SecondFragment extends BaseFragment implements SecondContact.View,
|
||||
cl_service.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
startActivity(new Intent(mContext, OrderListActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ import com.uiuios.aios.bean.HealthCode;
|
||||
import com.uiuios.aios.bean.MapGeoBean;
|
||||
import com.uiuios.aios.bean.NetDesktopIcon;
|
||||
import com.uiuios.aios.bean.OrderBean;
|
||||
import com.uiuios.aios.bean.OrderIndexBean;
|
||||
import com.uiuios.aios.bean.OrderIndexData;
|
||||
import com.uiuios.aios.bean.RegionInfo;
|
||||
import com.uiuios.aios.bean.SnInfo;
|
||||
import com.uiuios.aios.bean.SystemSettings;
|
||||
@@ -76,6 +78,8 @@ import com.uiuios.aios.network.api.UpdateAppIconApi;
|
||||
import com.uiuios.aios.network.api.UpdateDesktopApi;
|
||||
import com.uiuios.aios.network.api.UserInfoControl;
|
||||
import com.uiuios.aios.network.api.amap.GeocodingApi;
|
||||
import com.uiuios.aios.network.api.order.AllOrderApi;
|
||||
import com.uiuios.aios.network.api.order.OrderIndexApi;
|
||||
import com.uiuios.aios.network.interceptor.RepeatRequestInterceptor;
|
||||
|
||||
import java.io.File;
|
||||
@@ -336,7 +340,7 @@ public class NetInterfaceManager {
|
||||
|
||||
public Observable<BaseResponse<ArticleList>> getArticleListObservable(int id) {
|
||||
return mRetrofit.create(ArticleCategorysListApi.class)
|
||||
.getArticleList(RemoteManager.getInstance().getSerial(),id)
|
||||
.getArticleList(RemoteManager.getInstance().getSerial(), id)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
@@ -467,6 +471,20 @@ public class NetInterfaceManager {
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<OrderIndexData>> getAllOrderObservable() {
|
||||
return mRetrofit.create(AllOrderApi.class)
|
||||
.getOrderIndex(RemoteManager.getInstance().getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<OrderIndexData>> getOrderIndexObservable(int status) {
|
||||
return mRetrofit.create(OrderIndexApi.class)
|
||||
.getOrderIndex(RemoteManager.getInstance().getSerial(), status)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
|
||||
public RegionListApi getRegionListApi() {
|
||||
return mRetrofit.create(RegionListApi.class);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.uiuios.aios.network.api.order;
|
||||
|
||||
import com.uiuios.aios.bean.BaseResponse;
|
||||
import com.uiuios.aios.bean.OrderIndexData;
|
||||
import com.uiuios.aios.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface AllOrderApi {
|
||||
@GET(UrlAddress.ORDER_INDEX)
|
||||
Observable<BaseResponse<OrderIndexData>> getOrderIndex(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.uiuios.aios.network.api.order;
|
||||
|
||||
import com.uiuios.aios.bean.BaseResponse;
|
||||
import com.uiuios.aios.bean.OrderIndexData;
|
||||
import com.uiuios.aios.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface OrderIndexApi {
|
||||
@GET(UrlAddress.ORDER_INDEX)
|
||||
Observable<BaseResponse<OrderIndexData>> getOrderIndex(
|
||||
@Query("sn") String sn,
|
||||
@Query("status") int status
|
||||
);
|
||||
}
|
||||
16
app/src/main/res/drawable/check_express_bg.xml
Normal file
16
app/src/main/res/drawable/check_express_bg.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FFFFFF" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/colorPrimary" />
|
||||
<padding
|
||||
android:bottom="@dimen/dp_4"
|
||||
android:left="@dimen/dp_8"
|
||||
android:right="@dimen/dp_8"
|
||||
android:top="@dimen/dp_4" />
|
||||
|
||||
<corners android:radius="@dimen/dp_4" />
|
||||
</shape>
|
||||
@@ -152,6 +152,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_service"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
|
||||
101
app/src/main/res/layout/activity_order_list.xml
Normal file
101
app/src/main/res/layout/activity_order_list.xml
Normal file
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.OrderListActivity">
|
||||
|
||||
<data>
|
||||
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout21"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back_black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:text="我的订单"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout21"
|
||||
app:tabSelectedTextColor="@color/red"
|
||||
app:tabTextAppearance="@style/TabLayoutTextStyle"
|
||||
app:tabTextColor="@color/black">
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全部" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="待付款" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="待发货" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="待收货" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="已签收" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="已评价" />
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_order"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tabLayout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -25,6 +25,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_exit"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
|
||||
108
app/src/main/res/layout/item_order.xml
Normal file
108
app/src/main/res/layout/item_order.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_statu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:textColor="@color/action_bar_red"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="已付款" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_goods"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_statu" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:maxLines="2"
|
||||
android:minLines="2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_unit_price"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_goods"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_goods"
|
||||
tools:text="商品标题" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_unit_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_goods"
|
||||
tools:text="0.00" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_unit_price"
|
||||
tools:text="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_paid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_goods"
|
||||
tools:text="实付:¥0元" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_express"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:background="@drawable/check_express_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_paid"
|
||||
android:text="查看物流" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user