| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | Page page1 = customerVisitsMapper.selectPage(page, customerVisitsLambdaQueryWrapper); |
| | | return page1; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean updateCustomerVisit(CustomerVisits customerVisits) { |
| | | if (customerVisits == null || customerVisits.getId() == null) { |
| | | return false; |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(customerVisits.getCustomerName()) |
| | | || StringUtils.isEmpty(customerVisits.getPurposeVisit()) |
| | | || StringUtils.isEmpty(customerVisits.getVisitAddress()) |
| | | || StringUtils.isEmpty(customerVisits.getPurposeDate())) { |
| | | return false; |
| | | } |
| | | |
| | | return updateById(customerVisits); |
| | | } |
| | | } |