Commit edc71542 authored by zhh's avatar zhh
Browse files

添加创建产品功能

parent f603ca62
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{7BB41C87-EFE8-409A-A86E-B1C3FCE34F8C}" Label="" LastModificationDate="1522747822" Name="mall" Objects="984" Symbols="123" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{7BB41C87-EFE8-409A-A86E-B1C3FCE34F8C}" Label="" LastModificationDate="1524721741" Name="mall" Objects="972" Symbols="123" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
 
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
......@@ -7562,9 +7562,9 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Code>promotion_type</a:Code>
<a:CreationDate>1522721953</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1522722061</a:ModificationDate>
<a:ModificationDate>1524633114</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:Comment>促销类型:0-&gt;使用促销价;1-&gt;使用会员价;2-&gt;使用阶梯价格;3-&gt;使用满减价格</a:Comment>
<a:Comment>促销类型:0-&gt;没有促销使用原价;1-&gt;使用促销价;2-&gt;使用会员价;3-&gt;使用阶梯价格;4-&gt;使用满减价格</a:Comment>
<a:DataType>int(1)</a:DataType>
<a:Length>1</a:Length>
</o:Column>
......@@ -8675,9 +8675,9 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Code>id</a:Code>
<a:CreationDate>1521792488</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1521792502</a:ModificationDate>
<a:ModificationDate>1524721741</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:DataType>int</a:DataType>
<a:DataType>bigint</a:DataType>
<a:Identity>1</a:Identity>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
......@@ -9004,21 +9004,21 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
<o:Column Id="o400">
<a:ObjectID>A73883DF-2D36-497D-8D90-9EB0F5CF3C5B</a:ObjectID>
<a:Name>pms_product_id</a:Name>
<a:Code>pms_product_id</a:Code>
<a:Name>product_id</a:Name>
<a:Code>product_id</a:Code>
<a:CreationDate>1522046451</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1522046492</a:ModificationDate>
<a:ModificationDate>1524710981</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o401">
<a:ObjectID>92ACF804-9722-47C3-826B-A2611338F2F6</a:ObjectID>
<a:Name>pms_product_attribute_id</a:Name>
<a:Code>pms_product_attribute_id</a:Code>
<a:Name>product_attribute_id</a:Name>
<a:Code>product_attribute_id</a:Code>
<a:CreationDate>1522046456</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1522046492</a:ModificationDate>
<a:ModificationDate>1524710981</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:DataType>bigint</a:DataType>
</o:Column>
......@@ -9911,9 +9911,10 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Code>id</a:Code>
<a:CreationDate>1522138235</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1522138607</a:ModificationDate>
<a:ModificationDate>1524711592</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:DataType>bigint</a:DataType>
<a:Identity>1</a:Identity>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o468">
......
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{7BB41C87-EFE8-409A-A86E-B1C3FCE34F8C}" Label="" LastModificationDate="1524633114" Name="mall" Objects="972" Symbols="123" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{7BB41C87-EFE8-409A-A86E-B1C3FCE34F8C}" Label="" LastModificationDate="1524721741" Name="mall" Objects="972" Symbols="123" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
 
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
......@@ -8675,9 +8675,9 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Code>id</a:Code>
<a:CreationDate>1521792488</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1521792502</a:ModificationDate>
<a:ModificationDate>1524721741</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:DataType>int</a:DataType>
<a:DataType>bigint</a:DataType>
<a:Identity>1</a:Identity>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
......@@ -9004,21 +9004,21 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
<o:Column Id="o400">
<a:ObjectID>A73883DF-2D36-497D-8D90-9EB0F5CF3C5B</a:ObjectID>
<a:Name>pms_product_id</a:Name>
<a:Code>pms_product_id</a:Code>
<a:Name>product_id</a:Name>
<a:Code>product_id</a:Code>
<a:CreationDate>1522046451</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1522046492</a:ModificationDate>
<a:ModificationDate>1524710981</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o401">
<a:ObjectID>92ACF804-9722-47C3-826B-A2611338F2F6</a:ObjectID>
<a:Name>pms_product_attribute_id</a:Name>
<a:Code>pms_product_attribute_id</a:Code>
<a:Name>product_attribute_id</a:Name>
<a:Code>product_attribute_id</a:Code>
<a:CreationDate>1522046456</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1522046492</a:ModificationDate>
<a:ModificationDate>1524710981</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:DataType>bigint</a:DataType>
</o:Column>
......@@ -9911,9 +9911,10 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Code>id</a:Code>
<a:CreationDate>1522138235</a:CreationDate>
<a:Creator>zhenghong</a:Creator>
<a:ModificationDate>1522138607</a:ModificationDate>
<a:ModificationDate>1524711592</a:ModificationDate>
<a:Modifier>zhenghong</a:Modifier>
<a:DataType>bigint</a:DataType>
<a:Identity>1</a:Identity>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o468">
......
......@@ -3,6 +3,7 @@ package com.macro.mall;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* 应用启动入口
......@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
*/
@SpringBootApplication
@MapperScan({"com.macro.mall.mapper","com.macro.mall.dao"})
@EnableTransactionManagement
public class MallAdminApplication {
public static void main(String[] args) {
SpringApplication.run(MallAdminApplication.class, args);
......
package com.macro.mall.dao;
import com.macro.mall.model.CmsPrefrenceAreaProductRelation;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 自定义优选和商品关系操作
* Created by macro on 2018/4/26.
*/
public interface CmsPrefrenceAreaProductRelationDao {
int insertList(@Param("list") List<CmsPrefrenceAreaProductRelation> prefrenceAreaProductRelationList);
}
package com.macro.mall.dao;
import com.macro.mall.model.CmsSubjectProductRelation;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 自定义商品和专题关系操作
* Created by macro on 2018/4/26.
*/
public interface CmsSubjectProductRelationDao {
int insertList(@Param("list") List<CmsSubjectProductRelation> subjectProductRelationList);
}
package com.macro.mall.dao;
import com.macro.mall.model.PmsProductAttributeValue;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商品参数,商品自定义规格属性Dao
* Created by macro on 2018/4/26.
*/
public interface PmsProductAttributeValueDao {
int insertList(@Param("list")List<PmsProductAttributeValue> productAttributeValueList);
}
......@@ -17,13 +17,13 @@ public class PmsProductParam {
@ApiModelProperty("商品阶梯价格设置")
private List<PmsProductLadder> productLadderList;
@ApiModelProperty("商品满减价格设置")
private List<PmsProductFullReduction> pmsProductFullReductionList;
private List<PmsProductFullReduction> productFullReductionList;
@ApiModelProperty("商品会员价格设置")
private List<PmsMemberPrice> pmsMemberPriceList;
private List<PmsMemberPrice> memberPriceList;
@ApiModelProperty("商品的sku库存信息")
private List<PmsSkuStock> skuStockList;
@ApiModelProperty("商品参数及自定义规格属性")
private List<PmsProductAttributeValue> pmsProductAttributeValueList;
private List<PmsProductAttributeValue> productAttributeValueList;
@ApiModelProperty("专题和商品关系")
private List<CmsSubjectProductRelation> subjectProductRelationList;
@ApiModelProperty("优选专区和商品的关系")
......@@ -45,20 +45,20 @@ public class PmsProductParam {
this.productLadderList = productLadderList;
}
public List<PmsProductFullReduction> getPmsProductFullReductionList() {
return pmsProductFullReductionList;
public List<PmsProductFullReduction> getProductFullReductionList() {
return productFullReductionList;
}
public void setPmsProductFullReductionList(List<PmsProductFullReduction> pmsProductFullReductionList) {
this.pmsProductFullReductionList = pmsProductFullReductionList;
public void setProductFullReductionList(List<PmsProductFullReduction> productFullReductionList) {
this.productFullReductionList = productFullReductionList;
}
public List<PmsMemberPrice> getPmsMemberPriceList() {
return pmsMemberPriceList;
public List<PmsMemberPrice> getMemberPriceList() {
return memberPriceList;
}
public void setPmsMemberPriceList(List<PmsMemberPrice> pmsMemberPriceList) {
this.pmsMemberPriceList = pmsMemberPriceList;
public void setMemberPriceList(List<PmsMemberPrice> memberPriceList) {
this.memberPriceList = memberPriceList;
}
public List<PmsSkuStock> getSkuStockList() {
......@@ -69,12 +69,12 @@ public class PmsProductParam {
this.skuStockList = skuStockList;
}
public List<PmsProductAttributeValue> getPmsProductAttributeValueList() {
return pmsProductAttributeValueList;
public List<PmsProductAttributeValue> getProductAttributeValueList() {
return productAttributeValueList;
}
public void setPmsProductAttributeValueList(List<PmsProductAttributeValue> pmsProductAttributeValueList) {
this.pmsProductAttributeValueList = pmsProductAttributeValueList;
public void setProductAttributeValueList(List<PmsProductAttributeValue> productAttributeValueList) {
this.productAttributeValueList = productAttributeValueList;
}
public List<CmsSubjectProductRelation> getSubjectProductRelationList() {
......
......@@ -2,6 +2,9 @@ package com.macro.mall.service;
import com.macro.mall.dto.PmsProductCategoryParam;
import com.macro.mall.model.PmsProductCategory;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
......
package com.macro.mall.service;
import com.macro.mall.dto.PmsProductParam;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
/**
* 商品管理Service
......@@ -10,5 +13,6 @@ public interface PmsProductService {
/**
* 创建商品
*/
@Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED)
int create(PmsProductParam productParam);
}
package com.macro.mall.service.impl;
import com.macro.mall.dao.PmsMemberPriceDao;
import com.macro.mall.dao.PmsProductFullReductionDao;
import com.macro.mall.dao.PmsProductLadderDao;
import com.macro.mall.dao.*;
import com.macro.mall.dto.PmsProductParam;
import com.macro.mall.mapper.PmsProductMapper;
import com.macro.mall.model.PmsMemberPrice;
import com.macro.mall.model.PmsProduct;
import com.macro.mall.model.PmsProductFullReduction;
import com.macro.mall.model.PmsProductLadder;
import com.macro.mall.model.*;
import com.macro.mall.service.PmsProductService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.lang.reflect.Method;
import java.util.List;
/**
* 商品管理Service实现类
* Created by macro on 2018/4/26.
*/
@Service
public class PmsProductServiceImpl implements PmsProductService {
private static final Logger LOGGER = LoggerFactory.getLogger(PmsProductServiceImpl.class);
@Autowired
private PmsProductMapper productMapper;
@Autowired
......@@ -29,6 +29,14 @@ public class PmsProductServiceImpl implements PmsProductService {
private PmsProductLadderDao productLadderDao;
@Autowired
private PmsProductFullReductionDao productFullReductionDao;
@Autowired
private PmsSkuStockDao skuStockDao;
@Autowired
private PmsProductAttributeValueDao productAttributeValueDao;
@Autowired
private CmsSubjectProductRelationDao subjectProductRelationDao;
@Autowired
private CmsPrefrenceAreaProductRelationDao prefrenceAreaProductRelationDao;
@Override
public int create(PmsProductParam productParam) {
......@@ -40,7 +48,37 @@ public class PmsProductServiceImpl implements PmsProductService {
//根据促销类型设置价格:、阶梯价格、满减价格
Long productId = product.getId();
//会员价格
List<PmsMemberPrice> memberPriceList = productParam.getPmsMemberPriceList();
relateAndInsertList(memberPriceDao,productParam.getMemberPriceList(),productId);
//阶梯价格
relateAndInsertList(productLadderDao,productParam.getProductLadderList(),productId);
//满减价格
relateAndInsertList(productFullReductionDao, productParam.getProductFullReductionList(), productId);
//添加sku库存信息
relateAndInsertList(skuStockDao, productParam.getSkuStockList(), productId);
//添加商品参数,添加自定义商品规格
relateAndInsertList(productAttributeValueDao, productParam.getProductAttributeValueList(), productId);
//关联专题
relateAndInsertList(subjectProductRelationDao, productParam.getSubjectProductRelationList(), productId);
//关联优选
relateAndInsertList(prefrenceAreaProductRelationDao, productParam.getPrefrenceAreaProductRelationList(), productId);
count = 1;
return count;
}
/**
* @deprecated
* 旧版创建
*/
public int createOld(PmsProductParam productParam) {
int count;
//创建商品
PmsProduct product = productParam.getProduct();
product.setId(null);
productMapper.insertSelective(product);
//根据促销类型设置价格:、阶梯价格、满减价格
Long productId = product.getId();
//会员价格
List<PmsMemberPrice> memberPriceList = productParam.getMemberPriceList();
if (!CollectionUtils.isEmpty(memberPriceList)) {
for (PmsMemberPrice pmsMemberPrice : memberPriceList) {
pmsMemberPrice.setId(null);
......@@ -58,7 +96,7 @@ public class PmsProductServiceImpl implements PmsProductService {
productLadderDao.insertList(productLadderList);
}
//满减价格
List<PmsProductFullReduction> productFullReductionList = productParam.getPmsProductFullReductionList();
List<PmsProductFullReduction> productFullReductionList = productParam.getProductFullReductionList();
if (!CollectionUtils.isEmpty(productFullReductionList)) {
for (PmsProductFullReduction productFullReduction : productFullReductionList) {
productFullReduction.setId(null);
......@@ -67,11 +105,52 @@ public class PmsProductServiceImpl implements PmsProductService {
productFullReductionDao.insertList(productFullReductionList);
}
//添加sku库存信息
//添加商品参数
//添加自定义商品规格
List<PmsSkuStock> skuStockList = productParam.getSkuStockList();
if(!CollectionUtils.isEmpty(skuStockList)){
for (PmsSkuStock skuStock : skuStockList) {
skuStock.setId(null);
skuStock.setProductId(productId);
}
skuStockDao.insertList(skuStockList);
}
//添加商品参数,添加自定义商品规格
List<PmsProductAttributeValue> productAttributeValueList = productParam.getProductAttributeValueList();
if(!CollectionUtils.isEmpty(productAttributeValueList)){
for (PmsProductAttributeValue productAttributeValue : productAttributeValueList) {
productAttributeValue.setId(null);
productAttributeValue.setProductId(productId);
}
productAttributeValueDao.insertList(productAttributeValueList);
}
//关联专题
relateAndInsertList(subjectProductRelationDao, productParam.getSubjectProductRelationList(), productId);
//关联优选
relateAndInsertList(prefrenceAreaProductRelationDao, productParam.getPrefrenceAreaProductRelationList(), productId);
count = 1;
return count;
}
/**
* 建立和插入关系表操作
*
* @param dao 可以操作的dao
* @param dataList 要插入的数据
* @param productId 建立关系的id
*/
private void relateAndInsertList(Object dao, List dataList, Long productId) {
try {
if (CollectionUtils.isEmpty(dataList)) return;
for (Object item : dataList) {
Method setId = item.getClass().getMethod("setId", Long.class);
setId.invoke(item, (Long) null);
Method setProductId = item.getClass().getMethod("setProductId", Long.class);
setProductId.invoke(item, productId);
}
Method insertList = dao.getClass().getMethod("insertList", List.class);
insertList.invoke(dao, dataList);
} catch (Exception e) {
LOGGER.warn("创建产品出错:{}",e.getMessage());
throw new RuntimeException(e.getMessage());
}
}
}
<?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.macro.mall.dao.CmsPrefrenceAreaProductRelationDao">
<insert id="insertList">
insert into cms_prefrence_area_product_relation (prefrence_area_id, product_id) values
<foreach collection="list" item="item" separator="," index="index">
(#{item.prefrenceAreaId,jdbcType=BIGINT},
#{item.productId,jdbcType=BIGINT})
</foreach>
</insert>
</mapper>
\ No newline at end of file
<?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.macro.mall.dao.CmsSubjectProductRelationDao">
<insert id="insertList">
insert into cms_subject_product_relation (subject_id, product_id) values
<foreach collection="list" item="item" separator="," index="index">
(#{item.subjectId,jdbcType=BIGINT},
#{item.productId,jdbcType=BIGINT})
</foreach>
</insert>
</mapper>
\ No newline at end of file
<?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.macro.mall.dao.PmsProductAttributeValueDao">
<insert id="insertList">
insert into pms_product_attribute_value (product_id,product_attribute_id,value) values
<foreach collection="list" item="item" index="index" separator=",">
(#{item.productId,jdbcType=BIGINT},
#{item.productAttributeId,jdbcType=BIGINT},
#{item.value,jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>
\ No newline at end of file
<?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.macro.mall.dao.PmsMemberPriceDao">
<mapper namespace="com.macro.mall.dao.PmsProductFullReductionDao">
<insert id="insertList">
INSERT INTO pms_product_full_reduction (product_id, full_price, reduce_price) VALUES
<foreach collection="list" separator="," item="item" index="index">
......
<?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.macro.mall.dao.PmsSkuStockDao">
<insert id="insertList">
INSERT INTO pms_sku_stock (product_id, sku_code, price, stock, low_stock, sp1, sp2, sp3, pic, sale) VALUES
<foreach collection="list" item="item" index="index" separator=",">
(#{item.productId,jdbcType=BIGINT},
#{item.skuCode,jdbcType=VARCHAR},
#{item.price,jdbcType=DECIMAL},
#{item.stock,jdbcType=INTEGER},
#{item.lowStock,jdbcType=INTEGER},
#{item.sp1,jdbcType=VARCHAR},
#{item.sp2,jdbcType=VARCHAR},
#{item.sp3,jdbcType=VARCHAR},
#{item.pic,jdbcType=VARCHAR},
#{item.sale,jdbcType=INTEGER})
</foreach>
</insert>
</mapper>
\ No newline at end of file
......@@ -10,7 +10,7 @@ public interface PmsProductFullReductionMapper {
int deleteByExample(PmsProductFullReductionExample example);
int deleteByPrimaryKey(Integer id);
int deleteByPrimaryKey(Long id);
int insert(PmsProductFullReduction record);
......@@ -18,7 +18,7 @@ public interface PmsProductFullReductionMapper {
List<PmsProductFullReduction> selectByExample(PmsProductFullReductionExample example);
PmsProductFullReduction selectByPrimaryKey(Integer id);
PmsProductFullReduction selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") PmsProductFullReduction record, @Param("example") PmsProductFullReductionExample example);
......
......@@ -5,9 +5,9 @@ import java.io.Serializable;
public class PmsProductAttributeValue implements Serializable {
private Long id;
private Long pmsProductId;
private Long productId;
private Long pmsProductAttributeId;
private Long productAttributeId;
/**
* 存储的值
......@@ -26,20 +26,20 @@ public class PmsProductAttributeValue implements Serializable {
this.id = id;
}
public Long getPmsProductId() {
return pmsProductId;
public Long getProductId() {
return productId;
}
public void setPmsProductId(Long pmsProductId) {
this.pmsProductId = pmsProductId;
public void setProductId(Long productId) {
this.productId = productId;
}
public Long getPmsProductAttributeId() {
return pmsProductAttributeId;
public Long getProductAttributeId() {
return productAttributeId;
}
public void setPmsProductAttributeId(Long pmsProductAttributeId) {
this.pmsProductAttributeId = pmsProductAttributeId;
public void setProductAttributeId(Long productAttributeId) {
this.productAttributeId = productAttributeId;
}
public String getValue() {
......@@ -57,8 +57,8 @@ public class PmsProductAttributeValue implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", pmsProductId=").append(pmsProductId);
sb.append(", pmsProductAttributeId=").append(pmsProductAttributeId);
sb.append(", productId=").append(productId);
sb.append(", productAttributeId=").append(productAttributeId);
sb.append(", value=").append(value);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
......
......@@ -164,123 +164,123 @@ public class PmsProductAttributeValueExample {
return (Criteria) this;
}
public Criteria andPmsProductIdIsNull() {
addCriterion("pms_product_id is null");
public Criteria andProductIdIsNull() {
addCriterion("product_id is null");
return (Criteria) this;
}
public Criteria andPmsProductIdIsNotNull() {
addCriterion("pms_product_id is not null");
public Criteria andProductIdIsNotNull() {
addCriterion("product_id is not null");
return (Criteria) this;
}
public Criteria andPmsProductIdEqualTo(Long value) {
addCriterion("pms_product_id =", value, "pmsProductId");
public Criteria andProductIdEqualTo(Long value) {
addCriterion("product_id =", value, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdNotEqualTo(Long value) {
addCriterion("pms_product_id <>", value, "pmsProductId");
public Criteria andProductIdNotEqualTo(Long value) {
addCriterion("product_id <>", value, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdGreaterThan(Long value) {
addCriterion("pms_product_id >", value, "pmsProductId");
public Criteria andProductIdGreaterThan(Long value) {
addCriterion("product_id >", value, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdGreaterThanOrEqualTo(Long value) {
addCriterion("pms_product_id >=", value, "pmsProductId");
public Criteria andProductIdGreaterThanOrEqualTo(Long value) {
addCriterion("product_id >=", value, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdLessThan(Long value) {
addCriterion("pms_product_id <", value, "pmsProductId");
public Criteria andProductIdLessThan(Long value) {
addCriterion("product_id <", value, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdLessThanOrEqualTo(Long value) {
addCriterion("pms_product_id <=", value, "pmsProductId");
public Criteria andProductIdLessThanOrEqualTo(Long value) {
addCriterion("product_id <=", value, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdIn(List<Long> values) {
addCriterion("pms_product_id in", values, "pmsProductId");
public Criteria andProductIdIn(List<Long> values) {
addCriterion("product_id in", values, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdNotIn(List<Long> values) {
addCriterion("pms_product_id not in", values, "pmsProductId");
public Criteria andProductIdNotIn(List<Long> values) {
addCriterion("product_id not in", values, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdBetween(Long value1, Long value2) {
addCriterion("pms_product_id between", value1, value2, "pmsProductId");
public Criteria andProductIdBetween(Long value1, Long value2) {
addCriterion("product_id between", value1, value2, "productId");
return (Criteria) this;
}
public Criteria andPmsProductIdNotBetween(Long value1, Long value2) {
addCriterion("pms_product_id not between", value1, value2, "pmsProductId");
public Criteria andProductIdNotBetween(Long value1, Long value2) {
addCriterion("product_id not between", value1, value2, "productId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdIsNull() {
addCriterion("pms_product_attribute_id is null");
public Criteria andProductAttributeIdIsNull() {
addCriterion("product_attribute_id is null");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdIsNotNull() {
addCriterion("pms_product_attribute_id is not null");
public Criteria andProductAttributeIdIsNotNull() {
addCriterion("product_attribute_id is not null");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdEqualTo(Long value) {
addCriterion("pms_product_attribute_id =", value, "pmsProductAttributeId");
public Criteria andProductAttributeIdEqualTo(Long value) {
addCriterion("product_attribute_id =", value, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdNotEqualTo(Long value) {
addCriterion("pms_product_attribute_id <>", value, "pmsProductAttributeId");
public Criteria andProductAttributeIdNotEqualTo(Long value) {
addCriterion("product_attribute_id <>", value, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdGreaterThan(Long value) {
addCriterion("pms_product_attribute_id >", value, "pmsProductAttributeId");
public Criteria andProductAttributeIdGreaterThan(Long value) {
addCriterion("product_attribute_id >", value, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdGreaterThanOrEqualTo(Long value) {
addCriterion("pms_product_attribute_id >=", value, "pmsProductAttributeId");
public Criteria andProductAttributeIdGreaterThanOrEqualTo(Long value) {
addCriterion("product_attribute_id >=", value, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdLessThan(Long value) {
addCriterion("pms_product_attribute_id <", value, "pmsProductAttributeId");
public Criteria andProductAttributeIdLessThan(Long value) {
addCriterion("product_attribute_id <", value, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdLessThanOrEqualTo(Long value) {
addCriterion("pms_product_attribute_id <=", value, "pmsProductAttributeId");
public Criteria andProductAttributeIdLessThanOrEqualTo(Long value) {
addCriterion("product_attribute_id <=", value, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdIn(List<Long> values) {
addCriterion("pms_product_attribute_id in", values, "pmsProductAttributeId");
public Criteria andProductAttributeIdIn(List<Long> values) {
addCriterion("product_attribute_id in", values, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdNotIn(List<Long> values) {
addCriterion("pms_product_attribute_id not in", values, "pmsProductAttributeId");
public Criteria andProductAttributeIdNotIn(List<Long> values) {
addCriterion("product_attribute_id not in", values, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdBetween(Long value1, Long value2) {
addCriterion("pms_product_attribute_id between", value1, value2, "pmsProductAttributeId");
public Criteria andProductAttributeIdBetween(Long value1, Long value2) {
addCriterion("product_attribute_id between", value1, value2, "productAttributeId");
return (Criteria) this;
}
public Criteria andPmsProductAttributeIdNotBetween(Long value1, Long value2) {
addCriterion("pms_product_attribute_id not between", value1, value2, "pmsProductAttributeId");
public Criteria andProductAttributeIdNotBetween(Long value1, Long value2) {
addCriterion("product_attribute_id not between", value1, value2, "productAttributeId");
return (Criteria) this;
}
......
......@@ -4,7 +4,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
public class PmsProductFullReduction implements Serializable {
private Integer id;
private Long id;
private Long productId;
......@@ -14,11 +14,11 @@ public class PmsProductFullReduction implements Serializable {
private static final long serialVersionUID = 1L;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -115,52 +115,52 @@ public class PmsProductFullReductionExample {
return (Criteria) this;
}
public Criteria andIdEqualTo(Integer value) {
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
......
Supports Markdown
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