com.macro.mall.model.PmsProductFullReduction Java Examples

The following examples show how to use com.macro.mall.model.PmsProductFullReduction. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OmsPromotionServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
/**
 * 获取满减促销消息
 */
private String getFullReductionPromotionMessage(PmsProductFullReduction fullReduction) {
    StringBuilder sb = new StringBuilder();
    sb.append("满减优惠:");
    sb.append("满");
    sb.append(fullReduction.getFullPrice());
    sb.append("元,");
    sb.append("减");
    sb.append(fullReduction.getReducePrice());
    sb.append("元");
    return sb.toString();
}
 
Example #2
Source File: OmsPromotionServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
private PmsProductFullReduction getProductFullReduction(BigDecimal totalAmount,List<PmsProductFullReduction> fullReductionList) {
    //按条件从高到低排序
    fullReductionList.sort(new Comparator<PmsProductFullReduction>() {
        @Override
        public int compare(PmsProductFullReduction o1, PmsProductFullReduction o2) {
            return o2.getFullPrice().subtract(o1.getFullPrice()).intValue();
        }
    });
    for(PmsProductFullReduction fullReduction:fullReductionList){
        if(totalAmount.subtract(fullReduction.getFullPrice()).intValue()>=0){
            return fullReduction;
        }
    }
    return null;
}
 
Example #3
Source File: OmsPromotionServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
private PmsProductFullReduction getProductFullReduction(BigDecimal totalAmount,List<PmsProductFullReduction> fullReductionList) {
    //按条件从高到低排序
    fullReductionList.sort(new Comparator<PmsProductFullReduction>() {
        @Override
        public int compare(PmsProductFullReduction o1, PmsProductFullReduction o2) {
            return o2.getFullPrice().subtract(o1.getFullPrice()).intValue();
        }
    });
    for(PmsProductFullReduction fullReduction:fullReductionList){
        if(totalAmount.subtract(fullReduction.getFullPrice()).intValue()>=0){
            return fullReduction;
        }
    }
    return null;
}
 
Example #4
Source File: OmsPromotionServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
/**
 * 获取满减促销消息
 */
private String getFullReductionPromotionMessage(PmsProductFullReduction fullReduction) {
    StringBuilder sb = new StringBuilder();
    sb.append("满减优惠:");
    sb.append("满");
    sb.append(fullReduction.getFullPrice());
    sb.append("元,");
    sb.append("减");
    sb.append(fullReduction.getReducePrice());
    sb.append("元");
    return sb.toString();
}
 
Example #5
Source File: OmsPromotionServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
/**
 * 获取满减促销消息
 */
private String getFullReductionPromotionMessage(PmsProductFullReduction fullReduction) {
    StringBuilder sb = new StringBuilder();
    sb.append("满减优惠:");
    sb.append("满");
    sb.append(fullReduction.getFullPrice());
    sb.append("元,");
    sb.append("减");
    sb.append(fullReduction.getReducePrice());
    sb.append("元");
    return sb.toString();
}
 
Example #6
Source File: OmsPromotionServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
private PmsProductFullReduction getProductFullReduction(BigDecimal totalAmount,List<PmsProductFullReduction> fullReductionList) {
    //按条件从高到低排序
    fullReductionList.sort(new Comparator<PmsProductFullReduction>() {
        @Override
        public int compare(PmsProductFullReduction o1, PmsProductFullReduction o2) {
            return o2.getFullPrice().subtract(o1.getFullPrice()).intValue();
        }
    });
    for(PmsProductFullReduction fullReduction:fullReductionList){
        if(totalAmount.subtract(fullReduction.getFullPrice()).intValue()>=0){
            return fullReduction;
        }
    }
    return null;
}
 
Example #7
Source File: OmsPromotionServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
private PmsProductFullReduction getProductFullReduction(BigDecimal totalAmount,List<PmsProductFullReduction> fullReductionList) {
    //按条件从高到低排序
    fullReductionList.sort(new Comparator<PmsProductFullReduction>() {
        @Override
        public int compare(PmsProductFullReduction o1, PmsProductFullReduction o2) {
            return o2.getFullPrice().subtract(o1.getFullPrice()).intValue();
        }
    });
    for(PmsProductFullReduction fullReduction:fullReductionList){
        if(totalAmount.subtract(fullReduction.getFullPrice()).intValue()>=0){
            return fullReduction;
        }
    }
    return null;
}
 
Example #8
Source File: OmsPromotionServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
/**
 * 获取满减促销消息
 */
