| | |
| | | import com.ruoyi.goods.domain.vo.*; |
| | | import com.ruoyi.goods.mapper.lottery.LotteryEventMapper; |
| | | import com.ruoyi.goods.service.lottery.*; |
| | | import com.ruoyi.system.api.domain.dto.IntegralChangeDto; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | |
| | | memberGiftRecord.setGiftId(userLotteryEvent.getId()); |
| | | memberGiftRecord.setGiftFrom(1); |
| | | memberGiftRecord.setShopId(member.getRelationShopId()); |
| | | memberGiftRecord.setVerifyStatus(1); |
| | | switch (lotteryEventPrize.getPrizeType()) { |
| | | case 1: |
| | | memberGiftRecord.setGiftType(1); |
| | | memberGiftRecord.setCouponId(userLotteryEvent.getObjectId()); |
| | | memberGiftRecord.setCouponNumber(userLotteryEvent.getNumber()); |
| | | memberGiftRecord.setVerifyStatus(2); |
| | | break; |
| | | case 2: |
| | | memberGiftRecord.setGiftType(2); |
| | |
| | | case 4: |
| | | memberGiftRecord.setGiftType(5); |
| | | memberGiftRecord.setIntegralNumber(userLotteryEvent.getNumber()); |
| | | memberGiftRecord.setVerifyStatus(2); |
| | | break; |
| | | } |
| | | memberGiftRecord.setPrizeFrom(2); |
| | | memberGiftRecord.setCreateTime(new Date()); |
| | | memberGiftRecord.setVerifyStatus(1); |
| | | remoteMemberService.saveMemberGiftRecord(memberGiftRecord); |
| | | return R.ok(lotteryEventPrize); |
| | | } |