| @@ -72,7 +72,7 @@ public class WxGameController extends BaseController { | |||||
| try { | try { | ||||
| Long gameIdL = Long.valueOf(paramMap.get("gameId")); | Long gameIdL = Long.valueOf(paramMap.get("gameId")); | ||||
| Long orderIdL = Long.valueOf(paramMap.get("orderId")); | Long orderIdL = Long.valueOf(paramMap.get("orderId")); | ||||
| return wxGameService.addActionLog(getMemberId(), gameIdL, orderIdL); | |||||
| return wxGameService.addActionLog(getMemberId(), gameIdL, orderIdL,getTenantInfo()); | |||||
| } catch (Exception e){ | } catch (Exception e){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | ||||
| } | } | ||||
| @@ -295,7 +295,7 @@ public class PosServiceImpl implements PosService { | |||||
| logger.error(e.getMessage()); | logger.error(e.getMessage()); | ||||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_CAST_ERROR.getCode(), e.getMessage()); | throw new MallinkException(ErrorCode.SYS_PARAMETER_CAST_ERROR.getCode(), e.getMessage()); | ||||
| } | } | ||||
| WxCouponOrder couponOrder = couponOrderMapper.selectById(cardId); | |||||
| WxCouponOrder couponOrder = couponOrderMapper.selectById(cardId,merchant.getTenantId()); | |||||
| if (couponOrder == null) { | if (couponOrder == null) { | ||||
| throw new MallinkException(ErrorCode.CARD_IS_NOT_FOUND); | throw new MallinkException(ErrorCode.CARD_IS_NOT_FOUND); | ||||
| } | } | ||||
| @@ -117,6 +117,7 @@ public class CouponOrderExpiringSchedule { | |||||
| updateRecord.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_OVER_TIME.getCode()); //券已过期 | updateRecord.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_OVER_TIME.getCode()); //券已过期 | ||||
| } | } | ||||
| updateRecord.setUpdateDate(new Date()); | updateRecord.setUpdateDate(new Date()); | ||||
| updateRecord.updateTenantInfo(co); | |||||
| wxCouponOrderMapper.updateById(updateRecord); | wxCouponOrderMapper.updateById(updateRecord); | ||||
| // 库存退回 | // 库存退回 | ||||
| @@ -213,6 +213,6 @@ public interface WxCouponOrderService { | |||||
| /** | /** | ||||
| * 尚安停车 | * 尚安停车 | ||||
| */ | */ | ||||
| Integer shangAnVerify(Long couponOrderId); | |||||
| Integer shangAnVerify(Long couponOrderId,TenantEntity tenantinfo); | |||||
| } | } | ||||
| @@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxGame; | import com.iformall.domain.po.WxGame; | ||||
| import com.iformall.domain.po.WxGameActionLog; | import com.iformall.domain.po.WxGameActionLog; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumPayWay; | import com.iformall.enums.EnumPayWay; | ||||
| public interface WxGameService { | public interface WxGameService { | ||||
| @@ -32,7 +33,7 @@ public interface WxGameService { | |||||
| */ | */ | ||||
| WxGame getOneGame(WxGame record); | WxGame getOneGame(WxGame record); | ||||
| ResultData addActionLog(Long userId, Long gameId, Long orderId); | |||||
| ResultData addActionLog(Long userId, Long gameId, Long orderId,TenantEntity tenantinfo); | |||||
| ResultData getCount(Long gameId, Long userId); | ResultData getCount(Long gameId, Long userId); | ||||
| /** | /** | ||||
| @@ -417,7 +417,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { | |||||
| // 卡已消费, 余额不为0 | // 卡已消费, 余额不为0 | ||||
| int remainShareFeeAmount = cardInfo.getRemainingShareFeeAmount(); | int remainShareFeeAmount = cardInfo.getRemainingShareFeeAmount(); | ||||
| try { | try { | ||||
| WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(cardInfo.getId()); | |||||
| WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(cardInfo.getId(),cardInfo.getTenantId()); | |||||
| // 更新 coupon order状态 | // 更新 coupon order状态 | ||||
| couponOrder.setCouponOrderStatus(EnumCouponOrderStatus.CARD_RETURNED.getCode()); | couponOrder.setCouponOrderStatus(EnumCouponOrderStatus.CARD_RETURNED.getCode()); | ||||
| couponOrder.setUpdateDate(new Date()); | couponOrder.setUpdateDate(new Date()); | ||||
| @@ -474,7 +474,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { | |||||
| throw new MallinkException(ErrorCode.DB_FAIL); | throw new MallinkException(ErrorCode.DB_FAIL); | ||||
| } | } | ||||
| // 分账时间检查 | // 分账时间检查 | ||||
| WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(cardId); | |||||
| WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(cardId,tenantEntity.getTenantId()); | |||||
| if (couponOrder.getExpiredTime().before(new Date())) { | if (couponOrder.getExpiredTime().before(new Date())) { | ||||
| throw new MallinkException(ErrorCode.PROFIT_SHARING_TIME_EXPIRED); | throw new MallinkException(ErrorCode.PROFIT_SHARING_TIME_EXPIRED); | ||||
| } | } | ||||
| @@ -154,7 +154,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| @Override | @Override | ||||
| public WxCouponOrder getById(Long id,String tenantId) { | public WxCouponOrder getById(Long id,String tenantId) { | ||||
| return wxCouponOrderMapper.selectById(id); | |||||
| return wxCouponOrderMapper.selectById(id,tenantId); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -1451,10 +1451,11 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| updateCouponOrder.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USED.getCode()); | updateCouponOrder.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USED.getCode()); | ||||
| updateCouponOrder.setUpdateDate(new Date()); | updateCouponOrder.setUpdateDate(new Date()); | ||||
| updateCouponOrder.setPayVendor(payWay.getCode()); | updateCouponOrder.setPayVendor(payWay.getCode()); | ||||
| updateCouponOrder.updateTenantInfo(bUser); | |||||
| // 核销状态更新 | // 核销状态更新 | ||||
| int num = wxCouponOrderMapper.updateById(updateCouponOrder); | int num = wxCouponOrderMapper.updateById(updateCouponOrder); | ||||
| if (num == 1) { | if (num == 1) { | ||||
| WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(couponOrderId); | |||||
| WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(couponOrderId,updateCouponOrder.getTenantId()); | |||||
| WxCoupon coupon = wxCouponMapper.selectById(couponOrder.getCouponId(),bUser.getTenantId()); | WxCoupon coupon = wxCouponMapper.selectById(couponOrder.getCouponId(),bUser.getTenantId()); | ||||
| doAfterVerify(couponOrder, bUser, coupon); | doAfterVerify(couponOrder, bUser, coupon); | ||||
| } | } | ||||
| @@ -1463,15 +1464,16 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| @Override | @Override | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public Integer shangAnVerify(Long couponOrderId) { | |||||
| public Integer shangAnVerify(Long couponOrderId,TenantEntity tenantinfo) { | |||||
| WxCouponOrder updateCouponOrder = new WxCouponOrder(); | WxCouponOrder updateCouponOrder = new WxCouponOrder(); | ||||
| updateCouponOrder.setId(couponOrderId); | updateCouponOrder.setId(couponOrderId); | ||||
| updateCouponOrder.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USED.getCode()); | updateCouponOrder.setCouponOrderStatus(EnumCouponOrderStatus.COUPON_ORDER_USED.getCode()); | ||||
| updateCouponOrder.setUpdateDate(new Date()); | updateCouponOrder.setUpdateDate(new Date()); | ||||
| updateCouponOrder.updateTenantInfo(tenantinfo); | |||||
| // 核销状态更新 | // 核销状态更新 | ||||
| int num = wxCouponOrderMapper.updateById(updateCouponOrder); | int num = wxCouponOrderMapper.updateById(updateCouponOrder); | ||||
| if (num == 1) { | if (num == 1) { | ||||
| WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(couponOrderId); | |||||
| WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(couponOrderId,tenantinfo.getTenantId()); | |||||
| WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(couponOrder.getcUserId(),couponOrder.getFinalTenantId()); | WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(couponOrder.getcUserId(),couponOrder.getFinalTenantId()); | ||||
| WxCoupon coupon = wxCouponMapper.selectById(couponOrder.getCouponId(),couponOrder.getTenantId()); | WxCoupon coupon = wxCouponMapper.selectById(couponOrder.getCouponId(),couponOrder.getTenantId()); | ||||
| doAfterVerify(couponOrder, coupon, wxCUserBasicInfo); | doAfterVerify(couponOrder, coupon, wxCUserBasicInfo); | ||||
| @@ -10,6 +10,7 @@ import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxCouponCVo; | import com.iformall.domain.vo.WxCouponCVo; | ||||
| import com.iformall.domain.vo.WxCouponChannelVo; | import com.iformall.domain.vo.WxCouponChannelVo; | ||||
| import com.iformall.enums.EnumCouponChannelStatus; | import com.iformall.enums.EnumCouponChannelStatus; | ||||
| @@ -113,12 +114,12 @@ public class WxGameServiceImpl implements WxGameService { | |||||
| @Override | @Override | ||||
| public ResultData addActionLog(Long userId, Long gameId, Long orderId) { | |||||
| public ResultData addActionLog(Long userId, Long gameId, Long orderId,TenantEntity tenantinfo) { | |||||
| WxCouponOrder wxCouponOrder = new WxCouponOrder(); | WxCouponOrder wxCouponOrder = new WxCouponOrder(); | ||||
| wxCouponOrder.setCUserId(userId); | wxCouponOrder.setCUserId(userId); | ||||
| wxCouponOrder.setOrderId(orderId); | wxCouponOrder.setOrderId(orderId); | ||||
| wxCouponOrder.updateTenantInfo(tenantinfo); | |||||
| if (orderId != 0) { | if (orderId != 0) { | ||||
| try { | try { | ||||
| wxCouponOrder = wxCouponOrderMapper.selectOne(new QueryWrapper(wxCouponOrder)); | wxCouponOrder = wxCouponOrderMapper.selectOne(new QueryWrapper(wxCouponOrder)); | ||||
| @@ -123,7 +123,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||||
| @Override | @Override | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public ResultData createRefundOrder(WxAppinfo appInfo, Long couponOrderId, EnumPayType payType, Long bUserId) { | public ResultData createRefundOrder(WxAppinfo appInfo, Long couponOrderId, EnumPayType payType, Long bUserId) { | ||||
| WxCouponOrder wxCouponOrder = wxCouponOrderMapper.selectById(couponOrderId); | |||||
| WxCouponOrder wxCouponOrder = wxCouponOrderMapper.selectById(couponOrderId,appInfo.getTenantId()); | |||||
| if (wxCouponOrder == null) { | if (wxCouponOrder == null) { | ||||
| logger.error("券ID不存在:" + couponOrderId); | logger.error("券ID不存在:" + couponOrderId); | ||||
| throw new MallinkException(ErrorCode.COUPON_ORDER_IS_NULL); | throw new MallinkException(ErrorCode.COUPON_ORDER_IS_NULL); | ||||
| @@ -72,7 +72,7 @@ public class ShangAnParkService extends BaseParkService implements ParkAdapterSe | |||||
| if (retObj.getString(ShangAnUtil.SHANGAN_STATUS).equalsIgnoreCase(ShangAnUtil.SHANGAN_SUCCESS)) { | if (retObj.getString(ShangAnUtil.SHANGAN_STATUS).equalsIgnoreCase(ShangAnUtil.SHANGAN_SUCCESS)) { | ||||
| // 停车券-核销 | // 停车券-核销 | ||||
| try { | try { | ||||
| wxCouponOrderService.shangAnVerify(userCar.getId()); | |||||
| wxCouponOrderService.shangAnVerify(userCar.getId(),park); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error(e.getMessage()); | logger.error(e.getMessage()); | ||||
| } | } | ||||