|
|
@@ -66,112 +66,6 @@
|
|
|
#{recordId},#{userId},#{type},#{remark},#{addTime}
|
|
|
)
|
|
|
</insert>
|
|
|
- <insert id="saveAppConfig">
|
|
|
- insert into yt_app_default_config
|
|
|
- (
|
|
|
- config_name,
|
|
|
- open_id,
|
|
|
- secret,
|
|
|
- app_id,
|
|
|
- app_key,
|
|
|
- app_type,
|
|
|
- ditch_id
|
|
|
- )
|
|
|
- values
|
|
|
- (
|
|
|
- #{configName},
|
|
|
- #{openId},
|
|
|
- #{secret},
|
|
|
- #{appId},
|
|
|
- #{appKey},
|
|
|
- #{appType},
|
|
|
- #{ditchId}
|
|
|
- )
|
|
|
- </insert>
|
|
|
- <update id="updateAppConfig">
|
|
|
- update yt_app_default_config
|
|
|
- <set>
|
|
|
- <if test="canSimulator != null">
|
|
|
- can_simulator = #{canSimulator},
|
|
|
- </if>
|
|
|
- <if test="configName != null">
|
|
|
- config_name = #{configName},
|
|
|
- </if>
|
|
|
- <if test="openId != null">
|
|
|
- open_id = #{openId},
|
|
|
- </if>
|
|
|
- <if test="secret != null">
|
|
|
- secret = #{secret},
|
|
|
- </if>
|
|
|
- <if test="appKey != null">
|
|
|
- app_key = #{appKey},
|
|
|
- </if>
|
|
|
- <if test="appType != null">
|
|
|
- app_type = #{appType},
|
|
|
- </if>
|
|
|
- <if test="takuAppId != null">
|
|
|
- taku_app_id = #{takuAppId},
|
|
|
- </if>
|
|
|
- <if test="takuKey != null">
|
|
|
- taku_key = #{takuKey},
|
|
|
- </if>
|
|
|
- <if test="takuBannerPid != null">
|
|
|
- taku_banner_pid = #{takuBannerPid},
|
|
|
- </if>
|
|
|
- <if test="takuNativePid != null">
|
|
|
- taku_native_pid = #{takuNativePid},
|
|
|
- </if>
|
|
|
- <if test="takuRewardPid != null">
|
|
|
- taku_reward_pid = #{takuRewardPid},
|
|
|
- </if>
|
|
|
- <if test="takuInterstitialPid != null">
|
|
|
- taku_interstitial_pid = #{takuInterstitialPid},
|
|
|
- </if>
|
|
|
- <if test="canUseRoot != null">
|
|
|
- can_use_root = #{canUseRoot},
|
|
|
- </if>
|
|
|
- <if test="canUseAdb != null">
|
|
|
- can_use_adb = #{canUseAdb},
|
|
|
- </if>
|
|
|
- <if test="canUseFloat != null">
|
|
|
- can_use_float = #{canUseFloat},
|
|
|
- </if>
|
|
|
- <if test="canAccumulation != null">
|
|
|
- can_accumulation = #{canAccumulation},
|
|
|
- </if>
|
|
|
- <if test="ditchId != null">
|
|
|
- ditch_id = #{ditchId},
|
|
|
- </if>
|
|
|
- <if test="powerWaitTime != null">
|
|
|
- power_wait_time = #{powerWaitTime},
|
|
|
- </if>
|
|
|
- <if test="interstitialIntervalTime != null">
|
|
|
- interstitial_interval_time = #{interstitialIntervalTime},
|
|
|
- </if>
|
|
|
- <if test="flowIntervalTime != null">
|
|
|
- flow_interval_time = #{flowIntervalTime},
|
|
|
- </if>
|
|
|
- <if test="taskLimitTip != null">
|
|
|
- task_limit_tip = #{taskLimitTip},
|
|
|
- </if>
|
|
|
- <if test="lowValueTip != null">
|
|
|
- low_value_tip = #{lowValueTip},
|
|
|
- </if>
|
|
|
- <if test="brushTip != null">
|
|
|
- brush_tip = #{brushTip},
|
|
|
- </if>
|
|
|
- <if test="startWaitTime != null">
|
|
|
- start_wait_time = #{startWaitTime},
|
|
|
- </if>
|
|
|
- <if test="canCacheVideo != null">
|
|
|
- can_cache_video = #{canCacheVideo},
|
|
|
- </if>
|
|
|
- <if test="canAllowAutoRefresh != null">
|
|
|
- can_allow_auto_refresh = #{canAllowAutoRefresh}
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where app_id = #{appId}
|
|
|
- </update>
|
|
|
<update id="addOnePower">
|
|
|
update yt_dyz_user set power = power+1 where user_id = #{userId}
|
|
|
</update>
|
|
|
@@ -250,9 +144,7 @@
|
|
|
</set>
|
|
|
where user_id = #{userId}
|
|
|
</update>
|
|
|
- <delete id="delByAppId">
|
|
|
- delete from yt_app_default_config where app_id = #{appId}
|
|
|
- </delete>
|
|
|
+
|
|
|
<select id="getYtAppUser" resultType="com.ytpm.app.model.YtDyzUser">
|
|
|
select
|
|
|
user_id, app_id,phone,device_id, ditch_id, nick_name,head_img, power,
|
|
|
@@ -458,6 +350,118 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
+ <insert id="saveAppConfig">
|
|
|
+ insert into yt_app_default_config
|
|
|
+ (
|
|
|
+ config_name,
|
|
|
+ open_id,
|
|
|
+ secret,
|
|
|
+ app_id,
|
|
|
+ app_key,
|
|
|
+ app_type,
|
|
|
+ ditch_id
|
|
|
+ )
|
|
|
+ values
|
|
|
+ (
|
|
|
+ #{configName},
|
|
|
+ #{openId},
|
|
|
+ #{secret},
|
|
|
+ #{appId},
|
|
|
+ #{appKey},
|
|
|
+ #{appType},
|
|
|
+ #{ditchId}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <update id="updateAppConfig">
|
|
|
+ update yt_app_default_config
|
|
|
+ <set>
|
|
|
+ <if test="canSimulator != null">
|
|
|
+ can_simulator = #{canSimulator},
|
|
|
+ </if>
|
|
|
+ <if test="configName != null">
|
|
|
+ config_name = #{configName},
|
|
|
+ </if>
|
|
|
+ <if test="openId != null">
|
|
|
+ open_id = #{openId},
|
|
|
+ </if>
|
|
|
+ <if test="secret != null">
|
|
|
+ secret = #{secret},
|
|
|
+ </if>
|
|
|
+ <if test="appKey != null">
|
|
|
+ app_key = #{appKey},
|
|
|
+ </if>
|
|
|
+ <if test="appType != null">
|
|
|
+ app_type = #{appType},
|
|
|
+ </if>
|
|
|
+ <if test="takuAppId != null">
|
|
|
+ taku_app_id = #{takuAppId},
|
|
|
+ </if>
|
|
|
+ <if test="takuKey != null">
|
|
|
+ taku_key = #{takuKey},
|
|
|
+ </if>
|
|
|
+ <if test="takuBannerPid != null">
|
|
|
+ taku_banner_pid = #{takuBannerPid},
|
|
|
+ </if>
|
|
|
+ <if test="takuNativePid != null">
|
|
|
+ taku_native_pid = #{takuNativePid},
|
|
|
+ </if>
|
|
|
+ <if test="takuRewardPid != null">
|
|
|
+ taku_reward_pid = #{takuRewardPid},
|
|
|
+ </if>
|
|
|
+ <if test="takuInterstitialPid != null">
|
|
|
+ taku_interstitial_pid = #{takuInterstitialPid},
|
|
|
+ </if>
|
|
|
+ <if test="canUseRoot != null">
|
|
|
+ can_use_root = #{canUseRoot},
|
|
|
+ </if>
|
|
|
+ <if test="canUseAdb != null">
|
|
|
+ can_use_adb = #{canUseAdb},
|
|
|
+ </if>
|
|
|
+ <if test="canUseFloat != null">
|
|
|
+ can_use_float = #{canUseFloat},
|
|
|
+ </if>
|
|
|
+ <if test="canAccumulation != null">
|
|
|
+ can_accumulation = #{canAccumulation},
|
|
|
+ </if>
|
|
|
+ <if test="ditchId != null">
|
|
|
+ ditch_id = #{ditchId},
|
|
|
+ </if>
|
|
|
+ <if test="powerWaitTime != null">
|
|
|
+ power_wait_time = #{powerWaitTime},
|
|
|
+ </if>
|
|
|
+ <if test="interstitialIntervalTime != null">
|
|
|
+ interstitial_interval_time = #{interstitialIntervalTime},
|
|
|
+ </if>
|
|
|
+ <if test="flowIntervalTime != null">
|
|
|
+ flow_interval_time = #{flowIntervalTime},
|
|
|
+ </if>
|
|
|
+ <if test="taskLimitTip != null">
|
|
|
+ task_limit_tip = #{taskLimitTip},
|
|
|
+ </if>
|
|
|
+ <if test="lowValueTip != null">
|
|
|
+ low_value_tip = #{lowValueTip},
|
|
|
+ </if>
|
|
|
+ <if test="brushTip != null">
|
|
|
+ brush_tip = #{brushTip},
|
|
|
+ </if>
|
|
|
+ <if test="startWaitTime != null">
|
|
|
+ start_wait_time = #{startWaitTime},
|
|
|
+ </if>
|
|
|
+ <if test="canCacheVideo != null">
|
|
|
+ can_cache_video = #{canCacheVideo},
|
|
|
+ </if>
|
|
|
+ <if test="canAllowAutoRefresh != null">
|
|
|
+ can_allow_auto_refresh = #{canAllowAutoRefresh},
|
|
|
+ </if>
|
|
|
+ <if test="stratificationRate != null">
|
|
|
+ stratification_rate = #{stratificationRate}
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where app_id = #{appId}
|
|
|
+ </update>
|
|
|
+ <delete id="delByAppId">
|
|
|
+ delete from yt_app_default_config where app_id = #{appId}
|
|
|
+ </delete>
|
|
|
<select id="getDefaultConfig" resultType="com.ytpm.app.view.WxDefaultConfig">
|
|
|
select
|
|
|
config_id, config_name, open_id as app_id, secret, app_id as platformAppId, app_key as platformAppSecret,
|
|
|
@@ -466,7 +470,7 @@
|
|
|
can_use_root, can_use_adb, can_use_float, can_accumulation,
|
|
|
ditch_id, power_wait_time, interstitial_interval_time,
|
|
|
low_value_tip, brush_tip,flow_interval_time,task_limit_tip,start_wait_time,
|
|
|
- can_cache_video,can_allow_auto_refresh
|
|
|
+ can_cache_video,can_allow_auto_refresh, stratification_rate
|
|
|
from yt_app_default_config
|
|
|
where app_type = #{appType}
|
|
|
</select>
|
|
|
@@ -477,20 +481,23 @@
|
|
|
taku_reward_pid, taku_interstitial_pid, can_use_root, can_use_adb, can_use_float, can_accumulation,
|
|
|
ditch_id, power_wait_time, interstitial_interval_time,
|
|
|
low_value_tip, brush_tip,flow_interval_time,task_limit_tip,start_wait_time,
|
|
|
- can_cache_video,can_allow_auto_refresh
|
|
|
+ can_cache_video,can_allow_auto_refresh, stratification_rate
|
|
|
from yt_app_default_config
|
|
|
where app_id = #{appId}
|
|
|
</select>
|
|
|
- <select id="getSecretByAppId" resultType="java.lang.String">
|
|
|
+ <select id="getConfigByIds" resultType="com.ytpm.app.view.WxDefaultConfig">
|
|
|
select
|
|
|
config_id, config_name, open_id, secret, app_id, app_key, app_type,user_path,login_path,ad_path,
|
|
|
answer_path,power_path,can_simulator, taku_app_id, taku_key, taku_banner_pid, taku_native_pid,
|
|
|
taku_reward_pid, taku_interstitial_pid, can_use_root, can_use_adb, can_use_float, can_accumulation,
|
|
|
ditch_id, power_wait_time, interstitial_interval_time,
|
|
|
- low_value_tip, brush_tip, flow_interval_time,task_limit_tip,start_wait_time,
|
|
|
- can_cache_video,can_allow_auto_refresh
|
|
|
+ low_value_tip, brush_tip,flow_interval_time,task_limit_tip,start_wait_time,
|
|
|
+ can_cache_video,can_allow_auto_refresh, stratification_rate
|
|
|
from yt_app_default_config
|
|
|
- where app_id = #{appId}
|
|
|
+ where app_id in
|
|
|
+ <foreach collection="appIds.split(',')" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
</select>
|
|
|
<select id="queryByOpenid" resultType="com.ytpm.app.model.YtDyzUser">
|
|
|
select
|
|
|
@@ -506,19 +513,7 @@
|
|
|
where device_id = #{deviceId} and wx_open_id = #{openid}
|
|
|
limit 1
|
|
|
</select>
|
|
|
- <select id="getConfigByIds" resultType="com.ytpm.app.view.WxDefaultConfig">
|
|
|
- select
|
|
|
- config_id, config_name, open_id, secret, app_id, app_key, app_type, user_path, login_path, ad_path,
|
|
|
- answer_path, power_path,taku_app_id, taku_key, taku_banner_pid, taku_native_pid, taku_reward_pid,
|
|
|
- taku_interstitial_pid, can_use_root, can_use_adb, can_use_float, can_accumulation,can_simulator,
|
|
|
- ditch_id, power_wait_time, interstitial_interval_time,
|
|
|
- low_value_tip, brush_tip, flow_interval_time,task_limit_tip,start_wait_time,can_cache_video,can_allow_auto_refresh
|
|
|
- from yt_app_default_config
|
|
|
- where app_id in
|
|
|
- <foreach collection="appIds.split(',')" item="item" separator="," open="(" close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
+
|
|
|
<select id="getAdCount" resultType="java.lang.Integer">
|
|
|
select sum(total_video)
|
|
|
from yt_dyz_user
|