|
@@ -179,8 +179,6 @@ public class PtCardServiceImpl implements IPtCardService {
|
|
|
bo.setCardId(add.getCardId());
|
|
bo.setCardId(add.getCardId());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- PtCardVo vo = baseMapper.selectVoById(bo.getCardId());
|
|
|
|
|
- //kafkaNormalProducer.sendKafkaMessage(KafkaTopicConstants.SYNC_DATA_TOPIC, EventTypeConstants.CARD, EventSenderEnum.BACKSTAGE.code(), vo);
|
|
|
|
|
return flag;
|
|
return flag;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -195,9 +193,11 @@ public class PtCardServiceImpl implements IPtCardService {
|
|
|
PtCard update = MapstructUtils.convert(bo, PtCard.class);
|
|
PtCard update = MapstructUtils.convert(bo, PtCard.class);
|
|
|
validEntityBeforeSave(update);
|
|
validEntityBeforeSave(update);
|
|
|
int count = baseMapper.updateById(update);
|
|
int count = baseMapper.updateById(update);
|
|
|
- PtCardVo vo = baseMapper.selectVoById(bo.getCardId());
|
|
|
|
|
- //kafkaNormalProducer.sendKafkaMessage(KafkaTopicConstants.SYNC_DATA_TOPIC, EventTypeConstants.CARD, EventSenderEnum.BACKSTAGE.code(), vo);
|
|
|
|
|
- return count > 0;
|
|
|
|
|
|
|
+ if (count > 0) {
|
|
|
|
|
+ resetCardCache(bo.getCardId());
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -457,6 +457,9 @@ public class PtCardServiceImpl implements IPtCardService {
|
|
|
PtCardVo vo = baseMapper.selectVoById(entity.getCardId());
|
|
PtCardVo vo = baseMapper.selectVoById(entity.getCardId());
|
|
|
PtCardtypeVo cardTypeVo = cardTypeService.queryByCode(vo.getCardType());
|
|
PtCardtypeVo cardTypeVo = cardTypeService.queryByCode(vo.getCardType());
|
|
|
vo.setCardTypeName(cardTypeVo.getTypeName());
|
|
vo.setCardTypeName(cardTypeVo.getTypeName());
|
|
|
|
|
+
|
|
|
|
|
+ //更新缓存
|
|
|
|
|
+ resetCardCache(entity.getCardId());
|
|
|
return vo;
|
|
return vo;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -505,7 +508,14 @@ public class PtCardServiceImpl implements IPtCardService {
|
|
|
lpw.eq(bo.getFactoryId() != null, PtCard::getFactoryId, bo.getFactoryId());
|
|
lpw.eq(bo.getFactoryId() != null, PtCard::getFactoryId, bo.getFactoryId());
|
|
|
lpw.eq(bo.getCardNo() != null, PtCard::getCardNo, bo.getCardNo());
|
|
lpw.eq(bo.getCardNo() != null, PtCard::getCardNo, bo.getCardNo());
|
|
|
|
|
|
|
|
- return baseMapper.update(null, lpw) > 0;
|
|
|
|
|
|
|
+ int iCount = baseMapper.update(null, lpw);
|
|
|
|
|
+ if (iCount > 0) {
|
|
|
|
|
+ List<PtCardVo> list = getList(bo);
|
|
|
|
|
+ // 回收后需要更新缓存
|
|
|
|
|
+ resetCardCache(list.get(0).getCardId());
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|