| | |
| | | import com.ruoyi.common.core.constant.RedisConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.GlobalException; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | 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; |
| | | import com.ruoyi.goods.dto.GoodExchangeDTO; |
| | | import com.ruoyi.goods.dto.GoodsTypeQuery; |
| | | import com.ruoyi.goods.mapper.TGoodsMapper; |
| | | import com.ruoyi.goods.service.ITGoodsService; |
| | | import com.ruoyi.goods.service.ITOrderService; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | |
| | | private ITOrderService orderService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Override |
| | | public List<TGoodsVO> goodRecommend(Integer userId) { |
| | | return baseMapper.goodRecommend(userId); |
| | |
| | | this.baseMapper.updateOne(dto); |
| | | } |
| | | |
| | | @Override |
| | | public List<TGoods> listAll(GoodsTypeQuery query, PageInfo<TGoods> res) { |
| | | List<TGoods> list = this.baseMapper.listAll(query,res); |
| | | return list; |
| | | } |
| | | |
| | | private TOrder orderInfo(GoodExchangeDTO goodExchange, Recipient recipient, Integer number, Integer goodId, int needIntegral) { |
| | | TOrder order = new TOrder(); |
| | | order.setOrderNumber(goodExchange.getOrderNumber()); |