Commit 4e030aaf by yinyong

wish根据昨天数据得到今天数据

parent 8c19adb9
...@@ -134,7 +134,12 @@ public class WishSyncJob extends PointJob { ...@@ -134,7 +134,12 @@ public class WishSyncJob extends PointJob {
int updateInt = mapper.updateDayByExampleSelective(dcBaseFinanceWish, DcBaseFinanceWishExample.newAndCreateCriteria().andCampaignIdEqualTo(dcBaseFinanceWish.getCampaignId()).andRecordTimeEqualTo(dcBaseFinanceWish.getRecordTime()).example()); int updateInt = mapper.updateDayByExampleSelective(dcBaseFinanceWish, DcBaseFinanceWishExample.newAndCreateCriteria().andCampaignIdEqualTo(dcBaseFinanceWish.getCampaignId()).andRecordTimeEqualTo(dcBaseFinanceWish.getRecordTime()).example());
if(updateInt == 0) { if(updateInt == 0) {
DcBaseFinanceWishMapper mapper1 = SessionUtil.getSession().getMapper(DcBaseFinanceWishMapper.class); DcBaseFinanceWishMapper mapper1 = SessionUtil.getSession().getMapper(DcBaseFinanceWishMapper.class);
mapper1.insertDaySelective(dcBaseFinanceWish); DcBaseFinanceWish dcBaseFinanceWish1 = mapper1.selectOneByExample(DcBaseFinanceWishExample.newAndCreateCriteria().andCampaignIdEqualTo(dcBaseFinanceWish.getCampaignId()).andRecordTimeEqualTo(jobAccountLog.getStartTime().minusDays(1L).toLocalDate()).example());
if(dcBaseFinanceWish1 != null) {
mapper1.insertDaySelective(dcBaseFinanceWish);
}else{
mapper1.insertDaySelective0(dcBaseFinanceWish);
}
updateInsert = false; updateInsert = false;
} }
} catch (Exception e) { } catch (Exception e) {
......
...@@ -49,6 +49,8 @@ public interface DcBaseFinanceWishMapper { ...@@ -49,6 +49,8 @@ public interface DcBaseFinanceWishMapper {
int insertDaySelective(DcBaseFinanceWish record); int insertDaySelective(DcBaseFinanceWish record);
int insertDaySelective0(DcBaseFinanceWish record);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_finance_wish * This method corresponds to the database table dc_base_finance_wish
......
...@@ -1464,4 +1464,209 @@ ...@@ -1464,4 +1464,209 @@
campaign_id = #{campaignId} and record_time = DATE_SUB(#{recordTime,jdbcType=DATE}, INTERVAL 1 DAY ) campaign_id = #{campaignId} and record_time = DATE_SUB(#{recordTime,jdbcType=DATE}, INTERVAL 1 DAY )
</insert> </insert>
<insert id="insertDaySelective0" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWish">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dc_base_finance_wish
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="campaignId != null">
campaign_id,
</if>
<if test="campaignName != null">
campaign_name,
</if>
<if test="otherToCnyExchangeRate != null">
other_to_cny_exchange_rate,
</if>
<if test="otherToUsdExchangeRate != null">
other_to_usd_exchange_rate,
</if>
<if test="campaignMaxBudget != null">
campaign_max_budget,
daily_campaign_max_budget,
</if>
<if test="isAutomatedCampaign != null">
is_automated_campaign,
</if>
<if test="autoRenew != null">
auto_renew,
</if>
<if test="scheduledAddBudgetAmount != null">
scheduled_add_budget_amount,
</if>
<if test="totalImpressions != null">
total_impressions,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="sales != null">
sales,
</if>
<if test="totalImpressionFeesCharged != null">
total_impression_fees_charged,
</if>
<if test="scheduledAddBudgetEnabled != null">
scheduled_add_budget_enabled,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="impressionFeesBreakdown != null">
impression_fees_breakdown,
</if>
<if test="campaignState != null">
campaign_state,
</if>
<if test="canEdit != null">
can_edit,
</if>
<if test="discountRatio != null">
discount_ratio,
</if>
<if test="isSimpleBoost != null">
is_simple_boost,
</if>
<if test="totalCampaignSpend != null">
total_campaign_spend,
daily_total_campaign_spend,
</if>
<if test="scheduledAddBudgetDays != null">
scheduled_add_budget_days,
</if>
<if test="lastUpdatedTime != null">
last_updated_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="totalEnrollmentFeesCharged != null">
total_enrollment_fees_charged,
</if>
<if test="gmv != null">
gmv,
daily_gmv,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="gmtCreateTime != null">
gmt_create_time,
</if>
<if test="gmtModifyTime != null">
gmt_modify_time,
</if>
<if test="recordTime != null">
record_time
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="campaignId != null">
#{campaignId,jdbcType=VARCHAR},
</if>
<if test="campaignName != null">
#{campaignName,jdbcType=VARCHAR},
</if>
<if test="otherToCnyExchangeRate != null">
#{otherToCnyExchangeRate,jdbcType=DECIMAL},
</if>
<if test="otherToUsdExchangeRate != null">
#{otherToUsdExchangeRate,jdbcType=DECIMAL},
</if>
<if test="campaignMaxBudget != null">
#{campaignMaxBudget,jdbcType=DECIMAL},
#{campaignMaxBudget,jdbcType=DECIMAL},
</if>
<if test="isAutomatedCampaign != null">
#{isAutomatedCampaign,jdbcType=BIT},
</if>
<if test="autoRenew != null">
#{autoRenew,jdbcType=BIT},
</if>
<if test="scheduledAddBudgetAmount != null">
#{scheduledAddBudgetAmount,jdbcType=DECIMAL},
</if>
<if test="totalImpressions != null">
#{totalImpressions,jdbcType=INTEGER},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="sales != null">
#{sales,jdbcType=INTEGER},
</if>
<if test="totalImpressionFeesCharged != null">
#{totalImpressionFeesCharged,jdbcType=DECIMAL},
</if>
<if test="scheduledAddBudgetEnabled != null">
#{scheduledAddBudgetEnabled,jdbcType=BIT},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="impressionFeesBreakdown != null">
#{impressionFeesBreakdown,jdbcType=VARCHAR},
</if>
<if test="campaignState != null">
#{campaignState,jdbcType=VARCHAR},
</if>
<if test="canEdit != null">
#{canEdit,jdbcType=BIT},
</if>
<if test="discountRatio != null">
#{discountRatio,jdbcType=DECIMAL},
</if>
<if test="isSimpleBoost != null">
#{isSimpleBoost,jdbcType=BIT},
</if>
<if test="totalCampaignSpend != null">
#{totalCampaignSpend,jdbcType=DECIMAL},
#{totalCampaignSpend,jdbcType=DECIMAL},
</if>
<if test="scheduledAddBudgetDays != null">
#{scheduledAddBudgetDays,jdbcType=VARCHAR},
</if>
<if test="lastUpdatedTime != null">
#{lastUpdatedTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="totalEnrollmentFeesCharged != null">
#{totalEnrollmentFeesCharged,jdbcType=DECIMAL},
</if>
<if test="gmv != null">
#{gmv,jdbcType=DECIMAL},
#{gmv,jdbcType=DECIMAL},
</if>
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="gmtCreateTime != null">
#{gmtCreateTime,jdbcType=TIMESTAMP},
</if>
<if test="gmtModifyTime != null">
#{gmtModifyTime,jdbcType=TIMESTAMP},
</if>
<if test="recordTime != null">
#{recordTime,jdbcType=DATE}
</if>
</trim>
</insert>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment