mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 00:39:20 +08:00
feat: 给剩余服务层方法补上注释
This commit is contained in:
+45
@@ -35,6 +35,11 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
this.currentUserContext = currentUserContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建导入规则
|
||||
* @param createImportRuleDTO 创建导入规则DTO
|
||||
* @return 导入规则VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ImportRuleVO createImportRule(CreateImportRuleDTO createImportRuleDTO) {
|
||||
@@ -61,6 +66,12 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
return convertToVO(importRulePO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新导入规则
|
||||
* @param updateImportRuleDTO 更新导入规则DTO
|
||||
* @param id 导入规则ID
|
||||
* @return 导入规则VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ImportRuleVO updateImportRule(UpdateImportRuleDTO updateImportRuleDTO, Long id) {
|
||||
@@ -95,6 +106,10 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
return convertToVO(importRulePO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除导入规则
|
||||
* @param id 导入规则ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteImportRule(Long id) {
|
||||
@@ -114,6 +129,11 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询导入规则
|
||||
* @param id 导入规则ID
|
||||
* @return 导入规则VO
|
||||
*/
|
||||
@Override
|
||||
public ImportRuleVO getImportRuleById(Long id) {
|
||||
ImportRulePO importRulePO = this.getById(id);
|
||||
@@ -130,6 +150,11 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
return convertToVO(importRulePO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入规则分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<ImportRuleVO> getImportRulePage(PageQueryDTO<ImportRuleFilterDTO> pageQueryDTO) {
|
||||
Long companyId = currentUserContext.getCurrentCompanyId();
|
||||
@@ -167,6 +192,11 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
return new PageResultVO<>(voList, pageResult.getTotal(), pageQueryDTO.getPage(), pageQueryDTO.getPageSize());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据类型查询导入规则
|
||||
* @param ruleType 类型
|
||||
* @return 导入规则VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<ImportRuleVO> getImportRulesByType(String ruleType) {
|
||||
Long companyId = currentUserContext.getCurrentCompanyId();
|
||||
@@ -183,6 +213,10 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有启用的导入规则
|
||||
* @return 导入规则VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<ImportRuleVO> getActiveImportRules() {
|
||||
Long companyId = currentUserContext.getCurrentCompanyId();
|
||||
@@ -199,6 +233,11 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据类型查询启用的导入规则
|
||||
* @param ruleType 类型
|
||||
* @return 导入规则VO
|
||||
*/
|
||||
@Override
|
||||
public ImportRuleVO getActiveImportRuleByType(String ruleType) {
|
||||
Long companyId = currentUserContext.getCurrentCompanyId();
|
||||
@@ -219,6 +258,12 @@ public class ImportRuleServiceImpl extends ServiceImpl<ImportRuleMapper, ImportR
|
||||
return convertToVO(importRulePO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换导入规则状态
|
||||
* @param id 导入规则ID
|
||||
* @param isActive 状态
|
||||
* @return 导入规则VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ImportRuleVO toggleImportRuleStatus(Long id, Integer isActive) {
|
||||
|
||||
+30
@@ -50,6 +50,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderPO> implemen
|
||||
this.productSpecService = productSpecService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
* @param createOrderDTO 创建订单DTO
|
||||
* @return 订单VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public OrderVO createOrder(CreateOrderDTO createOrderDTO) {
|
||||
@@ -114,6 +119,12 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderPO> implemen
|
||||
return convertToVO(order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新订单
|
||||
* @param updateOrderDTO 更新订单DTO
|
||||
* @param id 订单ID
|
||||
* @return 订单VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public OrderVO updateOrder(UpdateOrderDTO updateOrderDTO, Long id) {
|
||||
@@ -159,6 +170,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderPO> implemen
|
||||
return convertToVO(order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
* @param id 订单ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteOrder(Long id) {
|
||||
@@ -175,6 +190,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderPO> implemen
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<OrderVO> getOrderPage(PageQueryDTO<OrderFilterDTO> pageQueryDTO) {
|
||||
// 从token中获取公司ID
|
||||
@@ -229,6 +249,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderPO> implemen
|
||||
return PageResultVO.create(voList, pageResult.getTotal(), pageQueryDTO.getPage(), pageQueryDTO.getPageSize());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询订单
|
||||
* @param id 订单ID
|
||||
* @return 订单VO
|
||||
*/
|
||||
@Override
|
||||
public OrderVO getOrderById(Long id) {
|
||||
// 从token中获取公司ID
|
||||
@@ -244,6 +269,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderPO> implemen
|
||||
return convertToVO(order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入订单
|
||||
* @param batchImportOrderDTO 批量导入订单DTO
|
||||
* @return 批量导入结果VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public BatchImportResultVO batchImportOrders(BatchImportOrderDTO batchImportOrderDTO) {
|
||||
|
||||
+32
@@ -26,6 +26,11 @@ public class OrderStatusServiceImpl implements OrderStatusService {
|
||||
private final OrderStatusMapper orderStatusMapper;
|
||||
private final CurrentUserContext currentUserContext;
|
||||
|
||||
/**
|
||||
* 创建订单状态
|
||||
* @param dto 创建订单状态DTO
|
||||
* @return 订单状态ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createOrderStatus(CreateOrderStatusDTO dto) {
|
||||
@@ -47,6 +52,10 @@ public class OrderStatusServiceImpl implements OrderStatusService {
|
||||
return po.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新订单状态
|
||||
* @param dto 更新订单状态DTO
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateOrderStatus(UpdateOrderStatusDTO dto) {
|
||||
@@ -57,6 +66,10 @@ public class OrderStatusServiceImpl implements OrderStatusService {
|
||||
orderStatusMapper.updateById(po);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单状态
|
||||
* @param id 订单状态ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteOrderStatus(Long id) {
|
||||
@@ -64,6 +77,11 @@ public class OrderStatusServiceImpl implements OrderStatusService {
|
||||
orderStatusMapper.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询订单状态
|
||||
* @param id 订单状态ID
|
||||
* @return 订单状态VO
|
||||
*/
|
||||
@Override
|
||||
public OrderStatusVO getOrderStatusById(Long id) {
|
||||
OrderStatusPO po = orderStatusMapper.selectById(id);
|
||||
@@ -76,6 +94,10 @@ public class OrderStatusServiceImpl implements OrderStatusService {
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有启用的订单状态列表
|
||||
* @return 订单状态VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<OrderStatusVO> getActiveOrderStatusList() {
|
||||
LambdaQueryWrapper<OrderStatusPO> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -93,6 +115,10 @@ public class OrderStatusServiceImpl implements OrderStatusService {
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有订单状态列表
|
||||
* @return 订单状态VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<OrderStatusVO> getAllOrderStatusList() {
|
||||
LambdaQueryWrapper<OrderStatusPO> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -111,6 +137,7 @@ public class OrderStatusServiceImpl implements OrderStatusService {
|
||||
|
||||
/**
|
||||
* 初始化公司订单状态数据
|
||||
* @param companyId 公司ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -153,6 +180,11 @@ public class OrderStatusServiceImpl implements OrderStatusService {
|
||||
|
||||
/**
|
||||
* 创建订单状态PO对象
|
||||
* @param companyId 公司ID
|
||||
* @param statusName 状态名称
|
||||
* @param description 描述
|
||||
* @param sortOrder 排序
|
||||
* @return 订单状态PO对象
|
||||
*/
|
||||
private OrderStatusPO createOrderStatusPO(Long companyId, String statusName, String description, Integer sortOrder) {
|
||||
OrderStatusPO po = new OrderStatusPO();
|
||||
|
||||
+35
@@ -45,6 +45,11 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductPO> im
|
||||
this.productSpecService = productSpecService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建商品
|
||||
* @param createProductDTO 创建商品DTO
|
||||
* @return 商品VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProductVO createProduct(CreateProductDTO createProductDTO) {
|
||||
@@ -86,6 +91,12 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductPO> im
|
||||
return convertToVO(product);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品
|
||||
* @param updateProductDTO 更新商品DTO
|
||||
* @param id 商品ID
|
||||
* @return 商品VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProductVO updateProduct(UpdateProductDTO updateProductDTO, Long id) {
|
||||
@@ -133,6 +144,10 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductPO> im
|
||||
return convertToVO(product);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品
|
||||
* @param id 商品ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteProduct(Long id) {
|
||||
@@ -149,6 +164,11 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductPO> im
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<ProductVO> getProductPage(PageQueryDTO<ProductFilterDTO> pageQueryDTO) {
|
||||
// 从token中获取公司ID
|
||||
@@ -184,6 +204,11 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductPO> im
|
||||
return PageResultVO.create(voList, pageResult.getTotal(), pageQueryDTO.getPage(), pageQueryDTO.getPageSize());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建商品并创建商品规格
|
||||
* @param createProductWithSpecsDTO 创建商品并创建商品规格DTO
|
||||
* @return 商品VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProductVO createProductWithSpecs(CreateProductWithSpecsDTO createProductWithSpecsDTO) {
|
||||
@@ -258,6 +283,11 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductPO> im
|
||||
return productVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据名称查询商品
|
||||
* @param name 商品名称
|
||||
* @return 商品VO
|
||||
*/
|
||||
@Override
|
||||
public ProductVO getProductByName(String name) {
|
||||
// 从token中获取公司ID
|
||||
@@ -276,6 +306,11 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductPO> im
|
||||
return convertToVO(product);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据名称列表查询商品
|
||||
* @param names 商品名称列表
|
||||
* @return 商品VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<ProductVO> getProductsByNames(List<String> names) {
|
||||
if (names == null || names.isEmpty()) {
|
||||
|
||||
+34
-1
@@ -39,6 +39,11 @@ public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, Produ
|
||||
this.productService = productService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建商品规格
|
||||
* @param createProductSpecDTO 创建商品规格DTO
|
||||
* @return 商品规格VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProductSpecVO createProductSpec(CreateProductSpecDTO createProductSpecDTO) {
|
||||
@@ -75,6 +80,12 @@ public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, Produ
|
||||
return convertToVO(productSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品规格
|
||||
* @param updateProductSpecDTO 更新商品规格DTO
|
||||
* @param id 商品规格ID
|
||||
* @return 商品规格VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProductSpecVO updateProductSpec(UpdateProductSpecDTO updateProductSpecDTO, Long id) {
|
||||
@@ -114,6 +125,10 @@ public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, Produ
|
||||
return convertToVO(productSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品规格
|
||||
* @param id 商品规格ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteProductSpec(Long id) {
|
||||
@@ -130,6 +145,11 @@ public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, Produ
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品规格分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<ProductSpecVO> getProductSpecPage(PageQueryDTO<ProductSpecFilterDTO> pageQueryDTO) {
|
||||
// 从token中获取公司ID
|
||||
@@ -171,6 +191,12 @@ public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, Produ
|
||||
return PageResultVO.create(voList, pageResult.getTotal(), pageQueryDTO.getPage(), pageQueryDTO.getPageSize());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据商品名称和规格编码查询商品规格
|
||||
* @param productName 商品名称
|
||||
* @param specCode 规格编码
|
||||
* @return 商品规格VO
|
||||
*/
|
||||
@Override
|
||||
public ProductSpecVO getProductSpecByProductAndSpec(String productName, String specCode) {
|
||||
// 从token中获取公司ID
|
||||
@@ -200,6 +226,11 @@ public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, Produ
|
||||
return convertToVO(productSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据商品名称和规格编码列表查询商品规格
|
||||
* @param queries 商品规格查询DTO列表
|
||||
* @return 商品VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<ProductVO> getProductSpecsByProductAndSpecs(List<ProductSpecService.ProductSpecQueryDTO> queries) {
|
||||
if (queries == null || queries.isEmpty()) {
|
||||
@@ -289,7 +320,9 @@ public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, Produ
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为VO
|
||||
* 将PO转换为VO
|
||||
* @param productSpec 商品规格PO
|
||||
* @return 商品规格VO
|
||||
*/
|
||||
private ProductSpecVO convertToVO(ProductSpecPO productSpec) {
|
||||
ProductSpecVO productSpecVO = new ProductSpecVO();
|
||||
|
||||
+23
@@ -31,6 +31,11 @@ public class PromotionFeeServiceImpl implements PromotionFeeService {
|
||||
private final PromotionFeeMapper promotionFeeMapper;
|
||||
private final CurrentUserContext currentUserContext;
|
||||
|
||||
/**
|
||||
* 创建推广费记录
|
||||
* @param dto 创建推广费记录DTO
|
||||
* @return 推广费记录ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createPromotionFee(CreatePromotionFeeDTO dto) {
|
||||
@@ -44,6 +49,10 @@ public class PromotionFeeServiceImpl implements PromotionFeeService {
|
||||
return po.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新推广费记录
|
||||
* @param dto 更新推广费记录DTO
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updatePromotionFee(UpdatePromotionFeeDTO dto) {
|
||||
@@ -54,6 +63,10 @@ public class PromotionFeeServiceImpl implements PromotionFeeService {
|
||||
promotionFeeMapper.updateById(po);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除推广费记录
|
||||
* @param id 推广费记录ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deletePromotionFee(Long id) {
|
||||
@@ -61,6 +74,11 @@ public class PromotionFeeServiceImpl implements PromotionFeeService {
|
||||
promotionFeeMapper.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询推广费记录
|
||||
* @param id 推广费记录ID
|
||||
* @return 推广费记录VO
|
||||
*/
|
||||
@Override
|
||||
public PromotionFeeVO getPromotionFeeById(Long id) {
|
||||
PromotionFeePO po = promotionFeeMapper.selectById(id);
|
||||
@@ -71,6 +89,11 @@ public class PromotionFeeServiceImpl implements PromotionFeeService {
|
||||
return convertToVO(po);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取推广费记录分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<PromotionFeeVO> getPromotionFeePage(PageQueryDTO<PromotionFeeFilterDTO> pageQueryDTO) {
|
||||
// 从token中获取公司ID
|
||||
|
||||
+33
@@ -26,6 +26,11 @@ public class PromotionFeeTypeServiceImpl implements PromotionFeeTypeService {
|
||||
private final PromotionFeeTypeMapper promotionFeeTypeMapper;
|
||||
private final CurrentUserContext currentUserContext;
|
||||
|
||||
/**
|
||||
* 创建推广费类型
|
||||
* @param dto 创建推广费类型DTO
|
||||
* @return 推广费类型ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createPromotionFeeType(CreatePromotionFeeTypeDTO dto) {
|
||||
@@ -47,6 +52,10 @@ public class PromotionFeeTypeServiceImpl implements PromotionFeeTypeService {
|
||||
return po.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新推广费类型
|
||||
* @param dto 更新推广费类型DTO
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updatePromotionFeeType(UpdatePromotionFeeTypeDTO dto) {
|
||||
@@ -57,6 +66,10 @@ public class PromotionFeeTypeServiceImpl implements PromotionFeeTypeService {
|
||||
promotionFeeTypeMapper.updateById(po);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除推广费类型
|
||||
* @param id 推广费类型ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deletePromotionFeeType(Long id) {
|
||||
@@ -64,6 +77,11 @@ public class PromotionFeeTypeServiceImpl implements PromotionFeeTypeService {
|
||||
promotionFeeTypeMapper.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询推广费类型
|
||||
* @param id 推广费类型ID
|
||||
* @return 推广费类型VO
|
||||
*/
|
||||
@Override
|
||||
public PromotionFeeTypeVO getPromotionFeeTypeById(Long id) {
|
||||
PromotionFeeTypePO po = promotionFeeTypeMapper.selectById(id);
|
||||
@@ -98,6 +116,10 @@ public class PromotionFeeTypeServiceImpl implements PromotionFeeTypeService {
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有启用的推广费类型列表
|
||||
* @return 推广费类型VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<PromotionFeeTypeVO> getActivePromotionFeeTypeList() {
|
||||
LambdaQueryWrapper<PromotionFeeTypePO> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -137,6 +159,10 @@ public class PromotionFeeTypeServiceImpl implements PromotionFeeTypeService {
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有推广费类型列表
|
||||
* @return 推广费类型VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<PromotionFeeTypeVO> getAllPromotionFeeTypeList() {
|
||||
LambdaQueryWrapper<PromotionFeeTypePO> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -177,6 +203,7 @@ public class PromotionFeeTypeServiceImpl implements PromotionFeeTypeService {
|
||||
|
||||
/**
|
||||
* 初始化公司推广费类型数据
|
||||
* @param companyId 公司ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -221,6 +248,12 @@ public class PromotionFeeTypeServiceImpl implements PromotionFeeTypeService {
|
||||
|
||||
/**
|
||||
* 创建推广费类型PO对象
|
||||
* @param companyId 公司ID
|
||||
* @param typeName 类型名称
|
||||
* @param description 描述
|
||||
* @param calculationMethod 计算方式
|
||||
* @param sortOrder 排序
|
||||
* @return 推广费类型PO对象
|
||||
*/
|
||||
private PromotionFeeTypePO createPromotionFeeTypePO(Long companyId, String typeName, String description, Integer calculationMethod, Integer sortOrder) {
|
||||
PromotionFeeTypePO po = new PromotionFeeTypePO();
|
||||
|
||||
+35
@@ -39,6 +39,11 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
|
||||
this.mediaImageService = mediaImageService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建店铺
|
||||
* @param createShopDTO 创建店铺DTO
|
||||
* @return 店铺VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ShopVO createShop(CreateShopDTO createShopDTO) {
|
||||
@@ -79,6 +84,12 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
|
||||
return convertToVO(shop);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新店铺
|
||||
* @param updateShopDTO 更新店铺DTO
|
||||
* @param id 店铺ID
|
||||
* @return 店铺VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ShopVO updateShop(UpdateShopDTO updateShopDTO, Long id) {
|
||||
@@ -125,6 +136,10 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
|
||||
return convertToVO(shop);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店铺
|
||||
* @param id 店铺ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteShop(Long id) {
|
||||
@@ -141,6 +156,11 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<ShopVO> getShopPage(PageQueryDTO<ShopFilterDTO> pageQueryDTO) {
|
||||
// 从token中获取公司ID
|
||||
@@ -179,12 +199,22 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
|
||||
return PageResultVO.create(voList, pageResult.getTotal(), pageQueryDTO.getPage(), pageQueryDTO.getPageSize());
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传Logo
|
||||
* @param file 文件
|
||||
* @return Logo图片VO
|
||||
*/
|
||||
@Override
|
||||
public MediaImageVO uploadLogo(MultipartFile file) {
|
||||
// 上传Logo到媒体模块(支持哈希校验和跨公司共享)
|
||||
return mediaImageService.uploadImageWithType(file, "logo");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据名称获取店铺
|
||||
* @param name 店铺名称
|
||||
* @return 店铺VO
|
||||
*/
|
||||
@Override
|
||||
public ShopVO getShopByName(String name) {
|
||||
// 从token中获取公司ID
|
||||
@@ -203,6 +233,11 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
|
||||
return convertToVO(shop);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据名称列表获取店铺列表
|
||||
* @param names 店铺名称列表
|
||||
* @return 店铺VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<ShopVO> getShopsByNames(List<String> names) {
|
||||
if (names == null || names.isEmpty()) {
|
||||
|
||||
+35
@@ -38,6 +38,11 @@ public class MediaFileServiceImpl extends ServiceImpl<MediaFileMapper, MediaFile
|
||||
this.currentUserContext = currentUserContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @param file 文件
|
||||
* @return 文件VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public MediaFileVO uploadFile(MultipartFile file) {
|
||||
@@ -93,6 +98,11 @@ public class MediaFileServiceImpl extends ServiceImpl<MediaFileMapper, MediaFile
|
||||
return convertToVO(mediaFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量上传文件
|
||||
* @param files 文件列表
|
||||
* @return 文件VO列表
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public List<MediaFileVO> batchUploadFiles(List<MultipartFile> files) {
|
||||
@@ -109,6 +119,12 @@ public class MediaFileServiceImpl extends ServiceImpl<MediaFileMapper, MediaFile
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新文件
|
||||
* @param id 文件ID
|
||||
* @param updateFileDTO 更新文件DTO
|
||||
* @return 文件VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public MediaFileVO updateFile(Long id, UpdateFileDTO updateFileDTO) {
|
||||
@@ -141,6 +157,10 @@ public class MediaFileServiceImpl extends ServiceImpl<MediaFileMapper, MediaFile
|
||||
return convertToVO(updatedFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文件
|
||||
* @param id 文件ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteFile(Long id) {
|
||||
// 从token中获取公司ID
|
||||
@@ -164,6 +184,11 @@ public class MediaFileServiceImpl extends ServiceImpl<MediaFileMapper, MediaFile
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件哈希获取文件
|
||||
* @param fileHash 文件哈希
|
||||
* @return 文件VO
|
||||
*/
|
||||
@Override
|
||||
public MediaFileVO getFileByHash(String fileHash) {
|
||||
MediaFilePO mediaFile = baseMapper.selectByFileHash(fileHash);
|
||||
@@ -180,6 +205,11 @@ public class MediaFileServiceImpl extends ServiceImpl<MediaFileMapper, MediaFile
|
||||
return convertToVO(mediaFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件哈希列表获取文件
|
||||
* @param fileHashes 文件哈希列表
|
||||
* @return 文件VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<MediaFileVO> getFilesByHashes(List<String> fileHashes) {
|
||||
if (fileHashes == null || fileHashes.isEmpty()) {
|
||||
@@ -197,6 +227,11 @@ public class MediaFileServiceImpl extends ServiceImpl<MediaFileMapper, MediaFile
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<MediaFileVO> getFilePage(PageQueryDTO<MediaFileFilterDTO> pageQueryDTO) {
|
||||
// 从token中获取公司ID
|
||||
|
||||
+52
@@ -38,6 +38,11 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
this.currentUserContext = currentUserContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
* @param file 图片文件
|
||||
* @return 图片VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public MediaImageVO uploadImage(MultipartFile file) {
|
||||
@@ -97,6 +102,11 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
return convertToVO(mediaImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量上传图片
|
||||
* @param files 图片文件列表
|
||||
* @return 图片VO列表
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public List<MediaImageVO> batchUploadImages(List<MultipartFile> files) {
|
||||
@@ -113,6 +123,12 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新图片
|
||||
* @param id 图片ID
|
||||
* @param updateImageDTO 更新图片DTO
|
||||
* @return 图片VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public MediaImageVO updateImage(Long id, UpdateImageDTO updateImageDTO) {
|
||||
@@ -145,6 +161,11 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
return convertToVO(updatedImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询图片
|
||||
* @param id 图片ID
|
||||
* @return 图片VO
|
||||
*/
|
||||
@Override
|
||||
public MediaImageVO getImageById(Long id) {
|
||||
MediaImagePO mediaImage = this.getById(id);
|
||||
@@ -154,6 +175,10 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
return convertToVO(mediaImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除图片
|
||||
* @param id 图片ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteImage(Long id) {
|
||||
// 从token中获取公司ID
|
||||
@@ -177,6 +202,11 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件哈希查询图片
|
||||
* @param fileHash 文件哈希
|
||||
* @return 图片VO
|
||||
*/
|
||||
@Override
|
||||
public MediaImageVO getImageByHash(String fileHash) {
|
||||
MediaImagePO mediaImage = baseMapper.selectByFileHash(fileHash);
|
||||
@@ -193,6 +223,11 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
return convertToVO(mediaImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件哈希列表查询图片
|
||||
* @param fileHashes 文件哈希列表
|
||||
* @return 图片VO列表
|
||||
*/
|
||||
@Override
|
||||
public List<MediaImageVO> getImagesByHashes(List<String> fileHashes) {
|
||||
if (fileHashes == null || fileHashes.isEmpty()) {
|
||||
@@ -210,6 +245,11 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图片分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<MediaImageVO> getImagePage(PageQueryDTO<MediaImageFilterDTO> pageQueryDTO) {
|
||||
// 从token中获取公司ID
|
||||
@@ -255,6 +295,12 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
return PageResultVO.create(voList, pageResult.getTotal(), pageQueryDTO.getPage(), pageQueryDTO.getPageSize());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件哈希和分类查询图片
|
||||
* @param fileHash 文件哈希
|
||||
* @param type 分类
|
||||
* @return 图片VO
|
||||
*/
|
||||
@Override
|
||||
public MediaImageVO getImageByHashAndType(String fileHash, String type) {
|
||||
if (fileHash == null || fileHash.trim().isEmpty()) {
|
||||
@@ -272,6 +318,12 @@ public class MediaImageServiceImpl extends ServiceImpl<MediaImageMapper, MediaIm
|
||||
return mediaImage != null ? convertToVO(mediaImage) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传指定分类的图片
|
||||
* @param file 图片文件
|
||||
* @param category 分类
|
||||
* @return 图片VO
|
||||
*/
|
||||
@Override
|
||||
public MediaImageVO uploadImageWithType(MultipartFile file, String category) {
|
||||
// 从token中获取公司ID
|
||||
|
||||
+26
@@ -34,6 +34,11 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, PositionPO>
|
||||
this.currentUserContext = currentUserContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建岗位
|
||||
* @param createPositionDTO 创建岗位DTO
|
||||
* @return 岗位VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public PositionVO createPosition(CreatePositionDTO createPositionDTO) {
|
||||
@@ -70,6 +75,12 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, PositionPO>
|
||||
return convertToVO(position);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新岗位
|
||||
* @param updatePositionDTO 更新岗位DTO
|
||||
* @param id 岗位ID
|
||||
* @return 岗位VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public PositionVO updatePosition(UpdatePositionDTO updatePositionDTO, Long id) {
|
||||
@@ -112,6 +123,10 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, PositionPO>
|
||||
return convertToVO(position);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除岗位
|
||||
* @param id 岗位ID
|
||||
*/
|
||||
@Override
|
||||
public void deletePosition(Long id) {
|
||||
// 从token中获取公司ID
|
||||
@@ -132,6 +147,11 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, PositionPO>
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<PositionVO> getPositionPage(PageQueryDTO<PositionFilterDTO> pageQueryDTO) {
|
||||
// 从token中获取公司ID
|
||||
@@ -170,6 +190,12 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, PositionPO>
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 为指定公司创建岗位
|
||||
* @param createPositionDTO 创建岗位DTO
|
||||
* @param companyId 公司ID
|
||||
* @return 岗位VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public PositionVO createPositionForCompany(CreatePositionDTO createPositionDTO, Long companyId) {
|
||||
|
||||
+25
@@ -39,6 +39,11 @@ public class SuperAccountServiceImpl extends ServiceImpl<UserMapper, UserPO> imp
|
||||
this.currentUserContext = currentUserContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建账户(超管接口)
|
||||
* @param superCreateAccountDTO 创建账户DTO
|
||||
* @return 账户VO
|
||||
*/
|
||||
@Override
|
||||
public AccountVO createAccount(SuperCreateAccountDTO superCreateAccountDTO) {
|
||||
// 验证登录账号是否已存在
|
||||
@@ -75,6 +80,12 @@ public class SuperAccountServiceImpl extends ServiceImpl<UserMapper, UserPO> imp
|
||||
return convertToVO(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新账户信息(超管接口)
|
||||
* @param superUpdateAccountDTO 更新账户DTO
|
||||
* @param accountId 账户ID
|
||||
* @return 账户VO
|
||||
*/
|
||||
@Override
|
||||
public AccountVO updateAccount(SuperUpdateAccountDTO superUpdateAccountDTO, Long accountId) {
|
||||
// 查询账户
|
||||
@@ -146,6 +157,10 @@ public class SuperAccountServiceImpl extends ServiceImpl<UserMapper, UserPO> imp
|
||||
return convertToVO(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除账户(逻辑删除)
|
||||
* @param accountId 账户ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteAccount(Long accountId) {
|
||||
// 查询账户
|
||||
@@ -160,6 +175,11 @@ public class SuperAccountServiceImpl extends ServiceImpl<UserMapper, UserPO> imp
|
||||
this.updateById(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取账户详情
|
||||
* @param accountId 账户ID
|
||||
* @return 账户详情
|
||||
*/
|
||||
@Override
|
||||
public AccountVO getAccountDetail(Long accountId) {
|
||||
// 查询账户
|
||||
@@ -172,6 +192,11 @@ public class SuperAccountServiceImpl extends ServiceImpl<UserMapper, UserPO> imp
|
||||
return convertToVO(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询账户(超管接口)
|
||||
* @param pageQuery 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<AccountVO> getAccountPage(PageQueryDTO<AccountFilterDTO> pageQuery) {
|
||||
// 构建查询条件
|
||||
|
||||
+20
@@ -36,6 +36,11 @@ public class PlanPricingServiceImpl extends ServiceImpl<PlanPricingMapper, PlanP
|
||||
this.planService = planService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建定价
|
||||
* @param createPlanPricingDTO 创建定价DTO
|
||||
* @return 定价VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public PlanPricingVO createPlanPricing(CreatePlanPricingDTO createPlanPricingDTO) {
|
||||
@@ -71,6 +76,12 @@ public class PlanPricingServiceImpl extends ServiceImpl<PlanPricingMapper, PlanP
|
||||
return convertToVO(planPricing);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新定价
|
||||
* @param updatePlanPricingDTO 更新定价DTO
|
||||
* @param id 定价ID
|
||||
* @return 定价VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public PlanPricingVO updatePlanPricing(UpdatePlanPricingDTO updatePlanPricingDTO, Long id) {
|
||||
@@ -108,6 +119,10 @@ public class PlanPricingServiceImpl extends ServiceImpl<PlanPricingMapper, PlanP
|
||||
return convertToVO(planPricing);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除定价
|
||||
* @param id 定价ID
|
||||
*/
|
||||
@Override
|
||||
public void deletePlanPricing(Long id) {
|
||||
// 检查定价是否存在
|
||||
@@ -120,6 +135,11 @@ public class PlanPricingServiceImpl extends ServiceImpl<PlanPricingMapper, PlanP
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取定价列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<PlanPricingListVO> getPlanPricingPage(PageQueryDTO<PlanPricingFilterDTO> pageQueryDTO) {
|
||||
// 构建查询条件
|
||||
|
||||
+20
@@ -29,6 +29,11 @@ import java.util.List;
|
||||
@Service
|
||||
public class PlanServiceImpl extends ServiceImpl<PlanMapper, PlanPO> implements PlanService {
|
||||
|
||||
/**
|
||||
* 创建套餐
|
||||
* @param createPlanDTO 创建套餐DTO
|
||||
* @return 套餐VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public PlanVO createPlan(CreatePlanDTO createPlanDTO) {
|
||||
@@ -64,6 +69,12 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, PlanPO> implements
|
||||
return convertToVO(plan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新套餐
|
||||
* @param updatePlanDTO 更新套餐DTO
|
||||
* @param planId 套餐ID
|
||||
* @return 套餐VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public PlanVO updatePlan(UpdatePlanDTO updatePlanDTO, Long planId) {
|
||||
@@ -101,6 +112,10 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, PlanPO> implements
|
||||
return convertToVO(plan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除套餐
|
||||
* @param id 套餐ID
|
||||
*/
|
||||
@Override
|
||||
public void deletePlan(Long id) {
|
||||
// 检查套餐是否存在
|
||||
@@ -113,6 +128,11 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, PlanPO> implements
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取套餐分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<PlanListVO> getPlanPage(PageQueryDTO<PlanFilterDTO> pageQueryDTO) {
|
||||
// 构建查询条件
|
||||
|
||||
+20
@@ -37,6 +37,11 @@ public class SubscriptionServiceImpl extends ServiceImpl<SubscriptionMapper, Sub
|
||||
this.planService = planService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建订阅
|
||||
* @param createSubscriptionDTO 创建订阅DTO
|
||||
* @return 订阅VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public SubscriptionVO createSubscription(CreateSubscriptionDTO createSubscriptionDTO) {
|
||||
@@ -75,6 +80,12 @@ public class SubscriptionServiceImpl extends ServiceImpl<SubscriptionMapper, Sub
|
||||
return convertToVO(subscription);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新订阅
|
||||
* @param updateSubscriptionDTO 更新订阅DTO
|
||||
* @param id 订阅ID
|
||||
* @return 订阅VO
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public SubscriptionVO updateSubscription(UpdateSubscriptionDTO updateSubscriptionDTO, Long id) {
|
||||
@@ -108,6 +119,10 @@ public class SubscriptionServiceImpl extends ServiceImpl<SubscriptionMapper, Sub
|
||||
return convertToVO(subscription);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订阅
|
||||
* @param id 订阅ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteSubscription(Long id) {
|
||||
// 检查订阅是否存在
|
||||
@@ -120,6 +135,11 @@ public class SubscriptionServiceImpl extends ServiceImpl<SubscriptionMapper, Sub
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订阅分页列表
|
||||
* @param pageQueryDTO 分页查询DTO
|
||||
* @return 分页结果VO
|
||||
*/
|
||||
@Override
|
||||
public PageResultVO<SubscriptionListVO> getSubscriptionPage(PageQueryDTO<SubscriptionFilterDTO> pageQueryDTO) {
|
||||
// 构建查询条件
|
||||
|
||||
Reference in New Issue
Block a user