KuaishouLaunchGroupMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruixuan.launch.mapper.KuaishouLaunchGroupMapper">
  6. <resultMap type="com.ruixuan.launch.entity.KuaishouLaunchGroup" id="KuaishouLaunchGroupResult">
  7. <result property="id" column="id"/>
  8. <result property="accountId" column="account_id"/>
  9. <result property="campaignId" column="campaign_id"/>
  10. <result property="unitId" column="unit_id"/>
  11. <result property="unitName" column="unit_name"/>
  12. <result property="putStatus" column="put_status"/>
  13. <result property="cpaBid" column="cpa_bid"/>
  14. <result property="bidType" column="bid_type"/>
  15. <result property="ocpxActionType" column="ocpx_action_type"/>
  16. <result property="roiRatio" column="roi_ratio"/>
  17. <result property="sceneId" column="scene_id"/>
  18. <result property="unitType" column="unit_type"/>
  19. <result property="beginTimeStr" column="begin_time_str"/>
  20. <result property="endTimeStr" column="end_time_str"/>
  21. <result property="scheduleTime" column="schedule_time"/>
  22. <result property="dayBudget" column="day_budget"/>
  23. <result property="supportType" column="support_type"/>
  24. <result property="showMode" column="show_mode"/>
  25. <result property="speed" column="speed"/>
  26. <result property="statDate" column="stat_date"/>
  27. <result property="itemId" column="item_id"/>
  28. <result property="merchantItemPutType" column="merchant_item_put_type"/>
  29. <result property="shoppingCarProductId" column="shopping_car_product_id"/>
  30. <result property="liveUserId" column="live_user_id"/>
  31. <result property="createTime" column="create_time"/>
  32. <result property="updateTime" column="update_time"/>
  33. </resultMap>
  34. <sql id="selectKuaishouLaunchGroupVo">
  35. select id,
  36. account_id,
  37. campaign_id,
  38. unit_id,
  39. unit_name,
  40. put_status,
  41. cpa_bid,
  42. bid_type,
  43. ocpx_action_type,
  44. roi_ratio,
  45. scene_id,
  46. unit_type,
  47. begin_time_str,
  48. end_time_str,
  49. schedule_time,
  50. day_budget,
  51. support_type,
  52. show_mode,
  53. speed,
  54. stat_date,
  55. item_id,
  56. merchant_item_put_type,
  57. shopping_car_product_id,
  58. live_user_id,
  59. create_time,
  60. update_time
  61. from kuaishou_launch_group
  62. </sql>
  63. <select id="selectKuaishouLaunchGroupList" parameterType="com.ruixuan.launch.entity.KuaishouLaunchGroup"
  64. resultMap="KuaishouLaunchGroupResult">
  65. <include refid="selectKuaishouLaunchGroupVo"/>
  66. <where>
  67. <if test="accountId != null ">and account_id = #{accountId}</if>
  68. <if test="campaignId != null ">and campaign_id = #{campaignId}</if>
  69. <if test="unitId != null ">and unit_id = #{unitId}</if>
  70. <if test="unitName != null and unitName != ''">and unit_name like concat('%', #{unitName}, '%')</if>
  71. <if test="putStatus != null ">and put_status = #{putStatus}</if>
  72. <if test="cpaBid != null ">and cpa_bid = #{cpaBid}</if>
  73. <if test="bidType != null ">and bid_type = #{bidType}</if>
  74. <if test="ocpxActionType != null ">and ocpx_action_type = #{ocpxActionType}</if>
  75. <if test="roiRatio != null ">and roi_ratio = #{roiRatio}</if>
  76. <if test="sceneId != null and sceneId != ''">and scene_id = #{sceneId}</if>
  77. <if test="unitType != null ">and unit_type = #{unitType}</if>
  78. <if test="beginTimeStr != null and beginTimeStr != ''">and begin_time_str = #{beginTimeStr}
  79. </if>
  80. <if test="endTimeStr != null and endTimeStr != ''">and end_time_str = #{endTimeStr}</if>
  81. <if test="scheduleTime != null and scheduleTime != ''">and schedule_time = #{scheduleTime}</if>
  82. <if test="dayBudget != null ">and day_budget = #{dayBudget}</if>
  83. <if test="supportType != null ">and support_type = #{supportType}</if>
  84. <if test="showMode != null ">and show_mode = #{showMode}</if>
  85. <if test="speed != null ">and speed = #{speed}</if>
  86. <if test="statDate != null ">and stat_date = #{statDate}</if>
  87. <if test="itemId != null ">and item_id = #{itemId}</if>
  88. <if test="merchantItemPutType != null ">and merchant_item_put_type = #{merchantItemPutType}</if>
  89. <if test="shoppingCarProductId != null ">and shopping_car_product_id = #{shoppingCarProductId}</if>
  90. <if test="liveUserId != null ">and live_user_id = #{liveUserId}</if>
  91. </where>
  92. </select>
  93. <select id="selectKuaishouLaunchGroupById" parameterType="String" resultMap="KuaishouLaunchGroupResult">
  94. <include refid="selectKuaishouLaunchGroupVo"/>
  95. where id = #{id}
  96. </select>
  97. <insert id="insertKuaishouLaunchGroup" parameterType="com.ruixuan.launch.entity.KuaishouLaunchGroup">
  98. insert into kuaishou_launch_group
  99. <trim prefix="(" suffix=")" suffixOverrides=",">
  100. <if test="id != null">id,</if>
  101. <if test="accountId != null">account_id,</if>
  102. <if test="campaignId != null">campaign_id,</if>
  103. <if test="unitId != null">unit_id,</if>
  104. <if test="unitName != null">unit_name,</if>
  105. <if test="putStatus != null">put_status,</if>
  106. <if test="cpaBid != null">cpa_bid,</if>
  107. <if test="bidType != null">bid_type,</if>
  108. <if test="ocpxActionType != null">ocpx_action_type,</if>
  109. <if test="roiRatio != null">roi_ratio,</if>
  110. <if test="sceneId != null">scene_id,</if>
  111. <if test="unitType != null">unit_type,</if>
  112. <if test="beginTimeStr != null">begin_time_str,</if>
  113. <if test="endTimeStr != null">end_time_str,</if>
  114. <if test="scheduleTime != null">schedule_time,</if>
  115. <if test="dayBudget != null">day_budget,</if>
  116. <if test="supportType != null">support_type,</if>
  117. <if test="showMode != null">show_mode,</if>
  118. <if test="speed != null">speed,</if>
  119. <if test="statDate != null">stat_date,</if>
  120. <if test="itemId != null">item_id,</if>
  121. <if test="merchantItemPutType != null">merchant_item_put_type,</if>
  122. <if test="shoppingCarProductId != null">shopping_car_product_id,</if>
  123. <if test="liveUserId != null">live_user_id,</if>
  124. <if test="createTime != null">create_time,</if>
  125. <if test="updateTime != null">update_time,</if>
  126. </trim>
  127. <trim prefix="values (" suffix=")" suffixOverrides=",">
  128. <if test="id != null">#{id},</if>
  129. <if test="accountId != null">#{accountId},</if>
  130. <if test="campaignId != null">#{campaignId},</if>
  131. <if test="unitId != null">#{unitId},</if>
  132. <if test="unitName != null">#{unitName},</if>
  133. <if test="putStatus != null">#{putStatus},</if>
  134. <if test="cpaBid != null">#{cpaBid},</if>
  135. <if test="bidType != null">#{bidType},</if>
  136. <if test="ocpxActionType != null">#{ocpxActionType},</if>
  137. <if test="roiRatio != null">#{roiRatio},</if>
  138. <if test="sceneId != null">#{sceneId},</if>
  139. <if test="unitType != null">#{unitType},</if>
  140. <if test="beginTimeStr != null">#{beginTimeStr},</if>
  141. <if test="endTimeStr != null">#{endTimeStr},</if>
  142. <if test="scheduleTime != null">#{scheduleTime},</if>
  143. <if test="dayBudget != null">#{dayBudget},</if>
  144. <if test="supportType != null">#{supportType},</if>
  145. <if test="showMode != null">#{showMode},</if>
  146. <if test="speed != null">#{speed},</if>
  147. <if test="statDate != null">#{statDate},</if>
  148. <if test="itemId != null">#{itemId},</if>
  149. <if test="merchantItemPutType != null">#{merchantItemPutType},</if>
  150. <if test="shoppingCarProductId != null">#{shoppingCarProductId},</if>
  151. <if test="liveUserId != null">#{liveUserId},</if>
  152. <if test="createTime != null">#{createTime},</if>
  153. <if test="updateTime != null">#{updateTime},</if>
  154. </trim>
  155. </insert>
  156. <update id="updateKuaishouLaunchGroup" parameterType="com.ruixuan.launch.entity.KuaishouLaunchGroup">
  157. update kuaishou_launch_group
  158. <trim prefix="SET" suffixOverrides=",">
  159. <if test="accountId != null">account_id = #{accountId},</if>
  160. <if test="campaignId != null">campaign_id = #{campaignId},</if>
  161. <if test="unitId != null">unit_id = #{unitId},</if>
  162. <if test="unitName != null">unit_name = #{unitName},</if>
  163. <if test="putStatus != null">put_status = #{putStatus},</if>
  164. <if test="cpaBid != null">cpa_bid = #{cpaBid},</if>
  165. <if test="bidType != null">bid_type = #{bidType},</if>
  166. <if test="ocpxActionType != null">ocpx_action_type = #{ocpxActionType},</if>
  167. <if test="roiRatio != null">roi_ratio = #{roiRatio},</if>
  168. <if test="sceneId != null">scene_id = #{sceneId},</if>
  169. <if test="unitType != null">unit_type = #{unitType},</if>
  170. <if test="beginTimeStr != null">begin_time_str = #{beginTimeStr},</if>
  171. <if test="endTimeStr != null">end_time_str = #{endTimeStr},</if>
  172. <if test="scheduleTime != null">schedule_time = #{scheduleTime},</if>
  173. <if test="dayBudget != null">day_budget = #{dayBudget},</if>
  174. <if test="supportType != null">support_type = #{supportType},</if>
  175. <if test="showMode != null">show_mode = #{showMode},</if>
  176. <if test="speed != null">speed = #{speed},</if>
  177. <if test="statDate != null">stat_date = #{statDate},</if>
  178. <if test="itemId != null">item_id = #{itemId},</if>
  179. <if test="merchantItemPutType != null">merchant_item_put_type = #{merchantItemPutType},</if>
  180. <if test="shoppingCarProductId != null">shopping_car_product_id = #{shoppingCarProductId},</if>
  181. <if test="liveUserId != null">live_user_id = #{liveUserId},</if>
  182. <if test="createTime != null">create_time = #{createTime},</if>
  183. <if test="updateTime != null">update_time = #{updateTime},</if>
  184. </trim>
  185. where id = #{id}
  186. </update>
  187. <delete id="deleteKuaishouLaunchGroupById" parameterType="String">
  188. delete
  189. from kuaishou_launch_group
  190. where id = #{id}
  191. </delete>
  192. <delete id="deleteKuaishouLaunchGroupByIds" parameterType="String">
  193. delete from kuaishou_launch_group where id in
  194. <foreach item="id" collection="array" open="(" separator="," close=")">
  195. #{id}
  196. </foreach>
  197. </delete>
  198. </mapper>