| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.goods.api.domain.GetLotteryEventList; |
| | | import com.ruoyi.goods.api.domain.TLotteryEvent; |
| | | import com.ruoyi.goods.api.service.LotteryEventClient; |
| | | import com.ruoyi.member.domain.vo.AppIntegralRecordPageVo; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @ClassName AppIntegralController |
| | |
| | | |
| | | @RequestMapping(value = "/signShare", method = RequestMethod.POST) |
| | | @ApiOperation(value = "今日分享【2.0】") |
| | | public R<Boolean> signShare() { |
| | | public R<Map<String, Object>> signShare() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | IntegralChangeDto integralChangeDto = new IntegralChangeDto(); |
| | | integralChangeDto.setIntegralType(1); |
| | |
| | | throw new ServiceException(AppErrorConstant.DOUBLE_INTEGRAL_TASK); |
| | | } |
| | | //判断是否可以抽奖 |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(3).getData(); |
| | | return R.ok(data.size() > 0); |
| | | GetLotteryEventList getLotteryEventList = new GetLotteryEventList(); |
| | | getLotteryEventList.setActivityType(3); |
| | | getLotteryEventList.setUserId(SecurityUtils.getUserId()); |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(getLotteryEventList).getData(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(data.size() > 0){ |
| | | TLotteryEvent tLotteryEvent = data.get(0); |
| | | map.put("lotteryEventId", tLotteryEvent.getId()); |
| | | map.put("name", tLotteryEvent.getActivityProfile()); |
| | | map.put("image", tLotteryEvent.getCoverImage()); |
| | | } |
| | | return R.ok(map); |
| | | } |
| | | } |