| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.nq.common.ResponseCode; |
| | | import com.nq.common.ServerResponse; |
| | | import com.nq.dao.EChoMapper; |
| | | import com.nq.dao.OrderEchoMapper; |
| | | import com.nq.dao.UserAssetsMapper; |
| | | import com.nq.dao.UserPositionMapper; |
| | | import com.nq.enums.EStockAIStatus; |
| | | import com.nq.enums.EStockType; |
| | | import com.nq.pojo.*; |
| | | import com.nq.pojo.reponse.OrderEChoReponse; |
| | | import com.nq.service.IEchoServices; |
| | | import com.nq.service.IUserService; |
| | | import com.nq.utils.PropertiesUtil; |
| | | import com.nq.vo.subscribe.UserStockSubscribeVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ServerResponse queryOrderEchoPage(int pageNum, int pageSize, HttpServletRequest request) { |
| | | try { |
| | | User user = iUserService.getCurrentRefreshUser(request); |
| | | if (user == null) { |
| | | return ServerResponse.createByErrorCodeMsg(ResponseCode.NEED_LOGIN.getCode(),"请先登录"); |
| | | } |
| | | PageHelper.startPage(pageNum, pageSize); |
| | | List<OrderEchoOut> orderEchoOutList = orderEchoMapper.queryByUserId(user.getId()); |
| | | PageInfo<OrderEchoOut> pageInfo = new PageInfo<>(orderEchoOutList); |
| | | return ServerResponse.createBySuccess(pageInfo); |
| | | } catch (Exception ex) { |
| | | log.error("echoService queryOrderEchoPage error", ex); |
| | | } |
| | | return ServerResponse.createByError(); |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderEChoReponse> queryALLOrderEcho() { |
| | | return orderEchoMapper.queryAll(); |
| | | } |