Commit cfff1274 by huluobin

头程费用计算

亚马逊广告
parent 56e48859
......@@ -46,10 +46,10 @@ public class AmazonAdGenerateReportIdJob implements SimpleJob {
dcBaseCompanyAccountList.forEach(dcBaseCompanyAccount -> {
try {
//
LocalDateTime reportDate = LocalDateTime.now().minusDays(1).minusHours(12);
// LocalDateTime reportDate = LocalDateTime.now().minusDays(1).minusHours(12);
LocalDateTime reportDate =LocalDateTime.of(2020,8,21,0,0);
// LocalDateTime reportDate = LocalDateTime.of(2020, 8, 22, 0, 0);
JSONObject jsonObject = new JSONObject();
jsonObject.put("reportDate", reportDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")));
jsonObject.put("metrics", propertiesUtil.getPropertyAsString("METRICS"));
......
import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.job.CompanyAccountSyncJob;
import com.bailuntec.job.CompanyInfoSyncJob;
import com.bailuntec.job.CompanyStaffSyncJob;
import org.junit.jupiter.api.Test;
import java.time.LocalDateTime;
public class CompanyTest {
@Test
public void test() {
CompanyInfoSyncJob skuSyncJob = new CompanyInfoSyncJob();
skuSyncJob.executeJob(null, new JobPointLog("", 0, 100, 1, 1, LocalDateTime.now().minusMonths(1), LocalDateTime.now().minusDays(29)));
}
@Test
public void test2() {
CompanyStaffSyncJob skuSyncJob = new CompanyStaffSyncJob();
skuSyncJob.executeJob(null, new JobPointLog("", 0, 100, 1, 1, LocalDateTime.now().minusMonths(1), LocalDateTime.now().minusDays(29)));
}
@Test
public void test3() {
CompanyAccountSyncJob skuSyncJob = new CompanyAccountSyncJob();
skuSyncJob.execute(null);
}
}
......@@ -139,5 +139,5 @@ public interface DcBaseCostFirstMapper {
* @param pageOffset 分页参数
* @return 未计算的基础头程费用
*/
List<DcBaseCostFirst> listUnCalc(@Param("pageStart") Integer pageStart, @Param("pageOffset") Integer pageOffset);
List<DcBaseCostFirst> dcBaseCostGroupList(@Param("pageStart") Integer pageStart, @Param("pageOffset") Integer pageOffset);
}
......@@ -834,7 +834,7 @@
# and has_calculation = 0
GROUP BY channel_order_id, transfer_order_id, box_id, warehouse_code) tb;
</select>
<select id="listUnCalc" resultType="com.bailuntec.domain.entity.DcBaseCostFirst">
<select id="dcBaseCostGroupList" resultType="com.bailuntec.domain.entity.DcBaseCostFirst">
SELECT t2.*
from (
SELECT channel_order_id, transfer_order_id, box_id, warehouse_code
......@@ -857,7 +857,6 @@
and transfer_order_id = #{transferOrderId}
and box_id = #{boxId}
and warehouse_code = #{warehouseCode}
# and has_calculation = 0
</update>
......
......@@ -121,4 +121,12 @@ public interface DcMidCostFirstMapper {
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int upsertSelective(DcMidCostFirst record);
}
\ No newline at end of file
/**
* 批量插入更细
*
* @param dcMidCostFirstList
*/
void upsertBatch(@Param("lists") List<DcMidCostFirst> dcMidCostFirstList);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bailuntec.mapper.DcMidCostFirstMapper">
<resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="cost_first" jdbcType="DECIMAL" property="costFirst" />
<result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku" />
<result column="warehouse_code" jdbcType="VARCHAR" property="warehouseCode" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="has_calculation" jdbcType="BIT" property="hasCalculation" />
<result column="cost_count" jdbcType="INTEGER" property="costCount" />
<result column="has_config" jdbcType="BIT" property="hasConfig" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
<resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="cost_first" jdbcType="DECIMAL" property="costFirst"/>
<result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku"/>
<result column="warehouse_code" jdbcType="VARCHAR" property="warehouseCode"/>
<result column="company_id" jdbcType="INTEGER" property="companyId"/>
<result column="has_calculation" jdbcType="BIT" property="hasCalculation"/>
<result column="cost_count" jdbcType="INTEGER" property="costCount"/>
<result column="has_config" jdbcType="BIT" property="hasConfig"/>
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</trim>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, cost_first, bailun_sku, warehouse_code, company_id, has_calculation, cost_count,
has_config
</sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample"
resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, cost_first, bailun_sku, warehouse_code, company_id, has_calculation, cost_count,
has_config
</sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from dc_mid_cost_first
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="rows != null">
<if test="offset != null">
limit ${offset}, ${rows}
</if>
<if test="offset == null">
limit ${rows}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from dc_mid_cost_first
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dc_mid_cost_first
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dc_mid_cost_first
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dc_mid_cost_first (id, cost_first, bailun_sku,
warehouse_code, company_id, has_calculation,
cost_count, has_config)
values (#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{hasCalculation,jdbcType=BIT},
#{costCount,jdbcType=INTEGER}, #{hasConfig,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dc_mid_cost_first
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="costFirst != null">
cost_first,
</if>
<if test="bailunSku != null">
bailun_sku,
</if>
<if test="warehouseCode != null">
warehouse_code,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="hasCalculation != null">
has_calculation,
</if>
<if test="costCount != null">
cost_count,
</if>
<if test="hasConfig != null">
has_config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="costFirst != null">
#{costFirst,jdbcType=DECIMAL},
</if>
<if test="bailunSku != null">
#{bailunSku,jdbcType=VARCHAR},
</if>
<if test="warehouseCode != null">
#{warehouseCode,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
#{hasCalculation,jdbcType=BIT},
</if>
<if test="costCount != null">
#{costCount,jdbcType=INTEGER},
</if>
<if test="hasConfig != null">
#{hasConfig,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dc_mid_cost_first
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_mid_cost_first
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.costFirst != null">
<include refid="Base_Column_List"/>
from dc_mid_cost_first
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="rows != null">
<if test="offset != null">
limit ${offset}, ${rows}
</if>
<if test="offset == null">
limit ${rows}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List"/>
from dc_mid_cost_first
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dc_mid_cost_first
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dc_mid_cost_first
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dc_mid_cost_first (id, cost_first, bailun_sku,
warehouse_code, company_id, has_calculation,
cost_count, has_config)
values (#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{hasCalculation,jdbcType=BIT},
#{costCount,jdbcType=INTEGER}, #{hasConfig,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dc_mid_cost_first
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="costFirst != null">
cost_first,
</if>
<if test="bailunSku != null">
bailun_sku,
</if>
<if test="warehouseCode != null">
warehouse_code,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="hasCalculation != null">
has_calculation,
</if>
<if test="costCount != null">
cost_count,
</if>
<if test="hasConfig != null">
has_config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="costFirst != null">
#{costFirst,jdbcType=DECIMAL},
</if>
<if test="bailunSku != null">
#{bailunSku,jdbcType=VARCHAR},
</if>
<if test="warehouseCode != null">
#{warehouseCode,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
#{hasCalculation,jdbcType=BIT},
</if>
<if test="costCount != null">
#{costCount,jdbcType=INTEGER},
</if>
<if test="hasConfig != null">
#{hasConfig,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample"
resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dc_mid_cost_first
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_mid_cost_first
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.costFirst != null">
cost_first = #{record.costFirst,jdbcType=DECIMAL},
</if>
<if test="record.bailunSku != null">
bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
</if>
<if test="record.warehouseCode != null">
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.hasCalculation != null">
has_calculation = #{record.hasCalculation,jdbcType=BIT},
</if>
<if test="record.costCount != null">
cost_count = #{record.costCount,jdbcType=INTEGER},
</if>
<if test="record.hasConfig != null">
has_config = #{record.hasConfig,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_mid_cost_first
set id = #{record.id,jdbcType=INTEGER},
cost_first = #{record.costFirst,jdbcType=DECIMAL},
</if>
<if test="record.bailunSku != null">
bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
</if>
<if test="record.warehouseCode != null">
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.hasCalculation != null">
has_calculation = #{record.hasCalculation,jdbcType=BIT},
</if>
<if test="record.costCount != null">
cost_count = #{record.costCount,jdbcType=INTEGER},
</if>
<if test="record.hasConfig != null">
has_config = #{record.hasConfig,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_mid_cost_first
set id = #{record.id,jdbcType=INTEGER},
cost_first = #{record.costFirst,jdbcType=DECIMAL},
bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
company_id = #{record.companyId,jdbcType=INTEGER},
has_calculation = #{record.hasCalculation,jdbcType=BIT},
cost_count = #{record.costCount,jdbcType=INTEGER},
has_config = #{record.hasConfig,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_mid_cost_first
<set>
<if test="costFirst != null">
cost_first = #{costFirst,jdbcType=DECIMAL},
</if>
<if test="bailunSku != null">
has_config = #{record.hasConfig,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_mid_cost_first
<set>
<if test="costFirst != null">
cost_first = #{costFirst,jdbcType=DECIMAL},
</if>
<if test="bailunSku != null">
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
</if>
<if test="warehouseCode != null">
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
has_calculation = #{hasCalculation,jdbcType=BIT},
</if>
<if test="costCount != null">
cost_count = #{costCount,jdbcType=INTEGER},
</if>
<if test="hasConfig != null">
has_config = #{hasConfig,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_mid_cost_first
set cost_first = #{costFirst,jdbcType=DECIMAL},
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
</if>
<if test="warehouseCode != null">
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
has_calculation = #{hasCalculation,jdbcType=BIT},
</if>
<if test="costCount != null">
cost_count = #{costCount,jdbcType=INTEGER},
</if>
<if test="hasConfig != null">
has_config = #{hasConfig,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_mid_cost_first
set cost_first = #{costFirst,jdbcType=DECIMAL},
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
has_calculation = #{hasCalculation,jdbcType=BIT},
cost_count = #{costCount,jdbcType=INTEGER},
has_config = #{hasConfig,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into dc_mid_cost_first
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="costFirst != null">
has_config = #{hasConfig,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="upsertBatch">
insert into dc_mid_cost_first
(
cost_first,
</if>
<if test="bailunSku != null">
bailun_sku,
</if>
<if test="warehouseCode != null">
warehouse_code,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="hasCalculation != null">
has_calculation,
</if>
<if test="costCount != null">
cost_count,
</if>
<if test="hasConfig != null">
has_config,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="costFirst != null">
#{costFirst,jdbcType=DECIMAL},
</if>
<if test="bailunSku != null">
#{bailunSku,jdbcType=VARCHAR},
</if>
<if test="warehouseCode != null">
#{warehouseCode,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
#{hasCalculation,jdbcType=BIT},
</if>
<if test="costCount != null">
#{costCount,jdbcType=INTEGER},
</if>
<if test="hasConfig != null">
#{hasConfig,jdbcType=BIT},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
has_config)
values
<foreach collection="lists" item="item" index="index" separator=",">
(
#{item.costFirst,jdbcType=DECIMAL},
#{item.bailunSku,jdbcType=VARCHAR},
#{item.warehouseCode,jdbcType=VARCHAR},
#{item.companyId,jdbcType=INTEGER},
#{item.hasCalculation,jdbcType=BIT},
#{item.costCount,jdbcType=INTEGER},
#{item.hasConfig,jdbcType=BIT}
)
</foreach>
on duplicate key update
cost_first = values(cost_first),
bailun_sku = values(bailun_sku),
warehouse_code = values(warehouse_code),
company_id = values(company_id),
has_calculation = values(has_calculation),
cost_count = values(cost_count),
has_config = values(has_config)
</update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into dc_mid_cost_first
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="costFirst != null">
cost_first,
</if>
<if test="bailunSku != null">
bailun_sku,
</if>
<if test="warehouseCode != null">
warehouse_code,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="hasCalculation != null">
has_calculation,
</if>
<if test="costCount != null">
cost_count,
</if>
<if test="hasConfig != null">
has_config,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="costFirst != null">
#{costFirst,jdbcType=DECIMAL},
</if>
<if test="bailunSku != null">
#{bailunSku,jdbcType=VARCHAR},
</if>
<if test="warehouseCode != null">
#{warehouseCode,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
#{hasCalculation,jdbcType=BIT},
</if>
<if test="costCount != null">
#{costCount,jdbcType=INTEGER},
</if>
<if test="hasConfig != null">
#{hasConfig,jdbcType=BIT},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
<if test="costFirst != null">
cost_first = #{costFirst,jdbcType=DECIMAL},
</if>
<if test="bailunSku != null">
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
</if>
<if test="warehouseCode != null">
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
has_calculation = #{hasCalculation,jdbcType=BIT},
</if>
<if test="costCount != null">
cost_count = #{costCount,jdbcType=INTEGER},
</if>
<if test="hasConfig != null">
has_config = #{hasConfig,jdbcType=BIT},
</if>
</trim>
</insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into dc_mid_cost_first
(id, cost_first, bailun_sku, warehouse_code, company_id, has_calculation, cost_count,
has_config)
values
(#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{hasCalculation,jdbcType=BIT},
#{costCount,jdbcType=INTEGER}, #{hasConfig,jdbcType=BIT})
on duplicate key update
id = #{id,jdbcType=INTEGER},
</if>
<if test="costFirst != null">
cost_first = #{costFirst,jdbcType=DECIMAL},
</if>
<if test="bailunSku != null">
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
</if>
<if test="warehouseCode != null">
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
has_calculation = #{hasCalculation,jdbcType=BIT},
</if>
<if test="costCount != null">
cost_count = #{costCount,jdbcType=INTEGER},
</if>
<if test="hasConfig != null">
has_config = #{hasConfig,jdbcType=BIT},
</if>
</trim>
</insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into dc_mid_cost_first
(id, cost_first, bailun_sku, warehouse_code, company_id, has_calculation, cost_count,
has_config)
values
(#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{hasCalculation,jdbcType=BIT},
#{costCount,jdbcType=INTEGER}, #{hasConfig,jdbcType=BIT})
on duplicate key update
id = #{id,jdbcType=INTEGER},
cost_first = #{costFirst,jdbcType=DECIMAL},
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
has_calculation = #{hasCalculation,jdbcType=BIT},
cost_count = #{costCount,jdbcType=INTEGER},
has_config = #{hasConfig,jdbcType=BIT}
</insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<include refid="Base_Column_List" />
from dc_mid_cost_first
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
has_config = #{hasConfig,jdbcType=BIT}
</insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample"
resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<include refid="Base_Column_List"/>
from dc_mid_cost_first
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
</mapper>
......@@ -129,6 +129,5 @@ public interface DcMidCostFirstOrderMapper {
List<MidCostFirst> listSkuWarehouse(@Param("v1") int v1, @Param("v2") int v2);
int updateHasCalculation(MidCostFirst midCostFirst);
}
......@@ -577,28 +577,26 @@
limit 1
</select>
<!---->
<select id="countSkuWarehouse" resultType="int">
select count(*)
from (SELECT * FROM dc_mid_cost_first_order where has_calculation = 0 GROUP BY bailun_sku, warehouse_code) tb;
from (SELECT *
FROM dc_mid_cost_first_order
GROUP BY bailun_sku, warehouse_code) tb;
</select>
<!---->
<select id="listSkuWarehouse" resultType="com.bailuntec.domain.pojo.MidCostFirst">
SELECT bailun_sku,
warehouse_code,
sum(cost_first) as total_cost_first,
sum(quantity) as total_count
FROM dc_mid_cost_first_order
where has_calculation = 0
GROUP BY bailun_sku, warehouse_code
order by id asc
order by id
limit #{v1}, #{v2}
</select>
<update id="updateHasCalculation">
update dc_mid_cost_first_order
set has_calculation = 1
where bailun_sku = #{bailunSku}
and warehouse_code = #{warehouseCode}
</update>
</mapper>
......@@ -2,16 +2,19 @@ package com.bailuntec.job;
import com.bailuntec.domain.entity.DcBaseCostFirst;
import com.bailuntec.domain.entity.DcBaseSku;
import com.bailuntec.domain.entity.DcMidCostFirst;
import com.bailuntec.domain.entity.DcMidCostFirstOrder;
import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.example.DcBaseSkuExample;
import com.bailuntec.domain.example.DcMidCostFirstExample;
import com.bailuntec.domain.pojo.MidCostFirst;
import com.bailuntec.mapper.DcBaseCostFirstMapper;
import com.bailuntec.mapper.DcBaseSkuMapper;
import com.bailuntec.mapper.DcMidCostFirstMapper;
import com.bailuntec.mapper.DcMidCostFirstOrderMapper;
import com.bailuntec.support.PointJob;
import com.bailuntec.utils.ListUtil;
import com.bailuntec.utils.SessionUtil;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.SqlSession;
......@@ -23,85 +26,58 @@ import java.util.Optional;
import java.util.stream.Collectors;
@Slf4j
public class CalculateCostFirstJob extends PointJob {
public class CalculateCostFirstJob implements SimpleJob {
@Override
public void executeJob(ShardingContext shardingContext, JobPointLog jobPointLog) {
public void execute(ShardingContext shardingContext) {
int countChannelOrder;
try (SqlSession sqlSession = SessionUtil.getFactory().openSession(true)) {
DcBaseCostFirstMapper dcBaseCostFirstMapper = sqlSession.getMapper(DcBaseCostFirstMapper.class);
DcMidCostFirstOrderMapper dcMidCostFirstOrderMapper = sqlSession.getMapper(DcMidCostFirstOrderMapper.class);
DcBaseSkuMapper dcBaseSkuMapper = SessionUtil.getSession().getMapper(DcBaseSkuMapper.class);
DcBaseSkuMapper dcBaseSkuMapper = sqlSession.getMapper(DcBaseSkuMapper.class);
DcMidCostFirstMapper dcMidCostFirstMapper = sqlSession.getMapper(DcMidCostFirstMapper.class);
countChannelOrder = dcBaseCostFirstMapper.countChannelOrder();
int currentPage = 1;
int pageSize = 1000;
int countChannelOrder = dcBaseCostFirstMapper.countChannelOrder();
int totalPage = getTotalPage(countChannelOrder, pageSize);
int totalPage = getChannelOrderPage(countChannelOrder, jobPointLog);
do {
log.info("当前第:{}页", jobPointLog.getPageIndex());
log.info("当前第:{}页", currentPage);
log.info("总共:{}页", totalPage);
Integer pageStart = (jobPointLog.getPageIndex() - 1) * jobPointLog.getPageSize();
Integer pageOffset = jobPointLog.getPageSize();
Integer pageStart = (currentPage - 1) * currentPage;
Integer pageOffset = currentPage;
List<DcBaseCostFirst> dcBaseCostFirstList = dcBaseCostFirstMapper.listUnCalc(pageStart, pageOffset);
List<DcBaseCostFirst> dcBaseCostFirstList = dcBaseCostFirstMapper.dcBaseCostGroupList(pageStart, pageOffset);
if (ListUtil.isNotEmpty(dcBaseCostFirstList)) {
List<DcBaseSku> dcBaseSkuList = dcBaseSkuMapper.selectByExample(DcBaseSkuExample.newAndCreateCriteria()
.andBailunSkuIn(dcBaseCostFirstList.stream().map(DcBaseCostFirst::getBailunSku).collect(Collectors.toList())).example());
//聚合base头程费sku信息
List<DcBaseSku> dcBaseSkuList = dcBaseSkuMapper.selectByExample(DcBaseSkuExample
.newAndCreateCriteria()
.andBailunSkuIn(dcBaseCostFirstList
.stream()
.map(DcBaseCostFirst::getBailunSku)
.collect(Collectors.toList()))
.example());
Map<String, DcBaseSku> dcBaseSkuMap = dcBaseSkuList.stream().collect(Collectors.toMap(DcBaseSku::getBailunSku, dcBaseSku -> dcBaseSku));
dcBaseCostFirstList.forEach(dcBaseCostFirst -> dcBaseCostFirst.setDcBaseSku(Optional.ofNullable(dcBaseSkuMap.get(dcBaseCostFirst.getBailunSku()))));
//头程费用 按订单维度(boxId,channelOrderId ,transferOrderId,warehouseCode)分组
Map<String, List<DcBaseCostFirst>> dcBaseCostFirstMap = dcBaseCostFirstList.stream().collect(
Collectors.groupingBy(val -> val.getChannelOrderId() + val.getTransferOrderId() + val.getBoxId() + val.getWarehouseCode()));
//生成订单维度DcMidCostFirstOrder列表
List<DcMidCostFirstOrder> dcMidCostFirstOrderList = dcBaseCostFirstMap.values()
.stream()
.map(dcBaseCostFirstGroup -> {
//总重量
BigDecimal totalWeight = dcBaseCostFirstGroup.stream().map(dcBaseCostFirst -> dcBaseCostFirst.getDcBaseSku().map(DcBaseSku::getWeight).orElse(BigDecimal.ZERO)
.multiply(new BigDecimal(dcBaseCostFirst.getQuantity() == null ? 0 : dcBaseCostFirst.getQuantity())))
.reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal leftRatio = BigDecimal.ONE;
if (totalWeight.equals(BigDecimal.ZERO)) {
for (int i = 0; i < dcBaseCostFirstGroup.size(); i++) {
DcBaseCostFirst dcBaseCostFirst = dcBaseCostFirstGroup.get(i);
//最后一个元素用减法计算
if (dcBaseCostFirstGroup.size() - 1 == i) {
dcBaseCostFirst.setSkuWeightRatio(leftRatio);
}
//前面用除法计算
else {
BigDecimal skuWeightRatio = BigDecimal.ONE.divide(new BigDecimal(dcBaseCostFirstGroup.size()), 2, BigDecimal.ROUND_HALF_UP);
dcBaseCostFirst.setSkuWeightRatio(skuWeightRatio);
leftRatio = leftRatio.subtract(skuWeightRatio);
}
}
} else {
for (int i = 0; i < dcBaseCostFirstGroup.size(); i++) {
DcBaseCostFirst dcBaseCostFirst = dcBaseCostFirstGroup.get(i);
//最后一个元素用减法计算
if (dcBaseCostFirstGroup.size() - 1 == i) {
dcBaseCostFirst.setSkuWeightRatio(leftRatio);
}
//前面用除法计算
else {
BigDecimal skuWeightRatio = new BigDecimal(dcBaseCostFirst.getQuantity()).multiply(dcBaseCostFirst.getDcBaseSku().map(DcBaseSku::getWeight).orElse(BigDecimal.ZERO))
.divide(totalWeight, 2, BigDecimal.ROUND_HALF_UP);
dcBaseCostFirst.setSkuWeightRatio(skuWeightRatio);
leftRatio = leftRatio.subtract(skuWeightRatio);
}
}
}
List<DcMidCostFirstOrder> dcMidCostFirstOrderGroup = dcBaseCostFirstGroup
//计算sku权重
this.calcBaseFirstCostSkuWeightRatio(dcBaseCostFirstGroup);
return dcBaseCostFirstGroup
.stream()
.map(dcBaseCostFirst -> {
......@@ -117,36 +93,118 @@ public class CalculateCostFirstJob extends PointJob {
dcMidCostFirstOrder.setWeightRatio(dcBaseCostFirst.getSkuWeightRatio());
dcMidCostFirstOrder.setCostFirst(skuCostFirst);
dcMidCostFirstOrder.setCompanyId(dcBaseCostFirst.getCompanyId());
dcMidCostFirstOrder.setHasCalculation(false);
dcMidCostFirstOrder.setHasCalculation(true);
return dcMidCostFirstOrder;
}).collect(Collectors.toList());
return dcMidCostFirstOrderGroup;
})
.flatMap(List::stream)
.collect(Collectors.toList());
//批量插入更新订单维度
dcMidCostFirstOrderMapper.upsertBatch(dcMidCostFirstOrderList);
}
jobPointLog.setPageIndex(jobPointLog.getPageIndex() + 1);
currentPage = currentPage + 1;
}
while (jobPointLog.getPageIndex() <= totalPage);
while (currentPage <= totalPage);
jobPointLog.setPageIndex(0);
int dcMidCostFirstIndex = 1;
int dcMidCostFirstPageSize = 1000;
int countSkuWarehouse = dcMidCostFirstOrderMapper.countSkuWarehouse();
int dcMidCostFirstTotalPage = this.getTotalPage(countSkuWarehouse, dcMidCostFirstPageSize);
do {
List<MidCostFirst> midCostFirstList = dcMidCostFirstOrderMapper.listSkuWarehouse((dcMidCostFirstIndex - 1) * dcMidCostFirstPageSize, dcMidCostFirstPageSize);
List<DcMidCostFirst> dcMidCostFirstList = midCostFirstList.stream().map(midCostFirst -> {
DcMidCostFirst dcMidCostFirst = dcMidCostFirstMapper.selectOneByExample(DcMidCostFirstExample.newAndCreateCriteria()
.andBailunSkuEqualTo(midCostFirst.getBailunSku())
.andWarehouseCodeEqualTo(midCostFirst.getWarehouseCode())
.example());
if (dcMidCostFirst == null) {
dcMidCostFirst = new DcMidCostFirst();
dcMidCostFirst.setBailunSku(midCostFirst.getBailunSku());
dcMidCostFirst.setWarehouseCode(midCostFirst.getWarehouseCode());
dcMidCostFirst.setCompanyId(0);
dcMidCostFirst.setHasConfig(false);
}
dcMidCostFirst.setCostFirst(midCostFirst.getTotalCostFirst().divide(new BigDecimal(midCostFirst.getTotalCount()), 2, BigDecimal.ROUND_HALF_UP));
dcMidCostFirst.setCostCount(midCostFirst.getTotalCount());
dcMidCostFirst.setHasCalculation(true);
return dcMidCostFirst;
}
)
.collect(Collectors.toList());
dcMidCostFirstMapper.upsertBatch(dcMidCostFirstList);
dcMidCostFirstIndex = dcMidCostFirstIndex + 1;
} while (dcMidCostFirstIndex < dcMidCostFirstTotalPage);
} catch (Exception e) {
throw new RuntimeException("任务失败", e);
}
}
/**
* <p>
* 按照sku重量计算组别内每个订单维度的头程费用权重
* </p>
*
* @param dcBaseCostFirstGroup 基础头程费用 按订单维度(boxId,channelOrderId ,transferOrderId,warehouseCode)分组后的组别
*/
private void calcBaseFirstCostSkuWeightRatio(List<DcBaseCostFirst> dcBaseCostFirstGroup) {
//总重量
BigDecimal totalWeight = dcBaseCostFirstGroup.stream().map(dcBaseCostFirst -> dcBaseCostFirst.getDcBaseSku().map(DcBaseSku::getWeight).orElse(BigDecimal.ZERO)
.multiply(new BigDecimal(dcBaseCostFirst.getQuantity() == null ? 0 : dcBaseCostFirst.getQuantity())))
.reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal leftRatio = BigDecimal.ONE;
if (totalWeight.equals(BigDecimal.ZERO)) {
for (int i = 0; i < dcBaseCostFirstGroup.size(); i++) {
DcBaseCostFirst dcBaseCostFirst = dcBaseCostFirstGroup.get(i);
//最后一个元素用减法计算
if (dcBaseCostFirstGroup.size() - 1 == i) {
dcBaseCostFirst.setSkuWeightRatio(leftRatio);
}
//前面用除法计算
else {
BigDecimal skuWeightRatio = BigDecimal.ONE.divide(new BigDecimal(dcBaseCostFirstGroup.size()), 2, BigDecimal.ROUND_HALF_UP);
dcBaseCostFirst.setSkuWeightRatio(skuWeightRatio);
leftRatio = leftRatio.subtract(skuWeightRatio);
}
}
} else {
for (int i = 0; i < dcBaseCostFirstGroup.size(); i++) {
DcBaseCostFirst dcBaseCostFirst = dcBaseCostFirstGroup.get(i);
//最后一个元素用减法计算
if (dcBaseCostFirstGroup.size() - 1 == i) {
dcBaseCostFirst.setSkuWeightRatio(leftRatio);
}
//前面用除法计算
else {
BigDecimal skuWeightRatio = new BigDecimal(dcBaseCostFirst.getQuantity()).multiply(dcBaseCostFirst.getDcBaseSku().map(DcBaseSku::getWeight).orElse(BigDecimal.ZERO))
.divide(totalWeight, 2, BigDecimal.ROUND_HALF_UP);
dcBaseCostFirst.setSkuWeightRatio(skuWeightRatio);
leftRatio = leftRatio.subtract(skuWeightRatio);
}
}
}
}
private int getChannelOrderPage(int countChannelOrder, JobPointLog jobPointLog) {
if (countChannelOrder % jobPointLog.getPageSize() == 0) {
return countChannelOrder / jobPointLog.getPageSize();
private int getTotalPage(int count, int pageSize) {
if (count % pageSize == 0) {
return count / pageSize;
}
return countChannelOrder / jobPointLog.getPageSize() + 1;
return count / pageSize + 1;
}
}
......@@ -2,7 +2,6 @@ import com.bailuntec.domain.constant.Constant;
import com.bailuntec.domain.entity.DcBaseSku;
import com.bailuntec.domain.entity.DcMidCostFirst;
import com.bailuntec.domain.entity.DcMidCostFirstConfig;
import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.example.DcBaseSkuExample;
import com.bailuntec.domain.example.DcMidCostFirstExample;
import com.bailuntec.domain.pojo.MidCostFirst;
......@@ -37,7 +36,7 @@ public class CostFirstTest {
@Test
public void test() {
CalculateCostFirstJob costFirstJob = new CalculateCostFirstJob();
costFirstJob.executeJob(null, new JobPointLog("dc-mid-calculate-cost-first", 1, 100, null, null, null, null));
costFirstJob.execute(null);
}
@Test
......
......@@ -20,6 +20,6 @@ class CalculateCostFirstJobTest {
JobPointLog jobPointLog = new JobPointLog();
jobPointLog.setPageSize(1000);
jobPointLog.setPageIndex(1);
calculateCostFirstJob.executeJob(null, jobPointLog);
calculateCostFirstJob.execute(null);
}
}
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