| | |
| | | //添加用户管理 账户信息 |
| | | @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, "0", 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, "0", 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, "0", accountType, request); |
| | | } |
| | | |
| | | @RequestMapping({"authByAdmin.do"}) |
| | |
| | | package com.nq.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | @Data |
| | | public class AgentUser { |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | private Integer id; |
| | | private String agentName; |
| | | private String agentPwd; |
| | |
| | | package com.nq.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.nq.common.ServerResponse; |
| | | import com.nq.dao.MoneyLogMapper; |
| | |
| | | |
| | | @Override |
| | | public ServerResponse updateUserAssets(Integer id, String amt,String type) { |
| | | UserAssets userAssets = userAssetsMapper.selectById(id); |
| | | UserAssets userAssets = userAssetsMapper.selectOne(new LambdaQueryWrapper<>(UserAssets.class).eq(UserAssets::getUserId,id)); |
| | | // 0 入款 1是扣钱 2 是充值 3 是提币 |
| | | BigDecimal bigAmt = new BigDecimal(amt); |
| | | if(type.equals("0") || type.equals("1")){ |
| | |
| | | } |
| | | }else{ |
| | | if(type.equals("2")){ |
| | | return userRechargeService.createOrder(userAssets.getUserId(),1,bigAmt.intValue(),"1"); |
| | | return userRechargeService.createOrder(id,1,bigAmt.intValue(),"1"); |
| | | }else{ |
| | | |
| | | |