Commit a5b2df59 by wutong

开放所有账号获取费用

parent c2ffb8fa
......@@ -50,15 +50,14 @@ public class AmazonAdProductJob extends PointJob {
private final long SLEEP_WAIT = 10000;
@Override
public void executeJob(ShardingContext shardingContext, JobPointLog jobPointLog) {
//int totalPage = getCount();//分片即将处理的账号总数
int totalPage = getCount();//分片即将处理的账号总数
try {
JobAccountLogMapper jobAccountLogMapper = SessionUtil.getSession().getMapper(JobAccountLogMapper.class);
/*
* 根据不同分片
* 再分页去拿不同的账号执行任务
*/
//int pageSize = totalPage % shardingContext.getShardingTotalCount() == 0? totalPage / shardingContext.getShardingTotalCount() : totalPage / shardingContext.getShardingTotalCount() + 1;
int pageSize= 0;
int pageSize = totalPage % shardingContext.getShardingTotalCount() == 0? totalPage / shardingContext.getShardingTotalCount() : totalPage / shardingContext.getShardingTotalCount() + 1;
//拿到账号集合, TOKEN到用的时候再拿, 不放集合里
List<JobAccountLog> listByPage = jobAccountLogMapper.getListByPage(platformId,pageSize * shardingContext.getShardingItem(), pageSize);
if (listByPage != null && listByPage.size() > 0) {
......
......@@ -609,13 +609,13 @@
limit 1
</select>
<!-- <select id="getListByPage" resultType="com.bailuntec.domain.entity.JobAccountLog">
<select id="getListByPage" resultType="com.bailuntec.domain.entity.JobAccountLog">
SELECT t2.id,t1.company_id, t1.account_id, t2.job_name,t2.page_index,t2.page_size,t2.type,t2.interval_time,t2.start_time,t2.end_time, t2.task_ids FROM
(SELECT * FROM dc_base_company_account WHERE 1=1 <if test="platformId != null">and platform_id=#{platformId} </if>) t1 LEFT JOIN job_account_log t2 on t1.account_id = t2.account_id order by id limit #{pageIndex},#{pageSize}
</select>-->
</select>
<select id="getListByPage" resultType="com.bailuntec.domain.entity.JobAccountLog">
<!-- <select id="getListByPage" resultType="com.bailuntec.domain.entity.JobAccountLog">
SELECT t2.message,t2.id,t1.company_id, t1.account_id, t2.job_name,t2.page_index,t2.page_size,t2.type,t2.interval_time,t2.start_time,t2.end_time, t2.task_ids FROM
(SELECT * FROM dc_base_company_account WHERE 1=1 and platform_id=15) t1 LEFT JOIN job_account_log t2 on t1.account_id = t2.account_id WHERE t2.message != '授权信息为空'order by id limit 1,1
</select>
</select>-->
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment