| | |
| | | } |
| | | UserPendingorder userPendingorder = userPendingorderMapper.selectOne(new QueryWrapper<UserPendingorder>().eq("user_id", user.getId()).eq("stock_id", stockId).eq("status", 0)); |
| | | if (userPendingorder != null) { |
| | | String lang = request.getHeader("lang"); |
| | | if(lang.equals("ja")){ |
| | | String msg = "繰り返しの送信はご遠慮ください"; |
| | | return ServerResponse.createByErrorMsg(msg); |
| | | }else{ |
| | | return ServerResponse.createByErrorMsg("Please do not repeat the order",request); |
| | | } |
| | | } |
| | | |
| | | userPendingorder = new UserPendingorder(); |
| | |
| | | userPendingorder.setStatus(0); |
| | | int ret = userPendingorderMapper.insert(userPendingorder); |
| | | if (ret > 0) { |
| | | String lang = request.getHeader("lang"); |
| | | if(lang.equals("ja")){ |
| | | String msg = "注文が成功しました。取引時間内に自動的に約定されます。"; |
| | | return ServerResponse.createBySuccessMsg(msg); |
| | | }else{ |
| | | return ServerResponse.createBySuccessMsg("If the pending order is successfully added, the order will be automatically placed if the order conditions are met",request); |
| | | } |
| | | } |
| | | return ServerResponse.createByErrorMsg("Add failure",request); |
| | | |
| | | } |