1
zj
2024-09-02 7b419a8d76be83426c8b92505a431069522b5722
1
5 files modified
30 ■■■■ changed files
src/main/java/com/nq/controller/agent/AgentController.java 7 ●●●● patch | view | raw | blame | history
src/main/java/com/nq/controller/agent/AgentUserController.java 8 ●●●● patch | view | raw | blame | history
src/main/java/com/nq/controller/backend/AdminUserController.java 7 ●●●● patch | view | raw | blame | history
src/main/java/com/nq/pojo/AgentUser.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/nq/service/impl/UserAssetsServices.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/nq/controller/agent/AgentController.java
@@ -82,8 +82,11 @@
    //添加用户管理 账户信息
    @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);
    }
    //查询股票统计指定时间内,代理客户(已平仓)的交易盈亏
src/main/java/com/nq/controller/agent/AgentUserController.java
@@ -61,8 +61,12 @@
    //添加用户列表 用户信息
    @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"})
src/main/java/com/nq/controller/backend/AdminUserController.java
@@ -74,8 +74,11 @@
    //添加用户列表 用户信息
    @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"})
src/main/java/com/nq/pojo/AgentUser.java
@@ -1,5 +1,7 @@
package com.nq.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.math.BigDecimal;
@@ -8,6 +10,7 @@
@Data
public class AgentUser {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String agentName;
    private String agentPwd;
src/main/java/com/nq/service/impl/UserAssetsServices.java
@@ -1,5 +1,6 @@
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;
@@ -62,7 +63,7 @@
    @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")){
@@ -104,7 +105,7 @@
            }
        }else{
            if(type.equals("2")){
                return  userRechargeService.createOrder(userAssets.getUserId(),1,bigAmt.intValue(),"1");
                return  userRechargeService.createOrder(id,1,bigAmt.intValue(),"1");
            }else{