Bladeren bron

app关联接口修改、广告源接口增删改查

小杜 4 maanden geleden
bovenliggende
commit
d59e85d01c
20 gewijzigde bestanden met toevoegingen van 516 en 20 verwijderingen
  1. 10 4
      yt-advertise/advertise-feign/src/main/java/com/ytpm/feign/AdvertiseFeign.java
  2. 28 5
      yt-advertise/advertise-service/src/main/java/com/ytpm/controller/AdvertiseController.java
  3. 62 0
      yt-agent/agent-service/src/main/java/com/ytpm/controller/AgentAdSourceController.java
  4. 10 0
      yt-agent/agent-service/src/main/java/com/ytpm/controller/AgentChannelController.java
  5. 20 0
      yt-agent/agent-service/src/main/java/com/ytpm/dao/AdSourceMapper.java
  6. 10 0
      yt-agent/agent-service/src/main/java/com/ytpm/dao/AppChannelRelativeMapper.java
  7. 7 0
      yt-agent/agent-service/src/main/java/com/ytpm/dao/ChannelMapper.java
  8. 23 0
      yt-agent/agent-service/src/main/java/com/ytpm/service/AdSourceService.java
  9. 6 0
      yt-agent/agent-service/src/main/java/com/ytpm/service/ChannelService.java
  10. 78 0
      yt-agent/agent-service/src/main/java/com/ytpm/service/impl/AdSourceServiceImpl.java
  11. 13 11
      yt-agent/agent-service/src/main/java/com/ytpm/service/impl/AgentAppServiceImpl.java
  12. 7 0
      yt-agent/agent-service/src/main/java/com/ytpm/service/impl/ChannelServiceImpl.java
  13. 63 0
      yt-agent/agent-service/src/main/resources/mapper/AdSourceMapper.xml
  14. 7 0
      yt-agent/agent-service/src/main/resources/mapper/ChannelMapper.xml
  15. 13 0
      yt-common/src/main/java/com/ytpm/advertise/param/ChannelAppParam.java
  16. 38 0
      yt-common/src/main/java/com/ytpm/agent/model/YtAppAdSource.java
  17. 31 0
      yt-common/src/main/java/com/ytpm/agent/model/YtAppChannelRelative.java
  18. 27 0
      yt-common/src/main/java/com/ytpm/agent/param/AdSourceListParam.java
  19. 49 0
      yt-common/src/main/java/com/ytpm/agent/param/AdSourceParam.java
  20. 14 0
      yt-common/src/main/java/com/ytpm/agent/view/AgentAdSourceView.java

+ 10 - 4
yt-advertise/advertise-feign/src/main/java/com/ytpm/feign/AdvertiseFeign.java

@@ -1,14 +1,12 @@
 package com.ytpm.feign;
 
-import com.ytpm.advertise.param.AddAppParam;
-import com.ytpm.advertise.param.AddPlacementParam;
-import com.ytpm.advertise.param.ComprehensiveReportParam;
-import com.ytpm.advertise.param.RelativeChannelParam;
+import com.ytpm.advertise.param.*;
 import com.ytpm.advertise.view.AddAppResponse;
 import com.ytpm.advertise.view.AddPlacementResponse;
 import com.ytpm.advertise.view.ComprehensiveAppReport;
 import com.ytpm.general.Result;
 import com.ytpm.general.ResultTable;
+import io.swagger.annotations.ApiOperation;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -32,4 +30,12 @@ public interface AdvertiseFeign {
     Result<?> delPlacement(@RequestParam("placementId")String placementId);
     @PostMapping("/advertise/getAppReport")
     List<ComprehensiveAppReport> getAppReport(@RequestBody ComprehensiveReportParam param);
+
+    @GetMapping("/delAdSource")
+    Result<?> delAdSource(@RequestParam("adSourceId") Integer adSourceId);
+    @PostMapping("/saveAdSource")
+    Result<?> saveAdSource(@RequestBody UnitsParam param);
+
+    @PostMapping("/updateAdSource")
+    Result<?> updateAdSource(@RequestBody UnitsParam param);
 }

+ 28 - 5
yt-advertise/advertise-service/src/main/java/com/ytpm/controller/AdvertiseController.java

@@ -1,10 +1,6 @@
 package com.ytpm.controller;
 
