Commit 2263aee2 authored by jiaorz's avatar jiaorz

获取用户是否参加活动

parent 46c6d9ad
package com.github.wxiaoqi.security.admin.rpc.service;
import cn.hutool.json.JSONUtil;
import com.ace.cache.annotation.CacheClear;
import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.admin.biz.*;
import com.github.wxiaoqi.security.admin.constant.RedisKey;
......@@ -252,8 +251,15 @@ public class AppPermissionService {
if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(mobilecode)) {
return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空");
}
if(StringUtils.isNotBlank(code)&&appUserDetailBiz.getUserByCode(code)==0){
return JsonResultUtil.createFailedResult(ResultCode.NOTEXIST_CODE, "邀请人不存在");
if (StringUtils.isNotBlank(code)){
//判断处理活动关键字
String[] codes = code.split("_");
if(codes.length > 1) {
String userCode = codes[0];
if(appUserDetailBiz.getUserByCode(userCode)==0) {
return JsonResultUtil.createFailedResult(ResultCode.NOTEXIST_CODE, "邀请人不存在");
}
}
}
String redisLockKey = RedisKey.CONSTANT_CODE_PREFIX + username + mobilecode;
String mobilecodeRedis = userRedisTemplate.opsForValue().get(redisLockKey) == null ? "" : userRedisTemplate.opsForValue().get(redisLockKey).toString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment