当前位置:网站首页>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);
}
});
}
});
}
});
}
边栏推荐
- 收藏!0基础开源数据可视化平台FlyFish大屏开发指南
- EXE程序加密锁
- Opencv (II) -- basic image processing
- 雪花ID(Go 实现)
- Simulation生成报表
- OpenCV(三)——图像分割
- The difference and use between get request and post request
- 【论文阅读】Single- and Cross-Modality Near Duplicate Image PairsDetection via Spatial Transformer Compar
- Casadi -- detailed explanation of data types and introduction to basic operations
- Unable to enter the function definition after transferring the IAR project folder to the directory
猜你喜欢
随机推荐
Filament Creator材质编辑工具的实现
爬取常见英文名
C channel simply implements the publishing and subscription of message queue
Find active SQL connections in SQL Server
补充—整数规划例题
第21回---第30回
ADAMS中转动整个模型
从零开始Blazor Server(1)--项目搭建
AS更换背景主题以及背景图片
google chrome revercecaptcha广告屏蔽
Exe program encryption lock
C language output string in reverse order
Replication of complex linked list
android中的图片三级缓存
2021-03-09
EXE程序加密锁
Json数据的格式使用
Configuration and application of gurobi in pycharm
Rotate the whole model in ADAMS
MPC_ ORCA








