bugfix merge remote了以后出现了玄学问题,服了
This commit is contained in:
parent
131e44eac3
commit
52c3c4fd50
@ -30,38 +30,20 @@ public class IndentItemView {
|
||||
int flag = 0;
|
||||
while (!reader.hasNext("end")) {
|
||||
IndentItem IItem = new IndentItem();
|
||||
String s;
|
||||
String[] sn;
|
||||
while (!reader.hasNext("end")) {
|
||||
s = reader.nextLine();
|
||||
sn = s.split("\\s+");
|
||||
//菜名
|
||||
IItem.setName(sn[0]);
|
||||
//初始价格
|
||||
IItem.setInitialPrice(Float.valueOf(sn[1]));
|
||||
//折扣
|
||||
if (sn[3] != null) {
|
||||
IItem.setDiscount(Float.valueOf(sn[2]));
|
||||
} else {
|
||||
IItem.setDiscount(-1F);
|
||||
}
|
||||
//描述
|
||||
if (sn[3] != null) {
|
||||
IItem.setDescription(sn[3]);
|
||||
}
|
||||
//菜名
|
||||
IItem.setName(reader.next());
|
||||
//初始价格
|
||||
IItem.setInitialPrice(reader.nextFloat());
|
||||
//折扣
|
||||
if (reader.hasNextFloat()) {
|
||||
IItem.setDiscount(reader.nextFloat());
|
||||
} else {
|
||||
IItem.setDiscount(-1F);
|
||||
}
|
||||
//描述
|
||||
if (!reader.hasNext("end") && !Objects.equals(reader.nextLine(), " ")) {
|
||||
IItem.setDescription(reader.nextLine());
|
||||
}
|
||||
// IItem.setName(reader.next());
|
||||
// IItem.setInitialPrice(reader.nextFloat());
|
||||
|
||||
// if (reader.hasNextFloat()) {
|
||||
// IItem.setDiscount(reader.nextFloat());
|
||||
// } else {
|
||||
// IItem.setDiscount(-1F);
|
||||
// }
|
||||
|
||||
// if (!reader.hasNext("end") && !Objects.equals(reader.nextLine(), " ")) {
|
||||
// IItem.setDescription(reader.nextLine());
|
||||
// }
|
||||
//菜单ID
|
||||
indentDAO indent = new indentDAO();
|
||||
IItem.setIndentID(indent.searchID(indentID));
|
||||
|
Loading…
Reference in New Issue
Block a user