-import com.ytpm.advertise.param.AddAppParam;
-import com.ytpm.advertise.param.AddPlacementParam;
-import com.ytpm.advertise.param.ComprehensiveReportParam;
-import com.ytpm.advertise.param.PlacementParam;
-import com.ytpm.advertise.param.RelativeChannelParam;
+import com.ytpm.advertise.param.*;
 import com.ytpm.advertise.view.AddAppResponse;
 import com.ytpm.advertise.view.AddPlacementResponse;
 import com.ytpm.advertise.view.AppV1View;
@@ -88,6 +84,33 @@ public class AdvertiseController {
         return takuApiService.delPlacement(Collections.singletonList(placementId));
     }
 
+    /**
+     * 删除广告源
+     */
+    @ApiOperation("删除广告源")
+    @GetMapping("/delAdSource")
+    public Result<?> delAdSource(@RequestParam("adSourceId")Integer adSourceId) {
+        return takuApiService.delUnits(Collections.singletonList(adSourceId));
+    }
+
+    /**
+     * 新增广告源
+     */
+    @ApiOperation("新增广告源")
+    @PostMapping("/saveAdSource")
+    public Result<?> saveAdSource(@RequestBody UnitsParam param) {
+        return takuApiService.saveUnits(param);
+    }
+
+    /**
+     * 修改广告源
+     */
+    @ApiOperation("修改广告源")
+    @PostMapping("/updateAdSource")
+    public Result<?> updateAdSource(@RequestBody UnitsParam param) {
+        return takuApiService.updateUnits(param);
+    }
+
     /**
      * 根据应用分组查询数据报表
      */

+ 62 - 0
yt-agent/agent-service/src/main/java/com/ytpm/controller/AgentAdSourceController.java

@@ -0,0 +1,62 @@
+package com.ytpm.controller;
+
+import com.ytpm.agent.param.AdSourceListParam;
+import com.ytpm.agent.param.AdSourceParam;
+import com.ytpm.agent.view.AgentAdSourceView;
+import com.ytpm.agent.view.AgentUserInfo;
+import com.ytpm.general.Result;
+import com.ytpm.general.ResultTable;
+import com.ytpm.service.impl.AdSourceServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.core.annotation.AuthenticationPrincipal;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.annotation.Resource;
+
+@Api(tags = "广告源管理模块")
+@RestController
+@RequestMapping("/adSource")
+public class AgentAdSourceController {
+    @Resource
+    private AdSourceServiceImpl adSourceService;
+
+
+    /**
+     * 获取广告源列表
+     */
+    @ApiOperation("获取广告源列表")
+    @PostMapping("/list")
+    public ResultTable<AgentAdSourceView> list(@RequestBody AdSourceListParam param,@ApiIgnore @AuthenticationPrincipal AgentUserInfo userInfo) {
+        return adSourceService.adSourceList(param);
+    }
+
+    /**
+     * 新增广告源
+     */
+    @ApiOperation("新增广告源")
+    @PostMapping("/addOne")
+    public Result<?> addOne(@RequestBody AdSourceParam param,@ApiIgnore @AuthenticationPrincipal AgentUserInfo userInfo){
+        return adSourceService.addOne(param);
+    }
+
+    /**
+     * 修改广告源
+     */
+    @ApiOperation("修改广告源")
+    @PostMapping("/updateOne")
+    public Result<?> updateOne(@RequestBody AdSourceParam param){
+        return adSourceService.updateOne(param);
+    }
+
+    /**
+     * 删除广告渠道
+     */
+    @ApiOperation("删除广告源")
+    @GetMapping("/deleteOne")
+    public Result<?> deleteOne(@RequestParam("adSourceId")Integer adSourceId){
+        return adSourceService.deleteOne(adSourceId);
+    }
+
+}

+ 10 - 0
yt-agent/agent-service/src/main/java/com/ytpm/controller/AgentChannelController.java

@@ -1,5 +1,6 @@
 package com.ytpm.controller;
 
+import com.ytpm.advertise.param.ChannelAppParam;
 import com.ytpm.agent.param.ChannelListParam;
 import com.ytpm.agent.param.ChannelParam;
 import com.ytpm.agent.view.AgentChannelView;
@@ -60,4 +61,13 @@ public class AgentChannelController {
     public Result<?> deleteOne(@RequestParam("channelId")String channelId){
         return channelService.deleteOne(channelId);
     }
+
+    /**
+     * 过滤指定app已经关联过的渠道
+     */
+    @ApiOperation("过滤指定app已经关联过的渠道")
+    @PostMapping("/relativeChannel")
+    public ResultTable<AgentChannelView>  relativeChannel(@RequestBody ChannelAppParam param){
+        return channelService.relativeChannel(param);
+    }
 }

+ 20 - 0
yt-agent/agent-service/src/main/java/com/ytpm/dao/AdSourceMapper.java

@@ -0,0 +1,20 @@
+package com.ytpm.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ytpm.agent.model.YtAppAdSource;
+import com.ytpm.agent.param.AdSourceListParam;
+import com.ytpm.agent.view.AgentAdSourceView;
+
+import java.util.List;
+
+/**
+ * 广告源mapper
+ */
+public interface AdSourceMapper extends BaseMapper<YtAppAdSource> {
+
+    List<AgentAdSourceView> adSourceList(AdSourceListParam param);
+
+    void update(YtAppAdSource ytAppAdSource);
+
+    void insertOne(YtAppAdSource ytAppAdSource);
+}

+ 10 - 0
yt-agent/agent-service/src/main/java/com/ytpm/dao/AppChannelRelativeMapper.java

@@ -0,0 +1,10 @@
+package com.ytpm.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ytpm.agent.model.YtAppChannelRelative;
+
+/**
+ * app关联渠道 中间表
+ */
+public interface AppChannelRelativeMapper extends BaseMapper<YtAppChannelRelative> {
+}

+ 7 - 0
yt-agent/agent-service/src/main/java/com/ytpm/dao/ChannelMapper.java

@@ -20,4 +20,11 @@ public interface ChannelMapper {
      * 新增广告渠道
      */
     void insert(YtChannel channel);
+
+    /**
+     * 过滤指定app已经关联过的渠道
+     */
+    List<AgentChannelView> relativeChannel(String appId);
+
+
 }

+ 23 - 0
yt-agent/agent-service/src/main/java/com/ytpm/service/AdSourceService.java

@@ -0,0 +1,23 @@
+package com.ytpm.service;
+
+import com.ytpm.agent.param.AdSourceListParam;
+import com.ytpm.agent.param.AdSourceParam;
+import com.ytpm.agent.view.AgentAdSourceView;
+import com.ytpm.general.Result;
+import com.ytpm.general.ResultTable;
+
+/**
+ * 广告源service
+ */
+public interface AdSourceService {
+    /**
+     * 获取广告源列表
+     */
+    ResultTable<AgentAdSourceView> adSourceList(AdSourceListParam param);
+
+    Result<?> addOne(AdSourceParam param);
+
+    Result<?> updateOne(AdSourceParam param);
+
+    Result<?> deleteOne(Integer adSourceId);
+}

+ 6 - 0
yt-agent/agent-service/src/main/java/com/ytpm/service/ChannelService.java

@@ -1,5 +1,6 @@
 package com.ytpm.service;
 
+import com.ytpm.advertise.param.ChannelAppParam;
 import com.ytpm.agent.param.ChannelListParam;
 import com.ytpm.agent.param.ChannelParam;
 import com.ytpm.agent.view.AgentChannelView;
@@ -26,4 +27,9 @@ public interface ChannelService {
      * 删除广告渠道
      */
     Result<?> deleteOne(String channelId);
+
+    /**
+     * 过滤指定app已经关联过的渠道
+     */
+    ResultTable<AgentChannelView>  relativeChannel(ChannelAppParam param);
 }

+ 78 - 0
yt-agent/agent-service/src/main/java/com/ytpm/service/impl/AdSourceServiceImpl.java

@@ -0,0 +1,78 @@
+package com.ytpm.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ytpm.agent.model.YtAppAdSource;
+import com.ytpm.agent.param.AdSourceListParam;
+import com.ytpm.agent.param.AdSourceParam;
+import com.ytpm.agent.view.AgentAdSourceView;
+import com.ytpm.dao.AdSourceMapper;
+import com.ytpm.feign.AdvertiseFeign;
+import com.ytpm.general.RepMessage;
+import com.ytpm.general.Result;
+import com.ytpm.general.ResultTable;
+import com.ytpm.service.AdSourceService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+public class AdSourceServiceImpl implements AdSourceService {
+
+    @Resource
+    private AdSourceMapper adSourceMapper;
+
+    @Resource
+    private AdvertiseFeign advertiseFeign;
+
+    @Override
+    public ResultTable<AgentAdSourceView> adSourceList(AdSourceListParam param) {
+        PageHelper.startPage(param.getPage(), param.getLimit());
+        List<AgentAdSourceView> agentAdSourceViews = adSourceMapper.adSourceList(param);
+        return ResultTable.resultTableOk(new PageInfo<>(agentAdSourceViews));
+    }
+
+    @Override
+    public Result<?> addOne(AdSourceParam param) {
+        //todo 调用api接口进行广告源新增
+//        UnitsParam unitsParam = new UnitsParam();
+//        unitsParam.setPlacement_id(param.getPlacementId());
+//        UnitsItemParam unitsItemParam = new UnitsItemParam();
+//        BeanUtil.copyProperties(param,unitsItemParam);
+//        unitsItemParam.setAdsource_token();
+//        advertiseFeign.saveAdSource();
+        YtAppAdSource ytAppAdSource = new YtAppAdSource();
+        ytAppAdSource.setName(param.getName());
+        ytAppAdSource.setType(param.getType());
+        ytAppAdSource.setMixFormat(param.getMix_format());
+        ytAppAdSource.setPlacementId(param.getPlacementId());
+        ytAppAdSource.setEnabled(1);
+        adSourceMapper.insertOne(ytAppAdSource);
+        return Result.resultOk(RepMessage.SAVE_SUCCESS);
+    }
+
+    @Override
+    public Result<?> updateOne(AdSourceParam param) {
+        //todo 调用api接口进行广告源修改
+        YtAppAdSource ytAppAdSource = new YtAppAdSource();
+        ytAppAdSource.setAdSourceId(param.getAdSourceId());
+        ytAppAdSource.setName(param.getName());
+        ytAppAdSource.setType(param.getType());
+        ytAppAdSource.setMixFormat(param.getMix_format());
+        ytAppAdSource.setPlacementId(param.getPlacementId());
+        ytAppAdSource.setEnabled(1);
+        adSourceMapper.update(ytAppAdSource);
+        return Result.resultOk(RepMessage.MODIFY_SUCCESS);
+    }
+
+    @Override
+    public Result<?> deleteOne(Integer adSourceId) {
+        advertiseFeign.delAdSource(adSourceId);
+        YtAppAdSource ytAppAdSource = new YtAppAdSource();
+        ytAppAdSource.setEnabled(0);
+        ytAppAdSource.setAdSourceId(adSourceId);
+        adSourceMapper.update(ytAppAdSource);
+        return Result.resultOk(RepMessage.DELETE_SUCCESS);
+    }
+}

+ 13 - 11
yt-agent/agent-service/src/main/java/com/ytpm/service/impl/AgentAppServiceImpl.java

@@ -12,11 +12,13 @@ import com.ytpm.advertise.param.RelativeChannelParam;
 import com.ytpm.advertise.view.AddAppResponse;
 import com.ytpm.advertise.view.ComprehensiveAppReport;
 import com.ytpm.agent.model.YtApp;
+import com.ytpm.agent.model.YtAppChannelRelative;
 import com.ytpm.agent.param.AppListParam;
 import com.ytpm.agent.param.AppParam;
 import com.ytpm.agent.view.AgentAppView;
 import com.ytpm.agent.view.AgentEnableAppView;
 import com.ytpm.dao.AgentAppMapper;
+import com.ytpm.dao.AppChannelRelativeMapper;
 import com.ytpm.dao.AppMapper;
 import com.ytpm.feign.AdvertiseFeign;
 import com.ytpm.general.RepMessage;
@@ -29,11 +31,7 @@ import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
 import java.util.stream.Collectors;
 
 