private String getFullReductionPromotionMessage(PmsProductFullReduction fullReduction) {
    StringBuilder sb = new StringBuilder();
    sb.append("满减优惠:");
    sb.append("满");
    sb.append(fullReduction.getFullPrice());
    sb.append("元,");
    sb.append("减");
    sb.append(fullReduction.getReducePrice());
    sb.append("元");
    return sb.toString();
}
 
Example #9
Source File: PromotionProduct.java    From mall-swarm with Apache License 2.0 4 votes vote down vote up
public void setProductFullReductionList(List<PmsProductFullReduction> productFullReductionList) {
    this.productFullReductionList = productFullReductionList;
}
 
Example #10
Source File: PromotionProduct.java    From mall with Apache License 2.0 4 votes vote down vote up
public void setProductFullReductionList(List<PmsProductFullReduction> productFullReductionList) {
    this.productFullReductionList = productFullReductionList;
}
 
Example #11
Source File: PromotionProduct.java    From macrozheng with Apache License 2.0 4 votes vote down vote up
public List<PmsProductFullReduction> getProductFullReductionList() {
    return productFullReductionList;
}
 
Example #12
Source File: PromotionProduct.java    From macrozheng with Apache License 2.0 4 votes vote down vote up
public void setProductFullReductionList(List<PmsProductFullReduction> productFullReductionList) {
    this.productFullReductionList = productFullReductionList;
}
 
Example #13
Source File: PromotionProduct.java    From mall with Apache License 2.0 4 votes vote down vote up
public List<PmsProductFullReduction> getProductFullReductionList() {
    return productFullReductionList;
}
 
Example #14
Source File: PromotionProduct.java    From mall-swarm with Apache License 2.0 4 votes vote down vote up
public List<PmsProductFullReduction> getProductFullReductionList() {
    return productFullReductionList;
}
 
Example #15
Source File: PromotionProduct.java    From macrozheng-mall with MIT License 4 votes vote down vote up
public List<PmsProductFullReduction> getProductFullReductionList() {
    return productFullReductionList;
}
 
Example #16
Source File: PromotionProduct.java    From macrozheng-mall with MIT License 4 votes vote down vote up
public void setProductFullReductionList(List<PmsProductFullReduction> productFullReductionList) {
    this.productFullReductionList = productFullReductionList;
}
 
Example #17
Source File: PmsProductFullReductionDao.java    From mall-swarm with Apache License 2.0 2 votes vote down vote up
/**
 * 批量创建
 */
int insertList(@Param("list") List<PmsProductFullReduction> productFullReductionList);
 
Example #18
Source File: PmsProductFullReductionDao.java    From mall with Apache License 2.0 2 votes vote down vote up
/**
 * 批量创建
 */
int insertList(@Param("list") List<PmsProductFullReduction> productFullReductionList);
 
Example #19
Source File: PmsProductFullReductionMapper.java    From macrozheng-mall with MIT License votes vote down vote up
PmsProductFullReduction selectByPrimaryKey(Long id); 
Example #20
Source File: PmsProductFullReductionMapper.java    From mall with Apache License 2.0 votes vote down vote up
int updateByPrimaryKey(PmsProductFullReduction record); 
Example #21
Source File: PmsProductFullReductionMapper.java    From mall with Apache License 2.0 votes vote down vote up
int updateByPrimaryKeySelective(PmsProductFullReduction record); 
Example #22
Source File: PmsProductFullReductionMapper.java    From mall with Apache License 2.0 votes vote down vote up
int updateByExample(@Param("record") PmsProductFullReduction record, @Param("example") PmsProductFullReductionExample example); 
Example #23
Source File: PmsProductFullReductionMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int insert(PmsProductFullReduction record); 
Example #24
Source File: PmsProductFullReductionMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int insertSelective(PmsProductFullReduction record); 
Example #25
Source File: PmsProductFullReductionMapper.java    From macrozheng-mall with MIT License votes vote down vote up
List<PmsProductFullReduction> selectByExample(PmsProductFullReductionExample example); 
Example #26
Source File: PmsProductFullReductionMapper.java    From mall with Apache License 2.0 votes vote down vote up
int insert(PmsProductFullReduction record); 
Example #27
Source File: PmsProductFullReductionMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int updateByExampleSelective(@Param("record") PmsProductFullReduction record, @Param("example") PmsProductFullReductionExample example); 
Example #28
Source File: PmsProductFullReductionMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int updateByExample(@Param("record") PmsProductFullReduction record, @Param("example") PmsProductFullReductionExample example); 
Example #29
Source File: PmsProductFullReductionMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int updateByPrimaryKeySelective(PmsProductFullReduction record); 
Example #30
Source File: PmsProductFullReductionMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int updateByPrimaryKey(PmsProductFullReduction record);