|
|
@@ -588,9 +588,11 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
public WxCreditHistory saveOrUpdate(WxCreditHistory record,TenantEntity tenantEntity) { |
|
|
public WxCreditHistory saveOrUpdate(WxCreditHistory record,TenantEntity tenantEntity) { |
|
|
WxCreditHistory history = wxCreditHistoryMapper.selectOne(new LambdaQueryWrapper<WxCreditHistory>().eq(WxCreditHistory::getTicketNumber, record.getTicketNumber())); |
|
|
|
|
|
if (history != null){ |
|
|
|
|
|
throw new MallinkException(ErrorCode.SMALL_TICKET_IS_USED); |
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(record.getTicketNumber())){ |
|
|
|
|
|
WxCreditHistory history = wxCreditHistoryMapper.selectOne(new LambdaQueryWrapper<WxCreditHistory>().eq(WxCreditHistory::getTicketNumber, record.getTicketNumber())); |
|
|
|
|
|
if (history != null){ |
|
|
|
|
|
throw new MallinkException(ErrorCode.SMALL_TICKET_IS_USED); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(record.getCUserId(),record.getTenantId()); |
|
|
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(record.getCUserId(),record.getTenantId()); |
|
|
if (wxCUserBasicInfo == null) { |
|
|
if (wxCUserBasicInfo == null) { |
|
|
|