@@ -48,6 +46,9 @@ public class AgentAppServiceImpl implements AgentAppService {
     @Resource
     private AppMapper appMapper;
 
+    @Resource
+    private AppChannelRelativeMapper appChannelRelativeMapper;
+
     /**
      * 查询渠道启用的应用列表
      */
@@ -171,12 +172,13 @@ public class AgentAppServiceImpl implements AgentAppService {
             Result.resultErr(RepMessage.OBJECT_NOT_EXIST);
         }
         advertiseFeign.relativePlatform(param);
-        YtApp app = new YtApp();
-        app.setAppId(param.getAppId());
-        app.setChannelId(param.getChannelId());
-        app.setChannelName(param.getChannelName());
-        app.setNetworkAppId(param.getNetworkAppId());
-        appMapper.updateOne(app);
+        YtAppChannelRelative ytAppChannelRelative = new YtAppChannelRelative();
+        ytAppChannelRelative.setRelativeId(UUID.randomUUID().toString().replace("-",""));
+        ytAppChannelRelative.setAppId(param.getAppId());
+        ytAppChannelRelative.setChannelId(param.getChannelId());
+        ytAppChannelRelative.setChannelName(param.getChannelName());
+        ytAppChannelRelative.setNetworkAppId(param.getNetworkAppId());
+        appChannelRelativeMapper.insert(ytAppChannelRelative);
         return Result.resultOk(RepMessage.RELATIVE_SUCCESS);
     }
 

+ 7 - 0
yt-agent/agent-service/src/main/java/com/ytpm/service/impl/ChannelServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.ytpm.advertise.enums.AdPlatformTypeEnum;
+import com.ytpm.advertise.param.ChannelAppParam;
 import com.ytpm.agent.model.YtChannel;
 import com.ytpm.agent.param.ChannelListParam;
 import com.ytpm.agent.param.ChannelParam;
@@ -69,4 +70,10 @@ public class ChannelServiceImpl implements ChannelService {
         channelMapper.update(channel);
         return Result.resultOk(RepMessage.DELETE_SUCCESS);
     }
+
+    @Override
+    public ResultTable<AgentChannelView> relativeChannel(ChannelAppParam param) {
+        PageHelper.startPage(param.getPage(), param.getLimit());
+        return ResultTable.resultTableOk(new PageInfo<AgentChannelView>(channelMapper.relativeChannel(param.getAppId())));
+    }
 }

+ 63 - 0
yt-agent/agent-service/src/main/resources/mapper/AdSourceMapper.xml

