Browse Source

fix:IOS根据应用ID获取默认配置

zack 2 months ago
parent
commit
71dfe36d0b

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

@@ -82,8 +82,8 @@ public class WxController {
     @ApiOperation("IOS登录")
     @Transactional
     public Result<YtDyzUser> iosLogin(@RequestBody IosLoginParam param, HttpServletRequest request) {
-        //根据应用获取配置调用接口登录
-        WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
+        //根据应用ID获取配置调用接口登录
+        WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfigByAppId(param.getAppId());
         if(Objects.isNull(defaultConfig)){
             return new Result<>(StatusCode.ACCESS_ERR,"登录失败,未找到相应配置!");
         }
@@ -103,7 +103,7 @@ public class WxController {
     @ApiOperation("获取默认配置")
     @Transactional
     public Result<WxDefaultConfig> getByTypeId(@RequestBody IosLoginParam param){
-        WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
+        WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfigByAppId(param.getAppId());
         return Result.resultOk(RepMessage.QUERY_SUCCESS, defaultConfig);
     }
 

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

@@ -90,6 +90,11 @@ public interface AppUserMapper {
      */
     WxDefaultConfig getDefaultConfig(@Param("appType") int appType);
 
+    /**
+     * 根据应用ID查询应用默认配置
+     */
+    WxDefaultConfig getDefaultConfigByAppId(@Param("appId") String appId);
+
     /**
      * 根据微信openid查询用户
      */

+ 7 - 0
yt-ios-lemon/lemon-ios-service/src/main/resources/mapper/AppUserMapper.xml

@@ -446,6 +446,13 @@
         from yt_app_default_config
         where app_type = #{appType}
     </select>
+    <select id="getDefaultConfigByAppId" resultType="com.ytpm.app.view.WxDefaultConfig">
+        select
+            config_id, config_name, open_id appId, secret, app_id platformAppId, app_key platformAppSecret, app_type,user_path,login_path,ad_path,answer_path,power_path
+             ,can_simulator,taku_app_id,taku_key,taku_banner_pid,taku_interstitial_pid,taku_reward_pid,taku_native_pid,can_use_adb,can_accumulation,can_use_float,can_use_root,ditch_id,power_wait_time,interstitial_interval_time
+        from yt_app_default_config
+        where app_id = #{appId}
+    </select>
     <select id="getSecretByAppId" resultType="java.lang.String">
         select
            secret