fix: 优惠券使用报错修复

This commit is contained in:
张松
2024-11-13 14:13:46 +08:00
parent 4556bf24cd
commit ced9197698

View File

@@ -319,7 +319,7 @@ public class TbShopCouponServiceImpl extends ServiceImpl<TbShopCouponMapper, TbS
TbActivateInRecord inRecord = inRecordMapper.selectById(outRecord.getGiveId()); TbActivateInRecord inRecord = inRecordMapper.selectById(outRecord.getGiveId());
if (inRecord.getSource() != null && inRecord.getSource().equals("invited")) { if (inRecord.getSource() != null && inRecord.getSource().equals("invited")) {
TbShopShareRecord shareRecord = shareRecordService.getById(inRecord.getSourceActId()); TbShopShareRecord shareRecord = shareRecordService.getById(inRecord.getSourceActId());
if (shareRecord.getMethod().equals("use")) { if (shareRecord != null && shareRecord.getMethod().equals("use")) {
shareRecord.setStatus(3); shareRecord.setStatus(3);
shareRecordService.give(shareRecord,shareRecord.getInvitedId()); shareRecordService.give(shareRecord,shareRecord.getInvitedId());
shareRecordService.updateById(shareRecord); shareRecordService.updateById(shareRecord);