@@ -0,0 +1,63 @@
+<?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.dao.AdSourceMapper">
+
+    <insert id="insertOne">
+        insert into yt_app_ad_source
+        (
+            ad_source_id,
+            name,
+            placement_id,
+            type,
+            mix_format,
+            enabled
+        )
+        values
+            (
+                #{adSourceId},
+                #{name},
+                #{placementId},
+                #{type},
+                #{mixFormat},
+                #{enabled}
+            )
+    </insert>
+
+    <update id="update">
+        update yt_app_ad_source
+        <set>
+            <if test="name !=null">
+                name = #{name},
+            </if>
+            <if test="placementId !=null">
+                placement_id = #{placementId},
+            </if>
+            <if test="type !=null">
+                type = #{type},
+            </if>
+            <if test="mixFormat !=null">
+                mix_format = #{mixFormat},
+            </if>
+            <if test="enabled !=null">
+                enabled = #{enabled},
+            </if>
+        </set>
+        where ad_source_id = #{adSourceId}
+    </update>
+
+    <select id="adSourceList" resultType="com.ytpm.agent.view.AgentAdSourceView">
+        select
+            ad_source_id, name, type, mix_format,placement_id
+        from yt_app_ad_source
+        <where>
+            <if test="placementId != null">
+                placement_id=#{placementId}
+            </if>
+            <if test="name != null and name != ''">
+                AND name LIKE CONCAT('%', #{name}, '%')
+            </if>
+            and enabled=1
+        </where>
+    </select>
+
+</mapper>

+ 7 - 0
yt-agent/agent-service/src/main/resources/mapper/ChannelMapper.xml

@@ -72,4 +72,11 @@
         from yt_channel
         where enabled = 1
     </select>
+    
+    <select id="relativeChannel" resultType="com.ytpm.agent.view.AgentChannelView">
+        select
+            channel_id, channel_name, login_type, channel_account, channel_pwd, channel_status, api_key, api_secret, remark, enabled,ad_platform_type
+        from yt_channel
+        where enabled = 1 and  channel_id not in (select channel_id from yt_app_channel_relative where app_id=#{appId})
+    </select>
 </mapper>

+ 13 - 0
yt-common/src/main/java/com/ytpm/advertise/param/ChannelAppParam.java

@@ -0,0 +1,13 @@
+package com.ytpm.advertise.param;
+
+import com.ytpm.general.PageMeta;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class ChannelAppParam extends PageMeta {
+    private String appId;
+}

+ 38 - 0
yt-common/src/main/java/com/ytpm/agent/model/YtAppAdSource.java

@@ -0,0 +1,38 @@
+package com.ytpm.agent.model;
+
+import lombok.Data;
+
+@Data
+public class YtAppAdSource {
+    /**
+     * id
+     */
+    private Integer adSourceId;
+    /**
+     * 名称
+     */
+    private String name;
+    /**
+     * 广告位id
+     */
+    private String placementId;
+    /** 广告源类型
+     2:常规广告源
+     10:兜底广告源
+     12:客户端竞价广告源
+     13:服务端竞价广告源 */
+    private String type;
+    /**
+     * 混合样式
+     * -1: 非混合类型
+     * 0:混合native类型
+     * 1:混合rewarded_video类型
+     * 2:混合banner类型
+     * 3:混合interstitial类型
+     * 4:混合splash类型
+     */
+    private String mixFormat;
+
+    private Integer enabled;
+
+}

+ 31 - 0
yt-common/src/main/java/com/ytpm/agent/model/YtAppChannelRelative.java

@@ -0,0 +1,31 @@
+package com.ytpm.agent.model;
+
+import lombok.Data;
+
+@Data
+public class YtAppChannelRelative {
+    /**
+     * 关联id
+     */
+    private String relativeId;
+    /**
+     * 平台应用id
+     */
+    private String appId;
+    /**
+     * 广告渠道id
+     */
+    private String channelId;
+    /**
+     * 广告渠道名称
+     */
+    private String channelName;
+    /**
+     * 关联渠道应用ID
+     */
+    private String networkAppId;
+    /**
+     * 关联的渠道应用名称
+     */
+    private String networkAppName;
+}

+ 27 - 0
yt-common/src/main/java/com/ytpm/agent/param/AdSourceListParam.java

@@ -0,0 +1,27 @@
+package com.ytpm.agent.param;
+
+import com.ytpm.general.PageMeta;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@NoArgsConstructor
+@AllArgsConstructor
+@ApiModel("广告源管理列表入参")
+public class AdSourceListParam extends PageMeta {
+    /**
+     * 广告位id
+     */
+    @ApiModelProperty("广告位id")
+    private String placementId;
+    /**
+     * 广告源名称
+     */
+    @ApiModelProperty("名称")
+    private String name;
+}

+ 49 - 0
yt-common/src/main/java/com/ytpm/agent/param/AdSourceParam.java

@@ -0,0 +1,49 @@
+package com.ytpm.agent.param;
+
+import com.ytpm.general.PageMeta;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@NoArgsConstructor
+@AllArgsConstructor
+@ApiModel("新增广告源入参")
+public class AdSourceParam  {
+    /**
+     * 广告位id
+     */
+    @ApiModelProperty("广告位id")
+    private String placementId;
+    /**
+     * 广告源名称
+     */
+    @ApiModelProperty("名称")
+    private String name;
+
+    /** Taku广告平台账号ID */
+    @ApiModelProperty("Taku广告平台账号ID")
+    private String network_id;
+
+    /** 广告源类型
+     2:常规广告源
+     10:兜底广告源
+     12:客户端竞价广告源
+     13:服务端竞价广告源 */
+    @ApiModelProperty("广告源类型")
+    private String type;
+    /** -1: 非混合类型
+     0:混合native类型
+     1:混合rewarded_video类型
+     2:混合banner类型
+     3:混合interstitial类型
+     4:混合splash类型 */
+    @ApiModelProperty("混合样式")
+    private String mix_format;
+    @ApiModelProperty("修改时传递")
+    private Integer adSourceId;
+}

+ 14 - 0
yt-common/src/main/java/com/ytpm/agent/view/AgentAdSourceView.java

@@ -0,0 +1,14 @@
+package com.ytpm.agent.view;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@Data
+@ApiModel("广告源信息")
+public class AgentAdSourceView {
+    private Integer adSourceId;
+    private String placementId;
+    private String name;
+    private String type;
+    private String mixFormat;
+}