Quellcode durchsuchen

应用管理列表
广告渠道管理列表
广告位管理列表

marxjaw vor 4 Monaten
Ursprung
Commit
dc9d0740ac

+ 4 - 0
yt-advertise/advertise-service/src/main/java/com/ytpm/service/impl/TakuApiServiceImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageInfo;
+import com.ytpm.advertise.enums.AdPlatformTypeEnum;
 import com.ytpm.advertise.param.AddPlacementParam;
 import com.ytpm.advertise.param.AppAuthContent;
 import com.ytpm.advertise.param.AuthContent;
@@ -88,6 +89,9 @@ public class TakuApiServiceImpl implements TakuApiService {
         AuthContent authContent = new AuthContent();
         authContent.setAccount_id(channelParam.getChannelAccount());
         authContent.setSecret_key(channelParam.getApiSecret());
+        if(channelParam.getAdPlatformType().equals(AdPlatformTypeEnum.KUAISHOU.getCode())){
+            authContent.setAccess_key(channelParam.getApiKey());
+        }
         network.setAuth_content(authContent);
         //设置Taku应用ID
         NetworkAppInfo networkAppInfo = new NetworkAppInfo();

+ 11 - 9
yt-agent/agent-service/src/main/resources/mapper/AgentAppMapper.xml

@@ -7,42 +7,44 @@
             ya.app_id,
             ya.app_name,
             ya.user_id,
-            ya.channel_id,
             ya.app_type,
-            ya.network_app_id,
             ya.apk_url,
             ya.qr_code,
             ya.version_code,
             ya.update_tips,
-            yc.channel_name,
             ypu.nick_name
         FROM
             yt_app ya
-                LEFT JOIN yt_channel yc ON ya.channel_id = yc.channel_id
                 LEFT JOIN yt_platform_user ypu ON ya.user_id = ypu.user_id
         WHERE
             ya.enabled = 1
           AND ya.user_id = #{userId}
     </select>
+
     <select id="searchAppList" resultType="com.ytpm.agent.view.AgentAppView">
         SELECT
             ya.app_id,
             ya.app_key,
             ya.app_name,
             ya.user_id,
-            ya.channel_id,
             ya.app_type,
-            ya.network_app_id,
             ya.apk_url,
             ya.qr_code,
             ya.version_code,
             ya.update_tips,
-            yc.channel_name,
-            ya.enabled
+            ya.enabled,
+            GROUP_CONCAT( acr.channel_id ) channel_id,
+            GROUP_CONCAT( acr.channel_name ) channel_name,
+            GROUP_CONCAT( acr.network_app_id ) network_app_id,
+            GROUP_CONCAT( acr.network_app_name ) network_app_name,
+            u.nick_name
         FROM
             yt_app ya
-                LEFT JOIN yt_channel yc ON ya.channel_id = yc.channel_id
+                LEFT JOIN yt_app_channel_relative acr ON ya.app_id = acr.app_id
+                LEFT JOIN yt_platform_user u ON ya.user_id = u.user_id
         WHERE
             ya.user_id = #{userId}
+        GROUP BY
+            ya.app_id
     </select>
 </mapper>

+ 1 - 16
yt-agent/agent-service/src/main/resources/mapper/AppMapper.xml

@@ -8,11 +8,8 @@
          app_id,
          app_key,
          app_name,
-         channel_id,
-         channel_name,
          user_id,
          app_type,
-         network_app_id,
          apk_url,
          qr_code,
          version_code,
@@ -23,11 +20,8 @@
          #{appId},
          #{appKey},
          #{appName},
-         #{channelId},
-         #{channelName},
          #{userId},
          #{appType},
-         #{networkAppId},
          #{apkUrl},
          #{qrCode},
          #{versionCode},
@@ -43,18 +37,9 @@
             <if test="appName != null">
                 app_name = #{appName},
             </if>
-            <if test="channelId != null">
-                channel_id = #{channelId},
-            </if>
-            <if test="channelName != null">
-                channel_name = #{channelName},
-            </if>
             <if test="appType != null">
                 app_type = #{appType},
             </if>
-            <if test="networkAppId != null">
-                network_app_id = #{networkAppId},
-            </if>
             <if test="versionCode != null">
                 version_code = #{versionCode},
             </if>
@@ -72,7 +57,7 @@
     </delete>
     <select id="selectPrimary" resultType="com.ytpm.agent.model.YtApp">
         select
-            app_id, app_key, app_name, channel_id, channel_name, user_id, app_type, network_app_id, apk_url, qr_code, version_code, update_tips, enabled
+            app_id, app_key, app_name,user_id, app_type, apk_url, qr_code, version_code, update_tips, enabled
         from yt_app
         where app_id = #{appId}
     </select>

+ 1 - 1
yt-agent/agent-service/src/main/resources/mapper/PlacementMapper.xml

@@ -58,7 +58,7 @@
 
     <select id="selectList" resultType="com.ytpm.agent.view.AgentPlacementView">
         select
-            placement_id, placement_name, app_id, app_name, network_app_id, network_app_name, status, remark
+            placement_id, placement_name, app_id, app_name, network_app_id, network_app_name, status, remark,ad_format,platform appType
         from yt_app_placement
     </select>
 </mapper>

+ 11 - 4
yt-common/src/main/java/com/ytpm/agent/view/AgentAppView.java

@@ -13,10 +13,6 @@ public class AgentAppView {
     private String appKey;
     @ApiModelProperty("应用名称")
     private String appName;
-    @ApiModelProperty("渠道ID")
-    private String channelId;
-    @ApiModelProperty("渠道名称")
-    private String channelName;
     @ApiModelProperty("加盟商用户ID")
     private String userId;
     @ApiModelProperty("应用类型")
@@ -31,4 +27,15 @@ public class AgentAppView {
     private String updateTips;
     @ApiModelProperty("是否启用")
     private Integer enabled;
+    @ApiModelProperty("广告渠道名称")
+    private String channelName;
+    @ApiModelProperty("广告渠道ID")
+    private String channelId;
+    @ApiModelProperty("广告渠道应用ID")
+    private String networkAppId;
+    @ApiModelProperty("广告渠道应用名称")
+    private String networkAppName;
+    @ApiModelProperty("加盟商名称")
+    private String nickName;
+    private boolean showKey;
 }