| | |
| | | public ServerResponse getList(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum, |
| | | @RequestParam(value = "pageSize", defaultValue = "15") int pageSize, |
| | | @RequestParam(value = "type", required = false) Integer type, |
| | | @RequestParam(value = "stockCode", required = false) String stockCode) { |
| | | @RequestParam(value = "stockCode", required = false)String stockCode, |
| | | @RequestParam(value = "agentId", required = false) String agentId) { |
| | | Page<UserPositionCheckDz> page = Page.of(pageNum, pageSize); |
| | | LambdaQueryWrapper<UserPositionCheckDz> queryWrapper = new LambdaQueryWrapper<UserPositionCheckDz>(); |
| | | |
| | | // 判断type是否为空,不为空则加入查询条件 |
| | | if (type != null) { |
| | | queryWrapper.eq(UserPositionCheckDz::getCheckType, type); |
| | | } |
| | | |
| | | if (agentId != null) { |
| | | queryWrapper.eq(UserPositionCheckDz::getAgentId, agentId); |
| | | } |
| | | |
| | | // 判断stockCode是否为空,不为空则加入查询条件 |
| | |
| | | UserPosition userPosition = Convert.convert(UserPosition.class, userPositionCheckDz); |
| | | userPosition.setBuyOrderPrice(nowPrice); |
| | | userPosition.setId(null); |
| | | userPosition.setDzId(stockDz.getId()); |
| | | userPositionMapper.insert(userPosition); |
| | | userAssetsServices.availablebalanceChange(EStockType.IN.getCode(), user.getId(), EUserAssets.BUY, buyAmt.negate(),"",""); |
| | | return ServerResponse.createBySuccessMsg("审核成功,订单已转客户持仓"); |