| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.CustomerDto; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpDto; |
| | | import com.ruoyi.basic.dto.CustomerPrivatePoolDto; |
| | | import com.ruoyi.basic.mapper.CustomerPrivateMapper; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.mapper.CustomerPrivatePoolMapper; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.service.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | return customerPrivatePoolMapper.selectInfos(); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean throwCustomer(List<Long> ids) { |
| | | for (Long id : ids) { |
| | | CustomerPrivatePoolDto customerPrivatePoolDto = customerPrivatePoolMapper.selectInfo(id); |
| | | if (ObjectUtils.isNotEmpty(customerPrivatePoolDto)) { |
| | | CustomerPrivate customerPrivate = customerPrivateMapper.selectById(customerPrivatePoolDto.getCustomerId()); |
| | | Customer customer = new Customer(); |
| | | BeanUtils.copyProperties(customerPrivate, customer); |
| | | customer.setId(null); |
| | | customer.setUsageUser(SecurityUtils.getLoginUser().getUserId()); |
| | | customer.setUsageStatus(1L); |
| | | customerService.save(customer); |
| | | customerPrivatePoolDto.setCustomerId(customer.getId()); |
| | | customerPrivatePoolDto.setType(1L); |
| | | customerPrivatePoolMapper.updateById(customerPrivatePoolDto); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | } |