old mode 100644
new mode 100755
| | |
| | | |
| | | JSONObject spec = null; |
| | | List<ProductSpecValuePo> productSpecValuePos = new ArrayList<>(); |
| | | boolean hasDefault = false; |
| | | ProductSpecValuePo productSpecValuePo = null; |
| | | for (int specIndex = 0; specIndex < productSpecs.size(); specIndex++) { |
| | | spec = productSpecs.getJSONObject(specIndex); |
| | | productSpecValuePos.add(BeanConvertUtil.covertBean(spec, ProductSpecValuePo.class)); |
| | | productSpecValuePo = BeanConvertUtil.covertBean(spec, ProductSpecValuePo.class); |
| | | productSpecValuePos.add(productSpecValuePo); |
| | | if("T".equals(productSpecValuePo.getIsDefault())){ |
| | | hasDefault = true; |
| | | } |
| | | } |
| | | |
| | | if(!hasDefault){ |
| | | throw new IllegalArgumentException("请求报文中未包含默认规格"); |
| | | } |
| | | |
| | | ProductPo productPo = BeanConvertUtil.covertBean(reqJson, ProductPo.class); |
| | |
| | | |
| | | JSONObject spec = null; |
| | | List<ProductSpecValuePo> productSpecValuePos = null; |
| | | ; |
| | | |
| | | boolean hasDefault = false; |
| | | ProductSpecValuePo productSpecValuePo = null; |
| | | if (productSpecs != null) { |
| | | productSpecValuePos = new ArrayList<>(); |
| | | for (int specIndex = 0; specIndex < productSpecs.size(); specIndex++) { |
| | | spec = productSpecs.getJSONObject(specIndex); |
| | | productSpecValuePos.add(BeanConvertUtil.covertBean(spec, ProductSpecValuePo.class)); |
| | | productSpecValuePo = BeanConvertUtil.covertBean(spec, ProductSpecValuePo.class); |
| | | productSpecValuePos.add(productSpecValuePo); |
| | | if("T".equals(productSpecValuePo.getIsDefault())){ |
| | | hasDefault = true; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(!hasDefault){ |
| | | throw new IllegalArgumentException("请求报文中未包含默认规格"); |
| | | } |
| | | |
| | | ProductPo productPo = BeanConvertUtil.covertBean(reqJson, ProductPo.class); |
| | |
| | | */ |
| | | @RequestMapping(value = "/deleteProductLabel", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteProductLabel(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "labelId", "labelId不能为空"); |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryProductLabel", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryProductLabel(@RequestParam(value = "labelCd", required = false) String labelCd, |
| | | @RequestParam(value = "hasProduct", required = false) String hasProduct, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ProductLabelDto productLabelDto = new ProductLabelDto(); |
| | | productLabelDto.setPage(page); |
| | | productLabelDto.setRow(row); |
| | | productLabelDto.setLabelCd(labelCd); |
| | | productLabelDto.setHasProduct(hasProduct); |
| | | return getProductLabelBMOImpl.get(productLabelDto); |
| | | } |
| | | |
| | | } |