Commit 19372f9d by wutong

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

parent 6614f858
......@@ -2,6 +2,7 @@ package com.bailuntec.job;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.bailuntec.domain.enumerate.CurrencyType;
import com.bailuntec.domain.pojo.AmazonAdAuth;
import com.bailuntec.domain.pojo.AmazonAdProduct;
import com.bailuntec.domain.pojo.AmazonAdReportLocationResult;
......@@ -189,7 +190,8 @@ public class AmazonAdProductJob extends PointJob {
dcBaseFinanceAmazonAdProduct.setAccountId(jobAccountLog.getAccountId());
dcBaseFinanceAmazonAdProduct.setCompanyId(jobAccountLog.getCompanyId());
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());
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);
......
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.bailuntec.domain.entity.DcBaseFinanceEbay;
import com.bailuntec.domain.entity.JobAccountLog;
import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.enumerate.CurrencyType;
import com.bailuntec.domain.example.DcBaseCompanyAccountExample;
import com.bailuntec.domain.example.DcBaseFinanceEbayExample;
import com.bailuntec.domain.example.JobAccountLogExample;
......@@ -119,7 +120,8 @@ public class EbayFinanceSyncJob extends PointJob {
if (accountEntry.getGrossAmount_() != null) {
dcBaseFinanceEbay.setGrossAmount(accountEntry.getGrossAmount_().getValue());
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) {
dcBaseFinanceEbay.setNetAmount(accountEntry.getNetAmount_().getValue());
......
......@@ -387,6 +387,15 @@ public class DcBaseFinanceAmazonAdProduct {
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 corresponds to the database table dc_base_finance_amazon_ad_product
*
......@@ -440,6 +449,7 @@ public class DcBaseFinanceAmazonAdProduct {
sb.append(", reportDate=").append(reportDate);
sb.append(", reportType=").append(reportType);
sb.append(", exchangeRate=").append(exchangeRate);
sb.append(", exchangeRateUsd=").append(exchangeRateUsd);
sb.append("]");
return sb.toString();
}
......@@ -503,7 +513,8 @@ public class DcBaseFinanceAmazonAdProduct {
&& (this.getBjModifyTime() == null ? other.getBjModifyTime() == null : this.getBjModifyTime().equals(other.getBjModifyTime()))
&& (this.getReportDate() == null ? other.getReportDate() == null : this.getReportDate().equals(other.getReportDate()))
&& (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 {
result = prime * result + ((getReportDate() == null) ? 0 : getReportDate().hashCode());
result = prime * result + ((getReportType() == null) ? 0 : getReportType().hashCode());
result = prime * result + ((getExchangeRate() == null) ? 0 : getExchangeRate().hashCode());
result = prime * result + ((getExchangeRateUsd() == null) ? 0 : getExchangeRateUsd().hashCode());
return result;
}
}
\ No newline at end of file
......@@ -197,6 +197,15 @@ public class DcBaseFinanceEbay {
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 corresponds to the database table dc_base_finance_ebay
*
......@@ -229,6 +238,7 @@ public class DcBaseFinanceEbay {
sb.append(", accountId=").append(accountId);
sb.append(", currency=").append(currency);
sb.append(", exchangeRate=").append(exchangeRate);
sb.append(", exchangeRateUsd=").append(exchangeRateUsd);
sb.append("]");
return sb.toString();
}
......@@ -271,7 +281,8 @@ public class DcBaseFinanceEbay {
&& (this.getReceivedTopRatedDiscount() == null ? other.getReceivedTopRatedDiscount() == null : this.getReceivedTopRatedDiscount().equals(other.getReceivedTopRatedDiscount()))
&& (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId()))
&& (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 {
result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
result = prime * result + ((getExchangeRate() == null) ? 0 : getExchangeRate().hashCode());
result = prime * result + ((getExchangeRateUsd() == null) ? 0 : getExchangeRateUsd().hashCode());
return result;
}
}
\ No newline at end of file
......@@ -3111,6 +3111,66 @@ public class DcBaseFinanceAmazonAdProductExample {
addCriterion("exchange_rate not between", value1, value2, "exchangeRate");
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 {
addCriterion("exchange_rate not between", value1, value2, "exchangeRate");
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 @@
<result column="report_date" jdbcType="DATE" property="reportDate" />
<result column="report_type" jdbcType="VARCHAR" property="reportType" />
<result column="exchange_rate" jdbcType="DECIMAL" property="exchangeRate" />
<result column="exchange_rate_usd" jdbcType="DECIMAL" property="exchangeRateUsd" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -131,7 +132,7 @@
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,
account_id, company_id, bj_create_time, bj_modify_time, report_date, report_type,
exchange_rate
exchange_rate, exchange_rate_usd
</sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultMap="BaseResultMap">
<!--
......@@ -209,8 +210,8 @@
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, 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},
#{adGroupName,jdbcType=VARCHAR}, #{adGroupId,jdbcType=VARCHAR}, #{impressions,jdbcType=INTEGER},
#{clicks,jdbcType=INTEGER}, #{cost,jdbcType=DECIMAL}, #{currency,jdbcType=VARCHAR},
......@@ -228,8 +229,8 @@
#{attributedUnitsOrderedSevendaySameSku,jdbcType=VARCHAR}, #{attributedUnitsOrderedFourteendaySameSku,jdbcType=VARCHAR},
#{attributedUnitsOrderedThirtydaySameSku,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER},
#{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 id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct">
<!--
......@@ -364,6 +365,9 @@
<if test="exchangeRate != null">
exchange_rate,
</if>
<if test="exchangeRateUsd != null">
exchange_rate_usd,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -492,6 +496,9 @@
<if test="exchangeRate != null">
#{exchangeRate,jdbcType=DECIMAL},
</if>
<if test="exchangeRateUsd != null">
#{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultType="java.lang.Long">
......@@ -637,6 +644,9 @@
<if test="record.exchangeRate != null">
exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL},
</if>
<if test="record.exchangeRateUsd != null">
exchange_rate_usd = #{record.exchangeRateUsd,jdbcType=DECIMAL},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -689,7 +699,8 @@
bj_modify_time = #{record.bjModifyTime,jdbcType=TIMESTAMP},
report_date = #{record.reportDate,jdbcType=DATE},
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">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -824,6 +835,9 @@
<if test="exchangeRate != null">
exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
</if>
<if test="exchangeRateUsd != null">
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
......@@ -873,7 +887,8 @@
bj_modify_time = #{bjModifyTime,jdbcType=TIMESTAMP},
report_date = #{reportDate,jdbcType=DATE},
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}
</update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct">
......@@ -1010,6 +1025,9 @@
<if test="exchangeRate != null">
exchange_rate,
</if>
<if test="exchangeRateUsd != null">
exchange_rate_usd,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -1139,6 +1157,9 @@
<if test="exchangeRate != null">
#{exchangeRate,jdbcType=DECIMAL},
</if>
<if test="exchangeRateUsd != null">
#{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
......@@ -1268,6 +1289,9 @@
<if test="exchangeRate != null">
exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
</if>
<if test="exchangeRateUsd != null">
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceAmazonAdProduct">
......@@ -1288,7 +1312,7 @@
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, 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
(#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=VARCHAR},
#{adGroupName,jdbcType=VARCHAR}, #{adGroupId,jdbcType=VARCHAR}, #{impressions,jdbcType=INTEGER},
......@@ -1307,8 +1331,8 @@
#{attributedUnitsOrderedSevendaySameSku,jdbcType=VARCHAR}, #{attributedUnitsOrderedFourteendaySameSku,jdbcType=VARCHAR},
#{attributedUnitsOrderedThirtydaySameSku,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER},
#{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
id = #{id,jdbcType=INTEGER},
campaign_name = #{campaignName,jdbcType=VARCHAR},
......@@ -1351,7 +1375,8 @@
bj_modify_time = #{bjModifyTime,jdbcType=TIMESTAMP},
report_date = #{reportDate,jdbcType=DATE},
report_type = #{reportType,jdbcType=VARCHAR},
exchange_rate = #{exchangeRate,jdbcType=DECIMAL}
exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL}
</insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceAmazonAdProductExample" resultMap="BaseResultMap">
<!--
......
......@@ -27,6 +27,7 @@
<result column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="currency" jdbcType="VARCHAR" property="currency" />
<result column="exchange_rate" jdbcType="DECIMAL" property="exchangeRate" />
<result column="exchange_rate_usd" jdbcType="DECIMAL" property="exchangeRateUsd" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -101,7 +102,7 @@
-->
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,
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>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceEbayExample" resultMap="BaseResultMap">
<!--
......@@ -168,16 +169,16 @@
memo, net_amount, ref_number,
vat_percent, title, order_line_id,
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},
#{accountEntryType,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gmtDate,jdbcType=TIMESTAMP},
#{bjDate,jdbcType=TIMESTAMP}, #{grossAmount,jdbcType=DECIMAL}, #{itemId,jdbcType=VARCHAR},
#{memo,jdbcType=VARCHAR}, #{netAmount,jdbcType=DECIMAL}, #{refNumber,jdbcType=VARCHAR},
#{vatPercent,jdbcType=DECIMAL}, #{title,jdbcType=VARCHAR}, #{orderLineId,jdbcType=VARCHAR},
#{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 id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay">
<!--
......@@ -249,6 +250,9 @@
<if test="exchangeRate != null">
exchange_rate,
</if>
<if test="exchangeRateUsd != null">
exchange_rate_usd,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -314,6 +318,9 @@
<if test="exchangeRate != null">
#{exchangeRate,jdbcType=DECIMAL},
</if>
<if test="exchangeRateUsd != null">
#{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceEbayExample" resultType="java.lang.Long">
......@@ -396,6 +403,9 @@
<if test="record.exchangeRate != null">
exchange_rate = #{record.exchangeRate,jdbcType=DECIMAL},
</if>
<if test="record.exchangeRateUsd != null">
exchange_rate_usd = #{record.exchangeRateUsd,jdbcType=DECIMAL},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -427,7 +437,8 @@
received_top_rated_discount = #{record.receivedTopRatedDiscount,jdbcType=BIT},
account_id = #{record.accountId,jdbcType=INTEGER},
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">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -499,6 +510,9 @@
<if test="exchangeRate != null">
exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
</if>
<if test="exchangeRateUsd != null">
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
......@@ -527,7 +541,8 @@
received_top_rated_discount = #{receivedTopRatedDiscount,jdbcType=BIT},
account_id = #{accountId,jdbcType=INTEGER},
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}
</update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay">
......@@ -601,6 +616,9 @@
<if test="exchangeRate != null">
exchange_rate,
</if>
<if test="exchangeRateUsd != null">
exchange_rate_usd,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -667,6 +685,9 @@
<if test="exchangeRate != null">
#{exchangeRate,jdbcType=DECIMAL},
</if>
<if test="exchangeRateUsd != null">
#{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
......@@ -733,6 +754,9 @@
<if test="exchangeRate != null">
exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
</if>
<if test="exchangeRateUsd != null">
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceEbay">
......@@ -745,7 +769,7 @@
(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, company_id, received_top_rated_discount, account_id, currency,
exchange_rate)
exchange_rate, exchange_rate_usd)
values
(#{id,jdbcType=INTEGER}, #{bjCreate,jdbcType=TIMESTAMP}, #{bjModified,jdbcType=TIMESTAMP},
#{accountEntryType,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gmtDate,jdbcType=TIMESTAMP},
......@@ -753,8 +777,8 @@
#{memo,jdbcType=VARCHAR}, #{netAmount,jdbcType=DECIMAL}, #{refNumber,jdbcType=VARCHAR},
#{vatPercent,jdbcType=DECIMAL}, #{title,jdbcType=VARCHAR}, #{orderLineId,jdbcType=VARCHAR},
#{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
id = #{id,jdbcType=INTEGER},
bj_create = #{bjCreate,jdbcType=TIMESTAMP},
......@@ -776,7 +800,8 @@
received_top_rated_discount = #{receivedTopRatedDiscount,jdbcType=BIT},
account_id = #{accountId,jdbcType=INTEGER},
currency = #{currency,jdbcType=VARCHAR},
exchange_rate = #{exchangeRate,jdbcType=DECIMAL}
exchange_rate = #{exchangeRate,jdbcType=DECIMAL},
exchange_rate_usd = #{exchangeRateUsd,jdbcType=DECIMAL}
</insert>
<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