| | |
| | | //添加用户管理 账户信息 |
| | | @RequestMapping({"addSimulatedAccount.do"}) |
| | | @ResponseBody |
| | | public ServerResponse addSimulatedAccount(HttpServletRequest request,@RequestParam("agentId") Integer agentId, @RequestParam("phone") String phone, @RequestParam("amt") String amt, @RequestParam("accountType") Integer accountType, @RequestParam("pwd") String pwd) { |
| | | return this.iUserService.addSimulatedAccount(agentId, phone, pwd, amt, accountType, request); |
| | | public ServerResponse addSimulatedAccount(HttpServletRequest request,@RequestParam("agentId") Integer agentId, @RequestParam("phone") String phone, @RequestParam("accountType") Integer accountType, @RequestParam("pwd") String pwd) { |
| | | return this.iUserService.addSimulatedAccount(agentId, phone, pwd, accountType, request); |
| | | } |
| | | |
| | | //查询股票统计指定时间内,代理客户(已平仓)的交易盈亏 |
| | |
| | | //添加用户列表 用户信息 |
| | | @RequestMapping({"addSimulatedAccount.do"}) |
| | | @ResponseBody |
| | | public ServerResponse addSimulatedAccount(HttpServletRequest request, @RequestParam(value = "agentId", required = false) Integer agentId, @RequestParam("phone") String phone, @RequestParam("amt") String amt, @RequestParam("accountType") Integer accountType, @RequestParam("pwd") String pwd) { |
| | | return this.iUserService.addSimulatedAccount(agentId, phone, pwd, amt, accountType, request); |
| | | public ServerResponse addSimulatedAccount(HttpServletRequest request, @RequestParam(value = "agentId", required = false) Integer agentId, @RequestParam("phone") String phone,@RequestParam("accountType") Integer accountType, @RequestParam("pwd") String pwd) { |
| | | return this.iUserService.addSimulatedAccount(agentId, phone, pwd, accountType, request); |
| | | } |
| | | |
| | | @RequestMapping({"authByAdmin.do"}) |
| | |
| | | //添加用户列表 用户信息 |
| | | @RequestMapping({"addSimulatedAccount.do"}) |
| | | @ResponseBody |
| | | public ServerResponse addSimulatedAccount(HttpServletRequest request, @RequestParam(value = "agentId", required = false) Integer agentId, @RequestParam("phone") String phone, @RequestParam("amt") String amt, @RequestParam("accountType") Integer accountType, @RequestParam("pwd") String pwd) { |
| | | return this.iUserService.addSimulatedAccount(agentId, phone, pwd, amt, accountType, request); |
| | | public ServerResponse addSimulatedAccount(HttpServletRequest request, @RequestParam(value = "agentId", required = false) Integer agentId, @RequestParam("phone") String phone, @RequestParam("accountType") Integer accountType, @RequestParam("pwd") String pwd) { |
| | | return this.iUserService.addSimulatedAccount(agentId, phone, pwd, accountType, request); |
| | | } |
| | | |
| | | @RequestMapping({"authByAdmin.do"}) |
| | |
| | | |
| | | ServerResponse listByAgent(String paramString1, String paramString2, Integer paramInteger1, Integer paramInteger2, int paramInt1, int paramInt2, HttpServletRequest paramHttpServletRequest); |
| | | |
| | | ServerResponse addSimulatedAccount(Integer paramInteger1, String paramString1, String paramString2, String paramString3, Integer paramInteger2, HttpServletRequest paramHttpServletRequest); |
| | | ServerResponse addSimulatedAccount(Integer paramInteger1, String paramString1, String paramString2, Integer paramInteger2, HttpServletRequest paramHttpServletRequest); |
| | | |
| | | ServerResponse listByAdmin(String paramString1, String paramString2, Integer paramInteger1, Integer paramInteger2, int paramInt1, int paramInt2, HttpServletRequest paramHttpServletRequest); |
| | | |
| | |
| | | return ServerResponse.createByErrorMsg("余额不足",request); |
| | | } |
| | | userAssetsServices.availablebalanceChange(fromType,user.getId(), EUserAssets.TRANSFER,amtBig.negate(),fromType+"/"+toType,""); |
| | | if(fromType.equals("US")){ |
| | | amtBig = (new BigDecimal(7.35)).multiply(amtBig); |
| | | }else{ |
| | | amtBig = rateServices.currencyRate(EStockType.getEStockTypeByCode(fromType),EStockType.getEStockTypeByCode(toType)).multiply(amtBig); |
| | | } |
| | | userAssetsServices.availablebalanceChange(toType,user.getId(),EUserAssets.TRANSFER,amtBig.setScale(5,RoundingMode.HALF_DOWN),fromType+"/"+toType,""); |
| | | return ServerResponse.createBySuccess(); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | public ServerResponse addSimulatedAccount(Integer agentId, String phone, String pwd, String amt, Integer accountType, HttpServletRequest request) { |
| | | public ServerResponse addSimulatedAccount(Integer agentId, String phone, String pwd,Integer accountType, HttpServletRequest request) { |
| | | if (StringUtils.isBlank(phone) || StringUtils.isBlank(pwd)) { |
| | | return ServerResponse.createByErrorMsg("The parameter cannot be null"); |
| | | } |
| | |
| | | return ServerResponse.createByErrorMsg("The phone number is registered"); |
| | | } |
| | | |
| | | |
| | | if ((new BigDecimal(amt)).compareTo(new BigDecimal("200000")) == 1) { |
| | | return ServerResponse.createByErrorMsg("The phone number is registered"); |
| | | } |
| | | amt = "0"; //代理后台添加用户时金额默认为0 |
| | | User user = new User(); |
| | | user.setAccountType(accountType); |
| | | user.setPhone(phone); |
| | |
| | | user.setIsActive(Integer.valueOf(0)); |
| | | user.setRegTime(new Date()); |
| | | user.setUserPwd(SymmetricCryptoUtil.encryptPassword(pwd)); |
| | | user.setLever("1"); |
| | | if (accountType.intValue() == 1) { |
| | | user.setNickName("模拟用户"); |
| | | } |