|
@@ -10,8 +10,7 @@ import com.fire.dto.ChannelSupplier;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author: admin
|
|
* @author: admin
|
|
@@ -30,6 +29,7 @@ public class SupplierServiceImpl extends ServiceImpl<ChannelSupplierMapper,Chann
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void updateSupplierBySupplierId(ChannelSupplier channelSupplier) {
|
|
public void updateSupplierBySupplierId(ChannelSupplier channelSupplier) {
|
|
|
|
+ channelSupplier.setUpdateTime(new Date());
|
|
UpdateWrapper<ChannelSupplier> updateWrapper = new UpdateWrapper<>();
|
|
UpdateWrapper<ChannelSupplier> updateWrapper = new UpdateWrapper<>();
|
|
updateWrapper.eq("supplier_id", channelSupplier.getSupplierId());
|
|
updateWrapper.eq("supplier_id", channelSupplier.getSupplierId());
|
|
int result = baseMapper.update(channelSupplier, updateWrapper);
|
|
int result = baseMapper.update(channelSupplier, updateWrapper);
|
|
@@ -40,6 +40,7 @@ public class SupplierServiceImpl extends ServiceImpl<ChannelSupplierMapper,Chann
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void saveSupplier(ChannelSupplier channelSupplier) {
|
|
public void saveSupplier(ChannelSupplier channelSupplier) {
|
|
|
|
+ channelSupplier.setCreateTime(new Date());
|
|
int result = baseMapper.insert(channelSupplier);
|
|
int result = baseMapper.insert(channelSupplier);
|
|
if (result > 0) {
|
|
if (result > 0) {
|
|
// TODO:2021/5/18 向MQ推送消息
|
|
// TODO:2021/5/18 向MQ推送消息
|
|
@@ -47,10 +48,8 @@ public class SupplierServiceImpl extends ServiceImpl<ChannelSupplierMapper,Chann
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void deleteSupplierBySupplierId(String supplierId) {
|
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
|
- map.put("supplier_id", supplierId);
|
|
|
|
- int result = baseMapper.deleteByMap(map);
|
|
|
|
|
|
+ public void deleteSupplierBySupplierId(Integer supplierId) {
|
|
|
|
+ int result = baseMapper.deleteSupplierById(supplierId);
|
|
if (result > 0) {
|
|
if (result > 0) {
|
|
// TODO:2021/5/18 向MQ推送消息
|
|
// TODO:2021/5/18 向MQ推送消息
|
|
}
|
|
}
|