fix: 优惠券使用报错修复
This commit is contained in:
@@ -317,7 +317,7 @@ public class TbShopCouponServiceImpl extends ServiceImpl<TbShopCouponMapper, TbS
|
|||||||
public boolean use(Integer shopId, Integer orderId, Integer vipUserId, List<TbActivateOutRecord> param) {
|
public boolean use(Integer shopId, Integer orderId, Integer vipUserId, List<TbActivateOutRecord> param) {
|
||||||
for (TbActivateOutRecord outRecord : param) {
|
for (TbActivateOutRecord outRecord : param) {
|
||||||
TbActivateInRecord inRecord = inRecordMapper.selectById(outRecord.getGiveId());
|
TbActivateInRecord inRecord = inRecordMapper.selectById(outRecord.getGiveId());
|
||||||
if (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.getMethod().equals("use")) {
|
||||||
shareRecord.setStatus(3);
|
shareRecord.setStatus(3);
|
||||||
|
|||||||
Reference in New Issue
Block a user