Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
dc-java
Commits
4e030aaf
Commit
4e030aaf
authored
Aug 09, 2019
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wish根据昨天数据得到今天数据
parent
8c19adb9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
214 additions
and
1 deletion
+214
-1
WishSyncJob.java
...nce-wish/src/main/java/com/bailuntec/job/WishSyncJob.java
+6
-1
DcBaseFinanceWishMapper.java
...in/java/com/bailuntec/mapper/DcBaseFinanceWishMapper.java
+2
-0
DcBaseFinanceWishMapper.xml
...ain/java/com/bailuntec/mapper/DcBaseFinanceWishMapper.xml
+206
-0
No files found.
data-base/base-sync-finance-wish/src/main/java/com/bailuntec/job/WishSyncJob.java
View file @
4e030aaf
...
...
@@ -134,7 +134,12 @@ public class WishSyncJob extends PointJob {
int
updateInt
=
mapper
.
updateDayByExampleSelective
(
dcBaseFinanceWish
,
DcBaseFinanceWishExample
.
newAndCreateCriteria
().
andCampaignIdEqualTo
(
dcBaseFinanceWish
.
getCampaignId
()).
andRecordTimeEqualTo
(
dcBaseFinanceWish
.
getRecordTime
()).
example
());
if
(
updateInt
==
0
)
{
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
;
}
}
catch
(
Exception
e
)
{
...
...
data-common/src/main/java/com/bailuntec/mapper/DcBaseFinanceWishMapper.java
View file @
4e030aaf
...
...
@@ -49,6 +49,8 @@ public interface DcBaseFinanceWishMapper {
int
insertDaySelective
(
DcBaseFinanceWish
record
);
int
insertDaySelective0
(
DcBaseFinanceWish
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_finance_wish
...
...
data-common/src/main/java/com/bailuntec/mapper/DcBaseFinanceWishMapper.xml
View file @
4e030aaf
...
...
@@ -1464,4 +1464,209 @@
campaign_id = #{campaignId} and record_time = DATE_SUB(#{recordTime,jdbcType=DATE}, INTERVAL 1 DAY )
</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>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment