Commit bd4bc55b by wutong

更新同步SKUMS的SKU发货仓库为一对多, 新增公司Id

parent 5e0f86c7
...@@ -5,6 +5,7 @@ import lombok.Data; ...@@ -5,6 +5,7 @@ import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
@Data @Data
public class SkuInfo { public class SkuInfo {
...@@ -252,16 +253,6 @@ public class SkuInfo { ...@@ -252,16 +253,6 @@ public class SkuInfo {
@JSONField(name = "buyerName") @JSONField(name = "buyerName")
public String buyerName; public String buyerName;
/// <summary>
/// 采购仓库
/// </summary>
@JSONField(name = "warehouseCode")
public String warehouseCode;
/// <summary>
/// 采购仓库
/// </summary>
@JSONField(name = "warehouseName")
public String warehouseName;
/// <summary> /// <summary>
/// 贴标要求 /// 贴标要求
...@@ -428,5 +419,17 @@ public class SkuInfo { ...@@ -428,5 +419,17 @@ public class SkuInfo {
@JSONField(name = "isDeleted") @JSONField(name = "isDeleted")
public Boolean hasDelete; public Boolean hasDelete;
/// <summary>
/// 公司Id
/// </summary>
@JSONField(name = "creatorOrganizeId")
public Integer companyId;
/// <summary>
/// 对应发货仓列表
/// </summary>
@JSONField(name = "wareList")
public List<WarehouseInfo> warehouseList;
} }
package com.bailuntec.domain.pojo;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
@Data
public class WarehouseInfo {
/// <summary>
/// 发货仓库
/// </summary>
@JSONField(name = "warehouseCode")
public String warehouseCode;
/// <summary>
/// 发货仓库
/// </summary>
@JSONField(name = "warehouseName")
public String warehouseName;
/// <summary>
/// 发货仓库区域
/// </summary>
@JSONField(name = "areaId")
public Integer areaId;
/// <summary>
/// 是否默认发货仓
/// </summary>
@JSONField(name = "default")
public Boolean hasDefault;
}
...@@ -3,14 +3,18 @@ package com.bailuntec.job; ...@@ -3,14 +3,18 @@ package com.bailuntec.job;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.bailuntec.domain.entity.DcBaseSku; import com.bailuntec.domain.entity.DcBaseSku;
import com.bailuntec.domain.entity.DcBaseSkuWarehouse;
import com.bailuntec.domain.entity.JobPointLog; import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.example.DcBaseSkuExample; import com.bailuntec.domain.example.DcBaseSkuExample;
import com.bailuntec.domain.example.DcBaseSkuWarehouseExample;
import com.bailuntec.domain.pojo.SkuInfo; import com.bailuntec.domain.pojo.SkuInfo;
import com.bailuntec.domain.pojo.SkuMsResponse; import com.bailuntec.domain.pojo.SkuMsResponse;
import com.bailuntec.domain.pojo.SkuMsResult; import com.bailuntec.domain.pojo.SkuMsResult;
import com.bailuntec.domain.pojo.WarehouseInfo;
import com.bailuntec.domain.request.SkuCondition; import com.bailuntec.domain.request.SkuCondition;
import com.bailuntec.domain.request.SkumsRequest; import com.bailuntec.domain.request.SkumsRequest;
import com.bailuntec.mapper.DcBaseSkuMapper; import com.bailuntec.mapper.DcBaseSkuMapper;
import com.bailuntec.mapper.DcBaseSkuWarehouseMapper;
import com.bailuntec.mapper.JobPointLogMapper; import com.bailuntec.mapper.JobPointLogMapper;
import com.bailuntec.support.PointJob; import com.bailuntec.support.PointJob;
import com.bailuntec.utils.OkHttpUtil; import com.bailuntec.utils.OkHttpUtil;
...@@ -86,18 +90,41 @@ public class SkuMSSyncJob extends PointJob { ...@@ -86,18 +90,41 @@ public class SkuMSSyncJob extends PointJob {
private void handleSkuMsJson(List<SkuInfo> data,JobPointLog jobPointLog) { private void handleSkuMsJson(List<SkuInfo> data,JobPointLog jobPointLog) {
DcBaseSku dcBaseSku = new DcBaseSku(); DcBaseSku dcBaseSku = new DcBaseSku();
DcBaseSkuWarehouse dcBaseSkuWarehouse = new DcBaseSkuWarehouse();
try { try {
DcBaseSkuMapper mapper = SessionUtil.getSession().getMapper(DcBaseSkuMapper.class); DcBaseSkuMapper mapper = SessionUtil.getSession().getMapper(DcBaseSkuMapper.class);
DcBaseSkuWarehouseMapper dcBaseSkuWarehouseMapper = SessionUtil.getSession().getMapper(DcBaseSkuWarehouseMapper.class);
for (SkuInfo skuInfo : data) { for (SkuInfo skuInfo : data) {
try { if (StringUtils.isNotBlank(skuInfo.getBailunSku())) {
BeanUtils.copyProperties(dcBaseSku,skuInfo); String bailunSku = skuInfo.getBailunSku();
} catch (Exception e) { //逻辑删除仓库
throw new RuntimeException("BeanUtils.copyProperties失败"); dcBaseSkuWarehouseMapper.logicDeleteWarehouse(skuInfo.getBailunSku(),skuInfo.getCompanyId());
} try {
dcBaseSku.setGmtModified(LocalDateTime.now()); BeanUtils.copyProperties(dcBaseSku, skuInfo);
int v = mapper.updateByExampleSelective(dcBaseSku, DcBaseSkuExample.newAndCreateCriteria().andBailunSkuEqualTo(skuInfo.getBailunSku()).example()); } catch (Exception e) {
if (v == 0) { throw new RuntimeException("BeanUtils.copyProperties失败");
mapper.insertSelective(dcBaseSku); }
List<WarehouseInfo> warehouseList = skuInfo.getWarehouseList();
for (WarehouseInfo warehouseInfo : warehouseList) {
try {
BeanUtils.copyProperties(dcBaseSkuWarehouse, warehouseInfo);
} catch (Exception e) {
throw new RuntimeException("BeanUtils.copyProperties失败");
}
dcBaseSkuWarehouse.setBailunSku(skuInfo.getBailunSku());
dcBaseSkuWarehouse.setCompanyId(skuInfo.getCompanyId());
dcBaseSkuWarehouse.setStatus(0);
dcBaseSkuWarehouse.setGmtModified(LocalDateTime.now());
int i = dcBaseSkuWarehouseMapper.updateByExampleSelective(dcBaseSkuWarehouse, DcBaseSkuWarehouseExample.newAndCreateCriteria().andBailunSkuEqualTo(dcBaseSkuWarehouse.getBailunSku()).andCompanyIdEqualTo(dcBaseSkuWarehouse.getCompanyId()).andWarehouseCodeEqualTo(dcBaseSkuWarehouse.getWarehouseCode()).example());
if (i == 0) {
dcBaseSkuWarehouseMapper.insertSelective(dcBaseSkuWarehouse);
}
}
dcBaseSku.setGmtModified(LocalDateTime.now());
int v = mapper.updateByExampleSelective(dcBaseSku, DcBaseSkuExample.newAndCreateCriteria().andBailunSkuEqualTo(dcBaseSku.getBailunSku()).andCompanyIdEqualTo(dcBaseSku.getCompanyId()).example());
if (v == 0) {
mapper.insertSelective(dcBaseSku);
}
} }
} }
if (jobPointLog.getPageIndex() % 10 == 0) { if (jobPointLog.getPageIndex() % 10 == 0) {
......
package com.bailuntec.mapper; package com.bailuntec.mapper;
import com.bailuntec.domain.entity.DcBaseWarehouse; import com.bailuntec.domain.entity.DcBaseSkuWarehouse;
import com.bailuntec.domain.example.DcBaseWarehouseExample; import com.bailuntec.domain.example.DcBaseSkuWarehouseExample;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
public interface DcBaseWarehouseMapper { public interface DcBaseSkuWarehouseMapper {
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
long countByExample(DcBaseWarehouseExample example); long countByExample(DcBaseSkuWarehouseExample example);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
int deleteByExample(DcBaseWarehouseExample example); int deleteByExample(DcBaseSkuWarehouseExample example);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
...@@ -33,95 +33,94 @@ public interface DcBaseWarehouseMapper { ...@@ -33,95 +33,94 @@ public interface DcBaseWarehouseMapper {
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
int insert(DcBaseWarehouse record); int insert(DcBaseSkuWarehouse record);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
int insertSelective(DcBaseWarehouse record); int insertSelective(DcBaseSkuWarehouse record);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DcBaseWarehouse selectOneByExample(DcBaseWarehouseExample example); DcBaseSkuWarehouse selectOneByExample(DcBaseSkuWarehouseExample example);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
List<DcBaseWarehouse> selectByExample(DcBaseWarehouseExample example); List<DcBaseSkuWarehouse> selectByExample(DcBaseSkuWarehouseExample example);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
DcBaseWarehouse selectByPrimaryKey(Integer id); DcBaseSkuWarehouse selectByPrimaryKey(Integer id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
int updateByExampleSelective(@Param("record") DcBaseWarehouse record, @Param("example") DcBaseWarehouseExample example); int updateByExampleSelective(@Param("record") DcBaseSkuWarehouse record, @Param("example") DcBaseSkuWarehouseExample example);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
int updateByExample(@Param("record") DcBaseWarehouse record, @Param("example") DcBaseWarehouseExample example); int updateByExample(@Param("record") DcBaseSkuWarehouse record, @Param("example") DcBaseSkuWarehouseExample example);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
int updateByPrimaryKeySelective(DcBaseWarehouse record); int updateByPrimaryKeySelective(DcBaseSkuWarehouse record);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
*/ */
int updateByPrimaryKey(DcBaseWarehouse record); int updateByPrimaryKey(DcBaseSkuWarehouse record);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
int upsert(DcBaseWarehouse record); int upsert(DcBaseSkuWarehouse record);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_warehouse * This method corresponds to the database table dc_base_sku_warehouse
* *
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
int upsertSelective(DcBaseWarehouse record); int upsertSelective(DcBaseSkuWarehouse record);
String getWarehouseName(String warehouseCode);
void logicDeleteWarehouse(@Param("bailunSku") String bailunSku,@Param("companyId") Integer companyId);
} }
\ No newline at end of file
...@@ -8,7 +8,9 @@ public class SyncSkuTest { ...@@ -8,7 +8,9 @@ public class SyncSkuTest {
@Test @Test
public void test() { public void test() {
SkuMSSyncJob skuSyncJob = new SkuMSSyncJob(); SkuMSSyncJob skuSyncJob = new SkuMSSyncJob();
skuSyncJob.executeJob(null, new JobPointLog("base-sku",0 ,100,1,1, LocalDateTime.now().minusMonths(1),LocalDateTime.now().minusDays(29))); skuSyncJob.executeJob(null, new JobPointLog("base-sku",1 ,1000,1,1,
LocalDateTime.of(2019,6,4,18,51),
LocalDateTime.of(2019,6,5,18,52)));
} }
} }
...@@ -55,24 +55,6 @@ public class DcBaseSku { ...@@ -55,24 +55,6 @@ public class DcBaseSku {
/** /**
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku.warehouse_code
*
* @mbg.generated
*/
private String warehouseCode;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku.warehouse_name
*
* @mbg.generated
*/
private String warehouseName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku.unit_price * This field corresponds to the database column dc_base_sku.unit_price
* *
* @mbg.generated * @mbg.generated
...@@ -620,6 +602,15 @@ public class DcBaseSku { ...@@ -620,6 +602,15 @@ public class DcBaseSku {
private LocalDateTime developTime; private LocalDateTime developTime;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku.company_id
*
* @mbg.generated
*/
private Integer companyId;
/**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_sku * This method corresponds to the database table dc_base_sku
* *
...@@ -636,8 +627,6 @@ public class DcBaseSku { ...@@ -636,8 +627,6 @@ public class DcBaseSku {
sb.append(", skuImage=").append(skuImage); sb.append(", skuImage=").append(skuImage);
sb.append(", categoryId=").append(categoryId); sb.append(", categoryId=").append(categoryId);
sb.append(", categoryName=").append(categoryName); sb.append(", categoryName=").append(categoryName);
sb.append(", warehouseCode=").append(warehouseCode);
sb.append(", warehouseName=").append(warehouseName);
sb.append(", unitPrice=").append(unitPrice); sb.append(", unitPrice=").append(unitPrice);
sb.append(", sellerId=").append(sellerId); sb.append(", sellerId=").append(sellerId);
sb.append(", sellerName=").append(sellerName); sb.append(", sellerName=").append(sellerName);
...@@ -699,6 +688,7 @@ public class DcBaseSku { ...@@ -699,6 +688,7 @@ public class DcBaseSku {
sb.append(", pushTime=").append(pushTime); sb.append(", pushTime=").append(pushTime);
sb.append(", hasDelete=").append(hasDelete); sb.append(", hasDelete=").append(hasDelete);
sb.append(", developTime=").append(developTime); sb.append(", developTime=").append(developTime);
sb.append(", companyId=").append(companyId);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -726,8 +716,6 @@ public class DcBaseSku { ...@@ -726,8 +716,6 @@ public class DcBaseSku {
&& (this.getSkuImage() == null ? other.getSkuImage() == null : this.getSkuImage().equals(other.getSkuImage())) && (this.getSkuImage() == null ? other.getSkuImage() == null : this.getSkuImage().equals(other.getSkuImage()))
&& (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId())) && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
&& (this.getCategoryName() == null ? other.getCategoryName() == null : this.getCategoryName().equals(other.getCategoryName())) && (this.getCategoryName() == null ? other.getCategoryName() == null : this.getCategoryName().equals(other.getCategoryName()))
&& (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode()))
&& (this.getWarehouseName() == null ? other.getWarehouseName() == null : this.getWarehouseName().equals(other.getWarehouseName()))
&& (this.getUnitPrice() == null ? other.getUnitPrice() == null : this.getUnitPrice().equals(other.getUnitPrice())) && (this.getUnitPrice() == null ? other.getUnitPrice() == null : this.getUnitPrice().equals(other.getUnitPrice()))
&& (this.getSellerId() == null ? other.getSellerId() == null : this.getSellerId().equals(other.getSellerId())) && (this.getSellerId() == null ? other.getSellerId() == null : this.getSellerId().equals(other.getSellerId()))
&& (this.getSellerName() == null ? other.getSellerName() == null : this.getSellerName().equals(other.getSellerName())) && (this.getSellerName() == null ? other.getSellerName() == null : this.getSellerName().equals(other.getSellerName()))
...@@ -788,7 +776,8 @@ public class DcBaseSku { ...@@ -788,7 +776,8 @@ public class DcBaseSku {
&& (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource())) && (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource()))
&& (this.getPushTime() == null ? other.getPushTime() == null : this.getPushTime().equals(other.getPushTime())) && (this.getPushTime() == null ? other.getPushTime() == null : this.getPushTime().equals(other.getPushTime()))
&& (this.getHasDelete() == null ? other.getHasDelete() == null : this.getHasDelete().equals(other.getHasDelete())) && (this.getHasDelete() == null ? other.getHasDelete() == null : this.getHasDelete().equals(other.getHasDelete()))
&& (this.getDevelopTime() == null ? other.getDevelopTime() == null : this.getDevelopTime().equals(other.getDevelopTime())); && (this.getDevelopTime() == null ? other.getDevelopTime() == null : this.getDevelopTime().equals(other.getDevelopTime()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()));
} }
/** /**
...@@ -806,8 +795,6 @@ public class DcBaseSku { ...@@ -806,8 +795,6 @@ public class DcBaseSku {
result = prime * result + ((getSkuImage() == null) ? 0 : getSkuImage().hashCode()); result = prime * result + ((getSkuImage() == null) ? 0 : getSkuImage().hashCode());
result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode()); result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
result = prime * result + ((getCategoryName() == null) ? 0 : getCategoryName().hashCode()); result = prime * result + ((getCategoryName() == null) ? 0 : getCategoryName().hashCode());
result = prime * result + ((getWarehouseCode() == null) ? 0 : getWarehouseCode().hashCode());
result = prime * result + ((getWarehouseName() == null) ? 0 : getWarehouseName().hashCode());
result = prime * result + ((getUnitPrice() == null) ? 0 : getUnitPrice().hashCode()); result = prime * result + ((getUnitPrice() == null) ? 0 : getUnitPrice().hashCode());
result = prime * result + ((getSellerId() == null) ? 0 : getSellerId().hashCode()); result = prime * result + ((getSellerId() == null) ? 0 : getSellerId().hashCode());
result = prime * result + ((getSellerName() == null) ? 0 : getSellerName().hashCode()); result = prime * result + ((getSellerName() == null) ? 0 : getSellerName().hashCode());
...@@ -869,6 +856,7 @@ public class DcBaseSku { ...@@ -869,6 +856,7 @@ public class DcBaseSku {
result = prime * result + ((getPushTime() == null) ? 0 : getPushTime().hashCode()); result = prime * result + ((getPushTime() == null) ? 0 : getPushTime().hashCode());
result = prime * result + ((getHasDelete() == null) ? 0 : getHasDelete().hashCode()); result = prime * result + ((getHasDelete() == null) ? 0 : getHasDelete().hashCode());
result = prime * result + ((getDevelopTime() == null) ? 0 : getDevelopTime().hashCode()); result = prime * result + ((getDevelopTime() == null) ? 0 : getDevelopTime().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
package com.bailuntec.domain.entity;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class DcBaseSkuWarehouse {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.id
*
* @mbg.generated
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.bailun_sku
*
* @mbg.generated
*/
private String bailunSku;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.warehouse_code
*
* @mbg.generated
*/
private String warehouseCode;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.warehouse_name
*
* @mbg.generated
*/
private String warehouseName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.gmt_create
*
* @mbg.generated
*/
private LocalDateTime gmtCreate;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.gmt_modified
*
* @mbg.generated
*/
private LocalDateTime gmtModified;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.status
*
* @mbg.generated
*/
private Integer status;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.has_default
*
* @mbg.generated
*/
private Boolean hasDefault;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku_warehouse.company_id
*
* @mbg.generated
*/
private Integer companyId;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_sku_warehouse
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", bailunSku=").append(bailunSku);
sb.append(", warehouseCode=").append(warehouseCode);
sb.append(", warehouseName=").append(warehouseName);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append(", status=").append(status);
sb.append(", hasDefault=").append(hasDefault);
sb.append(", companyId=").append(companyId);
sb.append("]");
return sb.toString();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_sku_warehouse
*
* @mbg.generated
*/
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
DcBaseSkuWarehouse other = (DcBaseSkuWarehouse) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getBailunSku() == null ? other.getBailunSku() == null : this.getBailunSku().equals(other.getBailunSku()))
&& (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode()))
&& (this.getWarehouseName() == null ? other.getWarehouseName() == null : this.getWarehouseName().equals(other.getWarehouseName()))
&& (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
&& (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getHasDefault() == null ? other.getHasDefault() == null : this.getHasDefault().equals(other.getHasDefault()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()));
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_sku_warehouse
*
* @mbg.generated
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getBailunSku() == null) ? 0 : getBailunSku().hashCode());
result = prime * result + ((getWarehouseCode() == null) ? 0 : getWarehouseCode().hashCode());
result = prime * result + ((getWarehouseName() == null) ? 0 : getWarehouseName().hashCode());
result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getHasDefault() == null) ? 0 : getHasDefault().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
return result;
}
}
\ No newline at end of file
...@@ -701,146 +701,6 @@ public class DcBaseSkuExample { ...@@ -701,146 +701,6 @@ public class DcBaseSkuExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWarehouseCodeIsNull() {
addCriterion("warehouse_code is null");
return (Criteria) this;
}
public Criteria andWarehouseCodeIsNotNull() {
addCriterion("warehouse_code is not null");
return (Criteria) this;
}
public Criteria andWarehouseCodeEqualTo(String value) {
addCriterion("warehouse_code =", value, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeNotEqualTo(String value) {
addCriterion("warehouse_code <>", value, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeGreaterThan(String value) {
addCriterion("warehouse_code >", value, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeGreaterThanOrEqualTo(String value) {
addCriterion("warehouse_code >=", value, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeLessThan(String value) {
addCriterion("warehouse_code <", value, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeLessThanOrEqualTo(String value) {
addCriterion("warehouse_code <=", value, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeLike(String value) {
addCriterion("warehouse_code like", value, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeNotLike(String value) {
addCriterion("warehouse_code not like", value, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeIn(List<String> values) {
addCriterion("warehouse_code in", values, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeNotIn(List<String> values) {
addCriterion("warehouse_code not in", values, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeBetween(String value1, String value2) {
addCriterion("warehouse_code between", value1, value2, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseCodeNotBetween(String value1, String value2) {
addCriterion("warehouse_code not between", value1, value2, "warehouseCode");
return (Criteria) this;
}
public Criteria andWarehouseNameIsNull() {
addCriterion("warehouse_name is null");
return (Criteria) this;
}
public Criteria andWarehouseNameIsNotNull() {
addCriterion("warehouse_name is not null");
return (Criteria) this;
}
public Criteria andWarehouseNameEqualTo(String value) {
addCriterion("warehouse_name =", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameNotEqualTo(String value) {
addCriterion("warehouse_name <>", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameGreaterThan(String value) {
addCriterion("warehouse_name >", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameGreaterThanOrEqualTo(String value) {
addCriterion("warehouse_name >=", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameLessThan(String value) {
addCriterion("warehouse_name <", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameLessThanOrEqualTo(String value) {
addCriterion("warehouse_name <=", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameLike(String value) {
addCriterion("warehouse_name like", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameNotLike(String value) {
addCriterion("warehouse_name not like", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameIn(List<String> values) {
addCriterion("warehouse_name in", values, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameNotIn(List<String> values) {
addCriterion("warehouse_name not in", values, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameBetween(String value1, String value2) {
addCriterion("warehouse_name between", value1, value2, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameNotBetween(String value1, String value2) {
addCriterion("warehouse_name not between", value1, value2, "warehouseName");
return (Criteria) this;
}
public Criteria andUnitPriceIsNull() { public Criteria andUnitPriceIsNull() {
addCriterion("unit_price is null"); addCriterion("unit_price is null");
return (Criteria) this; return (Criteria) this;
...@@ -4790,6 +4650,66 @@ public class DcBaseSkuExample { ...@@ -4790,6 +4650,66 @@ public class DcBaseSkuExample {
addCriterion("develop_time not between", value1, value2, "developTime"); addCriterion("develop_time not between", value1, value2, "developTime");
return (Criteria) this; 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;
}
} }
/** /**
......
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