提交 13e46ea1 编写于 作者: N nrd

修改了fee_info的数据类型

上级 b0a85ed2
...@@ -96,9 +96,7 @@ public class AlipayCallbackController { ...@@ -96,9 +96,7 @@ public class AlipayCallbackController {
//注意: //注意:
//付款完成后,支付宝系统发送该交易状态通知 //付款完成后,支付宝系统发送该交易状态通知
} }
out.println("success"); out.println("success");
} else {//验证失败 } else {//验证失败
out.println("fail"); out.println("fail");
......
...@@ -12,7 +12,7 @@ public class Enter { ...@@ -12,7 +12,7 @@ public class Enter {
private Date end_time_estimate; private Date end_time_estimate;
private Date end_time_actual; private Date end_time_actual;
private double fee_total; private double fee_total;
private int fee_info; private String fee_info;
private int user_id; private int user_id;
private String state; private String state;
private double price; private double price;
...@@ -21,6 +21,20 @@ public class Enter { ...@@ -21,6 +21,20 @@ public class Enter {
private String end_time_estimate1; private String end_time_estimate1;
private String end_time_actual1; private String end_time_actual1;
public Enter(int house_id, int customer_id, int customer_info, Date start_time, Date end_time_estimate, Date end_time_actual, double fee_total, String fee_info, int user_id, String state, double price) {
this.house_id = house_id;
this.customer_id = customer_id;
this.customer_info = customer_info;
this.start_time = start_time;
this.end_time_estimate = end_time_estimate;
this.end_time_actual = end_time_actual;
this.fee_total = fee_total;
this.fee_info = fee_info;
this.user_id = user_id;
this.state = state;
this.price = price;
}
public String getStart_time1() { public String getStart_time1() {
return start_time1; return start_time1;
} }
...@@ -135,13 +149,7 @@ public class Enter { ...@@ -135,13 +149,7 @@ public class Enter {
this.fee_total = fee_total; this.fee_total = fee_total;
} }
public int getFee_info() {
return fee_info;
}
public void setFee_info(int fee_info) {
this.fee_info = fee_info;
}
public int getUser_id() { public int getUser_id() {
return user_id; return user_id;
...@@ -159,14 +167,20 @@ public class Enter { ...@@ -159,14 +167,20 @@ public class Enter {
this.state = state; this.state = state;
} }
public String getFee_info() {
return fee_info;
}
public void setFee_info(String fee_info) {
this.fee_info = fee_info;
}
public void setPrice(float price) { public void setPrice(float price) {
this.price = price; this.price = price;
} }
public Enter(int house_id, int customer_id, int customer_info, Date start_time, Date end_time_estimate, Date end_time_actual, double fee_total, String fee_info, int user_id, String state, double price, String start_time1, String end_time_estimate1, String end_time_actual1, List<Customer> customers) {
public Enter(int house_id, int customer_id, int customer_info, Date start_time, Date end_time_estimate, Date end_time_actual, double fee_total, int fee_info, int user_id, String state, double price) { this.enter_id = enter_id;
this.house_id = house_id; this.house_id = house_id;
this.customer_id = customer_id; this.customer_id = customer_id;
this.customer_info = customer_info; this.customer_info = customer_info;
...@@ -178,27 +192,12 @@ public class Enter { ...@@ -178,27 +192,12 @@ public class Enter {
this.user_id = user_id; this.user_id = user_id;
this.state = state; this.state = state;
this.price = price; this.price = price;
this.start_time1 = start_time1;
this.end_time_estimate1 = end_time_estimate1;
this.end_time_actual1 = end_time_actual1;
this.customers = customers;
} }
public Enter() { public Enter() {
} }
@Override
public String toString() {
return "Enter{" +
"enter_id=" + enter_id +
", house_id='" + house_id + '\'' +
", customer_id=" + customer_id +
", customer_info='" + customer_info + '\'' +
", start_time1='" + start_time1 + '\'' +
", end_time_estimate1='" + end_time_estimate1 + '\'' +
", end_time_actual1='" + end_time_actual1 + '\'' +
", fee_total=" + fee_total +
", fee_info=" + fee_info +
", user_id=" + user_id +
", state='" + state + '\'' +
", price=" + price +
", customers=" + customers +
'}';
}
} }
...@@ -332,6 +332,7 @@ public class HouseServiceImpl implements HouseService { ...@@ -332,6 +332,7 @@ public class HouseServiceImpl implements HouseService {
Date time3 = new Date(time2); Date time3 = new Date(time2);
//如果房间是空闲则之间可以入住 //如果房间是空闲则之间可以入住
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String fee_info = Long.toString(System.currentTimeMillis());
if (house.getState().equals("空闲")) { if (house.getState().equals("空闲")) {
double money = house.getPrice() * day; double money = house.getPrice() * day;
//如果余额不足则会提示 //如果余额不足则会提示
...@@ -340,7 +341,7 @@ public class HouseServiceImpl implements HouseService { ...@@ -340,7 +341,7 @@ public class HouseServiceImpl implements HouseService {
customerDao.updataByCustomerIdToremainder(0, customerId); customerDao.updataByCustomerIdToremainder(0, customerId);
//插入顾客表 //插入顾客表
enterDao.inserintoEnter(new Enter(house.getHouseId(), customerId, enterDao.inserintoEnter(new Enter(house.getHouseId(), customerId,
numberOfPeople, time, time3, null, 0, 1, userId, "未结账", house.getPrice())); numberOfPeople, time, time3, null, 0, fee_info, userId, "未结账", house.getPrice()));
//设置时间格式为yyyy-MM-dd HH:mm:ss以便插入 //设置时间格式为yyyy-MM-dd HH:mm:ss以便插入
//规范化插入表时的时间和获取的时间有点误差 //规范化插入表时的时间和获取的时间有点误差
Enter enter = enterDao.queryByHouseIdAndLimitOne(house.getHouseId()); Enter enter = enterDao.queryByHouseIdAndLimitOne(house.getHouseId());
...@@ -354,9 +355,10 @@ public class HouseServiceImpl implements HouseService { ...@@ -354,9 +355,10 @@ public class HouseServiceImpl implements HouseService {
} else { } else {
//更新顾客表余额的数据 //更新顾客表余额的数据
customerDao.updataByCustomerIdToremainder(money, customerId); customerDao.updataByCustomerIdToremainder(money, customerId);
//插入顾客表 //插入顾客表
enterDao.inserintoEnter(new Enter(house.getHouseId(), customerId, enterDao.inserintoEnter(new Enter(house.getHouseId(), customerId,
numberOfPeople, time, time3, null, money, 1, userId, "已结账", house.getPrice())); numberOfPeople, time, time3, null, money, fee_info,userId, "已结账", house.getPrice()));
//设置时间格式为yyyy-MM-dd HH:mm:ss以便插入 //设置时间格式为yyyy-MM-dd HH:mm:ss以便插入
//规范化插入表时的时间和获取的时间有点误差 //规范化插入表时的时间和获取的时间有点误差
Enter enter = enterDao.queryByHouseIdAndLimitOne(house.getHouseId()); Enter enter = enterDao.queryByHouseIdAndLimitOne(house.getHouseId());
...@@ -379,7 +381,7 @@ public class HouseServiceImpl implements HouseService { ...@@ -379,7 +381,7 @@ public class HouseServiceImpl implements HouseService {
customerDao.updataByCustomerIdToremainder(0, customerId); customerDao.updataByCustomerIdToremainder(0, customerId);
//插入顾客表 //插入顾客表
enterDao.inserintoEnter(new Enter(house.getHouseId(), customerId, enterDao.inserintoEnter(new Enter(house.getHouseId(), customerId,
numberOfPeople, time, time3, null, 0, 1, userId, "未缴费", house.getPrice())); numberOfPeople, time, time3, null, 0, fee_info, userId, "未缴费", house.getPrice()));
//设置时间格式为yyyy-MM-dd HH:mm:ss以便插入 //设置时间格式为yyyy-MM-dd HH:mm:ss以便插入
//规范化插入表时的时间和获取的时间有点误差 //规范化插入表时的时间和获取的时间有点误差
Enter enter = enterDao.queryByHouseIdAndLimitOne(house.getHouseId()); Enter enter = enterDao.queryByHouseIdAndLimitOne(house.getHouseId());
...@@ -397,7 +399,7 @@ public class HouseServiceImpl implements HouseService { ...@@ -397,7 +399,7 @@ public class HouseServiceImpl implements HouseService {
customerDao.updataByCustomerIdToremainder(money, customerId); customerDao.updataByCustomerIdToremainder(money, customerId);
//插入顾客表 //插入顾客表
enterDao.inserintoEnter(new Enter(house.getHouseId(), customerId, enterDao.inserintoEnter(new Enter(house.getHouseId(), customerId,
numberOfPeople, time, time3, null, money, 1, userId, "已结账", house.getPrice())); numberOfPeople, time, time3, null, money, fee_info, userId, "已结账", house.getPrice()));
//设置时间格式为yyyy-MM-dd HH:mm:ss以便插入 //设置时间格式为yyyy-MM-dd HH:mm:ss以便插入
//规范化插入表时的时间和获取的时间有点误差 //规范化插入表时的时间和获取的时间有点误差
Enter enter = enterDao.queryByHouseIdAndLimitOne(house.getHouseId()); Enter enter = enterDao.queryByHouseIdAndLimitOne(house.getHouseId());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册