From 77509402c72adad7ff25da7eb0a541f6ef111415 Mon Sep 17 00:00:00 2001 From: chenxin <1851789500@qq.com> Date: Thu, 20 Feb 2025 14:49:50 +0800 Subject: [PATCH] revert 5f49434239c64cebb99e51f115d09fdb5fdbaae4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 还原 --- .../mall/controller/PmsProductController.java | 26 +++++++++++++++++++ .../mall/service/PmsProductService.java | 11 ++++++++ .../service/impl/PmsProductServiceImpl.java | 20 ++++++++++++++ .../com/buy507/mall/model/PmsProduct.java | 14 +++++----- .../buy507/mall/mapper/PmsProductMapper.xml | 9 ------- 5 files changed, 64 insertions(+), 16 deletions(-) diff --git a/mall-admin/src/main/java/com/buy507/mall/controller/PmsProductController.java b/mall-admin/src/main/java/com/buy507/mall/controller/PmsProductController.java index 91572b5..47f7d31 100644 --- a/mall-admin/src/main/java/com/buy507/mall/controller/PmsProductController.java +++ b/mall-admin/src/main/java/com/buy507/mall/controller/PmsProductController.java @@ -138,6 +138,32 @@ public class PmsProductController { } } + @ApiOperation("批量设为积分专区") + @RequestMapping(value = "/update/integrationStatus", method = RequestMethod.POST) + @ResponseBody + public CommonResult updateIntegrationStatus(@RequestParam("ids") List ids, + @RequestParam("pointsAreaStatus") Integer pointsAreaStatus) { + int count = productService.updatepointsAreaStatus(ids, pointsAreaStatus); + if (count > 0) { + return CommonResult.success(count); + } else { + return CommonResult.failed(); + } + } + + @ApiOperation("批量设为积分兑换专区") + @RequestMapping(value = "/update/integrationExchangeStatus", method = RequestMethod.POST) + @ResponseBody + public CommonResult updateIntegrationExchangeStatus(@RequestParam("ids") List ids, + @RequestParam("pointsExchangeStatus") Integer pointsExchangeStatus) { + int count = productService.updatepointsExchangeStatus(ids, pointsExchangeStatus); + if (count > 0) { + return CommonResult.success(count); + } else { + return CommonResult.failed(); + } + } + @ApiOperation("批量修改删除状态") @RequestMapping(value = "/update/deleteStatus", method = RequestMethod.POST) @ResponseBody diff --git a/mall-admin/src/main/java/com/buy507/mall/service/PmsProductService.java b/mall-admin/src/main/java/com/buy507/mall/service/PmsProductService.java index 1bd588e..0deaeec 100644 --- a/mall-admin/src/main/java/com/buy507/mall/service/PmsProductService.java +++ b/mall-admin/src/main/java/com/buy507/mall/service/PmsProductService.java @@ -60,6 +60,17 @@ public interface PmsProductService { */ int updateNewStatus(List ids, Integer newStatus); + /** + *批量设为积分专区 + */ + int updatepointsAreaStatus(List ids, Integer pointsAreaStatus); + + /** + * 批量设为积分兑换专区 + */ + int updatepointsExchangeStatus(List ids, Integer pointsExchangeStatus); + + /** * 批量删除商品 */ diff --git a/mall-admin/src/main/java/com/buy507/mall/service/impl/PmsProductServiceImpl.java b/mall-admin/src/main/java/com/buy507/mall/service/impl/PmsProductServiceImpl.java index 4202d64..1908424 100644 --- a/mall-admin/src/main/java/com/buy507/mall/service/impl/PmsProductServiceImpl.java +++ b/mall-admin/src/main/java/com/buy507/mall/service/impl/PmsProductServiceImpl.java @@ -264,6 +264,26 @@ public class PmsProductServiceImpl implements PmsProductService { return productMapper.updateByExampleSelective(record, example); } + //积分区域 + @Override + public int updatepointsAreaStatus(List ids, Integer pointsAreaStatus) { + PmsProduct record = new PmsProduct(); + record.setPointsAreaStatus(pointsAreaStatus); + PmsProductExample example = new PmsProductExample(); + example.createCriteria().andIdIn(ids); + return productMapper.updateByExampleSelective(record, example); + } + + //积分兑换区域 + @Override + public int updatepointsExchangeStatus(List ids, Integer pointsExchangeStatus) { + PmsProduct record = new PmsProduct(); + record.setPointsExchangeStatus(pointsExchangeStatus); + PmsProductExample example = new PmsProductExample(); + example.createCriteria().andIdIn(ids); + return productMapper.updateByExampleSelective(record, example); + } + @Override public int updateDeleteStatus(List ids, Integer deleteStatus) { diff --git a/mall-dao/src/main/java/com/buy507/mall/model/PmsProduct.java b/mall-dao/src/main/java/com/buy507/mall/model/PmsProduct.java index 6e345a2..cb2d6aa 100644 --- a/mall-dao/src/main/java/com/buy507/mall/model/PmsProduct.java +++ b/mall-dao/src/main/java/com/buy507/mall/model/PmsProduct.java @@ -157,7 +157,8 @@ public class PmsProduct implements Serializable { @Transient private SmsCoupon smsCoupon; - + + @ApiModelProperty(value = "评论信息") @Transient private List pmsComment; @@ -174,21 +175,20 @@ public class PmsProduct implements Serializable { @ApiModelProperty(value = "好评比例") private PmsComment commentBiLi; - @Transient - @ApiModelProperty(value = "会员专区状态") + // 会员专区状态 private Integer vipStatus; - @Transient - @ApiModelProperty(value = "积分专区状态") + // 积分专区状态 private Integer pointsAreaStatus; - @Transient - @ApiModelProperty(value = "积分兑换专区状态") + // 积分兑换专区状态 private Integer pointsExchangeStatus; @ApiModelProperty(value = "会员中心:1->店长; 2->代理; 3->市代理") private Integer vipCenter; + + public List getProductAttribute() { return productAttribute; diff --git a/mall-dao/src/main/resources/com/buy507/mall/mapper/PmsProductMapper.xml b/mall-dao/src/main/resources/com/buy507/mall/mapper/PmsProductMapper.xml index a8a9401..1f1b926 100644 --- a/mall-dao/src/main/resources/com/buy507/mall/mapper/PmsProductMapper.xml +++ b/mall-dao/src/main/resources/com/buy507/mall/mapper/PmsProductMapper.xml @@ -234,15 +234,6 @@ new_status, - - vip_status, - - - points_area_status, - - - points_exchange_status, - recommand_status,