Tabnine Logo
PmsProductCategoryAttributeRelationExample
Code IndexAdd Tabnine to your IDE (free)

How to use
PmsProductCategoryAttributeRelationExample
in
com.macro.mall.model

Best Java code snippets using com.macro.mall.model.PmsProductCategoryAttributeRelationExample (Showing top 3 results out of 315)

origin: macrozheng/mall

public Criteria or() {
  Criteria criteria = createCriteriaInternal();
  oredCriteria.add(criteria);
  return criteria;
}
origin: macrozheng/mall

@Override
public int update(Long id, PmsProductCategoryParam pmsProductCategoryParam) {
  PmsProductCategory productCategory = new PmsProductCategory();
  productCategory.setId(id);
  BeanUtils.copyProperties(pmsProductCategoryParam, productCategory);
  setCategoryLevel(productCategory);
  //更新商品分类时要更新商品中的名称
  PmsProduct product = new PmsProduct();
  product.setProductCategoryName(productCategory.getName());
  PmsProductExample example = new PmsProductExample();
  example.createCriteria().andProductCategoryIdEqualTo(id);
  productMapper.updateByExampleSelective(product,example);
  //同时更新筛选属性的信息
  if(!CollectionUtils.isEmpty(pmsProductCategoryParam.getProductAttributeIdList())){
    PmsProductCategoryAttributeRelationExample relationExample = new PmsProductCategoryAttributeRelationExample();
    relationExample.createCriteria().andProductCategoryIdEqualTo(id);
    productCategoryAttributeRelationMapper.deleteByExample(relationExample);
    insertRelationList(id,pmsProductCategoryParam.getProductAttributeIdList());
  }else{
    PmsProductCategoryAttributeRelationExample relationExample = new PmsProductCategoryAttributeRelationExample();
    relationExample.createCriteria().andProductCategoryIdEqualTo(id);
    productCategoryAttributeRelationMapper.deleteByExample(relationExample);
  }
  return productCategoryMapper.updateByPrimaryKeySelective(productCategory);
}
origin: macrozheng/mall

public Criteria createCriteria() {
  Criteria criteria = createCriteriaInternal();
  if (oredCriteria.size() == 0) {
    oredCriteria.add(criteria);
  }
  return criteria;
}
com.macro.mall.modelPmsProductCategoryAttributeRelationExample

Most used methods

  • <init>
  • createCriteria
  • createCriteriaInternal

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now