Commit 52bfa24e by sdif

添加科室非空判断

parent ae2594b7
......@@ -514,7 +514,9 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
totalOrderVo.setPayMoney(bo.getPayMoney());
if(null != bo.getDepartmentId() && bo.getDepartmentId() != 0){
bo.setDidName(departmentMapper.selectById(bo.getDepartmentId()).getTitle());
Optional.ofNullable(departmentMapper.selectById(bo.getDepartmentId()))
.map(Department::getTitle)
.ifPresent(bo::setDidName);
}
// 计算订单过期时间(当前时间加上30分钟)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment