|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fire.admin.dto.CustomerDto;
|
|
|
import com.fire.admin.mapper.CustomerMapper;
|
|
|
import com.fire.admin.mapper.FlowAppMapper;
|
|
|
+import com.fire.admin.service.BankCardService;
|
|
|
import com.fire.admin.service.CustomerService;
|
|
|
import com.fire.admin.util.SecurityUtil;
|
|
|
import com.fire.admin.vo.CustomerInfoVo;
|
|
@@ -21,6 +22,8 @@ import redis.clients.jedis.JedisCluster;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.fire.dto.enums.RedisKey.CUSTOMER_AMOUNT;
|
|
|
|
|
@@ -40,6 +43,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, CustomerInf
|
|
|
@Autowired
|
|
|
private FlowAppMapper flowAppMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private BankCardService bankCardService;
|
|
|
+
|
|
|
/**
|
|
|
* @Description: TODO 分页获取客户信息
|
|
|
* @Param: 查询条件,根据客户名称模糊查询
|
|
@@ -49,7 +55,11 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, CustomerInf
|
|
|
*/
|
|
|
@Override
|
|
|
public IPage<CustomerInfoVo> getCustomerInfoPage(Page page, CustomerDto customerDto) {
|
|
|
- return baseMapper.queryCustomerInfoPage(page, customerDto);
|
|
|
+ IPage<CustomerInfoVo> customerInfoVoIPage = baseMapper.queryCustomerInfoPage(page, customerDto);
|
|
|
+ List<Long> customerIds = customerInfoVoIPage.getRecords().stream().map(CustomerInfoVo::getCustomerId).collect(Collectors.toList());
|
|
|
+
|
|
|
+
|
|
|
+ return customerInfoVoIPage;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -135,6 +145,11 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, CustomerInf
|
|
|
.priceCheck(customerDto.getPriceCheck()).build();
|
|
|
|
|
|
int count = baseMapper.updateById(customerInfo);
|
|
|
+
|
|
|
+ if (!customerDto.getBankCards().isEmpty()){
|
|
|
+ bankCardService.saveBankCards(customerDto.getBankCards());
|
|
|
+ }
|
|
|
+
|
|
|
if(count>0){
|
|
|
log.info("------------------------- 客户修改成功,发送消息到相应的topic --------------------------------");
|
|
|
}
|