com.macro.mall.model.PmsProductAttributeExample Java Examples
The following examples show how to use
com.macro.mall.model.PmsProductAttributeExample.
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: PmsProductAttributeServiceImpl.java From macrozheng-mall with MIT License | 6 votes |
@Override public int delete(List<Long> ids) { //获取分类 PmsProductAttribute pmsProductAttribute = productAttributeMapper.selectByPrimaryKey(ids.get(0)); Integer type = pmsProductAttribute.getType(); PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); PmsProductAttributeExample example = new PmsProductAttributeExample(); example.createCriteria().andIdIn(ids); int count = productAttributeMapper.deleteByExample(example); //删除完成后修改数量 if(type==0){ if(pmsProductAttributeCategory.getAttributeCount()>=count){ pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()-count); }else{ pmsProductAttributeCategory.setAttributeCount(0); } }else if(type==1){ if(pmsProductAttributeCategory.getParamCount()>=count){ pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()-count); }else{ pmsProductAttributeCategory.setParamCount(0); } } productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); return count; }
Example #2
Source File: PmsProductAttributeServiceImpl.java From mall-swarm with Apache License 2.0 | 6 votes |
@Override public int delete(List<Long> ids) { //获取分类 PmsProductAttribute pmsProductAttribute = productAttributeMapper.selectByPrimaryKey(ids.get(0)); Integer type = pmsProductAttribute.getType(); PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); PmsProductAttributeExample example = new PmsProductAttributeExample(); example.createCriteria().andIdIn(ids); int count = productAttributeMapper.deleteByExample(example); //删除完成后修改数量 if(type==0){ if(pmsProductAttributeCategory.getAttributeCount()>=count){ pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()-count); }else{ pmsProductAttributeCategory.setAttributeCount(0); } }else if(type==1){ if(pmsProductAttributeCategory.getParamCount()>=count){ pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()-count); }else{ pmsProductAttributeCategory.setParamCount(0); } } productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); return count; }
Example #3
Source File: PmsProductAttributeServiceImpl.java From mall with Apache License 2.0 | 6 votes |
@Override public int delete(List<Long> ids) { //获取分类 PmsProductAttribute pmsProductAttribute = productAttributeMapper.selectByPrimaryKey(ids.get(0)); Integer type = pmsProductAttribute.getType(); PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); PmsProductAttributeExample example = new PmsProductAttributeExample(); example.createCriteria().andIdIn(ids); int count = productAttributeMapper.deleteByExample(example); //删除完成后修改数量 if(type==0){ if(pmsProductAttributeCategory.getAttributeCount()>=count){ pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()-count); }else{ pmsProductAttributeCategory.setAttributeCount(0); } }else if(type==1){ if(pmsProductAttributeCategory.getParamCount()>=count){ pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()-count); }else{ pmsProductAttributeCategory.setParamCount(0); } } productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); return count; }
Example #4
Source File: PmsProductAttributeServiceImpl.java From macrozheng with Apache License 2.0 | 6 votes |
@Override public int delete(List<Long> ids) { //获取分类 PmsProductAttribute pmsProductAttribute = productAttributeMapper.selectByPrimaryKey(ids.get(0)); Integer type = pmsProductAttribute.getType(); PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); PmsProductAttributeExample example = new PmsProductAttributeExample(); example.createCriteria().andIdIn(ids); int count = productAttributeMapper.deleteByExample(example); //删除完成后修改数量 if(type==0){ if(pmsProductAttributeCategory.getAttributeCount()>=count){ pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()-count); }else{ pmsProductAttributeCategory.setAttributeCount(0); } }else if(type==1){ if(pmsProductAttributeCategory.getParamCount()>=count){ pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()-count); }else{ pmsProductAttributeCategory.setParamCount(0); } } productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); return count; }
Example #5
Source File: PmsProductAttributeServiceImpl.java From macrozheng-mall with MIT License | 5 votes |
@Override public List<PmsProductAttribute> getList(Long cid, Integer type, Integer pageSize, Integer pageNum) { PageHelper.startPage(pageNum, pageSize); PmsProductAttributeExample example = new PmsProductAttributeExample(); example.setOrderByClause("sort desc"); example.createCriteria().andProductAttributeCategoryIdEqualTo(cid).andTypeEqualTo(type); return productAttributeMapper.selectByExample(example); }
Example #6
Source File: PmsProductAttributeServiceImpl.java From mall-swarm with Apache License 2.0 | 5 votes |
@Override public List<PmsProductAttribute> getList(Long cid, Integer type, Integer pageSize, Integer pageNum) { PageHelper.startPage(pageNum, pageSize); PmsProductAttributeExample example = new PmsProductAttributeExample(); example.setOrderByClause("sort desc"); example.createCriteria().andProductAttributeCategoryIdEqualTo(cid).andTypeEqualTo(type); return productAttributeMapper.selectByExample(example); }
Example #7
Source File: PmsProductAttributeServiceImpl.java From mall with Apache License 2.0 | 5 votes |
@Override public List<PmsProductAttribute> getList(Long cid, Integer type, Integer pageSize, Integer pageNum) { PageHelper.startPage(pageNum, pageSize); PmsProductAttributeExample example = new PmsProductAttributeExample(); example.setOrderByClause("sort desc"); example.createCriteria().andProductAttributeCategoryIdEqualTo(cid).andTypeEqualTo(type); return productAttributeMapper.selectByExample(example); }
Example #8
Source File: PmsProductAttributeServiceImpl.java From macrozheng with Apache License 2.0 | 5 votes |
@Override public List<PmsProductAttribute> getList(Long cid, Integer type, Integer pageSize, Integer pageNum) { PageHelper.startPage(pageNum, pageSize); PmsProductAttributeExample example = new PmsProductAttributeExample(); example.setOrderByClause("sort desc"); example.createCriteria().andProductAttributeCategoryIdEqualTo(cid).andTypeEqualTo(type); return productAttributeMapper.selectByExample(example); }
Example #9
Source File: PmsProductAttributeMapper.java From mall with Apache License 2.0 | votes |
long countByExample(PmsProductAttributeExample example);
Example #10
Source File: PmsProductAttributeMapper.java From macrozheng-mall with MIT License | votes |
int updateByExample(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example);
Example #11
Source File: PmsProductAttributeMapper.java From macrozheng-mall with MIT License | votes |
int updateByExampleSelective(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example);
Example #12
Source File: PmsProductAttributeMapper.java From macrozheng-mall with MIT License | votes |
List<PmsProductAttribute> selectByExample(PmsProductAttributeExample example);
Example #13
Source File: PmsProductAttributeMapper.java From macrozheng-mall with MIT License | votes |
int deleteByExample(PmsProductAttributeExample example);
Example #14
Source File: PmsProductAttributeMapper.java From macrozheng-mall with MIT License | votes |
int countByExample(PmsProductAttributeExample example);
Example #15
Source File: PmsProductAttributeMapper.java From mall with Apache License 2.0 | votes |
int updateByExample(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example);
Example #16
Source File: PmsProductAttributeMapper.java From mall with Apache License 2.0 | votes |
int updateByExampleSelective(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example);
Example #17
Source File: PmsProductAttributeMapper.java From mall with Apache License 2.0 | votes |
List<PmsProductAttribute> selectByExample(PmsProductAttributeExample example);
Example #18
Source File: PmsProductAttributeMapper.java From mall with Apache License 2.0 | votes |
int deleteByExample(PmsProductAttributeExample example);
Example #19
Source File: PmsProductAttributeMapper.java From mall-swarm with Apache License 2.0 | votes |
long countByExample(PmsProductAttributeExample example);
Example #20
Source File: PmsProductAttributeMapper.java From macrozheng with Apache License 2.0 | votes |
int updateByExample(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example);
Example #21
Source File: PmsProductAttributeMapper.java From macrozheng with Apache License 2.0 | votes |
int updateByExampleSelective(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example);
Example #22
Source File: PmsProductAttributeMapper.java From macrozheng with Apache License 2.0 | votes |
List<PmsProductAttribute> selectByExample(PmsProductAttributeExample example);
Example #23
Source File: PmsProductAttributeMapper.java From macrozheng with Apache License 2.0 | votes |
int deleteByExample(PmsProductAttributeExample example);
Example #24
Source File: PmsProductAttributeMapper.java From macrozheng with Apache License 2.0 | votes |
int countByExample(PmsProductAttributeExample example);
Example #25
Source File: PmsProductAttributeMapper.java From mall-swarm with Apache License 2.0 | votes |
int updateByExample(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example);
Example #26
Source File: PmsProductAttributeMapper.java From mall-swarm with Apache License 2.0 | votes |
int updateByExampleSelective(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example);
Example #27
Source File: PmsProductAttributeMapper.java From mall-swarm with Apache License 2.0 | votes |
List<PmsProductAttribute> selectByExample(PmsProductAttributeExample example);
Example #28
Source File: PmsProductAttributeMapper.java From mall-swarm with Apache License 2.0 | votes |
int deleteByExample(PmsProductAttributeExample example);