ソースを参照

feat: 新增字段enableLoginRiskCheck(是否开启登陆风控校验)默认启用;

hidewnd 1 週間 前
コミット
03626454db

+ 3 - 0
yt-common/src/main/java/com/ytpm/agent/param/AppParam.java

@@ -88,4 +88,7 @@ public class AppParam {
 
     @ApiModelProperty("是否允许自动刷新")
     private Integer canAllowAutoRefresh;
+
+    @ApiModelProperty("是否开启登陆风控校验")
+    private Integer enableLoginRiskCheck;
 }

+ 2 - 0
yt-common/src/main/java/com/ytpm/agent/view/AgentAppView.java

@@ -177,6 +177,8 @@ public class AgentAppView {
     @ApiModelProperty("是否允许自动刷新")
     private Integer canAllowAutoRefresh;
 
+    @ApiModelProperty("是否开启登陆风控校验")
+    private Integer enableLoginRiskCheck;
 
     @ApiModelProperty("最近修改记录")
     private YtAppConfigLog lastChangeLog;

+ 3 - 0
yt-common/src/main/java/com/ytpm/app/model/YtAppDefaultConfig.java

@@ -80,6 +80,9 @@ public class YtAppDefaultConfig {
     @ApiModelProperty("是否允许自动刷新")
     private Integer canAllowAutoRefresh;
 
+    @ApiModelProperty("是否开启登陆风控校验")
+    private Integer enableLoginRiskCheck;
+
     public YtAppDefaultConfig(Object o, String appName, String wxAppId, String wxSecret, String appId, String appKey, int appType,String ditchId) {
         this.configId = Objects.isNull(o)?null: Integer.parseInt(o.toString());
         this.configName = appName;

+ 4 - 0
yt-common/src/main/java/com/ytpm/app/view/WxDefaultConfig.java

@@ -115,4 +115,8 @@ public class WxDefaultConfig {
     @ApiModelProperty("是否允许自动刷新")
     @BeanChange(name = "是否允许自动刷新", ifYesNo = true)
     private Integer canAllowAutoRefresh;
+
+    @ApiModelProperty("是否开启登陆风控校验")
+    @BeanChange(name = "是否开启登陆风控校验", ifYesNo = true)
+    private Integer enableLoginRiskCheck;
 }

+ 100 - 74
yt-ios-lemon/lemon-ios-service/src/main/java/com/ytpm/lemonios/controller/WxController.java

@@ -19,16 +19,14 @@ import com.ytpm.app.param.AppConfigUpdateParam;
 import com.ytpm.app.param.DyzAdRecordParam;
 import com.ytpm.app.param.IosLoginParam;
 import com.ytpm.app.param.WxLoginParam;
-import com.ytpm.app.view.IosPowerResView;
-import com.ytpm.app.view.IosUserInfo;
-import com.ytpm.app.view.WxDefaultConfig;
-import com.ytpm.app.view.WxLoginResult;
-import com.ytpm.app.view.WxUserInfo;
+import com.ytpm.app.view.*;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
 import com.ytpm.general.StatusCode;
+import com.ytpm.handle.CustomerException;
 import com.ytpm.lemonios.dao.AdRecordMapper;
+import com.ytpm.lemonios.dao.AppDefaultConfigMapper;
 import com.ytpm.lemonios.dao.AppUserMapper;
 import com.ytpm.lemonios.dao.DitchMapper;
 import com.ytpm.lemonios.redis.RedisService;
@@ -41,12 +39,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -67,6 +60,8 @@ import java.util.stream.Collectors;
 @RequestMapping("/wx")
 public class WxController {
 
+    @Resource
+    private AppDefaultConfigMapper appDefaultConfigMapper;
     @Resource
     private AppUserMapper appUserMapper;
     @Resource
@@ -100,7 +95,7 @@ public class WxController {
     @Transactional
     public Result<YtDyzUser> wxLogin(@RequestBody WxLoginParam param, HttpServletRequest request) {
         //根据应用获取配置调用微信接口登录
-        WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
+        WxDefaultConfig defaultConfig = appDefaultConfigMapper.getByAppType(param.getAppType());
         if (Objects.isNull(defaultConfig)) {
             return new Result<>(StatusCode.ACCESS_ERR, "微信登录失败,未找到相应配置!");
         }
@@ -198,7 +193,7 @@ public class WxController {
         if (result.getCode() != 200) {
             String errorMessage = result.getMessage();
             if (user.getLoginType() == LoginType.VISITOR && RepMessage.RISK_VISITOR_LOWER_VALUE.equals(errorMessage)) {
-                WxDefaultConfig defaultConfig = appUserMapper.getLastDefaultConfig();
+                WxDefaultConfig defaultConfig = appDefaultConfigMapper.getLast();
                 return Result.resultErr(StrUtil.emptyToDefault(defaultConfig.getLowValueTip(), errorMessage));
             }
             return Result.resultErr(errorMessage);
@@ -243,33 +238,64 @@ public class WxController {
     @PostMapping("/iosLogin")
     @Transactional(rollbackFor = Exception.class)
     public Result<YtDyzUser> iosLogin(@RequestBody IosLoginParam param, HttpServletRequest request) {
-        //根据应用ID获取配置调用接口登录
-        WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfigByDitchId(param.getDitchId());
-        // 当默认配置不存在时,尝试通过渠道信息获取备用配置
-        if (Objects.isNull(defaultConfig)) {
-            // 1. 检查渠道是否存在(提前拦截无效情况)
-            YtDitch ditch = ditchMapper.selectById(param.getDitchId());
-            if (ditch != null) {
-                // 2. 通过渠道的appId获取备用配置
-                defaultConfig = appUserMapper.getByAppId(ditch.getAppId());
+        try {
+            // 1.根据应用ID获取配置调用接口登录,当默认配置不存在时,尝试通过渠道的appId获取备用配置
+            WxDefaultConfig defaultConfig = appDefaultConfigMapper.getByDitchId(param.getDitchId());
+            if (defaultConfig == null) {
+                // 检查渠道是否存在(提前拦截无效情况)
+                YtDitch ditch = ditchMapper.selectById(param.getDitchId());
+                defaultConfig = ditch == null ? null : appDefaultConfigMapper.getByAppId(ditch.getAppId());
             }
-        }
-        if (Objects.isNull(defaultConfig)) {
-            return new Result<>(StatusCode.ACCESS_ERR, "登录失败,未找到相应配置!");
-        }
-        // 幂等请求校验
-        if (StrUtil.isNotEmpty(param.getRequestId())) {
-            String redisKey = StrUtil.format("visitor:requestId:{}:{}", param.getDitchId(), param.getIosId());
-            if (!redisService.hasKey(redisKey)) {
-                return new Result<>(StatusCode.ACCESS_ERR, "登录失败,重复请求!");
+            if (Objects.isNull(defaultConfig)) {
+                throw new CustomerException("登录失败,未找到相应配置!");
+            }
+            // (可选)幂等请求校验
+            if (StrUtil.isNotEmpty(param.getRequestId())) {
+                String redisKey = StrUtil.format("visitor:requestId:{}:{}", param.getDitchId(), param.getIosId());
+                if (!redisService.hasKey(redisKey)) {
+                    throw new CustomerException("登录失败,重复请求!");
+                }
+                String cacheKey = redisService.getStr(redisKey);
+                if (!StrUtil.equals(cacheKey, param.getRequestId())) {
+                    throw new CustomerException("登录失败,重复请求!");
+                }
+                redisService.del(redisKey);
             }
-            String cacheKey = redisService.getStr(redisKey);
-            if (!StrUtil.equals(cacheKey, param.getRequestId())) {
-                return new Result<>(StatusCode.ACCESS_ERR, "登录失败,重复请求!");
+            // 2.处理phoneJson, loginIp, nickName等
+            param.setLoginIp(getClientIp(request));
+            handlePhoneJson(param);
+            IosUserInfo userInfo = setIosUserInfo(param);
+            // 是否进行风控校验
+            boolean enableRiskCheck = defaultConfig.getEnableLoginRiskCheck() != null && defaultConfig.getEnableLoginRiskCheck() == 1;
+            // 3.根据入参获取或注册用户
+            YtDyzUser dyzUser = appUserService.crudForNewTransIos(param, userInfo, LoginType.IOS);
+            // 4.处理登陆前广告记录数据 如果传入游客广告记录,执行游客登陆校验
+            handlePreAdList(dyzUser, param, defaultConfig, enableRiskCheck);
+            // 5.状态更新 游客登陆前风控 -> 正常
+            YtDyzUser newUser = new YtDyzUser();
+            newUser.setUserId(dyzUser.getUserId());
+            dyzUser.setUserStatus(UserStatusEnum.NORMAL.getCode());
+            newUser.setUserStatus(UserStatusEnum.NORMAL.getCode());
+            appUserMapper.updateUser(newUser);
+            // 6.进行默认登陆风控校验
+            if (enableRiskCheck) {
+                dyzUser.setPhoneJson(param.getPhoneJson());
+                loginRiskCheck(dyzUser, defaultConfig);
+            }
+            // 7.更新登录时间
+            if (dyzUser.getLastLoginTime() != null && dyzUser.getRegistryTime() != null) {
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                dyzUser.setLastLoginTimeStr(sdf.format(dyzUser.getLastLoginTime()));
+                dyzUser.setRegistryTimeStr(sdf.format(dyzUser.getRegistryTime()));
             }
-            redisService.del(redisKey);
+            //调用风控服务校验默认风控配置
+            return Result.resultOk(RepMessage.LOGIN_SUCCESS, dyzUser);
+        } catch (CustomerException e) {
+            return new Result<>(StatusCode.ACCESS_ERR, e.getMessage());
         }
-        // phoneJson 处理
+    }
+
+    private void handlePhoneJson(IosLoginParam param) {
         if (StrUtil.isNotEmpty(param.getPhoneJson())) {
             JSONObject jsonObject = JSONObject.parseObject(param.getPhoneJson());
             List<String> appList = null;
@@ -285,32 +311,35 @@ public class WxController {
                 param.setPhoneJson(JSONObject.toJSONString(jsonObject));
             }
         }
-        IosUserInfo userInfo = setIosUserInfo(param);
-        param.setLoginIp(getClientIp(request));
-        // 获取或注册用户
-        YtDyzUser dyzUser = appUserService.crudForNewTransIos(param, userInfo, LoginType.IOS);
-        // 如果传入游客广告记录,执行游客登陆校验
+    }
+
+
+    /**
+     * 登陆前广告数据处理
+     */
+    private void handlePreAdList(YtDyzUser dyzUser, IosLoginParam param, WxDefaultConfig defaultConfig,
+                                 boolean enableRiskCheck) {
         if (CollUtil.isNotEmpty(param.getPreAdList())) {
             dyzUser.setLoginType(LoginType.VISITOR);
             List<YtDyzAdRecord> preAdRecordList = saveVisitorAdRecord(dyzUser, param);
             dyzUser.setPreAdRecordList(preAdRecordList);
-            Result<?> result = riskFeign.checkLoginRisk(dyzUser);
-            if (result.getCode() != 200) {
-                String errorMessage = result.getMessage();
-                if (RepMessage.RISK_VISITOR_LOWER_VALUE.equals(errorMessage)) {
-                    errorMessage = StrUtil.emptyToDefault(defaultConfig.getLowValueTip(), errorMessage);
+            if (enableRiskCheck) {
+                Result<?> result = riskFeign.checkLoginRisk(dyzUser);
+                if (result.getCode() != 200) {
+                    String errorMessage = result.getMessage();
+                    if (RepMessage.RISK_VISITOR_LOWER_VALUE.equals(errorMessage)) {
+                        errorMessage = StrUtil.emptyToDefault(defaultConfig.getLowValueTip(), errorMessage);
+                    }
+                    throw new CustomerException(errorMessage);
                 }
-                return new Result<>(StatusCode.ACCESS_ERR, errorMessage);
             }
         }
-        // 状态更新 游客登陆前风控 -> 正常
-        YtDyzUser newUser = new YtDyzUser();
-        newUser.setUserId(dyzUser.getUserId());
-        dyzUser.setUserStatus(UserStatusEnum.NORMAL.getCode());
-        newUser.setUserStatus(UserStatusEnum.NORMAL.getCode());
-        appUserMapper.updateUser(newUser);
-        //调用风控服务校验默认风控配置
-        dyzUser.setPhoneJson(param.getPhoneJson());
+    }
+
+    /**
+     * 登陆风控校验
+     */
+    private void loginRiskCheck(YtDyzUser dyzUser, WxDefaultConfig defaultConfig) throws CustomerException {
         dyzUser.setLoginType(LoginType.IOS);
         dyzUser.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(dyzUser);
@@ -325,17 +354,13 @@ public class WxController {
                 String[] split = ipLimitTips.split(",");
                 errorMessage = split[RandomUtil.randomInt(split.length)];
             }
-            return new Result<>(StatusCode.ACCESS_ERR, errorMessage);
+            throw new CustomerException(errorMessage);
         }
-        if (dyzUser.getLastLoginTime() != null && dyzUser.getRegistryTime() != null) {
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-            dyzUser.setLastLoginTimeStr(sdf.format(dyzUser.getLastLoginTime()));
-            dyzUser.setRegistryTimeStr(sdf.format(dyzUser.getRegistryTime()));
-        }
-        //调用风控服务校验默认风控配置
-        return Result.resultOk(RepMessage.LOGIN_SUCCESS, dyzUser);
     }
 
+    /**
+     * 保存登陆前游客广告
+     */
     private List<YtDyzAdRecord> saveVisitorAdRecord(YtDyzUser ytDyzUser, IosLoginParam visitorLoginParam) {
         List<DyzAdRecordParam> preAdList = visitorLoginParam.getPreAdList();
         // 保存登陆前传递的广告记录
@@ -360,16 +385,17 @@ public class WxController {
             log.info(StrUtil.format("[visitor adRecords]userId:{} recordCount:{} revenue:{}",
                     ytDyzUser.getUserId(), adRecordIds.size(), totalRevenue.toPlainString()));
         }
-        return CollUtil.isEmpty(adRecordIds) ? new ArrayList<>()
-                : recordMapper.selectRecordByIds(AdRecordEnum.LOGIN_BEFORE.getCode(), adRecordIds);
+        return CollUtil.isEmpty(adRecordIds) ?
+                new ArrayList<>() : recordMapper.selectRecordByIds(AdRecordEnum.LOGIN_BEFORE.getCode(), adRecordIds);
     }
 
+
     @ApiEncrypt(response = true)
     @PostMapping("/getByDitchId")
     @ApiOperation("获取默认配置")
     @Transactional
     public Result<WxDefaultConfig> getByDitchId(@RequestBody IosLoginParam param) {
-        WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfigByDitchId(param.getDitchId());
+        WxDefaultConfig defaultConfig = appDefaultConfigMapper.getByDitchId(param.getDitchId());
         return Result.resultOk(RepMessage.QUERY_SUCCESS, defaultConfig);
     }
 
@@ -395,7 +421,7 @@ public class WxController {
     @ApiOperation("获取微信默认配置项")
     @GetMapping("/defaultConfig")
     public Result<WxDefaultConfig> getWxDefaultConfig(int appType) {
-        WxDefaultConfig config = appUserMapper.getDefaultConfig(appType);
+        WxDefaultConfig config = appDefaultConfigMapper.getByAppType(appType);
         if (Objects.isNull(config)) {
             return Result.resultErr("应用类型有误!");
         }
@@ -425,7 +451,7 @@ public class WxController {
     @ApiOperation("保存应用默认配置")
     @PostMapping("/saveAppConfig")
     public Result<String> saveAppConfig(@RequestBody YtAppDefaultConfig defaultConfig) {
-        appUserMapper.saveAppConfig(defaultConfig);
+        appDefaultConfigMapper.saveAppConfig(defaultConfig);
         return Result.resultOk(RepMessage.SAVE_SUCCESS);
     }
 
@@ -433,7 +459,7 @@ public class WxController {
     @ApiOperation("修改应用默认配置")
     @PostMapping("/updateAppConfig")
     public Result<String> updateAppConfig(@RequestBody YtAppDefaultConfig defaultConfig) {
-        appUserMapper.updateAppConfig(defaultConfig);
+        appDefaultConfigMapper.updateAppConfig(defaultConfig);
         return Result.resultOk(RepMessage.SAVE_SUCCESS);
     }
 
@@ -443,7 +469,7 @@ public class WxController {
     public void updateAppsConfig(@RequestBody AppConfigUpdateParam param) {
         if (CollUtil.isNotEmpty(param.getApps()) && param.getDefaultConfig() != null) {
             String appIds = String.join(",", param.getApps());
-            List<WxDefaultConfig> configs = appUserMapper.getConfigByIds(appIds);
+            List<WxDefaultConfig> configs = appDefaultConfigMapper.getByAppIds(appIds);
             YtAppDefaultConfig updateInfo = param.getDefaultConfig();
             for (WxDefaultConfig config : configs) {
                 YtAppDefaultConfig appConfig = new YtAppDefaultConfig();
@@ -466,7 +492,7 @@ public class WxController {
                 if (StrUtil.isNotEmpty(updateInfo.getTakuInterstitialPid())) {
                     appConfig.setTakuInterstitialPid(updateInfo.getTakuInterstitialPid());
                 }
-                appUserMapper.updateAppConfig(appConfig);
+                appDefaultConfigMapper.updateAppConfig(appConfig);
             }
         }
     }
@@ -476,7 +502,7 @@ public class WxController {
     @GetMapping("/getConfigs")
     public List<WxDefaultConfig> getConfigs(@RequestParam(name = "appIds") String appIds) {
         List<WxDefaultConfig> configs = new ArrayList<>();
-        List<WxDefaultConfig> dyzConfigs = appUserMapper.getConfigByIds(appIds);
+        List<WxDefaultConfig> dyzConfigs = appDefaultConfigMapper.getByAppIds(appIds);
         if (CollUtil.isNotEmpty(dyzConfigs)) {
             configs.addAll(dyzConfigs);
         }
@@ -487,9 +513,9 @@ public class WxController {
     @ApiOperation("删除默认配置")
     @GetMapping("/delDefaultConfig")
     public void delDefaultConfig(@RequestParam(name = "appId") String appId) {
-        List<WxDefaultConfig> dyzConfig = appUserMapper.getConfigByIds(appId);
+        List<WxDefaultConfig> dyzConfig = appDefaultConfigMapper.getByAppIds(appId);
         if (CollUtil.isNotEmpty(dyzConfig)) {
-            appUserMapper.delByAppId(appId);
+            appDefaultConfigMapper.delByAppId(appId);
             // 同步删除渠道记录
             ditchMapper.deleteByAppId(appId);
         }

+ 63 - 0
yt-ios-lemon/lemon-ios-service/src/main/java/com/ytpm/lemonios/dao/AppDefaultConfigMapper.java

@@ -0,0 +1,63 @@
+package com.ytpm.lemonios.dao;
+
+
+import com.ytpm.app.model.YtAppDefaultConfig;
+import com.ytpm.app.view.WxDefaultConfig;
+import org.apache.ibatis.annotations.Param;
+import org.mapstruct.Mapper;
+
+import java.util.List;
+
+/**
+ * @author hidewnd
+ * @date 2026/1/27 10:34
+ */
+@Mapper
+public interface AppDefaultConfigMapper {
+
+    /**
+     * 保存应用配置
+     */
+    void saveAppConfig(YtAppDefaultConfig defaultConfig);
+
+    /**
+     * 修改应用配置
+     */
+    void updateAppConfig(YtAppDefaultConfig defaultConfig);
+
+
+    /**
+     * 根据应用ID删除默认配置
+     */
+    void delByAppId(@Param("appId")String appId);
+
+    /**
+     * 根据应用ID查询应用默认配置
+     */
+    WxDefaultConfig getByAppId(@Param("appId") String appId);
+
+    /**
+     * 根据应用类型查询应用默认配置
+     */
+    WxDefaultConfig getByAppType(@Param("appType") Integer appType);
+
+    /**
+     * 根据应用ID查询应用默认配置
+     */
+    WxDefaultConfig getByDitchId(@Param("ditchId") Long ditchId);
+
+    /**
+     * 获取最近一条默认配置
+     */
+    WxDefaultConfig getLastByAppId(@Param("appId") String appId);
+
+    /**
+     * 获取最近一条默认配置
+     */
+    WxDefaultConfig getLast();
+
+    /**
+     * 根据APP_ID获取配置
+     */
+    List<WxDefaultConfig> getByAppIds(@Param("appIds") String appIds);
+}

+ 27 - 72
yt-ios-lemon/lemon-ios-service/src/main/java/com/ytpm/lemonios/dao/AppUserMapper.java

@@ -2,13 +2,11 @@ package com.ytpm.lemonios.dao;
 
 import com.ytpm.agent.param.AuditUserParam;
 import com.ytpm.agent.view.AgentAuditCheckVO;
-import com.ytpm.app.model.YtAppDefaultConfig;
 import com.ytpm.app.model.YtDyzPowerRecord;
 import com.ytpm.app.model.YtDyzUser;
 import com.ytpm.app.param.AppUserParam;
 import com.ytpm.app.param.YtAppUserListParam;
 import com.ytpm.app.view.HourCountView;
-import com.ytpm.app.view.WxDefaultConfig;
 import com.ytpm.app.view.YtAppUserListView;
 import com.ytpm.middle.view.AppRankingListVO;
 import com.ytpm.middle.view.AppUserHourVO;
@@ -26,27 +24,27 @@ public interface AppUserMapper {
     /**
      * userId查询用户信息
      */
-    YtDyzUser selectById(@Param("userId")String userId);
+    YtDyzUser selectById(@Param("userId") String userId);
 
     /**
      * IOSId查询用户信息
      */
-    YtDyzUser selectByIosId(@Param("iosId")String iosId);
+    YtDyzUser selectByIosId(@Param("iosId") String iosId);
 
     /**
      * openid查询用户信息
      */
-    YtDyzUser getYtAppUser(@Param("openid")String openid,@Param("ditchId")Long ditchId);
+    YtDyzUser getYtAppUser(@Param("openid") String openid, @Param("ditchId") Long ditchId);
 
     /**
      * openid查询用户信息
      */
-    YtDyzUser getYtAppUserForIos(@Param("iosId")String iosId,@Param("ditchId")Long ditchId);
+    YtDyzUser getYtAppUserForIos(@Param("iosId") String iosId, @Param("ditchId") Long ditchId);
 
     /**
      * 主键查询
      */
-    YtDyzUser selectPrimaryKey(@Param("userId")String userId);
+    YtDyzUser selectPrimaryKey(@Param("userId") String userId);
 
     /**
      * 新增应用用户
@@ -56,11 +54,12 @@ public interface AppUserMapper {
     /**
      * 增加体力
      */
-    void addOnePower(@Param("userId")String userId);
+    void addOnePower(@Param("userId") String userId);
+
     /**
      * 减少体力
      */
-    void subOnePower(@Param("userId")String userId);
+    void subOnePower(@Param("userId") String userId);
 
     /**
      * 体力增加记录
@@ -71,6 +70,7 @@ public interface AppUserMapper {
      * 修改用户信息
      */
     void updateUser(YtDyzUser newUser);
+
     /**
      * 查询所有玩家
      */
@@ -79,8 +79,9 @@ public interface AppUserMapper {
     /**
      * 查询所有玩家
      * 按照注册时间范围查询
+     *
      * @param startTime 开始时间(可选)
-     * @param endTime 结束时间(可选)
+     * @param endTime   结束时间(可选)
      */
     List<YtDyzUser> queryAllByTime(
             @Param("startTime") Date startTime,
@@ -100,65 +101,22 @@ public interface AppUserMapper {
      */
     List<YtDyzUser> getUserList(AppUserParam param);
 
-    /**
-     * 根据应用类型查询应用默认配置
-     */
-    WxDefaultConfig getDefaultConfig(@Param("appType") Integer appType);
-
-    /**
-     * 根据应用ID查询应用默认配置
-     */
-    YtAppDefaultConfig getConfigByAppId(@Param("appId") String appId);
-
-    /**
-     * 根据应用ID查询应用默认配置
-     */
-    WxDefaultConfig getByAppId(@Param("appId") String appId);
-
-    /**
-     * 根据应用ID查询应用默认配置
-     */
-    WxDefaultConfig getDefaultConfigByDitchId(@Param("ditchId") Long ditchId);
-
-    /**
-     * 获取最近一条默认配置
-     */
-    WxDefaultConfig getLastOne(@Param("appId") String appId);
-
-    /**
-     * 获取最近一条默认配置
-     */
-    WxDefaultConfig getLastDefaultConfig();
 
     /**
      * 根据微信openid查询用户
      */
-    List<YtDyzUser> queryByOpenid(@Param("openid")String openid);
+    List<YtDyzUser> queryByOpenid(@Param("openid") String openid);
 
     /**
      * 根据IosId查询用户
      */
-    List<YtDyzUser> queryByIosId(@Param("iosId")String iosId);
+    List<YtDyzUser> queryByIosId(@Param("iosId") String iosId);
 
     /**
      * 根据设备ID查询平台ID
      */
-    String getByDeviceId(@Param("deviceId")String deviceId,@Param("openid")String openid);
+    String getByDeviceId(@Param("deviceId") String deviceId, @Param("openid") String openid);
 
-    /**
-     * 保存应用配置
-     */
-    void saveAppConfig(YtAppDefaultConfig defaultConfig);
-    /**
-     * 修改应用配置
-     */
-    void updateAppConfig(YtAppDefaultConfig defaultConfig);
-
-
-    /**
-     * 根据APP_ID获取配置
-     */
-    List<WxDefaultConfig> getConfigByIds(@Param("appIds") String appIds);
 
     /**
      * 根据应用统计广告数
@@ -173,55 +131,52 @@ public interface AppUserMapper {
     /**
      * 查询应用排行榜
      */
-    List<AppRankingListVO> getAppRanking(@Param("sortBy") int sortBy,@Param("limit") int limit);
+    List<AppRankingListVO> getAppRanking(@Param("sortBy") int sortBy, @Param("limit") int limit);
 
     /**
      * 查询用户排行榜数据
      */
-    List<UserRankingListVO> getUserRanking(@Param("sortBy") int sortBy,@Param("limit") int limit);
+    List<UserRankingListVO> getUserRanking(@Param("sortBy") int sortBy, @Param("limit") int limit);
 
     /**
      * 根据应用查询用户数量
      */
-    int countUserByAppIds(@Param("appIds")String appIds);
+    int countUserByAppIds(@Param("appIds") String appIds);
 
     /**
      * 根据应用统计预估收益
      */
-    BigDecimal countRevenueByAppIds(@Param("appIds")String appIds);
+    BigDecimal countRevenueByAppIds(@Param("appIds") String appIds);
 
     /**
      * 根据应用查询风控用户数
      */
-    int countBannedByAppIds(@Param("appIds")String appIds);
+    int countBannedByAppIds(@Param("appIds") String appIds);
 
     /**
      * 统计注册用户数
      */
-    int countRegistryUser(@Param("appId")String appId, @Param("type")int type);
+    int countRegistryUser(@Param("appId") String appId, @Param("type") int type);
+
     /**
      * 统计登录用户数
      */
-    int countLoginUser(@Param("appId")String appId, @Param("type")int type);
+    int countLoginUser(@Param("appId") String appId, @Param("type") int type);
 
     /**
      * 分时统计注册数
      */
-    List<AppUserHourVO> countRegistryHour(@Param("appId")String appId, @Param("type")int type);
+    List<AppUserHourVO> countRegistryHour(@Param("appId") String appId, @Param("type") int type);
 
     /**
      * 分时统计登录
      */
-    List<AppUserHourVO> countLoginHour(@Param("appId")String appId, @Param("type")int type);
+    List<AppUserHourVO> countLoginHour(@Param("appId") String appId, @Param("type") int type);
 
-    /**
-     * 根据应用ID删除默认配置
-     */
-    void delByAppId(@Param("appId")String appId);
 
-    void unlockUser(@Param("userIds")String userIds);
+    void unlockUser(@Param("userIds") String userIds);
 
-    List<YtDyzUser> queryByUserIds(@Param("userIds")String userIds);
+    List<YtDyzUser> queryByUserIds(@Param("userIds") String userIds);
 
     /**
      * 分类型查询用户当天视频广告
@@ -238,7 +193,7 @@ public interface AppUserMapper {
 
     Long queryCountByIpTime(@Param("lastLoginIp") String lastLoginIp, @Param("date") Date startTime);
 
-    Long queryCountByIpRegion(@Param("cityList") List<String> cityList,@Param("date") Date startTime);
+    Long queryCountByIpRegion(@Param("cityList") List<String> cityList, @Param("date") Date startTime);
 
     Long countUserByLastLoginIpAndAppList(@Param("lastLoginIp") String lastLoginIp, @Param("appList") String appList,
                                           @Param("startTime") Date startTime);

+ 5 - 6
yt-ios-lemon/lemon-ios-service/src/main/java/com/ytpm/lemonios/service/impl/AppUserServiceImpl.java

@@ -24,10 +24,7 @@ import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.lemonios.config.ip2Regin.IP2ReginService;
-import com.ytpm.lemonios.dao.AppUserMapper;
-import com.ytpm.lemonios.dao.DitchMapper;
-import com.ytpm.lemonios.dao.LoginRecordMapper;
-import com.ytpm.lemonios.dao.QuestionMapper;
+import com.ytpm.lemonios.dao.*;
 import com.ytpm.lemonios.redis.RedisService;
 import com.ytpm.lemonios.service.AppUserService;
 import org.springframework.beans.factory.annotation.Value;
@@ -48,6 +45,8 @@ import java.util.Objects;
 @RefreshScope
 public class AppUserServiceImpl implements AppUserService {
 
+    @Resource
+    private AppDefaultConfigMapper appDefaultConfigMapper;
     @Resource
     private AppUserMapper appUserMapper;
     @Resource
@@ -303,7 +302,7 @@ public class AppUserServiceImpl implements AppUserService {
     @Override
     public Result<?> addDefaultConfig(YtDitch param) {
         ditchMapper.insertOne(param);
-        WxDefaultConfig lastOne = appUserMapper.getLastOne(param.getAppId());
+        WxDefaultConfig lastOne = appDefaultConfigMapper.getLastByAppId(param.getAppId());
         YtAppDefaultConfig appDefaultConfig = new YtAppDefaultConfig();
         appDefaultConfig.setConfigName(param.getDitchName());
         appDefaultConfig.setDitchId(param.getDitchId().toString());
@@ -318,7 +317,7 @@ public class AppUserServiceImpl implements AppUserService {
         appDefaultConfig.setCanSimulator(lastOne.getCanSimulator());
         appDefaultConfig.setPowerWaitTime(lastOne.getPowerWaitTime());
         appDefaultConfig.setInterstitialIntervalTime(lastOne.getInterstitialIntervalTime());
-        appUserMapper.saveAppConfig(appDefaultConfig);
+        appDefaultConfigMapper.saveAppConfig(appDefaultConfig);
         return Result.resultOk(RepMessage.ADD_SUCCESS);
     }
 

+ 188 - 0
yt-ios-lemon/lemon-ios-service/src/main/resources/mapper/AppDefaultConfigMapper.xml

@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ytpm.lemonios.dao.AppDefaultConfigMapper">
+    <insert id="saveAppConfig">
+        insert into yt_app_default_config
+        (config_name,
+         open_id,
+         secret,
+         app_id,
+         app_key,
+         app_type,
+         ditch_id)
+        values (#{configName},
+                #{openId},
+                #{secret},
+                #{appId},
+                #{appKey},
+                #{appType},
+                #{ditchId})
+    </insert>
+    <update id="updateAppConfig">
+        update yt_app_default_config
+        <set>
+            <if test="configName != null">
+                config_name = #{configName},
+            </if>
+            <if test="openId != null">
+                open_id = #{openId},
+            </if>
+            <if test="secret != null">
+                secret = #{secret},
+            </if>
+            <if test="appKey != null">
+                app_key = #{appKey},
+            </if>
+            <if test="appType != null">
+                app_type = #{appType},
+            </if>
+            <if test="takuAppId != null">
+                taku_app_id = #{takuAppId},
+            </if>
+            <if test="takuKey != null">
+                taku_key = #{takuKey},
+            </if>
+            <if test="takuBannerPid != null">
+                taku_banner_pid = #{takuBannerPid},
+            </if>
+            <if test="takuNativePid != null">
+                taku_native_pid = #{takuNativePid},
+            </if>
+            <if test="takuRewardPid != null">
+                taku_reward_pid = #{takuRewardPid},
+            </if>
+            <if test="takuInterstitialPid != null">
+                taku_interstitial_pid = #{takuInterstitialPid},
+            </if>
+            <if test="canUseRoot != null">
+                can_use_root = #{canUseRoot},
+            </if>
+            <if test="canUseAdb != null">
+                can_use_adb = #{canUseAdb},
+            </if>
+            <if test="canUseFloat != null">
+                can_use_float = #{canUseFloat},
+            </if>
+            <if test="canAccumulation != null">
+                can_accumulation = #{canAccumulation},
+            </if>
+            <if test="canSimulator != null">
+                can_simulator = #{canSimulator},
+            </if>
+            <if test="ditchId != null">
+                ditch_id = #{ditchId},
+            </if>
+            <if test="powerWaitTime != null">
+                power_wait_time = #{powerWaitTime},
+            </if>
+            <if test="interstitialIntervalTime != null">
+                interstitial_interval_time = #{interstitialIntervalTime},
+            </if>
+            <if test="lowValueTip != null">
+                low_value_tip = #{lowValueTip},
+            </if>
+            <if test="brushTip != null">
+                brush_tip = #{brushTip},
+            </if>
+            <if test="flowIntervalTime != null">
+                flow_interval_time = #{flowIntervalTime},
+            </if>
+            <if test="taskLimitTip != null">
+                task_limit_tip = #{taskLimitTip},
+            </if>
+            <if test="startWaitTime != null">
+                start_wait_time = #{startWaitTime},
+            </if>
+            <if test="canCacheVideo != null">
+                can_cache_video = #{canCacheVideo},
+            </if>
+            <if test="canAllowAutoRefresh != null">
+                can_allow_auto_refresh = #{canAllowAutoRefresh}
+            </if>
+            <if test="enableLoginRiskCheck != null">
+                enable_login_risk_check = #{enableLoginRiskCheck}
+            </if>
+        </set>
+        where app_id = #{appId}
+    </update>
+
+    <delete id="delByAppId">
+        delete from yt_app_default_config where app_id = #{appId}
+    </delete>
+
+    <sql id="default_select">
+        select
+            config_id,
+            config_name,
+            open_id,
+            secret,
+            app_id,
+            app_key,
+            app_type,
+            user_path,
+            login_path,
+            ad_path,
+            answer_path,
+            power_path,
+            taku_app_id,
+            taku_key,
+            taku_banner_pid,
+            taku_native_pid,
+            taku_reward_pid,
+            taku_interstitial_pid,
+            taku_screen_pid,
+            can_use_root,
+            can_use_adb,
+            can_use_float,
+            can_accumulation,
+            can_simulator,
+            ditch_id,
+            power_wait_time,
+            interstitial_interval_time,
+            low_value_tip,
+            brush_tip,
+            flow_interval_time,
+            task_limit_tip,
+            start_wait_time,
+            can_cache_video,
+            can_allow_auto_refresh,
+            enable_login_risk_check
+        from yt_app_default_config
+    </sql>
+
+    <select id="getByAppId" resultType="com.ytpm.app.view.WxDefaultConfig">
+        <include refid="default_select" />
+        where app_id = #{appId}
+    </select>
+
+    <select id="getByAppType" resultType="com.ytpm.app.view.WxDefaultConfig">
+        <include refid="default_select" />
+        where app_type = #{appType}
+    </select>
+
+    <select id="getByDitchId" resultType="com.ytpm.app.view.WxDefaultConfig">
+        <include refid="default_select" />
+        where ditch_id = #{ditchId}
+    </select>
+
+    <select id="getLastByAppId" resultType="com.ytpm.app.view.WxDefaultConfig">
+        <include refid="default_select" />
+        where app_id = #{appId}
+        limit 1
+    </select>
+
+    <select id="getLast" resultType="com.ytpm.app.view.WxDefaultConfig">
+        <include refid="default_select" />
+        ORDER BY config_id DESC
+        limit 1
+    </select>
+
+    <select id="getByAppIds" resultType="com.ytpm.app.view.WxDefaultConfig">
+        <include refid="default_select" />
+        where app_id in
+        <foreach collection="appIds.split(',')" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </select>
+
+</mapper>

+ 2 - 387
yt-ios-lemon/lemon-ios-service/src/main/resources/mapper/AppUserMapper.xml

@@ -73,112 +73,6 @@
          #{recordId},#{userId},#{type},#{remark},#{addTime}
         )
     </insert>
-    <insert id="saveAppConfig">
-        insert into yt_app_default_config
-        (
-         config_name,
-         open_id,
-         secret,
-         app_id,
-         app_key,
-         app_type,
-         ditch_id
-        )
-        values
-        (
-         #{configName},
-         #{openId},
-         #{secret},
-         #{appId},
-         #{appKey},
-         #{appType},
-         #{ditchId}
-        )
-    </insert>
-    <update id="updateAppConfig">
-        update yt_app_default_config
-        <set>
-            <if test="configName != null">
-                config_name = #{configName},
-            </if>
-            <if test="openId != null">
-                open_id = #{openId},
-            </if>
-            <if test="secret != null">
-                secret = #{secret},
-            </if>
-            <if test="appKey != null">
-                app_key = #{appKey},
-            </if>
-            <if test="appType != null">
-                app_type = #{appType},
-            </if>
-            <if test="takuAppId != null">
-                taku_app_id = #{takuAppId},
-            </if>
-            <if test="takuKey != null">
-                taku_key = #{takuKey},
-            </if>
-            <if test="takuBannerPid != null">
-                taku_banner_pid = #{takuBannerPid},
-            </if>
-            <if test="takuNativePid != null">
-                taku_native_pid = #{takuNativePid},
-            </if>
-            <if test="takuRewardPid != null">
-                taku_reward_pid = #{takuRewardPid},
-            </if>
-            <if test="takuInterstitialPid != null">
-                taku_interstitial_pid = #{takuInterstitialPid},
-            </if>
-            <if test="canUseRoot != null">
-                can_use_root = #{canUseRoot},
-            </if>
-            <if test="canUseAdb != null">
-                can_use_adb = #{canUseAdb},
-            </if>
-            <if test="canUseFloat != null">
-                can_use_float = #{canUseFloat},
-            </if>
-            <if test="canAccumulation != null">
-                can_accumulation = #{canAccumulation},
-            </if>
-            <if test="canSimulator != null">
-                can_simulator = #{canSimulator},
-            </if>
-            <if test="ditchId != null">
-                ditch_id = #{ditchId},
-            </if>
-            <if test="powerWaitTime != null">
-                power_wait_time = #{powerWaitTime},
-            </if>
-            <if test="interstitialIntervalTime != null">
-                interstitial_interval_time = #{interstitialIntervalTime},
-            </if>
-            <if test="lowValueTip != null">
-                low_value_tip = #{lowValueTip},
-            </if>
-            <if test="brushTip != null">
-                brush_tip = #{brushTip},
-            </if>
-            <if test="flowIntervalTime != null">
-                flow_interval_time = #{flowIntervalTime},
-            </if>
-            <if test="taskLimitTip != null">
-                task_limit_tip = #{taskLimitTip},
-            </if>
-            <if test="startWaitTime != null">
-                start_wait_time = #{startWaitTime},
-            </if>
-            <if test="canCacheVideo != null">
-                can_cache_video = #{canCacheVideo},
-            </if>
-            <if test="canAllowAutoRefresh != null">
-                can_allow_auto_refresh = #{canAllowAutoRefresh}
-            </if>
-        </set>
-        where app_id = #{appId}
-    </update>
     <update id="addOnePower">
         update yt_dyz_user set power = power+1 where user_id = #{userId}
     </update>
@@ -266,9 +160,7 @@
         </set>
         where user_id = #{userId}
     </update>
-    <delete id="delByAppId">
-        delete from yt_app_default_config where app_id = #{appId}
-    </delete>
+
     <select id="getYtAppUser" resultType="com.ytpm.app.model.YtDyzUser">
         select
            user_id, app_id,phone,device_id, ditch_id, nick_name,head_img, power,
@@ -532,243 +424,6 @@
             #{item}
         </foreach>
     </select>
-    <select id="getConfigByAppId" resultType="com.ytpm.app.model.YtAppDefaultConfig">
-        select
-            config_id,
-            config_name,
-            open_id,
-            secret,
-            app_id,
-            app_key,
-            app_type,
-            user_path,
-            login_path,
-            ad_path,
-            answer_path,
-            power_path,
-            taku_app_id,
-            taku_key,
-            taku_banner_pid,
-            taku_native_pid,
-            taku_reward_pid,
-            taku_interstitial_pid,
-            can_use_root,
-            can_use_adb,
-            can_use_float,
-            can_accumulation,
-            can_simulator,
-            ditch_id,
-            power_wait_time,
-            interstitial_interval_time,
-            low_value_tip,
-            brush_tip,
-            flow_interval_time,
-            task_limit_tip,
-            start_wait_time,
-            can_cache_video,
-            can_allow_auto_refresh
-        from yt_app_default_config
-        where app_id = #{appId}
-    </select>
-    <select id="getByAppId" resultType="com.ytpm.app.view.WxDefaultConfig">
-        select
-            config_id,
-            config_name,
-            open_id,
-            secret,
-            app_id,
-            app_key,
-            app_type,
-            user_path,
-            login_path,
-            ad_path,
-            answer_path,
-            power_path,
-            taku_app_id,
-            taku_key,
-            taku_banner_pid,
-            taku_native_pid,
-            taku_reward_pid,
-            taku_interstitial_pid,
-            can_use_root,
-            can_use_adb,
-            can_use_float,
-            can_accumulation,
-            can_simulator,
-            ditch_id,
-            power_wait_time,
-            interstitial_interval_time,
-            low_value_tip,
-            brush_tip,
-            flow_interval_time,
-            task_limit_tip,
-            start_wait_time,
-            can_cache_video,
-            can_allow_auto_refresh
-        from yt_app_default_config
-        where app_id = #{appId}
-    </select>
-    <select id="getDefaultConfig" resultType="com.ytpm.app.view.WxDefaultConfig">
-        select
-            config_id,
-            config_name,
-            open_id,
-            secret,
-            app_id,
-            app_key,
-            app_type,
-            user_path,
-            login_path,
-            ad_path,
-            answer_path,
-            power_path,
-            taku_app_id,
-            taku_key,
-            taku_banner_pid,
-            taku_native_pid,
-            taku_reward_pid,
-            taku_interstitial_pid,
-            can_use_root,
-            can_use_adb,
-            can_use_float,
-            can_accumulation,
-            can_simulator,
-            ditch_id,
-            power_wait_time,
-            interstitial_interval_time,
-            low_value_tip,
-            brush_tip,
-            flow_interval_time,
-            task_limit_tip,
-            start_wait_time,
-            can_cache_video,
-            can_allow_auto_refresh
-        from yt_app_default_config
-        where app_type = #{appType}
-    </select>
-    <select id="getDefaultConfigByDitchId" resultType="com.ytpm.app.view.WxDefaultConfig">
-        select
-            config_id,
-            config_name,
-            open_id,
-            secret,
-            app_id,
-            app_key,
-            app_type,
-            user_path,
-            login_path,
-            ad_path,
-            answer_path,
-            power_path,
-            taku_app_id,
-            taku_key,
-            taku_banner_pid,
-            taku_native_pid,
-            taku_reward_pid,
-            taku_interstitial_pid,
-            taku_screen_pid,
-            can_use_root,
-            can_use_adb,
-            can_use_float,
-            can_accumulation,
-            can_simulator,
-            ditch_id,
-            power_wait_time,
-            interstitial_interval_time,
-            low_value_tip,
-            brush_tip,
-            flow_interval_time,
-            task_limit_tip,
-            start_wait_time,
-            can_cache_video,
-            can_allow_auto_refresh
-        from yt_app_default_config
-        where ditch_id = #{ditchId}
-    </select>
-    <select id="getLastOne" resultType="com.ytpm.app.view.WxDefaultConfig">
-        select
-            config_id,
-            config_name,
-            open_id,
-            secret,
-            app_id,
-            app_key,
-            app_type,
-            user_path,
-            login_path,
-            ad_path,
-            answer_path,
-            power_path,
-            taku_app_id,
-            taku_key,
-            taku_banner_pid,
-            taku_native_pid,
-            taku_reward_pid,
-            taku_interstitial_pid,
-            can_use_root,
-            can_use_adb,
-            can_use_float,
-            can_accumulation,
-            can_simulator,
-            ditch_id,
-            power_wait_time,
-            interstitial_interval_time,
-            low_value_tip,
-            brush_tip,
-            flow_interval_time,
-            task_limit_tip,
-            start_wait_time,
-            can_cache_video,
-            can_allow_auto_refresh
-        from yt_app_default_config
-        where app_id =  #{appId}
-        limit 1
-    </select>
-    <select id="getLastDefaultConfig" resultType="com.ytpm.app.view.WxDefaultConfig">
-        SELECT
-            config_id,
-            config_name,
-            open_id,
-            secret,
-            app_id,
-            app_key,
-            app_type,
-            user_path,
-            login_path,
-            ad_path,
-            answer_path,
-            power_path,
-            taku_app_id,
-            taku_key,
-            taku_banner_pid,
-            taku_native_pid,
-            taku_reward_pid,
-            taku_interstitial_pid,
-            can_use_root,
-            can_use_adb,
-            can_use_float,
-            can_accumulation,
-            can_simulator,
-            ditch_id,
-            power_wait_time,
-            interstitial_interval_time,
-            low_value_tip,
-            brush_tip,
-            flow_interval_time,
-            task_limit_tip,
-            start_wait_time,
-            can_cache_video,
-            can_allow_auto_refresh
-        FROM yt_app_default_config
-        ORDER BY config_id DESC
-            LIMIT 1
-    </select>
-    <select id="getSecretByAppId" resultType="java.lang.String">
-        select
-           secret
-        from yt_app_default_config
-        where app_id = #{appId}
-    </select>
     <select id="queryByOpenid" resultType="com.ytpm.app.model.YtDyzUser">
         select
             user_id,phone,device_id, head_img, nick_name,
@@ -795,47 +450,7 @@
         and wx_open_id = #{openid}
         limit 1
     </select>
-    <select id="getConfigByIds" resultType="com.ytpm.app.view.WxDefaultConfig">
-        select
-        config_id,
-        config_name,
-        open_id,
-        secret,
-        app_id,
-        app_key,
-        app_type,
-        user_path,
-        login_path,
-        ad_path,
-        answer_path,
-        power_path,
-        taku_app_id,
-        taku_key,
-        taku_banner_pid,
-        taku_native_pid,
-        taku_reward_pid,
-        taku_interstitial_pid,
-        can_use_root,
-        can_use_adb,
-        can_use_float,
-        can_accumulation,
-        can_simulator,
-        ditch_id,
-        power_wait_time,
-        interstitial_interval_time,
-        low_value_tip,
-        brush_tip,
-        flow_interval_time,
-        task_limit_tip,
-        start_wait_time,
-        can_cache_video,
-        can_allow_auto_refresh
-        from yt_app_default_config
-        where app_id in
-        <foreach collection="appIds.split(',')" item="item" separator="," open="(" close=")">
-            #{item}
-        </foreach>
-    </select>
+
     <select id="getAdCount" resultType="java.lang.Integer">
         select
             sum(total_video)

+ 8 - 0
yt-risk/risk-feign/src/main/java/com/ytpm/feign/fallback/RiskFeignFallBack.java

@@ -5,6 +5,7 @@ import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
 import com.ytpm.general.StatusCode;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 
@@ -12,21 +13,25 @@ import org.springframework.web.bind.annotation.RequestBody;
  * 服务降级配置
  * @author EDY
  */
+@Slf4j
 @Component
 public class RiskFeignFallBack implements RiskFeign {
 
     @Override
     public Result<?> checkRisk(@RequestBody YtDyzUser ytDyzUser) {
+        log.warn("feign调用熔断放行");
         return new Result<>(StatusCode.OK, RepMessage.TOKEN_EXPIRE);
     }
 
     @Override
     public Result<?> checkAdRisk(@RequestBody YtDyzUser ytDyzUser) {
+        log.warn("feign调用熔断放行");
         return new Result<>(StatusCode.OK, RepMessage.TOKEN_EXPIRE);
     }
 
     @Override
     public Result<?> checkAdRisk766(YtDyzUser ytDyzUser) {
+        log.warn("feign调用熔断放行");
         return new Result<>(StatusCode.OK, RepMessage.TOKEN_EXPIRE);
     }
 
@@ -37,16 +42,19 @@ public class RiskFeignFallBack implements RiskFeign {
 
     @Override
     public Result<?> checkRegRisk(@RequestBody YtDyzUser ytDyzUser) {
+        log.warn("feign调用熔断放行");
         return new Result<>(StatusCode.OK, RepMessage.TOKEN_EXPIRE);
     }
 
     @Override
     public Result<?> checkLoginRisk(@RequestBody YtDyzUser ytDyzUser) {
+        log.warn("feign调用熔断放行");
         return new Result<>(StatusCode.OK, RepMessage.TOKEN_EXPIRE);
     }
 
     @Override
     public Result<?> checkVisitorLogin(YtDyzUser old) {
+        log.warn("feign调用熔断放行");
         return new Result<>(StatusCode.OK, RepMessage.TOKEN_EXPIRE);
     }
 }