com.macro.mall.dto.PmsBrandParam Java Examples
The following examples show how to use
com.macro.mall.dto.PmsBrandParam.
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: PmsBrandServiceImpl.java From macrozheng-mall with MIT License | 6 votes |
@Override public int updateBrand(Long id, PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); pmsBrand.setId(id); //如果创建时首字母为空,取名称的第一个为首字母 if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); } //更新品牌时要更新商品中的品牌名称 PmsProduct product = new PmsProduct(); product.setBrandName(pmsBrand.getName()); PmsProductExample example = new PmsProductExample(); example.createCriteria().andBrandIdEqualTo(id); productMapper.updateByExampleSelective(product,example); return brandMapper.updateByPrimaryKeySelective(pmsBrand); }
Example #2
Source File: PmsBrandController.java From macrozheng-mall with MIT License | 6 votes |
@ApiOperation(value = "更新品牌") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody @PreAuthorize("hasAuthority('pms:brand:update')") public Object update(@PathVariable("id") Long id, @Validated @RequestBody PmsBrandParam pmsBrandParam, BindingResult result) { CommonResult commonResult; int count = brandService.updateBrand(id, pmsBrandParam); if (count == 1) { commonResult = new CommonResult().success(count); } else { commonResult = new CommonResult().failed(); } return commonResult; }
Example #3
Source File: PmsBrandServiceImpl.java From mall-swarm with Apache License 2.0 | 6 votes |
@Override public int updateBrand(Long id, PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); pmsBrand.setId(id); //如果创建时首字母为空,取名称的第一个为首字母 if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); } //更新品牌时要更新商品中的品牌名称 PmsProduct product = new PmsProduct(); product.setBrandName(pmsBrand.getName()); PmsProductExample example = new PmsProductExample(); example.createCriteria().andBrandIdEqualTo(id); productMapper.updateByExampleSelective(product,example); return brandMapper.updateByPrimaryKeySelective(pmsBrand); }
Example #4
Source File: PmsBrandServiceImpl.java From mall with Apache License 2.0 | 6 votes |
@Override public int updateBrand(Long id, PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); pmsBrand.setId(id); //如果创建时首字母为空,取名称的第一个为首字母 if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); } //更新品牌时要更新商品中的品牌名称 PmsProduct product = new PmsProduct(); product.setBrandName(pmsBrand.getName()); PmsProductExample example = new PmsProductExample(); example.createCriteria().andBrandIdEqualTo(id); productMapper.updateByExampleSelective(product,example); return brandMapper.updateByPrimaryKeySelective(pmsBrand); }
Example #5
Source File: PmsBrandController.java From macrozheng with Apache License 2.0 | 6 votes |
@ApiOperation(value = "更新品牌") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody @PreAuthorize("hasAuthority('pms:brand:update')") public CommonResult update(@PathVariable("id") Long id, @Validated @RequestBody PmsBrandParam pmsBrandParam, BindingResult result) { CommonResult commonResult; int count = brandService.updateBrand(id, pmsBrandParam); if (count == 1) { commonResult = CommonResult.success(count); } else { commonResult = CommonResult.failed(); } return commonResult; }
Example #6
Source File: PmsBrandServiceImpl.java From macrozheng with Apache License 2.0 | 6 votes |
@Override public int updateBrand(Long id, PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); pmsBrand.setId(id); //如果创建时首字母为空,取名称的第一个为首字母 if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); } //更新品牌时要更新商品中的品牌名称 PmsProduct product = new PmsProduct(); product.setBrandName(pmsBrand.getName()); PmsProductExample example = new PmsProductExample(); example.createCriteria().andBrandIdEqualTo(id); productMapper.updateByExampleSelective(product,example); return brandMapper.updateByPrimaryKeySelective(pmsBrand); }
Example #7
Source File: PmsBrandController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation(value = "添加品牌") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@Validated @RequestBody PmsBrandParam pmsBrand, BindingResult result) { CommonResult commonResult; int count = brandService.createBrand(pmsBrand); if (count == 1) { commonResult = CommonResult.success(count); } else { commonResult = CommonResult.failed(); } return commonResult; }
Example #8
Source File: PmsBrandServiceImpl.java From macrozheng-mall with MIT License | 5 votes |
@Override public int createBrand(PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); //如果创建时首字母为空,取名称的第一个为首字母 if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); } return brandMapper.insertSelective(pmsBrand); }
Example #9
Source File: PmsBrandController.java From macrozheng-mall with MIT License | 5 votes |
@ApiOperation(value = "添加品牌") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody @PreAuthorize("hasAuthority('pms:brand:create')") public Object create(@Validated @RequestBody PmsBrandParam pmsBrand, BindingResult result) { CommonResult commonResult; int count = brandService.createBrand(pmsBrand); if (count == 1) { commonResult = new CommonResult().success(count); } else { commonResult = new CommonResult().failed(); } return commonResult; }
Example #10
Source File: PmsBrandServiceImpl.java From mall with Apache License 2.0 | 5 votes |
@Override public int createBrand(PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); //如果创建时首字母为空,取名称的第一个为首字母 if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); } return brandMapper.insertSelective(pmsBrand); }
Example #11
Source File: PmsBrandController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation(value = "更新品牌") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable("id") Long id, @Validated @RequestBody PmsBrandParam pmsBrandParam, BindingResult result) { CommonResult commonResult; int count = brandService.updateBrand(id, pmsBrandParam); if (count == 1) { commonResult = CommonResult.success(count); } else { commonResult = CommonResult.failed(); } return commonResult; }
Example #12
Source File: PmsBrandController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation(value = "添加品牌") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@Validated @RequestBody PmsBrandParam pmsBrand, BindingResult result) { CommonResult commonResult; int count = brandService.createBrand(pmsBrand); if (count == 1) { commonResult = CommonResult.success(count); } else { commonResult = CommonResult.failed(); } return commonResult; }
Example #13
Source File: PmsBrandServiceImpl.java From macrozheng with Apache License 2.0 | 5 votes |
@Override public int createBrand(PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); //如果创建时首字母为空,取名称的第一个为首字母 if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); } return brandMapper.insertSelective(pmsBrand); }
Example #14
Source File: PmsBrandController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation(value = "添加品牌") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody @PreAuthorize("hasAuthority('pms:brand:create')") public CommonResult create(@Validated @RequestBody PmsBrandParam pmsBrand, BindingResult result) { CommonResult commonResult; int count = brandService.createBrand(pmsBrand); if (count == 1) { commonResult = CommonResult.success(count); } else { commonResult = CommonResult.failed(); } return commonResult; }
Example #15
Source File: PmsBrandServiceImpl.java From mall-swarm with Apache License 2.0 | 5 votes |
@Override public int createBrand(PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); //如果创建时首字母为空,取名称的第一个为首字母 if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); } return brandMapper.insertSelective(pmsBrand); }
Example #16
Source File: PmsBrandController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation(value = "更新品牌") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable("id") Long id, @Validated @RequestBody PmsBrandParam pmsBrandParam, BindingResult result) { CommonResult commonResult; int count = brandService.updateBrand(id, pmsBrandParam); if (count == 1) { commonResult = CommonResult.success(count); } else { commonResult = CommonResult.failed(); } return commonResult; }
Example #17
Source File: PmsBrandService.java From macrozheng with Apache License 2.0 | 4 votes |
@Transactional int updateBrand(Long id, PmsBrandParam pmsBrandParam);
Example #18
Source File: PmsBrandService.java From macrozheng-mall with MIT License | 4 votes |
@Transactional int updateBrand(Long id, PmsBrandParam pmsBrandParam);
Example #19
Source File: PmsBrandService.java From mall with Apache License 2.0 | 2 votes |
/** * 创建品牌 */ int createBrand(PmsBrandParam pmsBrandParam);
Example #20
Source File: PmsBrandService.java From mall with Apache License 2.0 | 2 votes |
/** * 修改品牌 */ @Transactional int updateBrand(Long id, PmsBrandParam pmsBrandParam);
Example #21
Source File: PmsBrandService.java From mall-swarm with Apache License 2.0 | 2 votes |
/** * 修改品牌 */ @Transactional int updateBrand(Long id, PmsBrandParam pmsBrandParam);
Example #22
Source File: PmsBrandService.java From mall-swarm with Apache License 2.0 | 2 votes |
/** * 创建品牌 */ int createBrand(PmsBrandParam pmsBrandParam);
Example #23
Source File: PmsBrandService.java From macrozheng with Apache License 2.0 | votes |
int createBrand(PmsBrandParam pmsBrandParam);
Example #24
Source File: PmsBrandService.java From macrozheng-mall with MIT License | votes |
int createBrand(PmsBrandParam pmsBrandParam);