| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?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.ChannelMapper">
- <insert id="insert">
- insert into yt_channel
- (
- channel_id,
- channel_name,
- login_type,
- channel_account,
- channel_pwd,
- channel_status,
- api_key,
- api_secret,
- remark,
- ad_platform_type
- )
- values
- (
- #{channelId},
- #{channelName},
- #{loginType},
- #{channelAccount},
- #{channelPwd},
- #{channelStatus},
- #{apiKey},
- #{apiSecret},
- #{remark},
- #{adPlatformType}
- )
- </insert>
- <update id="update">
- update yt_channel
- <set>
- <if test="channelName !=null">
- channel_name = #{channelName},
- </if>
- <if test="channelStatus !=null">
- channel_status = #{channelStatus},
- </if>
- <if test="apiKey !=null">
- api_key = #{apiKey},
- </if>
- <if test="apiSecret !=null">
- api_secret = #{apiSecret},
- </if>
- <if test="remark !=null">
- remark = #{remark},
- </if>
- <if test="enabled !=null">
- enabled = #{enabled},
- </if>
- <if test="adPlatformType !=null">
- ad_platform_type = #{adPlatformType},
- </if>
- <if test="channelAccount !=null">
- channel_account = #{channelAccount},
- </if>
- <if test="channelPwd !=null">
- channel_pwd = #{channelPwd},
- </if>
- <if test="loginType !=null">
- login_type = #{loginType},
- </if>
- <if test="networkId !=null">
- network_id=#{networkId}
- </if>
- </set>
- where channel_id = #{channelId}
- </update>
- <select id="channelList" 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,network_id
- 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>
|