修改会员专区和积分专区的逻辑

This commit is contained in:
2025-02-17 10:13:22 +08:00
parent 48f6dd405b
commit d781eaa358
9 changed files with 117 additions and 29 deletions

View File

@@ -138,6 +138,32 @@ public class PmsProductController {
}
}
@ApiOperation("批量设为积分专区")
@RequestMapping(value = "/update/integrationStatus", method = RequestMethod.POST)
@ResponseBody
public CommonResult updateIntegrationStatus(@RequestParam("ids") List<Long> 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<Long> 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

View File

@@ -60,6 +60,17 @@ public interface PmsProductService {
*/
int updateNewStatus(List<Long> ids, Integer newStatus);
/**
*批量设为积分专区
*/
int updatepointsAreaStatus(List<Long> ids, Integer pointsAreaStatus);
/**
* 批量设为积分兑换专区
*/
int updatepointsExchangeStatus(List<Long> ids, Integer pointsExchangeStatus);
/**
* 批量删除商品
*/
@@ -69,4 +80,9 @@ public interface PmsProductService {
* 根据商品名称或者货号模糊查询
*/
List<PmsProduct> list(String keyword);
}

View File

@@ -264,6 +264,27 @@ public class PmsProductServiceImpl implements PmsProductService {
return productMapper.updateByExampleSelective(record, example);
}
//积分区域
@Override
public int updatepointsAreaStatus(List<Long> 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<Long> 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<Long> ids, Integer deleteStatus) {
PmsProduct record = new PmsProduct();
@@ -273,6 +294,7 @@ public class PmsProductServiceImpl implements PmsProductService {
return productMapper.updateByExampleSelective(record, example);
}
@Override
public List<PmsProduct> list(String keyword) {
PmsProductExample productExample = new PmsProductExample();
@@ -285,6 +307,8 @@ public class PmsProductServiceImpl implements PmsProductService {
return productMapper.selectByExample(productExample);
}
/**
* @deprecated 旧版创建
*/

View File

@@ -23,9 +23,6 @@ public class SmsHomeNewProductServiceImpl implements SmsHomeNewProductService {
for (SmsHomeNewProduct SmsHomeNewProduct : homeNewProductList) {
SmsHomeNewProduct.setRecommendStatus(1);
SmsHomeNewProduct.setSort(0);
SmsHomeNewProduct.setVipStatus(1);
SmsHomeNewProduct.setPointsAreaStatus(1);
SmsHomeNewProduct.setPointsExchangeStatus(1);
homeNewProductMapper.insert(SmsHomeNewProduct);
}
return homeNewProductList.size();