|
@@ -2,6 +2,7 @@ package com.fire.admin.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -43,8 +44,7 @@ public class SupplierServiceImpl extends ServiceImpl<ChannelSupplierMapper, Chan
|
|
|
|
|
|
if (supplierList != null) {
|
|
if (supplierList != null) {
|
|
for (ChannelSupplier supplier : supplierList.getRecords()) {
|
|
for (ChannelSupplier supplier : supplierList.getRecords()) {
|
|
- // TODO 这里是获取供应商的银行卡,所以值写死 【六六补充】
|
|
|
|
- supplier.setBankCards(bankCardService.getBankCardList(supplier.getSupplierId(), 1));
|
|
|
|
|
|
+ supplier.setBankCards(bankCardService.getBankCardList(supplier.getRelationId()));
|
|
}
|
|
}
|
|
return supplierList;
|
|
return supplierList;
|
|
} else {
|
|
} else {
|
|
@@ -54,15 +54,17 @@ public class SupplierServiceImpl extends ServiceImpl<ChannelSupplierMapper, Chan
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<ChannelSupplier> getSupplierInfo() {
|
|
public List<ChannelSupplier> getSupplierInfo() {
|
|
|
|
+ QueryWrapper<ChannelSupplier> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.select("relation_id", "supplierName");
|
|
return baseMapper.selectList(null);
|
|
return baseMapper.selectList(null);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void updateSupplierBySupplierId(ChannelSupplier channelSupplier) {
|
|
|
|
|
|
+ public void updateSupplierByRelationId(ChannelSupplier channelSupplier) {
|
|
channelSupplier.setUpdator("admin");
|
|
channelSupplier.setUpdator("admin");
|
|
channelSupplier.setUpdateTime(new Date());
|
|
channelSupplier.setUpdateTime(new Date());
|
|
LambdaUpdateWrapper<ChannelSupplier> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
|
LambdaUpdateWrapper<ChannelSupplier> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
|
- lambdaUpdateWrapper.eq(channelSupplier.getSupplierId() != null, ChannelSupplier::getSupplierId, channelSupplier.getSupplierId());
|
|
|
|
|
|
+ lambdaUpdateWrapper.eq(channelSupplier.getRelationId() != null, ChannelSupplier::getRelationId, channelSupplier.getRelationId());
|
|
int result = baseMapper.update(channelSupplier, lambdaUpdateWrapper);
|
|
int result = baseMapper.update(channelSupplier, lambdaUpdateWrapper);
|
|
if (result > 0) {
|
|
if (result > 0) {
|
|
// TODO: 2021/5/18 向MQ推送消息
|
|
// TODO: 2021/5/18 向MQ推送消息
|