|
@@ -81,14 +81,14 @@ public class SupplierServiceImpl extends ServiceImpl<ChannelSupplierMapper, Chan
|
|
|
int result = baseMapper.update(channelSupplier, lambdaUpdateWrapper);
|
|
|
if (result > 0) {
|
|
|
rocketMQTemplate.send(UPDATE_TOPIC + ":" + SUPPLIER_TAG, MessageBuilder.withPayload(SUPPLIER_TAG).build());
|
|
|
+ log.info("供应商已修改为:【{}】", channelSupplier);
|
|
|
}
|
|
|
- log.info("供应商已修改为:【{}】", channelSupplier);
|
|
|
if (ObjectUtil.isNotEmpty(channelSupplier.getBankCards())) {
|
|
|
/**
|
|
|
把供应商编号写入添加的银行里面
|
|
|
*/
|
|
|
channelSupplier.getBankCards().forEach(bankCard -> {
|
|
|
- bankCard.setRelationId(channelSupplier.getSupplierId().intValue());
|
|
|
+ bankCard.setRelationId(channelSupplier.getSupplierId());
|
|
|
});
|
|
|
|
|
|
bankCardService.saveBankCards(channelSupplier.getBankCards());
|
|
@@ -104,25 +104,25 @@ public class SupplierServiceImpl extends ServiceImpl<ChannelSupplierMapper, Chan
|
|
|
int result = baseMapper.insert(channelSupplier);
|
|
|
if (result > 0) {
|
|
|
rocketMQTemplate.send(UPDATE_TOPIC + ":" + SUPPLIER_TAG, MessageBuilder.withPayload(SUPPLIER_TAG).build());
|
|
|
+ log.info("添加的供应商是:【{}】", channelSupplier);
|
|
|
}
|
|
|
- log.info("添加的供应商是:【{}】", channelSupplier);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void deleteSupplierById(Integer id) {
|
|
|
+ public void deleteSupplierById(Long id) {
|
|
|
if (id != null) {
|
|
|
int result = baseMapper.deleteById(id);
|
|
|
if (result > 0) {
|
|
|
rocketMQTemplate.send(UPDATE_TOPIC + ":" + SUPPLIER_TAG, MessageBuilder.withPayload(SUPPLIER_TAG).build());
|
|
|
+ log.info("编号为:【{}】的供应商删除成功!", id);
|
|
|
}
|
|
|
- log.info("编号为:【{}】的供应商删除成功!", id);
|
|
|
} else {
|
|
|
throw new BaseException(Status.PARAM_ERROR.status(), Status.PARAM_ERROR.message());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void deleteBankCardById(Integer bankId) {
|
|
|
+ public void deleteBankCardById(Long bankId) {
|
|
|
if (bankId != null) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("id", bankId);
|
|
@@ -133,5 +133,4 @@ public class SupplierServiceImpl extends ServiceImpl<ChannelSupplierMapper, Chan
|
|
|
throw new BaseException(Status.PARAM_ERROR.status(), Status.PARAM_ERROR.message());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|