| | |
| | | import com.ruoyi.common.core.constant.Constants; |
| | | import com.ruoyi.common.core.constant.RedisConstants; |
| | | import com.ruoyi.common.core.exception.GlobalException; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.goods.domain.Recipient; |
| | | import com.ruoyi.goods.domain.TGoods; |
| | | import com.ruoyi.goods.domain.TOrder; |
| | |
| | | private StudyClient studyClient; |
| | | @Resource |
| | | private ITOrderService orderService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Override |
| | | public List<TGoodsVO> goodRecommend(String userId) { |
| | | public List<TGoodsVO> goodRecommend(Integer userId) { |
| | | return baseMapper.goodRecommend(userId); |
| | | } |
| | | |
| | |
| | | private TOrder orderInfo(GoodExchangeDTO goodExchange, Recipient recipient, Integer number, Integer goodId, int needIntegral) { |
| | | TOrder order = new TOrder(); |
| | | order.setOrderNumber(goodExchange.getOrderNumber()); |
| | | order.setUserId(SecurityUtils.getUserId().intValue()); |
| | | order.setUserId(tokenService.getLoginUserStudy().getUserid()); |
| | | order.setInsertTime(new Date()); |
| | | order.setGoodsId(goodId); |
| | | order.setCount(number); |