MTing 4 days ago
parent
commit
784681f78d
  1. 28
      app/src/main/java/com/ouxuan/oxface/orderOX/OrderVerificationResultActivity.java

28
app/src/main/java/com/ouxuan/oxface/orderOX/OrderVerificationResultActivity.java

@ -117,6 +117,31 @@ public class OrderVerificationResultActivity extends AppCompatActivity {
if (project == null) project = ""; if (project == null) project = "";
} }
/**
* 根据订单类型数字获取对应的中文名称
* @param orderType 订单类型数字
* @return 对应的中文名称
*/
private String getOrderTypeName(String orderType) {
try {
int type = Integer.parseInt(orderType);
switch (type) {
case 0:
return "场次";
case 1:
return "人次";
case 3:
return "年月卡";
case 5:
return "课程";
default:
return "orderType:"+type;
}
} catch (NumberFormatException e) {
return "未知订单类型";
}
}
private void updateUI() { private void updateUI() {
// 根据验证类型设置标题 // 根据验证类型设置标题
switch (verificationType) { switch (verificationType) {
@ -140,7 +165,8 @@ public class OrderVerificationResultActivity extends AppCompatActivity {
// 更新UI内容 // 更新UI内容
tvOrderNo.setText(orderNo); tvOrderNo.setText(orderNo);
tvVerificationCode.setText(verificationCode); tvVerificationCode.setText(verificationCode);
tvOrderType.setText(orderType);
// 使用 getOrderTypeName 方法转换订单类型显示
tvOrderType.setText(getOrderTypeName(orderType));
tvCardNo.setText(cardNo); tvCardNo.setText(cardNo);
tvStatus.setText(status); tvStatus.setText(status);

Loading…
Cancel
Save