| | |
| | | import com.nq.pojo.StockAIOrderPosition; |
| | | import com.nq.service.IStockAiService; |
| | | import com.nq.service.IStockService; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | if (id == null) { |
| | | return ServerResponse.createByErrorMsg("id is null"); |
| | | } |
| | | if (status.isEmpty()) { |
| | | if (StringUtils.isBlank(status)) { |
| | | return ServerResponse.createByErrorMsg("status is null"); |
| | | } |
| | | return stockAiService.orderOperation(id, status); |
| | |
| | | @RequestParam(value = "keyWords", required = false) String keyWords) { |
| | | return stockService.getStocksByKeyWords(pageNum, pageSize, keyWords); |
| | | } |
| | | |
| | | //建仓列表页 |
| | | @PostMapping({"getPositionList.do"}) |
| | | @ResponseBody |
| | | public ServerResponse getPositionList(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum, |
| | | @RequestParam(value = "pageSize", defaultValue = "5") int pageSize, |
| | | @RequestParam(value = "id", required = false) Integer stockAiOrderId) { |
| | | if (stockAiOrderId == null) { |
| | | return ServerResponse.createByErrorMsg("id is null"); |
| | | } |
| | | return stockAiService.getPositionList(pageNum, pageSize, stockAiOrderId); |
| | | } |
| | | } |