Codota Logo
PmsProductCategoryAttributeRelationExample.<init>
Code IndexAdd Codota to your IDE (free)

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

Best Java code snippets using com.macro.mall.model.PmsProductCategoryAttributeRelationExample.<init> (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
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);
}
com.macro.mall.modelPmsProductCategoryAttributeRelationExample<init>

Popular methods of PmsProductCategoryAttributeRelationExample

  • createCriteria
  • createCriteriaInternal

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now