| | |
| | | import com.nq.vo.stock.ai.StockAiOrderTypeVO; |
| | | import com.nq.vo.stock.ai.StockAiOrderVO; |
| | | import com.nq.vo.stock.ai.StockAiVO; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ServerResponse getStockAiList(Integer pageNum, Integer pageSize) { |
| | | public ServerResponse getStockAiList(Integer pageNum, Integer pageSize, String stockName) { |
| | | try { |
| | | PageHelper.startPage(pageNum, pageSize); |
| | | List<StockAI> stockAiList = stockAiMapper.selectList(new QueryWrapper<StockAI>() |
| | | .eq("status", EStockAIStatus.online.getValue())); |
| | | .eq("status", EStockAIStatus.online.getValue()) |
| | | .eq(StringUtils.isNotBlank(stockName),"stock_name", stockName)); |
| | | // 获取分页信息 |
| | | PageInfo<StockAI> pageInfo = new PageInfo<>(stockAiList); |
| | | return ServerResponse.createBySuccess(pageInfo); |
| | |
| | | if (model == null) { |
| | | return ServerResponse.createByErrorMsg("editStockAi model is null"); |
| | | } |
| | | if (model.getStockType().isEmpty() || model.getStockName().isEmpty() || model.getMinPrice() == null |
| | | || model.getSuccessRate() == null || model.getExpectedEarning() == null || model.getStatus().isEmpty()) { |
| | | if (StringUtils.isBlank(model.getStockType()) || StringUtils.isBlank(model.getStockName()) || model.getMinPrice() == null |
| | | || model.getSuccessRate() == null || model.getExpectedEarning() == null || StringUtils.isBlank(model.getStatus())) { |
| | | return ServerResponse.createByErrorMsg("请完善必填信息"); |
| | | } |
| | | if (!model.getStockType().equals(EStockType.US.getCode()) && !model.getStockType().equals(EStockType.MX.getCode())) { |