com.macro.mall.dto.PmsProductAttributeParam Java Examples
The following examples show how to use
com.macro.mall.dto.PmsProductAttributeParam.
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: PmsProductAttributeController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("添加商品属性信息") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody PmsProductAttributeParam productAttributeParam, BindingResult bindingResult) { int count = productAttributeService.create(productAttributeParam); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } }
Example #2
Source File: PmsProductAttributeServiceImpl.java From macrozheng-mall with MIT License | 5 votes |
@Override public int update(Long id, PmsProductAttributeParam productAttributeParam) { PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); pmsProductAttribute.setId(id); BeanUtils.copyProperties(productAttributeParam, pmsProductAttribute); return productAttributeMapper.updateByPrimaryKeySelective(pmsProductAttribute); }
Example #3
Source File: PmsProductAttributeServiceImpl.java From macrozheng-mall with MIT License | 5 votes |
@Override public int create(PmsProductAttributeParam pmsProductAttributeParam) { PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); BeanUtils.copyProperties(pmsProductAttributeParam, pmsProductAttribute); int count = productAttributeMapper.insertSelective(pmsProductAttribute); //新增商品属性以后需要更新商品属性分类数量 PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); if(pmsProductAttribute.getType()==0){ pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()+1); }else if(pmsProductAttribute.getType()==1){ pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()+1); } productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); return count; }
Example #4
Source File: PmsProductAttributeController.java From macrozheng-mall with MIT License | 5 votes |
@ApiOperation("修改商品属性信息") @RequestMapping(value = "/update/{id}",method = RequestMethod.POST) @ResponseBody public Object update(@PathVariable Long id,@RequestBody PmsProductAttributeParam productAttributeParam,BindingResult bindingResult){ int count = productAttributeService.update(id,productAttributeParam); if (count > 0) { return new CommonResult().success(count); } else { return new CommonResult().failed(); } }
Example #5
Source File: PmsProductAttributeController.java From macrozheng-mall with MIT License | 5 votes |
@ApiOperation("添加商品属性信息") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public Object create(@RequestBody PmsProductAttributeParam productAttributeParam, BindingResult bindingResult) { int count = productAttributeService.create(productAttributeParam); if (count > 0) { return new CommonResult().success(count); } else { return new CommonResult().failed(); } }
Example #6
Source File: PmsProductAttributeServiceImpl.java From mall with Apache License 2.0 | 5 votes |
@Override public int update(Long id, PmsProductAttributeParam productAttributeParam) { PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); pmsProductAttribute.setId(id); BeanUtils.copyProperties(productAttributeParam, pmsProductAttribute); return productAttributeMapper.updateByPrimaryKeySelective(pmsProductAttribute); }
Example #7
Source File: PmsProductAttributeServiceImpl.java From mall with Apache License 2.0 | 5 votes |
@Override public int create(PmsProductAttributeParam pmsProductAttributeParam) { PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); BeanUtils.copyProperties(pmsProductAttributeParam, pmsProductAttribute); int count = productAttributeMapper.insertSelective(pmsProductAttribute); //新增商品属性以后需要更新商品属性分类数量 PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); if(pmsProductAttribute.getType()==0){ pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()+1); }else if(pmsProductAttribute.getType()==1){ pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()+1); } productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); return count; }
Example #8
Source File: PmsProductAttributeController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("修改商品属性信息") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody PmsProductAttributeParam productAttributeParam, BindingResult bindingResult) { int count = productAttributeService.update(id, productAttributeParam); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } }
Example #9
Source File: PmsProductAttributeController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("添加商品属性信息") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody PmsProductAttributeParam productAttributeParam, BindingResult bindingResult) { int count = productAttributeService.create(productAttributeParam); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } }
Example #10
Source File: PmsProductAttributeServiceImpl.java From macrozheng with Apache License 2.0 | 5 votes |
@Override public int update(Long id, PmsProductAttributeParam productAttributeParam) { PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); pmsProductAttribute.setId(id); BeanUtils.copyProperties(productAttributeParam, pmsProductAttribute); return productAttributeMapper.updateByPrimaryKeySelective(pmsProductAttribute); }
Example #11
Source File: PmsProductAttributeServiceImpl.java From macrozheng with Apache License 2.0 | 5 votes |
@Override public int create(PmsProductAttributeParam pmsProductAttributeParam) { PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); BeanUtils.copyProperties(pmsProductAttributeParam, pmsProductAttribute); int count = productAttributeMapper.insertSelective(pmsProductAttribute); //新增商品属性以后需要更新商品属性分类数量 PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); if(pmsProductAttribute.getType()==0){ pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()+1); }else if(pmsProductAttribute.getType()==1){ pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()+1); } productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); return count; }
Example #12
Source File: PmsProductAttributeController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("修改商品属性信息") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody PmsProductAttributeParam productAttributeParam, BindingResult bindingResult) { int count = productAttributeService.update(id, productAttributeParam); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } }
Example #13
Source File: PmsProductAttributeController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("添加商品属性信息") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody PmsProductAttributeParam productAttributeParam, BindingResult bindingResult) { int count = productAttributeService.create(productAttributeParam); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } }
Example #14
Source File: PmsProductAttributeServiceImpl.java From mall-swarm with Apache License 2.0 | 5 votes |
@Override public int update(Long id, PmsProductAttributeParam productAttributeParam) { PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); pmsProductAttribute.setId(id); BeanUtils.copyProperties(productAttributeParam, pmsProductAttribute); return productAttributeMapper.updateByPrimaryKeySelective(pmsProductAttribute); }
Example #15
Source File: PmsProductAttributeServiceImpl.java From mall-swarm with Apache License 2.0 | 5 votes |
@Override public int create(PmsProductAttributeParam pmsProductAttributeParam) { PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); BeanUtils.copyProperties(pmsProductAttributeParam, pmsProductAttribute); int count = productAttributeMapper.insertSelective(pmsProductAttribute); //新增商品属性以后需要更新商品属性分类数量 PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); if(pmsProductAttribute.getType()==0){ pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()+1); }else if(pmsProductAttribute.getType()==1){ pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()+1); } productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); return count; }
Example #16
Source File: PmsProductAttributeController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("修改商品属性信息") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody PmsProductAttributeParam productAttributeParam, BindingResult bindingResult) { int count = productAttributeService.update(id, productAttributeParam); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } }
Example #17
Source File: PmsProductAttributeService.java From macrozheng with Apache License 2.0 | 2 votes |
/** * 修改商品属性 */ int update(Long id, PmsProductAttributeParam productAttributeParam);
Example #18
Source File: PmsProductAttributeService.java From macrozheng with Apache License 2.0 | 2 votes |
/** * 添加商品属性 */ @Transactional int create(PmsProductAttributeParam pmsProductAttributeParam);
Example #19
Source File: PmsProductAttributeService.java From mall with Apache License 2.0 | 2 votes |
/** * 添加商品属性 */ @Transactional int create(PmsProductAttributeParam pmsProductAttributeParam);
Example #20
Source File: PmsProductAttributeService.java From mall with Apache License 2.0 | 2 votes |
/** * 修改商品属性 */ int update(Long id, PmsProductAttributeParam productAttributeParam);
Example #21
Source File: PmsProductAttributeService.java From mall-swarm with Apache License 2.0 | 2 votes |
/** * 修改商品属性 */ int update(Long id, PmsProductAttributeParam productAttributeParam);
Example #22
Source File: PmsProductAttributeService.java From macrozheng-mall with MIT License | 2 votes |
/** * 添加商品属性 */ @Transactional int create(PmsProductAttributeParam pmsProductAttributeParam);
Example #23
Source File: PmsProductAttributeService.java From macrozheng-mall with MIT License | 2 votes |
/** * 修改商品属性 */ int update(Long id, PmsProductAttributeParam productAttributeParam);
Example #24
Source File: PmsProductAttributeService.java From mall-swarm with Apache License 2.0 | 2 votes |
/** * 添加商品属性 */ @Transactional int create(PmsProductAttributeParam pmsProductAttributeParam);