提交 6d4f27c6 编写于 作者: N nrd

优化二楼houseserviceimpl的代码

上级 c0d121ad
......@@ -291,18 +291,13 @@ public class HouseServiceImpl implements HouseService {
Date date1 = new Date();
enterDao.updateByHouseIdAndCustomerId(date1, houseId, customerId);
Enter enter = enterDao.selectByHouseIdAndCustomerId(houseId, customerId);
System.out.println(enter);
Date date2 = enter.getEnd_time_estimate();
DecimalFormat df = new DecimalFormat("#.##");
long day = (date2.getTime() - date1.getTime()) / 24 / 60 / 60 / 1000;
double money = day * price;
System.out.println(money);
System.out.println(df.format(money));
customerDao.updataByCustomerIdToremainderTwo(money, customerId);
Fee fee = feedao.queryByHouseIdAndCoustomerId(houseId, customerId);
System.out.println(fee);
int feeId = fee.getFeeId();
System.out.println(feeId);
String feeddirect = fee.getDirect();
if (feeddirect.equals("未缴费"))
feedao.updateByFeeId(feeId);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册