Board logo

标题: Java中dto里使用方法返回变量的枚举值 [打印本页]

作者: xiexie    时间: 2023-3-2 16:39     标题: Java中dto里使用方法返回变量的枚举值

public class UserBbxOrderAddRespDto {
private Integer addId;
private String lotteryName;
private String expertName = "";
private String username = "";
//追加期次
private String issues;
//消费/收入金额
private String money;
private String platMoney = "0";
private String expertMoney = "0";
private String status;
private List<UserBbxOrderAddRespDto> addDetail;
private String addTime;
public String getStatuName(){
if(this.status.equals("1")){
return "进行中";
} else if(this.status.equals("2")){
return "订阅完成";
} else if(this.status.equals("3")){
return "已结算";
}
return "";
}
}





欢迎光临 PHP开发笔记 (http://phpvi.com/) Powered by Discuz! 6.1.0