| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean updateCustomerVisit(CustomerVisits customerVisits) { |
| | | if (customerVisits == null || customerVisits.getId() == null) { |
| | | return false; |
| | | throw new RuntimeException("客户ID不能为空"); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(customerVisits.getCustomerName()) |
| | | || StringUtils.isEmpty(customerVisits.getPurposeVisit()) |
| | | || StringUtils.isEmpty(customerVisits.getVisitAddress()) |
| | | || StringUtils.isEmpty(customerVisits.getPurposeDate())) { |
| | | return false; |
| | | throw new RuntimeException("客户名称、拜访目的、拜访地址、拜访时间不能为空"); |
| | | } |
| | | |
| | | return updateById(customerVisits); |