| | |
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void invalidHongBaoV2AndGiveGodenCorn(Long hongBaoId, Long uid, String orderId, int sourceType,
|
| | | String beiZhu) throws Exception {
|
| | | HongBaoOrder hongbaoOrder = hongBaoOrderMapper.selectByHongBaoId(hongBaoId);
|
| | | if (hongbaoOrder != null) {
|
| | | CommonOrder commonOrder = commonOrderService.selectByPrimaryKey(hongbaoOrder.getCommonOrder().getId());
|
| | | if (commonOrder != null) {
|
| | | if (commonOrder.getState() == CommonOrder.STATE_FK) {
|
| | | CommonOrder updateOrder = new CommonOrder(commonOrder.getId());
|
| | | updateOrder.setState(CommonOrder.STATE_SX);
|
| | | updateOrder.setUpdateTime(new Date());
|
| | | commonOrderService.updateByPrimaryKeySelective(updateOrder);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | HongBaoV2 hongBao = hongBaoV2Service.selectByPrimaryKey(hongBaoId);
|
| | | if (hongBao == null || hongBao.getState() == HongBaoV2.STATE_SHIXIAO)
|
| | | return;
|
| | |
|
| | | HongBaoV2 v2 = new HongBaoV2(hongBaoId);
|
| | | v2.setState(HongBaoV2.STATE_SHIXIAO);
|
| | | v2.setBeizhu(beiZhu);
|