From c0cae0a68ec2d917a9fad1f093a16b6d1d16af3c Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Thu, 16 Mar 2023 13:41:37 +0800 Subject: [PATCH] 后台修改 --- src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | 42 ++++++++++++++++++++++++++++++++++++++---- 1 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java index 0a4d9f4..9ffdf23 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java @@ -199,7 +199,9 @@ public String generateAsaToken(String token) { RSA rsa = new RSA(null, AppContants.PUBLIC_KEY); - return rsa.encryptBase64(token + "_" + System.currentTimeMillis(), KeyType.PublicKey); +// return rsa.encryptBase64(token + "_" + System.currentTimeMillis(), KeyType.PublicKey); + //去掉时间戳 + return rsa.encryptBase64(token, KeyType.PublicKey); } @Override @@ -616,8 +618,8 @@ } } String token = IdUtil.simpleUUID(); - redisUtils.set(token, JSONObject.toJSONString(mallMember), 360000); - redisUtils.set(redisKey, token, 360000); + redisUtils.set(token, JSONObject.toJSONString(mallMember), -1); + redisUtils.set(redisKey, token, -1); Map<String, Object> authInfo = new HashMap<>(); authInfo.put("token", token); authInfo.put("appid", xcxProperties.getXcxAppid()); @@ -648,7 +650,7 @@ if(StrUtil.isNotEmpty(avatarUrl)){ mallMember.setAvatar(avatarUrl); } - mallMember.setSex(1 == apiXcxSaveInfoDto.getGender() ? "女" : "男"); +// mallMember.setSex(1 == apiXcxSaveInfoDto.getGender() ? "女" : "男"); this.baseMapper.updateById(mallMember); return new FebsResponse().success(); } @@ -789,6 +791,38 @@ this.baseMapper.updateById(mallMember); } + @Override + public FebsResponse agentDetail() { + DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + DataDictionaryEnum.AGENT_DETAILS.getType(), DataDictionaryEnum.AGENT_DETAILS.getCode()); + Map<String, Object> map = new HashMap<>(); + if(ObjectUtil.isNotEmpty(dataDictionaryCustom)){ + map.put("agentDetail", dataDictionaryCustom.getValue()); + } + return new FebsResponse().success().data(map); + } + + @Override + public FebsResponse activityInfo() { + DataDictionaryCustom activityBulletinDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + DataDictionaryEnum.ACTIVITY_BULLETIN.getType(), DataDictionaryEnum.ACTIVITY_BULLETIN.getCode()); + DataDictionaryCustom giveAmountDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + DataDictionaryEnum.GIVE_AMOUNT.getType(), DataDictionaryEnum.GIVE_AMOUNT.getCode()); + DataDictionaryCustom giveStateDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + DataDictionaryEnum.GIVE_STATE.getType(), DataDictionaryEnum.GIVE_STATE.getCode()); + Map<String, Object> map = new HashMap<>(); + if(ObjectUtil.isNotEmpty(activityBulletinDic)){ + map.put("activityBulletin", + ObjectUtil.isEmpty(activityBulletinDic.getValue()) ? "暂无活动" : activityBulletinDic.getValue()); + } + if(ObjectUtil.isNotEmpty(giveAmountDic)){ + map.put("giveAmount", + ObjectUtil.isEmpty(giveAmountDic.getValue()) ? 0 : giveAmountDic.getValue()); + } + map.put("giveState",giveStateDic.getValue()); + return new FebsResponse().success().data(map); + } + private String getXcxLoginUrl(String code) { String wechatLoginUrl =xcxProperties.getWecharLoginUrl(); return String.format(wechatLoginUrl, xcxProperties.getXcxAppid(), xcxProperties.getXcxSecret(), code); -- Gitblit v1.9.1