zainali5120
2020-09-25 286ea89f5f6cade73276f865effa5dcd2b19406d
src/main/java/com/xcong/excoin/common/system/controller/LoginController.java
@@ -10,6 +10,7 @@
import cn.hutool.crypto.asymmetric.SignAlgorithm;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.common.LoginUserUtils;
import com.xcong.excoin.common.annotations.SubmitRepeat;
import com.xcong.excoin.common.contants.AppContants;
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.common.system.bean.LoginUserBean;
@@ -90,13 +91,13 @@
                redisUtils.del(AppContants.PC_LOGIN_PREFIX + redisUtils.getString(redisMember));
            }
        }
        redisUtils.set(redisToken, JSONObject.toJSONString(loginUserBean), applicationProperties.getRedisExpire());
        redisUtils.set(redisToken, JSONObject.toJSONString(loginUserBean.getMemberEntity()), applicationProperties.getRedisExpire());
        redisUtils.set(redisMember, token);
        Map<String, Object> authInfo = new HashMap<>();
        // 开启debug模式,则将加密后的token返回
        if (applicationProperties.isDebug()) {
            authInfo.put("token", token);
            authInfo.put("rsaToken", generateAsaToken(token));
            authInfo.put("rsaToken", AppContants.TOKEN_START_WITH + generateAsaToken(token));
            authInfo.put("user", loginUserBean);
        } else {
            authInfo.put("token", token);
@@ -110,6 +111,7 @@
        return rsa.encryptBase64(token + "_" + System.currentTimeMillis(), KeyType.PublicKey);
    }
    @SubmitRepeat
    @ApiOperation(value = "app注册接口", notes = "app注册接口,验证码必须输入可默认为123456")
    @PostMapping(value = "/register")
    public Result register(@RequestBody @Validated RegisterDto registerDto) {