Commit 87fa3cf6 by yinyong

获取广告费任务下发延时获取报告

parent 89f4886a
......@@ -37,6 +37,16 @@
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
package com.bailuntec;
import com.alibaba.druid.pool.DruidDataSource;
import com.bailuntec.job.AmazonFinanceSyncJob;
import com.bailuntec.job.AdvertAddTaskSyncJob;
import com.bailuntec.job.AdvertResultSyncJob;
import com.bailuntec.utils.PropertiesUtil;
import com.dangdang.ddframe.job.config.JobCoreConfiguration;
import com.dangdang.ddframe.job.config.simple.SimpleJobConfiguration;
......@@ -23,8 +24,10 @@ public class Application {
private static final String EVENT_RDB_STORAGE_URL = propertiesUtil.getPropertyAsString("EVENT_RDB_STORAGE_URL");
private static final String EVENT_RDB_STORAGE_USERNAME = propertiesUtil.getPropertyAsString("EVENT_RDB_STORAGE_USERNAME");
private static final String EVENT_RDB_STORAGE_PASSWORD = propertiesUtil.getPropertyAsString("EVENT_RDB_STORAGE_PASSWORD");
public static void main(String[] args) {
new JobScheduler(createRegistryCenter(), createJobConfiguration1()).init();
new JobScheduler(createRegistryCenter(), createJobConfiguration2()).init();
}
private static CoordinatorRegistryCenter createRegistryCenter() {
......@@ -34,8 +37,15 @@ public class Application {
}
private static LiteJobConfiguration createJobConfiguration1() {
JobCoreConfiguration simpleCoreConfig = JobCoreConfiguration.newBuilder(propertiesUtil.getPropertyAsString("JOB_NAME"), propertiesUtil.getPropertyAsString("JOB_CRON"), propertiesUtil.getPropertyAsInt("SHARDING_TOTAL_COUNT")).build();
SimpleJobConfiguration simpleJobConfig = new SimpleJobConfiguration(simpleCoreConfig, AmazonFinanceSyncJob.class.getCanonicalName());
JobCoreConfiguration simpleCoreConfig = JobCoreConfiguration.newBuilder(propertiesUtil.getPropertyAsString("JOB_NAME_ADDTASK"), propertiesUtil.getPropertyAsString("JOB_CRON_ADDTASK"), propertiesUtil.getPropertyAsInt("SHARDING_TOTAL_COUNT")).build();
SimpleJobConfiguration simpleJobConfig = new SimpleJobConfiguration(simpleCoreConfig, AdvertAddTaskSyncJob.class.getCanonicalName());
LiteJobConfiguration simpleJobRootConfig = LiteJobConfiguration.newBuilder(simpleJobConfig).build();
return simpleJobRootConfig;
}
private static LiteJobConfiguration createJobConfiguration2() {
JobCoreConfiguration simpleCoreConfig = JobCoreConfiguration.newBuilder(propertiesUtil.getPropertyAsString("JOB_NAME_GETRESULT"), propertiesUtil.getPropertyAsString("JOB_CRON_GETRESULT"), propertiesUtil.getPropertyAsInt("SHARDING_TOTAL_COUNT")).build();
SimpleJobConfiguration simpleJobConfig = new SimpleJobConfiguration(simpleCoreConfig, AdvertResultSyncJob.class.getCanonicalName());
LiteJobConfiguration simpleJobRootConfig = LiteJobConfiguration.newBuilder(simpleJobConfig).build();
return simpleJobRootConfig;
}
......
package com.bailuntec.job;
import com.alibaba.fastjson.JSON;
import com.bailuntec.domain.AdvertResultData;
import com.alibaba.fastjson.JSONObject;
import com.bailuntec.domain.AdvertResultInfo;
import com.bailuntec.domain.AmazonAdvert;
import com.bailuntec.domain.entity.JobAccountLog;
import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.enumerate.AccountPlatformType;
import com.bailuntec.domain.example.DcBaseCompanyAccountExample;
import com.bailuntec.domain.example.JobAccountLogExample;
import com.bailuntec.mapper.DcAmazonAdvertMapper;
import com.bailuntec.mapper.DcBaseCompanyAccountMapper;
import com.bailuntec.mapper.JobAccountLogMapper;
import com.bailuntec.support.PointJob;
import com.bailuntec.utils.OkHttpUtil;
import com.bailuntec.utils.PropertiesUtil;
import com.bailuntec.utils.RedisUtil;
import com.bailuntec.utils.SessionUtil;
import com.dangdang.ddframe.job.api.ShardingContext;
import lombok.extern.slf4j.Slf4j;
......@@ -28,10 +27,11 @@ import java.util.HashMap;
import java.util.List;
@Slf4j
public class AmazonFinanceSyncJob extends PointJob {
public class AdvertAddTaskSyncJob extends PointJob {
private PropertiesUtil propertiesUtil = PropertiesUtil.getInstance("const");
private OkHttpClient client = OkHttpUtil.getInstance();
private RedisUtil redisUtil = new RedisUtil();
@Override
public void executeJob(ShardingContext shardingContext, JobPointLog jobPointLog) {
......@@ -58,7 +58,7 @@ public class AmazonFinanceSyncJob extends PointJob {
}
} catch (Exception e) {
e.printStackTrace();
log.warn("Amazon广告费定时同步费用接口错误", e);
log.warn("Amazon任务发布接口调用错误", e);
} finally {
SessionUtil.closeSession();
}
......@@ -120,9 +120,8 @@ public class AmazonFinanceSyncJob extends PointJob {
localDateTime = localDateTime.plusDays(1L);
} while (localDateTime.compareTo(job.getEndTime()) <= 0);
for (List<Integer> taskIdsList : taskIdsLists) {
callSaasApi(job, taskIdsList);
}
String taskIdsStr = JSONObject.toJSONString(taskIdsLists);
redisUtil.saveValueByKey(String.valueOf(job.getAccountId()), taskIdsStr);
job.setStartTime(job.getEndTime());
job.setEndTime(job.getStartTime().plusDays(job.getIntervalTime()).isAfter(LocalDateTime.now()) ? LocalDateTime.now() : job.getEndTime().plusDays(job.getIntervalTime()));
......@@ -136,49 +135,5 @@ public class AmazonFinanceSyncJob extends PointJob {
}
}
;
public void callSaasApi(JobAccountLog job, List<Integer> ids) {
HashMap<String, Object> map = new HashMap<>(2);
map.put("app_id", 1);
map.put("task_ids", ids);
MediaType mediaType = MediaType.parse("application/json");
Response response = null;
try {
DcAmazonAdvertMapper dcAmazonAdvertMapper = SessionUtil.getSession().getMapper(DcAmazonAdvertMapper.class);
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(map));
Request request = new Request.Builder()
.url(propertiesUtil.getPropertyAsString("GETRESULT_FINANCE_URL"))
.post(body)
.addHeader("Content-Type", "application/json")
.build();
response = client.newCall(request).execute();
if (response.isSuccessful()) {
AdvertResultInfo advertResult = JSON.parseObject(response.body().string(), AdvertResultInfo.class);
if (advertResult != null && advertResult.getCode() == 0) {
List<AdvertResultData> accountEntries = advertResult.getResults();
if (accountEntries != null && accountEntries.size() > 0) {
List<AmazonAdvert> advertList = JSON.parseArray(accountEntries.get(0).getData().get(0), AmazonAdvert.class);
for (AmazonAdvert amazonAdvert : advertList) {
amazonAdvert.setAccountId(job.getAccountId());
amazonAdvert.setCompanyId(job.getCompanyId());
dcAmazonAdvertMapper.upsertSelective(amazonAdvert);
}
}
} else {
throw new RuntimeException("授权错误");
}
} else {
throw new RuntimeException("接口调用失败");
}
} catch (Exception e) {
job.setMessage(e.getMessage());
} finally {
if (response != null) {
response.close();
}
}
}
}
package com.bailuntec.job;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.bailuntec.domain.AdvertResultData;
import com.bailuntec.domain.AdvertResultInfo;
import com.bailuntec.domain.AmazonAdvert;
import com.bailuntec.domain.entity.JobAccountLog;
import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.enumerate.AccountPlatformType;
import com.bailuntec.domain.example.DcBaseCompanyAccountExample;
import com.bailuntec.mapper.DcAmazonAdvertMapper;
import com.bailuntec.mapper.DcBaseCompanyAccountMapper;
import com.bailuntec.mapper.JobAccountLogMapper;
import com.bailuntec.support.PointJob;
import com.bailuntec.utils.OkHttpUtil;
import com.bailuntec.utils.PropertiesUtil;
import com.bailuntec.utils.RedisUtil;
import com.bailuntec.utils.SessionUtil;
import com.dangdang.ddframe.job.api.ShardingContext;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import java.util.HashMap;
import java.util.List;
@Slf4j
public class AdvertResultSyncJob extends PointJob {
private PropertiesUtil propertiesUtil = PropertiesUtil.getInstance("const");
private OkHttpClient client = OkHttpUtil.getInstance();
private RedisUtil redisUtil = new RedisUtil();
@Override
public void executeJob(ShardingContext shardingContext, JobPointLog jobPointLog) {
int totalPage = getCount(jobPointLog);//分片即将处理的账号总数
try {
JobAccountLogMapper jobAccountLogMapper = SessionUtil.getSession().getMapper(JobAccountLogMapper.class);
int pageSize = totalPage % shardingContext.getShardingTotalCount() == 0 ? totalPage / shardingContext.getShardingTotalCount() : totalPage / shardingContext.getShardingTotalCount() + 1;
List<JobAccountLog> listByPage = jobAccountLogMapper.getListByPage(AccountPlatformType.Amazon.code(), pageSize * shardingContext.getShardingItem(), pageSize);
for (JobAccountLog jobAccountLog : listByPage) {
String taskIds = redisUtil.getValueByKey(String.valueOf(jobAccountLog.getAccountId()));
List<List<Integer>> taskIdsList = (List<List<Integer>>) JSONArray.parse(taskIds);
for (List<Integer> ids : taskIdsList) {
callSaasApi(jobAccountLog, ids);
}
}
} catch (Exception e) {
e.printStackTrace();
log.warn("Amazon广告费接口调用错误", e);
} finally {
SessionUtil.closeSession();
}
}
private int getCount(JobPointLog jobPointLog) {
int i = 0;
try {
DcBaseCompanyAccountMapper accountMapper = SessionUtil.getSession().getMapper(DcBaseCompanyAccountMapper.class);
i = (int) accountMapper.countByExample(DcBaseCompanyAccountExample.newAndCreateCriteria().andPlatformIdEqualTo(AccountPlatformType.Amazon.code()).example());
} catch (Exception e) {
e.printStackTrace();
} finally {
SessionUtil.closeSession();
}
return i;
}
public void callSaasApi(JobAccountLog job, List<Integer> ids) {
HashMap<String, Object> map = new HashMap<>(2);
map.put("app_id", 1);
map.put("task_ids", ids);
MediaType mediaType = MediaType.parse("application/json");
Response response = null;
try {
DcAmazonAdvertMapper dcAmazonAdvertMapper = SessionUtil.getSession().getMapper(DcAmazonAdvertMapper.class);
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(map));
Request request = new Request.Builder()
.url(propertiesUtil.getPropertyAsString("GETRESULT_FINANCE_URL"))
.post(body)
.addHeader("Content-Type", "application/json")
.build();
response = client.newCall(request).execute();
if (response.isSuccessful()) {
AdvertResultInfo advertResult = JSON.parseObject(response.body().string(), AdvertResultInfo.class);
if (advertResult != null && advertResult.getCode() == 0) {
List<AdvertResultData> accountEntries = advertResult.getResults();
if (accountEntries != null && accountEntries.size() > 0) {
List<AmazonAdvert> advertList = JSON.parseArray(accountEntries.get(0).getData().get(0), AmazonAdvert.class);
for (AmazonAdvert amazonAdvert : advertList) {
amazonAdvert.setAccountId(job.getAccountId());
amazonAdvert.setCompanyId(job.getCompanyId());
dcAmazonAdvertMapper.upsertSelective(amazonAdvert);
}
}
} else {
throw new RuntimeException("授权错误");
}
} else {
throw new RuntimeException("接口调用失败");
}
} catch (Exception e) {
job.setMessage(e.getMessage());
} finally {
if (response != null) {
response.close();
}
}
}
}
......@@ -8,8 +8,8 @@
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="campaign_name" jdbcType="VARCHAR" property="campaignName" />
<result column="campaign_id" jdbcType="INTEGER" property="campaignId" />
<result column="campaign_status" jdbcType="TINYINT" property="campaignStatus" />
<result column="campaign_id" jdbcType="VARCHAR" property="campaignId" />
<result column="campaign_status" jdbcType="VARCHAR" property="campaignStatus" />
<result column="campaign_budget" jdbcType="DECIMAL" property="campaignBudget" />
<result column="attributed_conversions_oneday" jdbcType="INTEGER" property="attributedConversionsOneday" />
<result column="attributed_units_ordered_oneday" jdbcType="INTEGER" property="attributedUnitsOrderedOneday" />
......@@ -24,6 +24,11 @@
<result column="attributed_sales_thirtyday" jdbcType="INTEGER" property="attributedSalesThirtyday" />
<result column="attributed_sales_fourteenday" jdbcType="INTEGER" property="attributedSalesFourteenday" />
<result column="attributed_sales_sevenday" jdbcType="INTEGER" property="attributedSalesSevenday" />
<result column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="currency" jdbcType="VARCHAR" property="currency" />
<result column="gmt_create_time" jdbcType="TIMESTAMP" property="gmtCreateTime" />
<result column="gmt_modify_time" jdbcType="TIMESTAMP" property="gmtModifyTime" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -100,7 +105,7 @@
attributed_units_ordered_oneday, attributed_sales_oneday, attributed_units_ordered_sevenday,
impressions, clicks, cost, attributed_conversions_thirtyday, attributed_conversions_fourteenday,
attributed_conversions_sevenday, attributed_sales_thirtyday, attributed_sales_fourteenday,
attributed_sales_sevenday
attributed_sales_sevenday, account_id, company_id, currency, gmt_create_time, gmt_modify_time
</sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAmazonAdvertExample" resultMap="BaseResultMap">
<!--
......@@ -168,15 +173,19 @@
clicks, cost, attributed_conversions_thirtyday,
attributed_conversions_fourteenday, attributed_conversions_sevenday,
attributed_sales_thirtyday, attributed_sales_fourteenday,
attributed_sales_sevenday)
values (#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=INTEGER},
#{campaignStatus,jdbcType=TINYINT}, #{campaignBudget,jdbcType=DECIMAL}, #{attributedConversionsOneday,jdbcType=INTEGER},
attributed_sales_sevenday, account_id, company_id,
currency, gmt_create_time, gmt_modify_time
)
values (#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=VARCHAR},
#{campaignStatus,jdbcType=VARCHAR}, #{campaignBudget,jdbcType=DECIMAL}, #{attributedConversionsOneday,jdbcType=INTEGER},
#{attributedUnitsOrderedOneday,jdbcType=INTEGER}, #{attributedSalesOneday,jdbcType=INTEGER},
#{attributedUnitsOrderedSevenday,jdbcType=INTEGER}, #{impressions,jdbcType=INTEGER},
#{clicks,jdbcType=INTEGER}, #{cost,jdbcType=DECIMAL}, #{attributedConversionsThirtyday,jdbcType=INTEGER},
#{attributedConversionsFourteenday,jdbcType=INTEGER}, #{attributedConversionsSevenday,jdbcType=INTEGER},
#{attributedSalesThirtyday,jdbcType=INTEGER}, #{attributedSalesFourteenday,jdbcType=INTEGER},
#{attributedSalesSevenday,jdbcType=INTEGER})
#{attributedSalesSevenday,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER},
#{currency,jdbcType=VARCHAR}, #{gmtCreateTime,jdbcType=TIMESTAMP}, #{gmtModifyTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAmazonAdvert">
<!--
......@@ -239,6 +248,21 @@
<if test="attributedSalesSevenday != null">
attributed_sales_sevenday,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="currency != null">
currency,
</if>
<if test="gmtCreateTime != null">
gmt_create_time,
</if>
<if test="gmtModifyTime != null">
gmt_modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -248,10 +272,10 @@
#{campaignName,jdbcType=VARCHAR},
</if>
<if test="campaignId != null">
#{campaignId,jdbcType=INTEGER},
#{campaignId,jdbcType=VARCHAR},
</if>
<if test="campaignStatus != null">
#{campaignStatus,jdbcType=TINYINT},
#{campaignStatus,jdbcType=VARCHAR},
</if>
<if test="campaignBudget != null">
#{campaignBudget,jdbcType=DECIMAL},
......@@ -295,6 +319,21 @@
<if test="attributedSalesSevenday != null">
#{attributedSalesSevenday,jdbcType=INTEGER},
</if>
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="currency != null">
#{currency,jdbcType=VARCHAR},
</if>
<if test="gmtCreateTime != null">
#{gmtCreateTime,jdbcType=TIMESTAMP},
</if>
<if test="gmtModifyTime != null">
#{gmtModifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcAmazonAdvertExample" resultType="java.lang.Long">
......@@ -321,10 +360,10 @@
campaign_name = #{record.campaignName,jdbcType=VARCHAR},
</if>
<if test="record.campaignId != null">
campaign_id = #{record.campaignId,jdbcType=INTEGER},
campaign_id = #{record.campaignId,jdbcType=VARCHAR},
</if>
<if test="record.campaignStatus != null">
campaign_status = #{record.campaignStatus,jdbcType=TINYINT},
campaign_status = #{record.campaignStatus,jdbcType=VARCHAR},
</if>
<if test="record.campaignBudget != null">
campaign_budget = #{record.campaignBudget,jdbcType=DECIMAL},
......@@ -368,6 +407,21 @@
<if test="record.attributedSalesSevenday != null">
attributed_sales_sevenday = #{record.attributedSalesSevenday,jdbcType=INTEGER},
</if>
<if test="record.accountId != null">
account_id = #{record.accountId,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.currency != null">
currency = #{record.currency,jdbcType=VARCHAR},
</if>
<if test="record.gmtCreateTime != null">
gmt_create_time = #{record.gmtCreateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.gmtModifyTime != null">
gmt_modify_time = #{record.gmtModifyTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -381,8 +435,8 @@
update dc_amazon_advert
set id = #{record.id,jdbcType=INTEGER},
campaign_name = #{record.campaignName,jdbcType=VARCHAR},
campaign_id = #{record.campaignId,jdbcType=INTEGER},
campaign_status = #{record.campaignStatus,jdbcType=TINYINT},
campaign_id = #{record.campaignId,jdbcType=VARCHAR},
campaign_status = #{record.campaignStatus,jdbcType=VARCHAR},
campaign_budget = #{record.campaignBudget,jdbcType=DECIMAL},
attributed_conversions_oneday = #{record.attributedConversionsOneday,jdbcType=INTEGER},
attributed_units_ordered_oneday = #{record.attributedUnitsOrderedOneday,jdbcType=INTEGER},
......@@ -396,7 +450,12 @@
attributed_conversions_sevenday = #{record.attributedConversionsSevenday,jdbcType=INTEGER},
attributed_sales_thirtyday = #{record.attributedSalesThirtyday,jdbcType=INTEGER},
attributed_sales_fourteenday = #{record.attributedSalesFourteenday,jdbcType=INTEGER},
attributed_sales_sevenday = #{record.attributedSalesSevenday,jdbcType=INTEGER}
attributed_sales_sevenday = #{record.attributedSalesSevenday,jdbcType=INTEGER},
account_id = #{record.accountId,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER},
currency = #{record.currency,jdbcType=VARCHAR},
gmt_create_time = #{record.gmtCreateTime,jdbcType=TIMESTAMP},
gmt_modify_time = #{record.gmtModifyTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -412,10 +471,10 @@
campaign_name = #{campaignName,jdbcType=VARCHAR},
</if>
<if test="campaignId != null">
campaign_id = #{campaignId,jdbcType=INTEGER},
campaign_id = #{campaignId,jdbcType=VARCHAR},
</if>
<if test="campaignStatus != null">
campaign_status = #{campaignStatus,jdbcType=TINYINT},
campaign_status = #{campaignStatus,jdbcType=VARCHAR},
</if>
<if test="campaignBudget != null">
campaign_budget = #{campaignBudget,jdbcType=DECIMAL},
......@@ -459,6 +518,21 @@
<if test="attributedSalesSevenday != null">
attributed_sales_sevenday = #{attributedSalesSevenday,jdbcType=INTEGER},
</if>
<if test="accountId != null">
account_id = #{accountId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="currency != null">
currency = #{currency,jdbcType=VARCHAR},
</if>
<if test="gmtCreateTime != null">
gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
</if>
<if test="gmtModifyTime != null">
gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
......@@ -469,8 +543,8 @@
-->
update dc_amazon_advert
set campaign_name = #{campaignName,jdbcType=VARCHAR},
campaign_id = #{campaignId,jdbcType=INTEGER},
campaign_status = #{campaignStatus,jdbcType=TINYINT},
campaign_id = #{campaignId,jdbcType=VARCHAR},
campaign_status = #{campaignStatus,jdbcType=VARCHAR},
campaign_budget = #{campaignBudget,jdbcType=DECIMAL},
attributed_conversions_oneday = #{attributedConversionsOneday,jdbcType=INTEGER},
attributed_units_ordered_oneday = #{attributedUnitsOrderedOneday,jdbcType=INTEGER},
......@@ -484,7 +558,12 @@
attributed_conversions_sevenday = #{attributedConversionsSevenday,jdbcType=INTEGER},
attributed_sales_thirtyday = #{attributedSalesThirtyday,jdbcType=INTEGER},
attributed_sales_fourteenday = #{attributedSalesFourteenday,jdbcType=INTEGER},
attributed_sales_sevenday = #{attributedSalesSevenday,jdbcType=INTEGER}
attributed_sales_sevenday = #{attributedSalesSevenday,jdbcType=INTEGER},
account_id = #{accountId,jdbcType=INTEGER},
company_id = #{companyId,jdbcType=INTEGER},
currency = #{currency,jdbcType=VARCHAR},
gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.AmazonAdvert">
......@@ -549,6 +628,21 @@
<if test="attributedSalesSevenday != null">
attributed_sales_sevenday,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="currency != null">
currency,
</if>
<if test="gmtCreateTime != null">
gmt_create_time,
</if>
<if test="gmtModifyTime != null">
gmt_modify_time,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -559,10 +653,10 @@
#{campaignName,jdbcType=VARCHAR},
</if>
<if test="campaignId != null">
#{campaignId,jdbcType=INTEGER},
#{campaignId,jdbcType=VARCHAR},
</if>
<if test="campaignStatus != null">
#{campaignStatus,jdbcType=TINYINT},
#{campaignStatus,jdbcType=VARCHAR},
</if>
<if test="campaignBudget != null">
#{campaignBudget,jdbcType=DECIMAL},
......@@ -606,6 +700,21 @@
<if test="attributedSalesSevenday != null">
#{attributedSalesSevenday,jdbcType=INTEGER},
</if>
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="currency != null">
#{currency,jdbcType=VARCHAR},
</if>
<if test="gmtCreateTime != null">
#{gmtCreateTime,jdbcType=TIMESTAMP},
</if>
<if test="gmtModifyTime != null">
#{gmtModifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
......@@ -616,10 +725,10 @@
campaign_name = #{campaignName,jdbcType=VARCHAR},
</if>
<if test="campaignId != null">
campaign_id = #{campaignId,jdbcType=INTEGER},
campaign_id = #{campaignId,jdbcType=VARCHAR},
</if>
<if test="campaignStatus != null">
campaign_status = #{campaignStatus,jdbcType=TINYINT},
campaign_status = #{campaignStatus,jdbcType=VARCHAR},
</if>
<if test="campaignBudget != null">
campaign_budget = #{campaignBudget,jdbcType=DECIMAL},
......@@ -663,6 +772,21 @@
<if test="attributedSalesSevenday != null">
attributed_sales_sevenday = #{attributedSalesSevenday,jdbcType=INTEGER},
</if>
<if test="accountId != null">
account_id = #{accountId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="currency != null">
currency = #{currency,jdbcType=VARCHAR},
</if>
<if test="gmtCreateTime != null">
gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
</if>
<if test="gmtModifyTime != null">
gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAmazonAdvert">
......@@ -676,21 +800,24 @@
attributed_units_ordered_oneday, attributed_sales_oneday, attributed_units_ordered_sevenday,
impressions, clicks, cost, attributed_conversions_thirtyday, attributed_conversions_fourteenday,
attributed_conversions_sevenday, attributed_sales_thirtyday, attributed_sales_fourteenday,
attributed_sales_sevenday)
attributed_sales_sevenday, account_id, company_id, currency, gmt_create_time, gmt_modify_time
)
values
(#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=INTEGER},
#{campaignStatus,jdbcType=TINYINT}, #{campaignBudget,jdbcType=DECIMAL}, #{attributedConversionsOneday,jdbcType=INTEGER},
(#{id,jdbcType=INTEGER}, #{campaignName,jdbcType=VARCHAR}, #{campaignId,jdbcType=VARCHAR},
#{campaignStatus,jdbcType=VARCHAR}, #{campaignBudget,jdbcType=DECIMAL}, #{attributedConversionsOneday,jdbcType=INTEGER},
#{attributedUnitsOrderedOneday,jdbcType=INTEGER}, #{attributedSalesOneday,jdbcType=INTEGER},
#{attributedUnitsOrderedSevenday,jdbcType=INTEGER}, #{impressions,jdbcType=INTEGER},
#{clicks,jdbcType=INTEGER}, #{cost,jdbcType=DECIMAL}, #{attributedConversionsThirtyday,jdbcType=INTEGER},
#{attributedConversionsFourteenday,jdbcType=INTEGER}, #{attributedConversionsSevenday,jdbcType=INTEGER},
#{attributedSalesThirtyday,jdbcType=INTEGER}, #{attributedSalesFourteenday,jdbcType=INTEGER},
#{attributedSalesSevenday,jdbcType=INTEGER})
#{attributedSalesSevenday,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER},
#{currency,jdbcType=VARCHAR}, #{gmtCreateTime,jdbcType=TIMESTAMP}, #{gmtModifyTime,jdbcType=TIMESTAMP}
)
on duplicate key update
id = #{id,jdbcType=INTEGER},
campaign_name = #{campaignName,jdbcType=VARCHAR},
campaign_id = #{campaignId,jdbcType=INTEGER},
campaign_status = #{campaignStatus,jdbcType=TINYINT},
campaign_id = #{campaignId,jdbcType=VARCHAR},
campaign_status = #{campaignStatus,jdbcType=VARCHAR},
campaign_budget = #{campaignBudget,jdbcType=DECIMAL},
attributed_conversions_oneday = #{attributedConversionsOneday,jdbcType=INTEGER},
attributed_units_ordered_oneday = #{attributedUnitsOrderedOneday,jdbcType=INTEGER},
......@@ -704,7 +831,12 @@
attributed_conversions_sevenday = #{attributedConversionsSevenday,jdbcType=INTEGER},
attributed_sales_thirtyday = #{attributedSalesThirtyday,jdbcType=INTEGER},
attributed_sales_fourteenday = #{attributedSalesFourteenday,jdbcType=INTEGER},
attributed_sales_sevenday = #{attributedSalesSevenday,jdbcType=INTEGER}
attributed_sales_sevenday = #{attributedSalesSevenday,jdbcType=INTEGER},
account_id = #{accountId,jdbcType=INTEGER},
company_id = #{companyId,jdbcType=INTEGER},
currency = #{currency,jdbcType=VARCHAR},
gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP}
</insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAmazonAdvertExample" resultMap="BaseResultMap">
<!--
......
package com.bailuntec.utils;
import lombok.extern.slf4j.Slf4j;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
@Slf4j
public class RedisUtil {
private static PropertiesUtil propertiesUtil = PropertiesUtil.getInstance("redis");
private static JedisPool jedisPool = null;
/*
* 初始化连接池
*/
static{
JedisPoolConfig config = new JedisPoolConfig();
config.setMaxTotal(propertiesUtil.getPropertyAsInt("SETMAXTOTAL"));
config.setMaxIdle(propertiesUtil.getPropertyAsInt("SETMAXIDLE"));
config.setMaxWaitMillis(propertiesUtil.getPropertyAsInt("SETMAXWAITMILLLIS"));
config.setTestOnBorrow(true);
jedisPool = new JedisPool(config, propertiesUtil.getPropertyAsString("REDIS_URL"), propertiesUtil.getPropertyAsInt("REDIS_PORT"));
log.warn("初始化连接池");
}
/*
* 获取redis实例
*/
public synchronized static Jedis getJedis() {
Jedis jedis = null;
try{
jedis =jedisPool.getResource();
}catch(Exception e) {
e.printStackTrace();
}
return jedis;
}
/*
* 回收redis对象资源
*/
public synchronized static void returnResource(Jedis jedis) {
if(jedis != null) {
try{
jedis.close();
}catch (Exception e){
e.printStackTrace();
}
}
}
/*
* 获取key值
*/
public String getValueByKey(String key) {
Jedis jedis = null;
String result = null;
try {
jedis = getJedis();
result = jedis.get(key);
} catch (Exception e) {
e.printStackTrace();
} finally {
returnResource(jedis);
}
return result;
}
/*
* 删除key
*/
public void deleteByKey(String key) throws Exception {
Jedis jedis = null;
try {
jedis = getJedis();
jedis.del(key);
} catch (Exception e) {
throw e;
} finally {
returnResource(jedis);
}
}
/*
* 设置过期时间值
*/
public void saveValueByKey(String key, String value) throws Exception {
Jedis jedis = null;
try {
jedis = getJedis();
jedis.set(key, value);
jedis.expire(key, propertiesUtil.getPropertyAsInt("EXPIRETIME"));
} catch (Exception e) {
throw e;
} finally {
returnResource(jedis);
}
}
}
......@@ -9,6 +9,8 @@ EVENT_RDB_STORAGE_USERNAME=root
EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE=data-center
JOB_NAME=base-sync-finance-amazon
JOB_CRON=0/2 * * * * ? *
JOB_NAME_ADDTASK=base-sync-finance-amazon-addtask
JOB_CRON_ADDTASK=0 0 9 * * ? *
JOB_NAME_GETRESULT=base-sync-finance-amazon-getresult
JOB_CRON_GETRESULT=0 0 6,23 * * ? *
SHARDING_TOTAL_COUNT=3
\ No newline at end of file
#REDIS_URL=94.191.111.219
#REDIS_PORT=6379
REDIS_URL=redis.blt.com
REDIS_PORT=6379
SETMAXTOTAL=100
SETMAXIDLE=10
SETMAXWAITMILLLIS=10000
EXPIRETIME=86400
......@@ -3,6 +3,7 @@ package com.bailuntec.domain.entity;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
public class DcAmazonAdvert {
......@@ -31,7 +32,7 @@ public class DcAmazonAdvert {
*
* @mbg.generated
*/
private Integer campaignId;
private String campaignId;
/**
*
......@@ -40,7 +41,7 @@ public class DcAmazonAdvert {
*
* @mbg.generated
*/
private Integer campaignStatus;
private String campaignStatus;
/**
*
......@@ -169,6 +170,51 @@ public class DcAmazonAdvert {
private Integer attributedSalesSevenday;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_amazon_advert.account_id
*
* @mbg.generated
*/
private Integer accountId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_amazon_advert.company_id
*
* @mbg.generated
*/
private Integer companyId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_amazon_advert.currency
*
* @mbg.generated
*/
private String currency;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_amazon_advert.gmt_create_time
*
* @mbg.generated
*/
private LocalDateTime gmtCreateTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_amazon_advert.gmt_modify_time
*
* @mbg.generated
*/
private LocalDateTime gmtModifyTime;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_amazon_advert
*
......@@ -198,6 +244,11 @@ public class DcAmazonAdvert {
sb.append(", attributedSalesThirtyday=").append(attributedSalesThirtyday);
sb.append(", attributedSalesFourteenday=").append(attributedSalesFourteenday);
sb.append(", attributedSalesSevenday=").append(attributedSalesSevenday);
sb.append(", accountId=").append(accountId);
sb.append(", companyId=").append(companyId);
sb.append(", currency=").append(currency);
sb.append(", gmtCreateTime=").append(gmtCreateTime);
sb.append(", gmtModifyTime=").append(gmtModifyTime);
sb.append("]");
return sb.toString();
}
......@@ -237,7 +288,12 @@ public class DcAmazonAdvert {
&& (this.getAttributedConversionsSevenday() == null ? other.getAttributedConversionsSevenday() == null : this.getAttributedConversionsSevenday().equals(other.getAttributedConversionsSevenday()))
&& (this.getAttributedSalesThirtyday() == null ? other.getAttributedSalesThirtyday() == null : this.getAttributedSalesThirtyday().equals(other.getAttributedSalesThirtyday()))
&& (this.getAttributedSalesFourteenday() == null ? other.getAttributedSalesFourteenday() == null : this.getAttributedSalesFourteenday().equals(other.getAttributedSalesFourteenday()))
&& (this.getAttributedSalesSevenday() == null ? other.getAttributedSalesSevenday() == null : this.getAttributedSalesSevenday().equals(other.getAttributedSalesSevenday()));
&& (this.getAttributedSalesSevenday() == null ? other.getAttributedSalesSevenday() == null : this.getAttributedSalesSevenday().equals(other.getAttributedSalesSevenday()))
&& (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
&& (this.getGmtCreateTime() == null ? other.getGmtCreateTime() == null : this.getGmtCreateTime().equals(other.getGmtCreateTime()))
&& (this.getGmtModifyTime() == null ? other.getGmtModifyTime() == null : this.getGmtModifyTime().equals(other.getGmtModifyTime()));
}
/**
......@@ -268,6 +324,11 @@ public class DcAmazonAdvert {
result = prime * result + ((getAttributedSalesThirtyday() == null) ? 0 : getAttributedSalesThirtyday().hashCode());
result = prime * result + ((getAttributedSalesFourteenday() == null) ? 0 : getAttributedSalesFourteenday().hashCode());
result = prime * result + ((getAttributedSalesSevenday() == null) ? 0 : getAttributedSalesSevenday().hashCode());
result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
result = prime * result + ((getGmtCreateTime() == null) ? 0 : getGmtCreateTime().hashCode());
result = prime * result + ((getGmtModifyTime() == null) ? 0 : getGmtModifyTime().hashCode());
return result;
}
}
\ No newline at end of file
package com.bailuntec.domain.example;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
......@@ -510,52 +511,62 @@ public class DcAmazonAdvertExample {
return (Criteria) this;
}
public Criteria andCampaignIdEqualTo(Integer value) {
public Criteria andCampaignIdEqualTo(String value) {
addCriterion("campaign_id =", value, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdNotEqualTo(Integer value) {
public Criteria andCampaignIdNotEqualTo(String value) {
addCriterion("campaign_id <>", value, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdGreaterThan(Integer value) {
public Criteria andCampaignIdGreaterThan(String value) {
addCriterion("campaign_id >", value, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdGreaterThanOrEqualTo(Integer value) {
public Criteria andCampaignIdGreaterThanOrEqualTo(String value) {
addCriterion("campaign_id >=", value, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdLessThan(Integer value) {
public Criteria andCampaignIdLessThan(String value) {
addCriterion("campaign_id <", value, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdLessThanOrEqualTo(Integer value) {
public Criteria andCampaignIdLessThanOrEqualTo(String value) {
addCriterion("campaign_id <=", value, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdIn(List<Integer> values) {
public Criteria andCampaignIdLike(String value) {
addCriterion("campaign_id like", value, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdNotLike(String value) {
addCriterion("campaign_id not like", value, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdIn(List<String> values) {
addCriterion("campaign_id in", values, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdNotIn(List<Integer> values) {
public Criteria andCampaignIdNotIn(List<String> values) {
addCriterion("campaign_id not in", values, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdBetween(Integer value1, Integer value2) {
public Criteria andCampaignIdBetween(String value1, String value2) {
addCriterion("campaign_id between", value1, value2, "campaignId");
return (Criteria) this;
}
public Criteria andCampaignIdNotBetween(Integer value1, Integer value2) {
public Criteria andCampaignIdNotBetween(String value1, String value2) {
addCriterion("campaign_id not between", value1, value2, "campaignId");
return (Criteria) this;
}
......@@ -570,52 +581,62 @@ public class DcAmazonAdvertExample {
return (Criteria) this;
}
public Criteria andCampaignStatusEqualTo(Integer value) {
public Criteria andCampaignStatusEqualTo(String value) {
addCriterion("campaign_status =", value, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusNotEqualTo(Integer value) {
public Criteria andCampaignStatusNotEqualTo(String value) {
addCriterion("campaign_status <>", value, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusGreaterThan(Integer value) {
public Criteria andCampaignStatusGreaterThan(String value) {
addCriterion("campaign_status >", value, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusGreaterThanOrEqualTo(Integer value) {
public Criteria andCampaignStatusGreaterThanOrEqualTo(String value) {
addCriterion("campaign_status >=", value, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusLessThan(Integer value) {
public Criteria andCampaignStatusLessThan(String value) {
addCriterion("campaign_status <", value, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusLessThanOrEqualTo(Integer value) {
public Criteria andCampaignStatusLessThanOrEqualTo(String value) {
addCriterion("campaign_status <=", value, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusIn(List<Integer> values) {
public Criteria andCampaignStatusLike(String value) {
addCriterion("campaign_status like", value, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusNotLike(String value) {
addCriterion("campaign_status not like", value, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusIn(List<String> values) {
addCriterion("campaign_status in", values, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusNotIn(List<Integer> values) {
public Criteria andCampaignStatusNotIn(List<String> values) {
addCriterion("campaign_status not in", values, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusBetween(Integer value1, Integer value2) {
public Criteria andCampaignStatusBetween(String value1, String value2) {
addCriterion("campaign_status between", value1, value2, "campaignStatus");
return (Criteria) this;
}
public Criteria andCampaignStatusNotBetween(Integer value1, Integer value2) {
public Criteria andCampaignStatusNotBetween(String value1, String value2) {
addCriterion("campaign_status not between", value1, value2, "campaignStatus");
return (Criteria) this;
}
......@@ -1459,6 +1480,316 @@ public class DcAmazonAdvertExample {
addCriterion("attributed_sales_sevenday not between", value1, value2, "attributedSalesSevenday");
return (Criteria) this;
}
public Criteria andAccountIdIsNull() {
addCriterion("account_id is null");
return (Criteria) this;
}
public Criteria andAccountIdIsNotNull() {
addCriterion("account_id is not null");
return (Criteria) this;
}
public Criteria andAccountIdEqualTo(Integer value) {
addCriterion("account_id =", value, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdNotEqualTo(Integer value) {
addCriterion("account_id <>", value, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdGreaterThan(Integer value) {
addCriterion("account_id >", value, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdGreaterThanOrEqualTo(Integer value) {
addCriterion("account_id >=", value, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdLessThan(Integer value) {
addCriterion("account_id <", value, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdLessThanOrEqualTo(Integer value) {
addCriterion("account_id <=", value, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdIn(List<Integer> values) {
addCriterion("account_id in", values, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdNotIn(List<Integer> values) {
addCriterion("account_id not in", values, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdBetween(Integer value1, Integer value2) {
addCriterion("account_id between", value1, value2, "accountId");
return (Criteria) this;
}
public Criteria andAccountIdNotBetween(Integer value1, Integer value2) {
addCriterion("account_id not between", value1, value2, "accountId");
return (Criteria) this;
}
public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;
}
public Criteria andCompanyIdIsNotNull() {
addCriterion("company_id is not null");
return (Criteria) this;
}
public Criteria andCompanyIdEqualTo(Integer value) {
addCriterion("company_id =", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotEqualTo(Integer value) {
addCriterion("company_id <>", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThan(Integer value) {
addCriterion("company_id >", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThanOrEqualTo(Integer value) {
addCriterion("company_id >=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThan(Integer value) {
addCriterion("company_id <", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThanOrEqualTo(Integer value) {
addCriterion("company_id <=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdIn(List<Integer> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Integer> values) {
addCriterion("company_id not in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdBetween(Integer value1, Integer value2) {
addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotBetween(Integer value1, Integer value2) {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCurrencyIsNull() {
addCriterion("currency is null");
return (Criteria) this;
}
public Criteria andCurrencyIsNotNull() {
addCriterion("currency is not null");
return (Criteria) this;
}
public Criteria andCurrencyEqualTo(String value) {
addCriterion("currency =", value, "currency");
return (Criteria) this;
}
public Criteria andCurrencyNotEqualTo(String value) {
addCriterion("currency <>", value, "currency");
return (Criteria) this;
}
public Criteria andCurrencyGreaterThan(String value) {
addCriterion("currency >", value, "currency");
return (Criteria) this;
}
public Criteria andCurrencyGreaterThanOrEqualTo(String value) {
addCriterion("currency >=", value, "currency");
return (Criteria) this;
}
public Criteria andCurrencyLessThan(String value) {
addCriterion("currency <", value, "currency");
return (Criteria) this;
}
public Criteria andCurrencyLessThanOrEqualTo(String value) {
addCriterion("currency <=", value, "currency");
return (Criteria) this;
}
public Criteria andCurrencyLike(String value) {
addCriterion("currency like", value, "currency");
return (Criteria) this;
}
public Criteria andCurrencyNotLike(String value) {
addCriterion("currency not like", value, "currency");
return (Criteria) this;
}
public Criteria andCurrencyIn(List<String> values) {
addCriterion("currency in", values, "currency");
return (Criteria) this;
}
public Criteria andCurrencyNotIn(List<String> values) {
addCriterion("currency not in", values, "currency");
return (Criteria) this;
}
public Criteria andCurrencyBetween(String value1, String value2) {
addCriterion("currency between", value1, value2, "currency");
return (Criteria) this;
}
public Criteria andCurrencyNotBetween(String value1, String value2) {
addCriterion("currency not between", value1, value2, "currency");
return (Criteria) this;
}
public Criteria andGmtCreateTimeIsNull() {
addCriterion("gmt_create_time is null");
return (Criteria) this;
}
public Criteria andGmtCreateTimeIsNotNull() {
addCriterion("gmt_create_time is not null");
return (Criteria) this;
}
public Criteria andGmtCreateTimeEqualTo(LocalDateTime value) {
addCriterion("gmt_create_time =", value, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeNotEqualTo(LocalDateTime value) {
addCriterion("gmt_create_time <>", value, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeGreaterThan(LocalDateTime value) {
addCriterion("gmt_create_time >", value, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("gmt_create_time >=", value, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeLessThan(LocalDateTime value) {
addCriterion("gmt_create_time <", value, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("gmt_create_time <=", value, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeIn(List<LocalDateTime> values) {
addCriterion("gmt_create_time in", values, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeNotIn(List<LocalDateTime> values) {
addCriterion("gmt_create_time not in", values, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("gmt_create_time between", value1, value2, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("gmt_create_time not between", value1, value2, "gmtCreateTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeIsNull() {
addCriterion("gmt_modify_time is null");
return (Criteria) this;
}
public Criteria andGmtModifyTimeIsNotNull() {
addCriterion("gmt_modify_time is not null");
return (Criteria) this;
}
public Criteria andGmtModifyTimeEqualTo(LocalDateTime value) {
addCriterion("gmt_modify_time =", value, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeNotEqualTo(LocalDateTime value) {
addCriterion("gmt_modify_time <>", value, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeGreaterThan(LocalDateTime value) {
addCriterion("gmt_modify_time >", value, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("gmt_modify_time >=", value, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeLessThan(LocalDateTime value) {
addCriterion("gmt_modify_time <", value, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("gmt_modify_time <=", value, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeIn(List<LocalDateTime> values) {
addCriterion("gmt_modify_time in", values, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeNotIn(List<LocalDateTime> values) {
addCriterion("gmt_modify_time not in", values, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("gmt_modify_time between", value1, value2, "gmtModifyTime");
return (Criteria) this;
}
public Criteria andGmtModifyTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("gmt_modify_time not between", value1, value2, "gmtModifyTime");
return (Criteria) this;
}
}
/**
......
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