Commit 19372f9d by wutong

亚马逊广告费、eBay广告费、ebay刊登费增加转换成美元的汇率字段

parent 6614f858
...@@ -2,6 +2,7 @@ package com.bailuntec.job; ...@@ -2,6 +2,7 @@ package com.bailuntec.job;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.bailuntec.domain.enumerate.CurrencyType;
import com.bailuntec.domain.pojo.AmazonAdAuth; import com.bailuntec.domain.pojo.AmazonAdAuth;
import com.bailuntec.domain.pojo.AmazonAdProduct; import com.bailuntec.domain.pojo.AmazonAdProduct;
import com.bailuntec.domain.pojo.AmazonAdReportLocationResult; import com.bailuntec.domain.pojo.AmazonAdReportLocationResult;
...@@ -189,7 +190,8 @@ public class AmazonAdProductJob extends PointJob { ...@@ -189,7 +190,8 @@ public class AmazonAdProductJob extends PointJob {
dcBaseFinanceAmazonAdProduct.setAccountId(jobAccountLog.getAccountId()); dcBaseFinanceAmazonAdProduct.setAccountId(jobAccountLog.getAccountId());
dcBaseFinanceAmazonAdProduct.setCompanyId(jobAccountLog.getCompanyId()); dcBaseFinanceAmazonAdProduct.setCompanyId(jobAccountLog.getCompanyId());
dcBaseFinanceAmazonAdProduct.setReportDate(jobAccountLog.getStartTime().toLocalDate()); dcBaseFinanceAmazonAdProduct.setReportDate(jobAccountLog.getStartTime().toLocalDate());
dcBaseFinanceAmazonAdProduct.setExchangeRate(CallBailunSystem.getExchangeRate(dcBaseFinanceAmazonAdProduct.getCurrency(), "CNY", jobAccountLog.getStartTime())); dcBaseFinanceAmazonAdProduct.setExchangeRate(CallBailunSystem.getExchangeRate(dcBaseFinanceAmazonAdProduct.getCurrency(), CurrencyType.CNY.value(), jobAccountLog.getStartTime()));
dcBaseFinanceAmazonAdProduct.setExchangeRateUsd(CallBailunSystem.getExchangeRate(dcBaseFinanceAmazonAdProduct.getCurrency(), CurrencyType.USD.value(), jobAccountLog.getStartTime()));
dcBaseFinanceAmazonAdProduct.setBjModifyTime(LocalDateTime.now()); dcBaseFinanceAmazonAdProduct.setBjModifyTime(LocalDateTime.now());
DcBaseFinanceAmazonAdProductExample example = DcBaseFinanceAmazonAdProductExample.newAndCreateCriteria().andCompanyIdEqualTo(dcBaseFinanceAmazonAdProduct.getCompanyId()).andAccountIdEqualTo(dcBaseFinanceAmazonAdProduct.getAccountId()).andCampaignIdEqualTo(dcBaseFinanceAmazonAdProduct.getCampaignId()).andAdGroupIdEqualTo(dcBaseFinanceAmazonAdProduct.getAdGroupId()).andSkuEqualTo(dcBaseFinanceAmazonAdProduct.getSku()).andReportDateEqualTo(dcBaseFinanceAmazonAdProduct.getReportDate()).example(); DcBaseFinanceAmazonAdProductExample example = DcBaseFinanceAmazonAdProductExample.newAndCreateCriteria().andCompanyIdEqualTo(dcBaseFinanceAmazonAdProduct.getCompanyId()).andAccountIdEqualTo(dcBaseFinanceAmazonAdProduct.getAccountId()).andCampaignIdEqualTo(dcBaseFinanceAmazonAdProduct.getCampaignId()).andAdGroupIdEqualTo(dcBaseFinanceAmazonAdProduct.getAdGroupId()).andSkuEqualTo(dcBaseFinanceAmazonAdProduct.getSku()).andReportDateEqualTo(dcBaseFinanceAmazonAdProduct.getReportDate()).example();
int i = mapper.updateByExampleSelective(dcBaseFinanceAmazonAdProduct,example); int i = mapper.updateByExampleSelective(dcBaseFinanceAmazonAdProduct,example);
......
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.bailuntec.domain.entity.DcBaseFinanceEbay; import com.bailuntec.domain.entity.DcBaseFinanceEbay;
import com.bailuntec.domain.entity.JobAccountLog; import com.bailuntec.domain.entity.JobAccountLog;
import com.bailuntec.domain.entity.JobPointLog; import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.enumerate.CurrencyType;
import com.bailuntec.domain.example.DcBaseCompanyAccountExample; import com.bailuntec.domain.example.DcBaseCompanyAccountExample;
import com.bailuntec.domain.example.DcBaseFinanceEbayExample; import com.bailuntec.domain.example.DcBaseFinanceEbayExample;
import com.bailuntec.domain.example.JobAccountLogExample; import com.bailuntec.domain.example.JobAccountLogExample;
...@@ -119,7 +120,8 @@ public class EbayFinanceSyncJob extends PointJob { ...@@ -119,7 +120,8 @@ public class EbayFinanceSyncJob extends PointJob {
if (accountEntry.getGrossAmount_() != null) { if (accountEntry.getGrossAmount_() != null) {
dcBaseFinanceEbay.setGrossAmount(accountEntry.getGrossAmount_().getValue()); dcBaseFinanceEbay.setGrossAmount(accountEntry.getGrossAmount_().getValue());
dcBaseFinanceEbay.setCurrency(accountEntry.getGrossAmount_().getCurrency()); dcBaseFinanceEbay.setCurrency(accountEntry.getGrossAmount_().getCurrency());
dcBaseFinanceEbay.setExchangeRate(CallBailunSystem.getExchangeRate(dcBaseFinanceEbay.getCurrency(), "CNY", dcBaseFinanceEbay.getBjDate())); dcBaseFinanceEbay.setExchangeRate(CallBailunSystem.getExchangeRate(dcBaseFinanceEbay.getCurrency(), CurrencyType.CNY.value(), dcBaseFinanceEbay.getBjDate()));
dcBaseFinanceEbay.setExchangeRateUsd(CallBailunSystem.getExchangeRate(dcBaseFinanceEbay.getCurrency(), CurrencyType.USD.value(), dcBaseFinanceEbay.getBjDate()));
} }
if (accountEntry.getGrossAmount_() != null) { if (accountEntry.getGrossAmount_() != null) {
dcBaseFinanceEbay.setNetAmount(accountEntry.getNetAmount_().getValue()); dcBaseFinanceEbay.setNetAmount(accountEntry.getNetAmount_().getValue());
......
...@@ -387,6 +387,15 @@ public class DcBaseFinanceAmazonAdProduct { ...@@ -387,6 +387,15 @@ public class DcBaseFinanceAmazonAdProduct {
private BigDecimal exchangeRate; private BigDecimal exchangeRate;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_finance_amazon_ad_product.exchange_rate_usd
*
* @mbg.generated
*/
private BigDecimal exchangeRateUsd;
/**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_finance_amazon_ad_product * This method corresponds to the database table dc_base_finance_amazon_ad_product
* *
...@@ -440,6 +449,7 @@ public class DcBaseFinanceAmazonAdProduct { ...@@ -440,6 +449,7 @@ public class DcBaseFinanceAmazonAdProduct {
sb.append(", reportDate=").append(reportDate); sb.append(", reportDate=").append(reportDate);
sb.append(", reportType=").append(reportType); sb.append(", reportType=").append(reportType);
sb.append(", exchangeRate=").append(exchangeRate); sb.append(", exchangeRate=").append(exchangeRate);
sb.append(", exchangeRateUsd=").append(exchangeRateUsd);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -503,7 +513,8 @@ public class DcBaseFinanceAmazonAdProduct { ...@@ -503,7 +513,8 @@ public class DcBaseFinanceAmazonAdProduct {
&& (this.getBjModifyTime() == null ? other.getBjModifyTime() == null : this.getBjModifyTime().equals(other.getBjModifyTime())) && (this.getBjModifyTime() == null ? other.getBjModifyTime() == null : this.getBjModifyTime().equals(other.getBjModifyTime()))
&& (this.getReportDate() == null ? other.getReportDate() == null : this.getReportDate().equals(other.getReportDate())) && (this.getReportDate() == null ? other.getReportDate() == null : this.getReportDate().equals(other.getReportDate()))
&& (this.getReportType() == null ? other.getReportType() == null : this.getReportType().equals(other.getReportType())) && (this.getReportType() == null ? other.getReportType() == null : this.getReportType().equals(other.getReportType()))
&& (this.getExchangeRate() == null ? other.getExchangeRate() == null : this.getExchangeRate().equals(other.getExchangeRate())); && (this.getExchangeRate() == null ? other.getExchangeRate() == null : this.getExchangeRate().equals(other.getExchangeRate()))
&& (this.getExchangeRateUsd() == null ? other.getExchangeRateUsd() == null : this.getExchangeRateUsd().equals(other.getExchangeRateUsd()));
} }
/** /**
...@@ -558,6 +569,7 @@ public class DcBaseFinanceAmazonAdProduct { ...@@ -558,6 +569,7 @@ public class DcBaseFinanceAmazonAdProduct {
result = prime * result + ((getReportDate() == null) ? 0 : getReportDate().hashCode()); result = prime * result + ((getReportDate() == null) ? 0 : getReportDate().hashCode());
result = prime * result + ((getReportType() == null) ? 0 : getReportType().hashCode()); result = prime * result + ((getReportType() == null) ? 0 : getReportType().hashCode());
result = prime * result + ((getExchangeRate() == null) ? 0 : getExchangeRate().hashCode()); result = prime * result + ((getExchangeRate() == null) ? 0 : getExchangeRate().hashCode());
result = prime * result + ((getExchangeRateUsd() == null) ? 0 : getExchangeRateUsd().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
...@@ -197,6 +197,15 @@ public class DcBaseFinanceEbay { ...@@ -197,6 +197,15 @@ public class DcBaseFinanceEbay {
private BigDecimal exchangeRate; private BigDecimal exchangeRate;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_finance_ebay.exchange_rate_usd
*
* @mbg.generated
*/
private BigDecimal exchangeRateUsd;
/**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_finance_ebay * This method corresponds to the database table dc_base_finance_ebay
* *
...@@ -229,6 +238,7 @@ public class DcBaseFinanceEbay { ...@@ -229,6 +238,7 @@ public class DcBaseFinanceEbay {
sb.append(", accountId=").append(accountId); sb.append(", accountId=").append(accountId);
sb.append(", currency=").append(currency); sb.append(", currency=").append(currency);
sb.append(", exchangeRate=").append(exchangeRate); sb.append(", exchangeRate=").append(exchangeRate);
sb.append(", exchangeRateUsd=").append(exchangeRateUsd);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -271,7 +281,8 @@ public class DcBaseFinanceEbay { ...@@ -271,7 +281,8 @@ public class DcBaseFinanceEbay {
&& (this.getReceivedTopRatedDiscount() == null ? other.getReceivedTopRatedDiscount() == null : this.getReceivedTopRatedDiscount().equals(other.getReceivedTopRatedDiscount())) && (this.getReceivedTopRatedDiscount() == null ? other.getReceivedTopRatedDiscount() == null : this.getReceivedTopRatedDiscount().equals(other.getReceivedTopRatedDiscount()))
&& (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId())) && (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId()))
&& (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency())) && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
&& (this.getExchangeRate() == null ? other.getExchangeRate() == null : this.getExchangeRate().equals(other.getExchangeRate())); && (this.getExchangeRate() == null ? other.getExchangeRate() == null : this.getExchangeRate().equals(other.getExchangeRate()))
&& (this.getExchangeRateUsd() == null ? other.getExchangeRateUsd() == null : this.getExchangeRateUsd().equals(other.getExchangeRateUsd()));
} }
/** /**
...@@ -305,6 +316,7 @@ public class DcBaseFinanceEbay { ...@@ -305,6 +316,7 @@ public class DcBaseFinanceEbay {
result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode()); result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode()); result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
result = prime * result + ((getExchangeRate() == null) ? 0 : getExchangeRate().hashCode()); result = prime * result + ((getExchangeRate() == null) ? 0 : getExchangeRate().hashCode());
result = prime * result + ((getExchangeRateUsd() == null) ? 0 : getExchangeRateUsd().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
...@@ -3111,6 +3111,66 @@ public class DcBaseFinanceAmazonAdProductExample { ...@@ -3111,6 +3111,66 @@ public class DcBaseFinanceAmazonAdProductExample {
addCriterion("exchange_rate not between", value1, value2, "exchangeRate"); addCriterion("exchange_rate not between", value1, value2, "exchangeRate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andExchangeRateUsdIsNull() {
addCriterion("exchange_rate_usd is null");
return (Criteria) this;
}
public Criteria andExchangeRateUsdIsNotNull() {
addCriterion("exchange_rate_usd is not null");
return (Criteria) this;
}
public Criteria andExchangeRateUsdEqualTo(BigDecimal value) {
addCriterion("exchange_rate_usd =", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdNotEqualTo(BigDecimal value) {
addCriterion("exchange_rate_usd <>", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdGreaterThan(BigDecimal value) {
addCriterion("exchange_rate_usd >", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("exchange_rate_usd >=", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdLessThan(BigDecimal value) {
addCriterion("exchange_rate_usd <", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdLessThanOrEqualTo(BigDecimal value) {
addCriterion("exchange_rate_usd <=", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdIn(List<BigDecimal> values) {
addCriterion("exchange_rate_usd in", values, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdNotIn(List<BigDecimal> values) {
addCriterion("exchange_rate_usd not in", values, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("exchange_rate_usd between", value1, value2, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("exchange_rate_usd not between", value1, value2, "exchangeRateUsd");
return (Criteria) this;
}
} }
/** /**
......
...@@ -1720,6 +1720,66 @@ public class DcBaseFinanceEbayExample { ...@@ -1720,6 +1720,66 @@ public class DcBaseFinanceEbayExample {
addCriterion("exchange_rate not between", value1, value2, "exchangeRate"); addCriterion("exchange_rate not between", value1, value2, "exchangeRate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andExchangeRateUsdIsNull() {
addCriterion("exchange_rate_usd is null");
return (Criteria) this;
}
public Criteria andExchangeRateUsdIsNotNull() {
addCriterion("exchange_rate_usd is not null");
return (Criteria) this;
}
public Criteria andExchangeRateUsdEqualTo(BigDecimal value) {
addCriterion("exchange_rate_usd =", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdNotEqualTo(BigDecimal value) {
addCriterion("exchange_rate_usd <>", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdGreaterThan(BigDecimal value) {
addCriterion("exchange_rate_usd >", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("exchange_rate_usd >=", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdLessThan(BigDecimal value) {
addCriterion("exchange_rate_usd <", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdLessThanOrEqualTo(BigDecimal value) {
addCriterion("exchange_rate_usd <=", value, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdIn(List<BigDecimal> values) {
addCriterion("exchange_rate_usd in", values, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdNotIn(List<BigDecimal> values) {
addCriterion("exchange_rate_usd not in", values, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("exchange_rate_usd between", value1, value2, "exchangeRateUsd");
return (Criteria) this;
}
public Criteria andExchangeRateUsdNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("exchange_rate_usd not between", value1, value2, "exchangeRateUsd");
return (Criteria) this;
}
} }
/** /**
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<result column="report_date" jdbcType="DATE" property="reportDate" /> <result column="report_date" jdbcType="DATE" property="reportDate" />
<result column="report_type" jdbcType="VARCHAR" property="reportType" /> <result column="report_type" jdbcType="VARCHAR" property="reportType" />
<result column="exchange_rate" jdbcType="DECIMAL" property="exchangeRate" /> <result column="exchange_rate" jdbcType="DECIMAL" property="exchangeRate" />
<result column="exchange_rate_usd" jdbcType="DECIMAL" property="exchangeRateUsd" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -131,7 +132,7 @@ ...@@ -131,7 +132,7 @@
attributed_sales_thirtyday_same_sku, attributed_units_ordered_oneday_same_sku, attributed_units_ordered_sevenday_same_sku, attributed_sales_thirtyday_same_sku, attributed_units_ordered_oneday_same_sku, attributed_units_ordered_sevenday_same_sku,
attributed_units_ordered_fourteenday_same_sku, attributed_units_ordered_thirtyday_same_sku, attributed_units_ordered_fourteenday_same_sku, attributed_units_ordered_thirtyday_same_sku,
account_id, company_id, bj_create_time, bj_modify_time, report_date, report_type, account_id, company_id, bj_create_time, bj_modify_time, report_date, report_type,
exchange_rate exchange_rate, exchange_rate_usd
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -209,8 +210,8 @@ ...@@ -209,8 +210,8 @@
attributed_units_ordered_sevenday_same_sku, attributed_units_ordered_fourteenday_same_sku, attributed_units_ordered_sevenday_same_sku, attributed_units_ordered_fourteenday_same_sku,
attributed_units_ordered_thirtyday_same_sku, account_id, attributed_units_ordered_thirtyday_same_sku, account_id,
company_id, bj_create_time, bj_modify_time, company_id, bj_create_time, bj_modify_time,
report_date, report_type, exchange_rate report_date, report_type, exchange_rate,
) exchange_rate_usd)
values (#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=VARCHAR},
#{adGroupName,jdbcType=VARCHAR}, #{adGroupId,jdbcType=VARCHAR}, #{impressions,jdbcType=INTEGER}, #{adGroupName,jdbcType=VARCHAR}, #{adGroupId,jdbcType=VARCHAR}, #{impressions,jdbcType=INTEGER},
#{clicks,jdbcType=INTEGER}, #{cost,jdbcType=DECIMAL}, #{currency,jdbcType=VARCHAR}, #{clicks,jdbcType=INTEGER}, #{cost,jdbcType=DECIMAL}, #{currency,jdbcType=VARCHAR},
...@@ -228,8 +229,8 @@ ...@@ -228,8 +229,8 @@
#{attributedUnitsOrderedSevendaySameSku,jdbcType=VARCHAR}, #{attributedUnitsOrderedFourteendaySameSku,jdbcType=VARCHAR}, #{attributedUnitsOrderedSevendaySameSku,jdbcType=VARCHAR}, #{attributedUnitsOrderedFourteendaySameSku,jdbcType=VARCHAR},
#{attributedUnitsOrderedThirtydaySameSku,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER}, #{attributedUnitsOrderedThirtydaySameSku,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER},
#{companyId,jdbcType=INTEGER}, #{bjCreateTime,jdbcType=TIMESTAMP}, #{bjModifyTime,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, #{bjCreateTime,jdbcType=TIMESTAMP}, #{bjModifyTime,jdbcType=TIMESTAMP},
#{reportDate,jdbcType=DATE}, #{reportType,jdbcType=VARCHAR}, #{exchangeRate,jdbcType=DECIMAL} #{reportDate,jdbcType=DATE}, #{reportType,jdbcType=VARCHAR}, #{exchangeRate,jdbcType=DECIMAL},
) #{exchangeRateUsd,jdbcType=DECIMAL})
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct">
<!-- <!--
...@@ -364,6 +365,9 @@ ...@@ -364,6 +365,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
exchange_rate, exchange_rate,
</if> </if>
<if test="exchangeRateUsd != null">
exchange_rate_usd,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -492,6 +496,9 @@ ...@@ -492,6 +496,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
#{exchangeRate,jdbcType=DECIMAL}, #{exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="exchangeRateUsd != null">
#{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultType="java.lang.Long">
...@@ -637,6 +644,9 @@ ...@@ -637,6 +644,9 @@
<if test="record.exchangeRate != null"> <if test="record.exchangeRate != null">
exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL}, exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="record.exchangeRateUsd != null">
exchange_rate_usd = #{record.exchangeRateUsd,jdbcType=DECIMAL},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -689,7 +699,8 @@ ...@@ -689,7 +699,8 @@
bj_modify_time = #{record.bjModifyTime,jdbcType=TIMESTAMP}, bj_modify_time = #{record.bjModifyTime,jdbcType=TIMESTAMP},
report_date = #{record.reportDate,jdbcType=DATE}, report_date = #{record.reportDate,jdbcType=DATE},
report_type = #{record.reportType,jdbcType=VARCHAR}, report_type = #{record.reportType,jdbcType=VARCHAR},
exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL} exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL},
exchange_rate_usd = #{record.exchangeRateUsd,jdbcType=DECIMAL}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -824,6 +835,9 @@ ...@@ -824,6 +835,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
exchange_rate = #{exchangeRate,jdbcType=DECIMAL}, exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="exchangeRateUsd != null">
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -873,7 +887,8 @@ ...@@ -873,7 +887,8 @@
bj_modify_time = #{bjModifyTime,jdbcType=TIMESTAMP}, bj_modify_time = #{bjModifyTime,jdbcType=TIMESTAMP},
report_date = #{reportDate,jdbcType=DATE}, report_date = #{reportDate,jdbcType=DATE},
report_type = #{reportType,jdbcType=VARCHAR}, report_type = #{reportType,jdbcType=VARCHAR},
exchange_rate = #{exchangeRate,jdbcType=DECIMAL} exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct"> <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct">
...@@ -1010,6 +1025,9 @@ ...@@ -1010,6 +1025,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
exchange_rate, exchange_rate,
</if> </if>
<if test="exchangeRateUsd != null">
exchange_rate_usd,
</if>
</trim> </trim>
values values
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -1139,6 +1157,9 @@ ...@@ -1139,6 +1157,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
#{exchangeRate,jdbcType=DECIMAL}, #{exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="exchangeRateUsd != null">
#{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<trim suffixOverrides=","> <trim suffixOverrides=",">
...@@ -1268,6 +1289,9 @@ ...@@ -1268,6 +1289,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
exchange_rate = #{exchangeRate,jdbcType=DECIMAL}, exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="exchangeRateUsd != null">
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim> </trim>
</insert> </insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct">
...@@ -1288,7 +1312,7 @@ ...@@ -1288,7 +1312,7 @@
attributed_sales_thirtyday_same_sku, attributed_units_ordered_oneday_same_sku, attributed_sales_thirtyday_same_sku, attributed_units_ordered_oneday_same_sku,
attributed_units_ordered_sevenday_same_sku, attributed_units_ordered_fourteenday_same_sku, attributed_units_ordered_sevenday_same_sku, attributed_units_ordered_fourteenday_same_sku,
attributed_units_ordered_thirtyday_same_sku, account_id, company_id, bj_create_time, attributed_units_ordered_thirtyday_same_sku, account_id, company_id, bj_create_time,
bj_modify_time, report_date, report_type, exchange_rate) bj_modify_time, report_date, report_type, exchange_rate, exchange_rate_usd)
values values
(#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=VARCHAR}, (#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=VARCHAR},
#{adGroupName,jdbcType=VARCHAR}, #{adGroupId,jdbcType=VARCHAR}, #{impressions,jdbcType=INTEGER}, #{adGroupName,jdbcType=VARCHAR}, #{adGroupId,jdbcType=VARCHAR}, #{impressions,jdbcType=INTEGER},
...@@ -1307,8 +1331,8 @@ ...@@ -1307,8 +1331,8 @@
#{attributedUnitsOrderedSevendaySameSku,jdbcType=VARCHAR}, #{attributedUnitsOrderedFourteendaySameSku,jdbcType=VARCHAR}, #{attributedUnitsOrderedSevendaySameSku,jdbcType=VARCHAR}, #{attributedUnitsOrderedFourteendaySameSku,jdbcType=VARCHAR},
#{attributedUnitsOrderedThirtydaySameSku,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER}, #{attributedUnitsOrderedThirtydaySameSku,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER},
#{companyId,jdbcType=INTEGER}, #{bjCreateTime,jdbcType=TIMESTAMP}, #{bjModifyTime,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, #{bjCreateTime,jdbcType=TIMESTAMP}, #{bjModifyTime,jdbcType=TIMESTAMP},
#{reportDate,jdbcType=DATE}, #{reportType,jdbcType=VARCHAR}, #{exchangeRate,jdbcType=DECIMAL} #{reportDate,jdbcType=DATE}, #{reportType,jdbcType=VARCHAR}, #{exchangeRate,jdbcType=DECIMAL},
) #{exchangeRateUsd,jdbcType=DECIMAL})
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
campaign_name = #{campaignName,jdbcType=VARCHAR}, campaign_name = #{campaignName,jdbcType=VARCHAR},
...@@ -1351,7 +1375,8 @@ ...@@ -1351,7 +1375,8 @@
bj_modify_time = #{bjModifyTime,jdbcType=TIMESTAMP}, bj_modify_time = #{bjModifyTime,jdbcType=TIMESTAMP},
report_date = #{reportDate,jdbcType=DATE}, report_date = #{reportDate,jdbcType=DATE},
report_type = #{reportType,jdbcType=VARCHAR}, report_type = #{reportType,jdbcType=VARCHAR},
exchange_rate = #{exchangeRate,jdbcType=DECIMAL} exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL}
</insert> </insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultMap="BaseResultMap">
<!-- <!--
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<result column="account_id" jdbcType="INTEGER" property="accountId" /> <result column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="currency" jdbcType="VARCHAR" property="currency" /> <result column="currency" jdbcType="VARCHAR" property="currency" />
<result column="exchange_rate" jdbcType="DECIMAL" property="exchangeRate" /> <result column="exchange_rate" jdbcType="DECIMAL" property="exchangeRate" />
<result column="exchange_rate_usd" jdbcType="DECIMAL" property="exchangeRateUsd" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -101,7 +102,7 @@ ...@@ -101,7 +102,7 @@
--> -->
id, bj_create, bj_modified, account_entry_type, description, gmt_date, bj_date, gross_amount, id, bj_create, bj_modified, account_entry_type, description, gmt_date, bj_date, gross_amount,
item_id, memo, net_amount, ref_number, vat_percent, title, order_line_id, transaction_id, item_id, memo, net_amount, ref_number, vat_percent, title, order_line_id, transaction_id,
company_id, received_top_rated_discount, account_id, currency, exchange_rate company_id, received_top_rated_discount, account_id, currency, exchange_rate, exchange_rate_usd
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceEbayExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceEbayExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -168,16 +169,16 @@ ...@@ -168,16 +169,16 @@
memo, net_amount, ref_number, memo, net_amount, ref_number,
vat_percent, title, order_line_id, vat_percent, title, order_line_id,
transaction_id, company_id, received_top_rated_discount, transaction_id, company_id, received_top_rated_discount,
account_id, currency, exchange_rate account_id, currency, exchange_rate,
) exchange_rate_usd)
values (#{id,jdbcType=INTEGER}, #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP}, values (#{id,jdbcType=INTEGER}, #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP},
#{accountEntryType,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gmtDate,jdbcType=TIMESTAMP}, #{accountEntryType,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gmtDate,jdbcType=TIMESTAMP},
#{bjDate,jdbcType=TIMESTAMP}, #{grossAmount,jdbcType=DECIMAL}, #{itemId,jdbcType=VARCHAR}, #{bjDate,jdbcType=TIMESTAMP}, #{grossAmount,jdbcType=DECIMAL}, #{itemId,jdbcType=VARCHAR},
#{memo,jdbcType=VARCHAR}, #{netAmount,jdbcType=DECIMAL}, #{refNumber,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, #{netAmount,jdbcType=DECIMAL}, #{refNumber,jdbcType=VARCHAR},
#{vatPercent,jdbcType=DECIMAL}, #{title,jdbcType=VARCHAR}, #{orderLineId,jdbcType=VARCHAR}, #{vatPercent,jdbcType=DECIMAL}, #{title,jdbcType=VARCHAR}, #{orderLineId,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{receivedTopRatedDiscount,jdbcType=BIT}, #{transactionId,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{receivedTopRatedDiscount,jdbcType=BIT},
#{accountId,jdbcType=INTEGER}, #{currency,jdbcType=VARCHAR}, #{exchangeRate,jdbcType=DECIMAL} #{accountId,jdbcType=INTEGER}, #{currency,jdbcType=VARCHAR}, #{exchangeRate,jdbcType=DECIMAL},
) #{exchangeRateUsd,jdbcType=DECIMAL})
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay">
<!-- <!--
...@@ -249,6 +250,9 @@ ...@@ -249,6 +250,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
exchange_rate, exchange_rate,
</if> </if>
<if test="exchangeRateUsd != null">
exchange_rate_usd,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -314,6 +318,9 @@ ...@@ -314,6 +318,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
#{exchangeRate,jdbcType=DECIMAL}, #{exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="exchangeRateUsd != null">
#{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceEbayExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceEbayExample" resultType="java.lang.Long">
...@@ -396,6 +403,9 @@ ...@@ -396,6 +403,9 @@
<if test="record.exchangeRate != null"> <if test="record.exchangeRate != null">
exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL}, exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="record.exchangeRateUsd != null">
exchange_rate_usd = #{record.exchangeRateUsd,jdbcType=DECIMAL},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -427,7 +437,8 @@ ...@@ -427,7 +437,8 @@
received_top_rated_discount = #{record.receivedTopRatedDiscount,jdbcType=BIT}, received_top_rated_discount = #{record.receivedTopRatedDiscount,jdbcType=BIT},
account_id = #{record.accountId,jdbcType=INTEGER}, account_id = #{record.accountId,jdbcType=INTEGER},
currency = #{record.currency,jdbcType=VARCHAR}, currency = #{record.currency,jdbcType=VARCHAR},
exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL} exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL},
exchange_rate_usd = #{record.exchangeRateUsd,jdbcType=DECIMAL}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -499,6 +510,9 @@ ...@@ -499,6 +510,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
exchange_rate = #{exchangeRate,jdbcType=DECIMAL}, exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="exchangeRateUsd != null">
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -527,7 +541,8 @@ ...@@ -527,7 +541,8 @@
received_top_rated_discount = #{receivedTopRatedDiscount,jdbcType=BIT}, received_top_rated_discount = #{receivedTopRatedDiscount,jdbcType=BIT},
account_id = #{accountId,jdbcType=INTEGER}, account_id = #{accountId,jdbcType=INTEGER},
currency = #{currency,jdbcType=VARCHAR}, currency = #{currency,jdbcType=VARCHAR},
exchange_rate = #{exchangeRate,jdbcType=DECIMAL} exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay"> <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay">
...@@ -601,6 +616,9 @@ ...@@ -601,6 +616,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
exchange_rate, exchange_rate,
</if> </if>
<if test="exchangeRateUsd != null">
exchange_rate_usd,
</if>
</trim> </trim>
values values
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -667,6 +685,9 @@ ...@@ -667,6 +685,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
#{exchangeRate,jdbcType=DECIMAL}, #{exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="exchangeRateUsd != null">
#{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<trim suffixOverrides=","> <trim suffixOverrides=",">
...@@ -733,6 +754,9 @@ ...@@ -733,6 +754,9 @@
<if test="exchangeRate != null"> <if test="exchangeRate != null">
exchange_rate = #{exchangeRate,jdbcType=DECIMAL}, exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
</if> </if>
<if test="exchangeRateUsd != null">
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim> </trim>
</insert> </insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay">
...@@ -745,7 +769,7 @@ ...@@ -745,7 +769,7 @@
(id, bj_create, bj_modified, account_entry_type, description, gmt_date, bj_date, (id, bj_create, bj_modified, account_entry_type, description, gmt_date, bj_date,
gross_amount, item_id, memo, net_amount, ref_number, vat_percent, title, order_line_id, gross_amount, item_id, memo, net_amount, ref_number, vat_percent, title, order_line_id,
transaction_id, company_id, received_top_rated_discount, account_id, currency, transaction_id, company_id, received_top_rated_discount, account_id, currency,
exchange_rate) exchange_rate, exchange_rate_usd)
values values
(#{id,jdbcType=INTEGER}, #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP}, (#{id,jdbcType=INTEGER}, #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP},
#{accountEntryType,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gmtDate,jdbcType=TIMESTAMP}, #{accountEntryType,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gmtDate,jdbcType=TIMESTAMP},
...@@ -753,8 +777,8 @@ ...@@ -753,8 +777,8 @@
#{memo,jdbcType=VARCHAR}, #{netAmount,jdbcType=DECIMAL}, #{refNumber,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, #{netAmount,jdbcType=DECIMAL}, #{refNumber,jdbcType=VARCHAR},
#{vatPercent,jdbcType=DECIMAL}, #{title,jdbcType=VARCHAR}, #{orderLineId,jdbcType=VARCHAR}, #{vatPercent,jdbcType=DECIMAL}, #{title,jdbcType=VARCHAR}, #{orderLineId,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{receivedTopRatedDiscount,jdbcType=BIT}, #{transactionId,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{receivedTopRatedDiscount,jdbcType=BIT},
#{accountId,jdbcType=INTEGER}, #{currency,jdbcType=VARCHAR}, #{exchangeRate,jdbcType=DECIMAL} #{accountId,jdbcType=INTEGER}, #{currency,jdbcType=VARCHAR}, #{exchangeRate,jdbcType=DECIMAL},
) #{exchangeRateUsd,jdbcType=DECIMAL})
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
bj_create = #{bjCreate,jdbcType=TIMESTAMP}, bj_create = #{bjCreate,jdbcType=TIMESTAMP},
...@@ -776,7 +800,8 @@ ...@@ -776,7 +800,8 @@
received_top_rated_discount = #{receivedTopRatedDiscount,jdbcType=BIT}, received_top_rated_discount = #{receivedTopRatedDiscount,jdbcType=BIT},
account_id = #{accountId,jdbcType=INTEGER}, account_id = #{accountId,jdbcType=INTEGER},
currency = #{currency,jdbcType=VARCHAR}, currency = #{currency,jdbcType=VARCHAR},
exchange_rate = #{exchangeRate,jdbcType=DECIMAL} exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL}
</insert> </insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceEbayExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceEbayExample" resultMap="BaseResultMap">
<!-- <!--
......
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