当前位置:网站首页>JSON data format usage
JSON data format usage
2022-07-27 16:42:00 【Young people in Baima town】
public SearchOrderBean typeBean;//SearchOrderBean Inside the entity class are the data types and parameters returned by the background typeBean Accessible elsewhere
public void serchOrder() {
ActivateDevice mo = ShareInfo.getObject(ActivateDevice.class);
// Parameters
Map<String, String> map = new HashMap<>();
map.put(Constans.MERCHANTID, mo.getMerchantId());
map.put(Constans.STOREID, mo.getStoreId());
map.put(Constans.DEVICEID, mo.getDeviceId());
map.put(Constans.PAGE, page + "")
// Access interface
SSClient.getInstance().doRequest01(BaseParams.getBaseAddressUrl02(PosInterface.PAY_ORDER_LIST), map, new SSLCallBack() {
@Override
public void onFailed(Call call, IOException e) {
// Failure
}
@Override
public void onReponse(Call call, String response) {
// Parsing data
JSONObject jsonObject = JSON.parseObject(response);
String proInfo = jsonObject.getString("data");//data Fields in data
String tips = jsonObject.getString("tips");//tips Fields in data
typeBean = JSON.parseObject(response, SearchOrderBean.class);
Request data loading in the sub thread
((Activity) binding.getRoot().getContext()).runOnUiThread(new Runnable()
{
@Override
public void run() {
binding.recyclerView.setAdapter(mAdapter = new OneAddpter(binding.getRoot().getContext(),listdat ));
binding.recyclerView.setLayoutManager(new StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.VERTICAL));
mAdapter.notifyDataSetChanged();// Refresh changed data
// Set up item Click events for
mAdapter.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClickListener(View view, int position) {
Log.e("TAG", " You clicked item Click events for ");
Intent intent = new
Intent(binding.getRoot().getContext(),
OrderDetailActivity.class);
intent.putExtra("tradeNo",
typeBean.getData().getSmtransactionConditions().get(position).getTradeNo());
binding.getRoot().getContext().startActivity(intent);
}
});
}
});
}
});
}
边栏推荐
- OpenCV(二)——图像基本处理
- Configuration and application of gurobi in pycharm
- The method of inserting degree in word
- 收藏!0基础开源数据可视化平台FlyFish大屏开发指南
- Two methods of generating excel table with PHP
- Polynomial locus of order 5
- Reduce PDF document size (Reprint)
- AS更换背景主题以及背景图片
- Opencv (IV) -- image features and target detection
- Leetcode25 question: turn the linked list in a group of K -- detailed explanation of the difficult questions of the linked list
猜你喜欢

插入word中的图片保持高dpi方法

HowNet and Wanfang database download papers for free ----- several times faster than connecting to the school intranet (some schools Wanfang database does not support downloading)

MPC_ ORCA

TP5 paging some small points

OpenCV(五)——运动目标识别

CCF-201312-1

Kmeans implementation

Implementation of filler creator material editing tool

The 21st - -- the 30th time

Leetcode25 question: turn the linked list in a group of K -- detailed explanation of the difficult questions of the linked list
随机推荐
DRF learning notes (I): Data Serialization
Cubemx combined with IAR engineering transplantation
低代码是开发的未来吗?浅谈低代码平台
Gurobi——GRBEnv
Simulation生成报表
ADAMS中转动整个模型
2021 national vocational college skills competition (secondary vocational group) network security competition questions (9) ideas
Flowable process custom attribute
Kmeans implementation
Gurobi——GRBModel
After the cubemx is reconfigured, the generated code cannot be opened successfully with IAR
Implementation of filler creator material editing tool
C语言逆序输出字符串
指针总结
Script file ‘D:\programs\anaconda3\Scripts\pip-script. py‘ is not present.
const小结
最大子段和 Go 四种的四种求解
The difference and use between get request and post request
solidwork装配体导入到Adams中出现多个Part重名和Part丢失的情况处理
Mazak handwheel maintenance Mazak little giant CNC machine tool handle operator maintenance av-eahs-382-1