Commit 8322a5c4 by huluobin

daliy sales

parent bad61c50
package com.bailuntec.domain.entity;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
@Data
public class DcDailySales {
......@@ -74,6 +73,15 @@ public class DcDailySales {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_daily_sales.oneday_total_sales_amount
*
* @mbg.generated
*/
private BigDecimal onedayTotalSalesAmount;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_daily_sales.threeday_total_sales
*
* @mbg.generated
......@@ -198,6 +206,15 @@ public class DcDailySales {
private LocalDate recordDate;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_daily_sales.company_id
*
* @mbg.generated
*/
private Integer companyId;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_daily_sales
*
......@@ -216,6 +233,7 @@ public class DcDailySales {
sb.append(", warehouseCode=").append(warehouseCode);
sb.append(", bailunCategoryId=").append(bailunCategoryId);
sb.append(", onedayTotalSales=").append(onedayTotalSales);
sb.append(", onedayTotalSalesAmount=").append(onedayTotalSalesAmount);
sb.append(", threedayTotalSales=").append(threedayTotalSales);
sb.append(", sevendayTotalSales=").append(sevendayTotalSales);
sb.append(", fourteendayTotalSales=").append(fourteendayTotalSales);
......@@ -230,6 +248,7 @@ public class DcDailySales {
sb.append(", globalCompanyCode=").append(globalCompanyCode);
sb.append(", globalCompanyName=").append(globalCompanyName);
sb.append(", recordDate=").append(recordDate);
sb.append(", companyId=").append(companyId);
sb.append("]");
return sb.toString();
}
......@@ -259,6 +278,7 @@ public class DcDailySales {
&& (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode()))
&& (this.getBailunCategoryId() == null ? other.getBailunCategoryId() == null : this.getBailunCategoryId().equals(other.getBailunCategoryId()))
&& (this.getOnedayTotalSales() == null ? other.getOnedayTotalSales() == null : this.getOnedayTotalSales().equals(other.getOnedayTotalSales()))
&& (this.getOnedayTotalSalesAmount() == null ? other.getOnedayTotalSalesAmount() == null : this.getOnedayTotalSalesAmount().equals(other.getOnedayTotalSalesAmount()))
&& (this.getThreedayTotalSales() == null ? other.getThreedayTotalSales() == null : this.getThreedayTotalSales().equals(other.getThreedayTotalSales()))
&& (this.getSevendayTotalSales() == null ? other.getSevendayTotalSales() == null : this.getSevendayTotalSales().equals(other.getSevendayTotalSales()))
&& (this.getFourteendayTotalSales() == null ? other.getFourteendayTotalSales() == null : this.getFourteendayTotalSales().equals(other.getFourteendayTotalSales()))
......@@ -272,7 +292,8 @@ public class DcDailySales {
&& (this.getGlobalCompanyId() == null ? other.getGlobalCompanyId() == null : this.getGlobalCompanyId().equals(other.getGlobalCompanyId()))
&& (this.getGlobalCompanyCode() == null ? other.getGlobalCompanyCode() == null : this.getGlobalCompanyCode().equals(other.getGlobalCompanyCode()))
&& (this.getGlobalCompanyName() == null ? other.getGlobalCompanyName() == null : this.getGlobalCompanyName().equals(other.getGlobalCompanyName()))
&& (this.getRecordDate() == null ? other.getRecordDate() == null : this.getRecordDate().equals(other.getRecordDate()));
&& (this.getRecordDate() == null ? other.getRecordDate() == null : this.getRecordDate().equals(other.getRecordDate()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()));
}
/**
......@@ -292,6 +313,7 @@ public class DcDailySales {
result = prime * result + ((getWarehouseCode() == null) ? 0 : getWarehouseCode().hashCode());
result = prime * result + ((getBailunCategoryId() == null) ? 0 : getBailunCategoryId().hashCode());
result = prime * result + ((getOnedayTotalSales() == null) ? 0 : getOnedayTotalSales().hashCode());
result = prime * result + ((getOnedayTotalSalesAmount() == null) ? 0 : getOnedayTotalSalesAmount().hashCode());
result = prime * result + ((getThreedayTotalSales() == null) ? 0 : getThreedayTotalSales().hashCode());
result = prime * result + ((getSevendayTotalSales() == null) ? 0 : getSevendayTotalSales().hashCode());
result = prime * result + ((getFourteendayTotalSales() == null) ? 0 : getFourteendayTotalSales().hashCode());
......@@ -306,6 +328,7 @@ public class DcDailySales {
result = prime * result + ((getGlobalCompanyCode() == null) ? 0 : getGlobalCompanyCode().hashCode());
result = prime * result + ((getGlobalCompanyName() == null) ? 0 : getGlobalCompanyName().hashCode());
result = prime * result + ((getRecordDate() == null) ? 0 : getRecordDate().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
return result;
}
}
\ No newline at end of file
......@@ -832,6 +832,66 @@ public class DcDailySalesExample {
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountIsNull() {
addCriterion("oneday_total_sales_amount is null");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountIsNotNull() {
addCriterion("oneday_total_sales_amount is not null");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountEqualTo(BigDecimal value) {
addCriterion("oneday_total_sales_amount =", value, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountNotEqualTo(BigDecimal value) {
addCriterion("oneday_total_sales_amount <>", value, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountGreaterThan(BigDecimal value) {
addCriterion("oneday_total_sales_amount >", value, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("oneday_total_sales_amount >=", value, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountLessThan(BigDecimal value) {
addCriterion("oneday_total_sales_amount <", value, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountLessThanOrEqualTo(BigDecimal value) {
addCriterion("oneday_total_sales_amount <=", value, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountIn(List<BigDecimal> values) {
addCriterion("oneday_total_sales_amount in", values, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountNotIn(List<BigDecimal> values) {
addCriterion("oneday_total_sales_amount not in", values, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("oneday_total_sales_amount between", value1, value2, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andOnedayTotalSalesAmountNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("oneday_total_sales_amount not between", value1, value2, "onedayTotalSalesAmount");
return (Criteria) this;
}
public Criteria andThreedayTotalSalesIsNull() {
addCriterion("threeday_total_sales is null");
return (Criteria) this;
......@@ -1691,6 +1751,66 @@ public class DcDailySalesExample {
addCriterion("record_date not between", value1, value2, "recordDate");
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;
}
}
/**
......@@ -1922,6 +2042,6 @@ public class DcDailySalesExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
void example(DcDailySalesExample example);
void example(com.bailuntec.domain.example.DcDailySalesExample example);
}
}
\ No newline at end of file
table-name=dc_base_finance_amazon_ad_product
table-name=dc_daily_sales
package com.bailuntec.job;
import com.bailuntec.mapper.DcDailySalesMapper;
import com.bailuntec.utils.SessionUtil;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
......@@ -11,6 +12,7 @@ public class CalculateSalesJob implements SimpleJob {
try {
DcDailySalesMapper mapper = SessionUtil.getSession().getMapper(DcDailySalesMapper.class);
mapper.calculateSales();
SessionUtil.getSession().commit();
} catch (Exception e) {
e.printStackTrace();
......
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