新版仿ok交易所-后端
1
zj
yesterday f31fc9f42f78de0808e7f4bdc797c5e622df09e3
trading-order-admin/src/main/java/com/yami/trading/admin/controller/service/impl/SysUserOperServiceImpl.java
@@ -66,7 +66,7 @@
        SysUser dbUser = sysUserService.getOne(new LambdaQueryWrapper<SysUser>()
                .eq(SysUser::getUsername, userName));
        if (dbUser != null) {
            throw new YamiShopBindException("该用户已存在");
            throw new YamiShopBindException("User already exists");
        }
        List<SysRole> list = roleService.list(Wrappers.<SysRole>query()
                .lambda().eq(SysRole::getRoleName, "代理商"));
@@ -91,11 +91,11 @@
    public void restPassword(String password, String id) {
        Agent agent = agentService.getById(id);
        if (agent == null) {
            throw new YamiShopBindException("参数错误!");
            throw new YamiShopBindException("Invalid parameters!");
        }
        User user = userService.getById(agent.getUserId());
        if (user == null) {
            throw new YamiShopBindException("代理商不存在!");
            throw new YamiShopBindException("Agent does not exist!");
        }
        user.setLoginPassword(passwordEncoder.encode(password));
        userService.updateById(user);
@@ -124,12 +124,12 @@
    public void unbindGoogleAuthCode(String id) {
        Agent agent = agentService.getById(id);
        if (agent == null) {
            throw new YamiShopBindException("参数错误");
            throw new YamiShopBindException("Invalid parameters");
        }
        User user = userService.getById(agent.getUserId());
        SysUser sysUser = sysUserService.getByUserName(user.getUserName());
        if (sysUser == null) {
            throw new YamiShopBindException("参数错误");
            throw new YamiShopBindException("Invalid parameters");
        }
        sysUser.setGoogleAuthSecret(null);
        sysUser.setGoogleAuthBind(false);
@@ -151,12 +151,12 @@
    public void bindGoogleAuthCode(String googleAuthSecret, String id) {
        Agent agent = agentService.getById(id);
        if (agent == null) {
            throw new YamiShopBindException("参数错误");
            throw new YamiShopBindException("Invalid parameters");
        }
        User user = userService.getById(agent.getUserId());
        SysUser sysUser = sysUserService.getByUserName(user.getUserName());
        if (sysUser == null) {
            throw new YamiShopBindException("参数错误");
            throw new YamiShopBindException("Invalid parameters");
        }
        sysUser.setGoogleAuthSecret(googleAuthSecret);
        sysUser.setGoogleAuthBind(true);