| | |
| | | // if(null == stock){ |
| | | // return ServerResponse.createByErrorMsg("新股代码不存在"); |
| | | // } |
| | | |
| | | Long count = stockSubscribeMapper.selectCount(new LambdaQueryWrapper<StockSubscribe>() |
| | | .eq(StockSubscribe::getCode, model.getCode())); |
| | | if(count > 0){ |
| | | return ServerResponse.createByErrorMsg("新股代码已存在"); |
| | | } |
| | | int resultCount = this.stockSubscribeMapper.insert(model); |
| | | if (resultCount > 0) { |
| | | return ServerResponse.createBySuccessMsg("添加新股成功"); |
| | |
| | | if (stockSubscribe == null) { |
| | | return ServerResponse.createByErrorMsg("新股不存在"); |
| | | } |
| | | Long count = stockSubscribeMapper.selectCount(new LambdaQueryWrapper<StockSubscribe>() |
| | | .eq(StockSubscribe::getCode, model.getCode()) |
| | | .ne(StockSubscribe::getNewlistId,model.getNewlistId())); |
| | | if(count > 0){ |
| | | return ServerResponse.createByErrorMsg("新股代码已存在"); |
| | | } |
| | | |
| | | //修改新股 |
| | | int resultCount = this.stockSubscribeMapper.updateById(model); |