1. 旅游团、新闻、景点信息等功能模块访问接口路径拆分
2. 支付回调改造成 endpoint
This commit is contained in:
@@ -59,6 +59,7 @@ public class AccelUpgradeCashProcessor implements BasicProcessor {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public ProcessResult process(TaskContext taskContext) throws Exception {
|
public ProcessResult process(TaskContext taskContext) throws Exception {
|
||||||
|
log.info("工作流-->开始执行现金分红任务");
|
||||||
|
|
||||||
Date startDate = DateUtil.getYesterday();
|
Date startDate = DateUtil.getYesterday();
|
||||||
Date endDate = DateUtil.getToday();
|
Date endDate = DateUtil.getToday();
|
||||||
@@ -72,7 +73,6 @@ public class AccelUpgradeCashProcessor implements BasicProcessor {
|
|||||||
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
||||||
.select(CommonUserOrderEntity::getUserId)
|
.select(CommonUserOrderEntity::getUserId)
|
||||||
.eq(CommonUserOrderEntity::getOrderType, BusinessModule.SELF_OPERATED_MALL.getCode())
|
.eq(CommonUserOrderEntity::getOrderType, BusinessModule.SELF_OPERATED_MALL.getCode())
|
||||||
.eq(CommonUserOrderEntity::getPaymentType, 1)
|
|
||||||
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
||||||
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public class AccelUpgradeWelfareProcessor implements BasicProcessor {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public ProcessResult process(TaskContext taskContext) throws Exception {
|
public ProcessResult process(TaskContext taskContext) throws Exception {
|
||||||
|
log.info("工作流-->开始执行福利积分加速任务");
|
||||||
// 1. 初始化配置
|
// 1. 初始化配置
|
||||||
Date searchDate = DateUtil.getYesterday();
|
Date searchDate = DateUtil.getYesterday();
|
||||||
Date startDate = DateUtil.getYesterday();
|
Date startDate = DateUtil.getYesterday();
|
||||||
@@ -80,7 +81,6 @@ public class AccelUpgradeWelfareProcessor implements BasicProcessor {
|
|||||||
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
||||||
.select(CommonUserOrderEntity::getUserId)
|
.select(CommonUserOrderEntity::getUserId)
|
||||||
.eq(CommonUserOrderEntity::getOrderType, BusinessModule.SELF_OPERATED_MALL.getCode())
|
.eq(CommonUserOrderEntity::getOrderType, BusinessModule.SELF_OPERATED_MALL.getCode())
|
||||||
.eq(CommonUserOrderEntity::getPaymentType, 1)
|
|
||||||
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
||||||
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -54,19 +54,6 @@ public class InitUserPerformanceProcessor implements BasicProcessor {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
log.info("初始化用户业绩成功 , 用户数量: {}" , marketInfoEntityList.size());
|
log.info("初始化用户业绩成功 , 用户数量: {}" , marketInfoEntityList.size());
|
||||||
welfarePerformanceService.update(
|
|
||||||
Wrappers.lambdaUpdate(MarketWelfarePerformanceEntity.class)
|
|
||||||
.set(MarketWelfarePerformanceEntity::getTotalAmount, BigDecimal.ZERO)
|
|
||||||
.set(MarketWelfarePerformanceEntity::getOwenAmount, BigDecimal.ZERO)
|
|
||||||
.set(MarketWelfarePerformanceEntity::getVersion, 1)
|
|
||||||
.eq(MarketWelfarePerformanceEntity::getIsDeleted, 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
welfarePerformanceLogService.remove(
|
|
||||||
Wrappers.lambdaUpdate(MarketWelfarePerformanceLogEntity.class)
|
|
||||||
.eq(MarketWelfarePerformanceLogEntity::getIsDeleted, 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
return new ProcessResult(true, "result is success");
|
return new ProcessResult(true, "result is success");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public class StatsCalculatorCashProcessor implements BasicProcessor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProcessResult process(TaskContext taskContext) throws Exception {
|
public ProcessResult process(TaskContext taskContext) throws Exception {
|
||||||
|
log.info("工作流-->开始执行现金动态业绩每日计算");
|
||||||
|
|
||||||
Date startDate = DateUtil.getYesterday();
|
Date startDate = DateUtil.getYesterday();
|
||||||
Date endDate = DateUtil.getToday();
|
Date endDate = DateUtil.getToday();
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class StatsCalculatorWelfareProcessor implements BasicProcessor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProcessResult process(TaskContext taskContext) throws Exception {
|
public ProcessResult process(TaskContext taskContext) throws Exception {
|
||||||
|
log.info("工作流-->开始执行福利包动态业绩每日计算");
|
||||||
|
|
||||||
Date searchDate = DateUtil.getYesterday();
|
Date searchDate = DateUtil.getYesterday();
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class TallyCashUpgradeProcessor implements BasicProcessor {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public ProcessResult process(TaskContext taskContext) throws Exception {
|
public ProcessResult process(TaskContext taskContext) throws Exception {
|
||||||
|
log.info("工作流-->开始执行现金动态升级任务");
|
||||||
|
|
||||||
Date startDate = DateUtil.getYesterday();
|
Date startDate = DateUtil.getYesterday();
|
||||||
Date endDate = DateUtil.getToday();
|
Date endDate = DateUtil.getToday();
|
||||||
@@ -81,7 +82,6 @@ public class TallyCashUpgradeProcessor implements BasicProcessor {
|
|||||||
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
||||||
.select(CommonUserOrderEntity::getUserId)
|
.select(CommonUserOrderEntity::getUserId)
|
||||||
.eq(CommonUserOrderEntity::getOrderType, BusinessModule.SELF_OPERATED_MALL.getCode())
|
.eq(CommonUserOrderEntity::getOrderType, BusinessModule.SELF_OPERATED_MALL.getCode())
|
||||||
.eq(CommonUserOrderEntity::getPaymentType, 1)
|
|
||||||
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
||||||
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public class TallyWelfareUpgradeProcessor implements BasicProcessor {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public ProcessResult process(TaskContext taskContext) throws Exception {
|
public ProcessResult process(TaskContext taskContext) throws Exception {
|
||||||
|
log.info("工作流-->开始执行福利包动态升级");
|
||||||
|
|
||||||
Date startDate = DateUtil.getYesterday();
|
Date startDate = DateUtil.getYesterday();
|
||||||
Date endDate = DateUtil.getToday();
|
Date endDate = DateUtil.getToday();
|
||||||
@@ -80,7 +81,6 @@ public class TallyWelfareUpgradeProcessor implements BasicProcessor {
|
|||||||
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
||||||
.select(CommonUserOrderEntity::getUserId)
|
.select(CommonUserOrderEntity::getUserId)
|
||||||
.eq(CommonUserOrderEntity::getOrderType, BusinessModule.SELF_OPERATED_MALL.getCode())
|
.eq(CommonUserOrderEntity::getOrderType, BusinessModule.SELF_OPERATED_MALL.getCode())
|
||||||
.eq(CommonUserOrderEntity::getPaymentType, 1)
|
|
||||||
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
||||||
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package org.springblade.modules.api.app;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
import io.swagger.v3.oas.annotations.Hidden;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -11,8 +10,8 @@ import org.springblade.core.tool.api.R;
|
|||||||
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
||||||
import org.springblade.modules.common.service.INewsCategoryService;
|
import org.springblade.modules.news.service.INewsCategoryService;
|
||||||
import org.springblade.modules.common.service.INewsContentService;
|
import org.springblade.modules.news.service.INewsContentService;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
package org.springblade.modules.api.app;
|
package org.springblade.modules.api.app;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
import io.swagger.v3.oas.annotations.Hidden;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -11,13 +9,11 @@ import org.springblade.core.tool.api.R;
|
|||||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
import org.springblade.modules.api.request.MerchantStoreRequest;
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
||||||
import org.springblade.modules.common.service.IMerchantFlagshipStoreService;
|
import org.springblade.modules.merchantStore.service.IMerchantFlagshipStoreService;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/app/store")
|
@RequestMapping("/app/store")
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package org.springblade.modules.api.app;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
import io.swagger.v3.oas.annotations.Hidden;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
@@ -12,13 +11,10 @@ import org.springblade.core.tool.api.R;
|
|||||||
import org.springblade.modules.api.request.*;
|
import org.springblade.modules.api.request.*;
|
||||||
import org.springblade.modules.api.response.CreateOrderResponse;
|
import org.springblade.modules.api.response.CreateOrderResponse;
|
||||||
import org.springblade.modules.api.vo.*;
|
import org.springblade.modules.api.vo.*;
|
||||||
import org.springblade.modules.common.service.ICommonTourInfoService;
|
|
||||||
import org.springblade.modules.common.service.ICommonUserOrderService;
|
import org.springblade.modules.common.service.ICommonUserOrderService;
|
||||||
import org.springblade.modules.common.service.ITourProductService;
|
import org.springblade.modules.tour.service.ITourProductService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/app/tour")
|
@RequestMapping("/app/tour")
|
||||||
|
|||||||
@@ -2,14 +2,13 @@ package org.springblade.modules.api.app;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
import io.swagger.v3.oas.annotations.Hidden;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
||||||
import org.springblade.modules.common.service.ICulturalTourismSpotService;
|
import org.springblade.modules.tourismSpot.service.ICulturalTourismSpotService;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.springblade.modules.api.vo;
|
package org.springblade.modules.api.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import org.springblade.modules.common.pojo.entity.*;
|
|||||||
import org.springblade.modules.common.pojo.vo.AppCommonRegionsInfoVO;
|
import org.springblade.modules.common.pojo.vo.AppCommonRegionsInfoVO;
|
||||||
import org.springblade.modules.common.pojo.vo.CommonUserOrderVO;
|
import org.springblade.modules.common.pojo.vo.CommonUserOrderVO;
|
||||||
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
||||||
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,7 @@ package org.springblade.modules.common.convert;
|
|||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
import org.springblade.modules.api.vo.CommonTourInfoApiVO;
|
import org.springblade.modules.api.vo.CommonTourInfoApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonTourProductApiVO;
|
|
||||||
import org.springblade.modules.api.vo.CommonTourProductDetailApiVO;
|
|
||||||
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@@ -25,11 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.vo;
|
package org.springblade.modules.common.pojo.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springblade.common.handler.PgJsonbTypeHandler;
|
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ import org.springblade.modules.mall.service.IMallProductService;
|
|||||||
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
|
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
|
||||||
import org.springblade.modules.market.service.IMarketInfoService;
|
import org.springblade.modules.market.service.IMarketInfoService;
|
||||||
import org.springblade.modules.market.service.IMarketUserCommissionService;
|
import org.springblade.modules.market.service.IMarketUserCommissionService;
|
||||||
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
|
import org.springblade.modules.tour.service.ITourOrderDetailService;
|
||||||
|
import org.springblade.modules.tour.service.ITourProductService;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
@@ -69,7 +73,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户订单 服务实现类
|
* 用户订单 服务实现类
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.controller;
|
package org.springblade.modules.merchantStore.controller;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -16,10 +16,10 @@ import org.springblade.core.tool.utils.Func;
|
|||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
import org.springblade.modules.merchantStore.pojo.entity.MerchantFlagshipStoreEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
import org.springblade.modules.merchantStore.pojo.vo.MerchantFlagshipStoreVO;
|
||||||
import org.springblade.modules.common.wrapper.MerchantFlagshipStoreWrapper;
|
import org.springblade.modules.merchantStore.wrapper.MerchantFlagshipStoreWrapper;
|
||||||
import org.springblade.modules.common.service.IMerchantFlagshipStoreService;
|
import org.springblade.modules.merchantStore.service.IMerchantFlagshipStoreService;
|
||||||
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("common/merchant-store")
|
@RequestMapping("merchant-store")
|
||||||
@Tag(name = "商家旗舰店信息", description = "商家旗舰店信息接口")
|
@Tag(name = "商家旗舰店信息", description = "商家旗舰店信息接口")
|
||||||
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
||||||
public class MerchantFlagshipStoreController extends BladeController {
|
public class MerchantFlagshipStoreController extends BladeController {
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package org.springblade.modules.common.mapper;
|
package org.springblade.modules.merchantStore.mapper;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
import org.springblade.modules.api.request.MerchantStoreRequest;
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
||||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
import org.springblade.modules.merchantStore.pojo.entity.MerchantFlagshipStoreEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
import org.springblade.modules.merchantStore.pojo.vo.MerchantFlagshipStoreVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.springblade.modules.common.mapper.MerchantFlagshipStoreMapper">
|
<mapper namespace="org.springblade.modules.merchantStore.mapper.MerchantFlagshipStoreMapper">
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="merchantFlagshipStoreResultMap" type="org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity">
|
<resultMap id="merchantFlagshipStoreResultMap" type="org.springblade.modules.merchantStore.pojo.entity.MerchantFlagshipStoreEntity">
|
||||||
<result column="id" property="id"/>
|
<result column="id" property="id"/>
|
||||||
<result column="store_name" property="storeName"/>
|
<result column="store_name" property="storeName"/>
|
||||||
<result column="contact_phone" property="contactPhone"/>
|
<result column="contact_phone" property="contactPhone"/>
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.dto;
|
package org.springblade.modules.merchantStore.pojo.dto;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
import org.springblade.modules.merchantStore.pojo.entity.MerchantFlagshipStoreEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.pojo.entity;
|
package org.springblade.modules.merchantStore.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package org.springblade.modules.common.pojo.vo;
|
package org.springblade.modules.merchantStore.pojo.vo;
|
||||||
|
|
||||||
|
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
import org.springblade.modules.merchantStore.pojo.entity.MerchantFlagshipStoreEntity;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,18 +1,15 @@
|
|||||||
package org.springblade.modules.common.service;
|
package org.springblade.modules.merchantStore.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
import org.springblade.modules.api.request.MerchantStoreRequest;
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
||||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
import org.springblade.modules.merchantStore.pojo.entity.MerchantFlagshipStoreEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
import org.springblade.modules.merchantStore.pojo.vo.MerchantFlagshipStoreVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseService;
|
import org.springblade.core.mp.base.BaseService;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商家旗舰店信息 服务类
|
* 商家旗舰店信息 服务类
|
||||||
*
|
*
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.service.impl;
|
package org.springblade.modules.merchantStore.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
@@ -11,11 +11,11 @@ import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
|||||||
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
||||||
import org.springblade.modules.common.pojo.dto.LocationDTO;
|
import org.springblade.modules.common.pojo.dto.LocationDTO;
|
||||||
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
||||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
import org.springblade.modules.merchantStore.pojo.entity.MerchantFlagshipStoreEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
import org.springblade.modules.merchantStore.pojo.vo.MerchantFlagshipStoreVO;
|
||||||
import org.springblade.modules.common.mapper.MerchantFlagshipStoreMapper;
|
import org.springblade.modules.merchantStore.mapper.MerchantFlagshipStoreMapper;
|
||||||
import org.springblade.modules.common.service.ICommonRegionsInfoService;
|
import org.springblade.modules.common.service.ICommonRegionsInfoService;
|
||||||
import org.springblade.modules.common.service.IMerchantFlagshipStoreService;
|
import org.springblade.modules.merchantStore.service.IMerchantFlagshipStoreService;
|
||||||
import org.springblade.modules.common.service.TianDiTuMapService;
|
import org.springblade.modules.common.service.TianDiTuMapService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -23,12 +23,12 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.wrapper;
|
package org.springblade.modules.merchantStore.wrapper;
|
||||||
|
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
import org.springblade.modules.merchantStore.pojo.entity.MerchantFlagshipStoreEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
import org.springblade.modules.merchantStore.pojo.vo.MerchantFlagshipStoreVO;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.controller;
|
package org.springblade.modules.news.controller;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -14,10 +14,10 @@ import org.springblade.core.tool.api.R;
|
|||||||
import org.springblade.core.tool.utils.Func;
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
import org.springblade.modules.news.pojo.entity.NewsCategoryEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsCategoryVO;
|
import org.springblade.modules.news.pojo.vo.NewsCategoryVO;
|
||||||
import org.springblade.modules.common.wrapper.NewsCategoryWrapper;
|
import org.springblade.modules.news.wrapper.NewsCategoryWrapper;
|
||||||
import org.springblade.modules.common.service.INewsCategoryService;
|
import org.springblade.modules.news.service.INewsCategoryService;
|
||||||
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -32,7 +32,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("common/news-category")
|
@RequestMapping("news/category")
|
||||||
@Tag(name = "资讯分类", description = "资讯分类接口")
|
@Tag(name = "资讯分类", description = "资讯分类接口")
|
||||||
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
||||||
public class NewsCategoryController extends BladeController {
|
public class NewsCategoryController extends BladeController {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.controller;
|
package org.springblade.modules.news.controller;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -14,10 +14,10 @@ import org.springblade.core.tool.api.R;
|
|||||||
import org.springblade.core.tool.utils.Func;
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
import org.springblade.modules.news.pojo.entity.NewsContentEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsContentVO;
|
import org.springblade.modules.news.pojo.vo.NewsContentVO;
|
||||||
import org.springblade.modules.common.wrapper.NewsContentWrapper;
|
import org.springblade.modules.news.wrapper.NewsContentWrapper;
|
||||||
import org.springblade.modules.common.service.INewsContentService;
|
import org.springblade.modules.news.service.INewsContentService;
|
||||||
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -31,7 +31,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("common/news-content")
|
@RequestMapping("news/content")
|
||||||
@Tag(name = "资讯内容", description = "资讯内容接口")
|
@Tag(name = "资讯内容", description = "资讯内容接口")
|
||||||
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
||||||
public class NewsContentController extends BladeController {
|
public class NewsContentController extends BladeController {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.convert;
|
package org.springblade.modules.news.convert;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
@@ -6,15 +6,15 @@ import org.mapstruct.factory.Mappers;
|
|||||||
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
import org.springblade.modules.news.pojo.entity.NewsCategoryEntity;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
import org.springblade.modules.news.pojo.entity.NewsContentEntity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CommonNewsContentConvert {
|
public interface NewsContentConvert {
|
||||||
|
|
||||||
CommonNewsContentConvert INSTANCE = Mappers.getMapper(CommonNewsContentConvert.class);
|
NewsContentConvert INSTANCE = Mappers.getMapper(NewsContentConvert.class);
|
||||||
|
|
||||||
|
|
||||||
List<CommonNewsCategoryApiVO> convertNewsCategoryApiVO(List<NewsCategoryEntity> categoryList);
|
List<CommonNewsCategoryApiVO> convertNewsCategoryApiVO(List<NewsCategoryEntity> categoryList);
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
package org.springblade.modules.common.mapper;
|
package org.springblade.modules.news.mapper;
|
||||||
|
|
||||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
import org.springblade.modules.news.pojo.entity.NewsCategoryEntity;
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
import org.springblade.modules.news.pojo.vo.NewsCategoryVO;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
|
||||||
import org.springblade.modules.common.pojo.vo.NewsCategoryVO;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.springblade.modules.common.mapper.NewsCategoryMapper">
|
<mapper namespace="org.springblade.modules.news.mapper.NewsCategoryMapper">
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="newsCategoryResultMap" type="org.springblade.modules.common.pojo.entity.NewsCategoryEntity">
|
<resultMap id="newsCategoryResultMap" type="org.springblade.modules.news.pojo.entity.NewsCategoryEntity">
|
||||||
<result column="id" property="id"/>
|
<result column="id" property="id"/>
|
||||||
<result column="category_name" property="categoryName"/>
|
<result column="category_name" property="categoryName"/>
|
||||||
<result column="sort_order" property="sortOrder"/>
|
<result column="sort_order" property="sortOrder"/>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.springblade.modules.common.mapper;
|
package org.springblade.modules.news.mapper;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
import org.springblade.modules.news.pojo.entity.NewsContentEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsContentVO;
|
import org.springblade.modules.news.pojo.vo.NewsContentVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.springblade.modules.common.mapper.NewsContentMapper">
|
<mapper namespace="org.springblade.modules.news.mapper.NewsContentMapper">
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="newsContentResultMap" type="org.springblade.modules.common.pojo.entity.NewsContentEntity">
|
<resultMap id="newsContentResultMap" type="org.springblade.modules.news.pojo.entity.NewsContentEntity">
|
||||||
<result column="id" property="id"/>
|
<result column="id" property="id"/>
|
||||||
<result column="category_id" property="categoryId"/>
|
<result column="category_id" property="categoryId"/>
|
||||||
<result column="title" property="title"/>
|
<result column="title" property="title"/>
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.dto;
|
package org.springblade.modules.news.pojo.dto;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
import org.springblade.modules.news.pojo.entity.NewsCategoryEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.dto;
|
package org.springblade.modules.news.pojo.dto;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
import org.springblade.modules.news.pojo.entity.NewsContentEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
package org.springblade.modules.common.pojo.entity;
|
package org.springblade.modules.news.pojo.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.util.Date;
|
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springblade.core.mp.base.BaseEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
import org.springblade.core.tenant.mp.TenantEntity;
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.pojo.entity;
|
package org.springblade.modules.news.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
@@ -6,11 +6,10 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.util.Date;
|
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
||||||
import org.springblade.core.mp.base.BaseEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
import org.springblade.core.tenant.mp.TenantEntity;
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.vo;
|
package org.springblade.modules.news.pojo.vo;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
import org.springblade.modules.news.pojo.entity.NewsCategoryEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -23,11 +23,12 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.vo;
|
package org.springblade.modules.news.pojo.vo;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springblade.modules.news.pojo.entity.NewsContentEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
package org.springblade.modules.common.service;
|
package org.springblade.modules.news.service;
|
||||||
|
|
||||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
|
||||||
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
import org.springblade.modules.news.pojo.entity.NewsCategoryEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsCategoryVO;
|
import org.springblade.modules.news.pojo.vo.NewsCategoryVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseService;
|
import org.springblade.core.mp.base.BaseService;
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package org.springblade.modules.common.service;
|
package org.springblade.modules.news.service;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
import org.springblade.modules.news.pojo.entity.NewsContentEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsContentVO;
|
import org.springblade.modules.news.pojo.vo.NewsContentVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseService;
|
import org.springblade.core.mp.base.BaseService;
|
||||||
|
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
package org.springblade.modules.common.service.impl;
|
package org.springblade.modules.news.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
|
||||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
|
||||||
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
||||||
import org.springblade.modules.common.convert.CommonNewsContentConvert;
|
import org.springblade.modules.news.convert.NewsContentConvert;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
import org.springblade.modules.news.pojo.entity.NewsCategoryEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsCategoryVO;
|
import org.springblade.modules.news.pojo.vo.NewsCategoryVO;
|
||||||
import org.springblade.modules.common.mapper.NewsCategoryMapper;
|
import org.springblade.modules.news.mapper.NewsCategoryMapper;
|
||||||
import org.springblade.modules.common.service.INewsCategoryService;
|
import org.springblade.modules.news.service.INewsCategoryService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
@@ -40,7 +38,7 @@ public class NewsCategoryServiceImpl extends BaseServiceImpl<NewsCategoryMapper,
|
|||||||
.orderByDesc(NewsCategoryEntity::getCreateTime)
|
.orderByDesc(NewsCategoryEntity::getCreateTime)
|
||||||
);
|
);
|
||||||
|
|
||||||
return CommonNewsContentConvert.INSTANCE.convertNewsCategoryApiVO(categoryList);
|
return NewsContentConvert.INSTANCE.convertNewsCategoryApiVO(categoryList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1,22 +1,19 @@
|
|||||||
package org.springblade.modules.common.service.impl;
|
package org.springblade.modules.news.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.springblade.core.log.exception.ServiceException;
|
import org.springblade.core.log.exception.ServiceException;
|
||||||
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
|
||||||
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
||||||
import org.springblade.modules.common.convert.CommonNewsContentConvert;
|
import org.springblade.modules.news.convert.NewsContentConvert;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
import org.springblade.modules.news.pojo.entity.NewsContentEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsContentVO;
|
import org.springblade.modules.news.pojo.vo.NewsContentVO;
|
||||||
import org.springblade.modules.common.mapper.NewsContentMapper;
|
import org.springblade.modules.news.mapper.NewsContentMapper;
|
||||||
import org.springblade.modules.common.service.INewsContentService;
|
import org.springblade.modules.news.service.INewsContentService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资讯内容 服务实现类
|
* 资讯内容 服务实现类
|
||||||
*
|
*
|
||||||
@@ -54,13 +51,13 @@ public class NewsContentServiceImpl extends BaseServiceImpl<NewsContentMapper, N
|
|||||||
.orderByDesc(NewsContentEntity::getSortOrder)
|
.orderByDesc(NewsContentEntity::getSortOrder)
|
||||||
.orderByDesc(NewsContentEntity::getCreateTime)
|
.orderByDesc(NewsContentEntity::getCreateTime)
|
||||||
);
|
);
|
||||||
return result.convert(CommonNewsContentConvert.INSTANCE::convertNewsContentApiVO);
|
return result.convert(NewsContentConvert.INSTANCE::convertNewsContentApiVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommonNewsContentDetailApiVO newsContentDetail(Long id) {
|
public CommonNewsContentDetailApiVO newsContentDetail(Long id) {
|
||||||
NewsContentEntity newsContent = getById(id);
|
NewsContentEntity newsContent = getById(id);
|
||||||
return CommonNewsContentConvert.INSTANCE.convertNewsContentDetailApiVO(newsContent);
|
return NewsContentConvert.INSTANCE.convertNewsContentDetailApiVO(newsContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -23,12 +23,12 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.wrapper;
|
package org.springblade.modules.news.wrapper;
|
||||||
|
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
import org.springblade.modules.news.pojo.entity.NewsCategoryEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsCategoryVO;
|
import org.springblade.modules.news.pojo.vo.NewsCategoryVO;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,12 +23,12 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.wrapper;
|
package org.springblade.modules.news.wrapper;
|
||||||
|
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
import org.springblade.modules.news.pojo.entity.NewsContentEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.NewsContentVO;
|
import org.springblade.modules.news.pojo.vo.NewsContentVO;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.controller;
|
package org.springblade.modules.tour.controller;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -12,13 +12,12 @@ import org.springblade.core.mp.support.Query;
|
|||||||
import org.springblade.core.secure.annotation.PreAuth;
|
import org.springblade.core.secure.annotation.PreAuth;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springblade.core.tool.utils.Func;
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springblade.modules.common.pojo.entity.CommonUserOrderEntity;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourOrderDetailVO;
|
import org.springblade.modules.tour.pojo.vo.TourOrderDetailVO;
|
||||||
import org.springblade.modules.common.wrapper.TourOrderDetailWrapper;
|
import org.springblade.modules.tour.wrapper.TourOrderDetailWrapper;
|
||||||
import org.springblade.modules.common.service.ITourOrderDetailService;
|
import org.springblade.modules.tour.service.ITourOrderDetailService;
|
||||||
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -31,7 +30,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("common/tour-order-detail")
|
@RequestMapping("tour-order")
|
||||||
@Tag(name = "旅游团订单详情", description = "旅游团订单详情接口")
|
@Tag(name = "旅游团订单详情", description = "旅游团订单详情接口")
|
||||||
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
||||||
public class TourOrderDetailController extends BladeController {
|
public class TourOrderDetailController extends BladeController {
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.controller;
|
package org.springblade.modules.tour.controller;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -39,10 +39,10 @@ import org.springblade.core.tool.api.R;
|
|||||||
import org.springblade.core.tool.utils.Func;
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourProductVO;
|
import org.springblade.modules.tour.pojo.vo.TourProductVO;
|
||||||
import org.springblade.modules.common.wrapper.TourProductWrapper;
|
import org.springblade.modules.tour.wrapper.TourProductWrapper;
|
||||||
import org.springblade.modules.common.service.ITourProductService;
|
import org.springblade.modules.tour.service.ITourProductService;
|
||||||
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
|
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ import org.springblade.core.boot.ctrl.BladeController;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("common/tour-product")
|
@RequestMapping("tour-product")
|
||||||
@Tag(name = "旅游产品", description = "旅游产品接口")
|
@Tag(name = "旅游产品", description = "旅游产品接口")
|
||||||
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
@PreAuth("hasAnyRole('administrator', 'admin', 'operator')")
|
||||||
public class TourProductController extends BladeController {
|
public class TourProductController extends BladeController {
|
||||||
@@ -1,16 +1,14 @@
|
|||||||
package org.springblade.modules.common.convert;
|
package org.springblade.modules.tour.convert;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
import org.springblade.modules.api.vo.*;
|
import org.springblade.modules.api.vo.*;
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CommonTourProductConvert {
|
public interface TourProductConvert {
|
||||||
|
|
||||||
CommonTourProductConvert INSTANCE = Mappers.getMapper(CommonTourProductConvert.class);
|
TourProductConvert INSTANCE = Mappers.getMapper(TourProductConvert.class);
|
||||||
|
|
||||||
CommonTourProductApiVO convertTourProductApiVO(TourProductEntity entity);
|
CommonTourProductApiVO convertTourProductApiVO(TourProductEntity entity);
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.springblade.modules.common.mapper;
|
package org.springblade.modules.tour.mapper;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourOrderDetailVO;
|
import org.springblade.modules.tour.pojo.vo.TourOrderDetailVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.springblade.modules.common.mapper.TourOrderDetailMapper">
|
<mapper namespace="org.springblade.modules.tour.mapper.TourOrderDetailMapper">
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="tourOrderDetailResultMap" type="org.springblade.modules.common.pojo.entity.TourOrderDetailEntity">
|
<resultMap id="tourOrderDetailResultMap" type="org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity">
|
||||||
<result column="id" property="id"/>
|
<result column="id" property="id"/>
|
||||||
<result column="order_id" property="orderId"/>
|
<result column="order_id" property="orderId"/>
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_id" property="userId"/>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.springblade.modules.common.mapper;
|
package org.springblade.modules.tour.mapper;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourProductVO;
|
import org.springblade.modules.tour.pojo.vo.TourProductVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.springblade.modules.common.mapper.TourProductMapper">
|
<mapper namespace="org.springblade.modules.tour.mapper.TourProductMapper">
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="tourProductResultMap" type="org.springblade.modules.common.pojo.entity.TourProductEntity">
|
<resultMap id="tourProductResultMap" type="org.springblade.modules.tour.pojo.entity.TourProductEntity">
|
||||||
<result column="id" property="id"/>
|
<result column="id" property="id"/>
|
||||||
<result column="product_name" property="productName"/>
|
<result column="product_name" property="productName"/>
|
||||||
<result column="sub_title" property="subTitle"/>
|
<result column="sub_title" property="subTitle"/>
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.dto;
|
package org.springblade.modules.tour.pojo.dto;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.dto;
|
package org.springblade.modules.tour.pojo.dto;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.pojo.entity;
|
package org.springblade.modules.tour.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -10,7 +10,6 @@ import java.math.BigDecimal;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springblade.common.handler.PgJsonbTypeHandler;
|
import org.springblade.common.handler.PgJsonbTypeHandler;
|
||||||
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
|
||||||
import org.springblade.core.mp.base.BaseEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.pojo.entity;
|
package org.springblade.modules.tour.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.vo;
|
package org.springblade.modules.tour.pojo.vo;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.vo;
|
package org.springblade.modules.tour.pojo.vo;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.springblade.modules.common.service;
|
package org.springblade.modules.tour.service;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourOrderDetailVO;
|
import org.springblade.modules.tour.pojo.vo.TourOrderDetailVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseService;
|
import org.springblade.core.mp.base.BaseService;
|
||||||
|
|
||||||
@@ -1,17 +1,15 @@
|
|||||||
package org.springblade.modules.common.service;
|
package org.springblade.modules.tour.service;
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.springblade.modules.api.request.TourProductRequest;
|
import org.springblade.modules.api.request.TourProductRequest;
|
||||||
import org.springblade.modules.api.vo.CommonTourProductApiVO;
|
import org.springblade.modules.api.vo.CommonTourProductApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonTourProductDetailApiVO;
|
import org.springblade.modules.api.vo.CommonTourProductDetailApiVO;
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourProductVO;
|
import org.springblade.modules.tour.pojo.vo.TourProductVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseService;
|
import org.springblade.core.mp.base.BaseService;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 旅游产品 服务类
|
* 旅游产品 服务类
|
||||||
*
|
*
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package org.springblade.modules.common.service.impl;
|
package org.springblade.modules.tour.service.impl;
|
||||||
|
|
||||||
import org.springblade.core.log.exception.ServiceException;
|
import org.springblade.core.log.exception.ServiceException;
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourOrderDetailVO;
|
import org.springblade.modules.tour.pojo.vo.TourOrderDetailVO;
|
||||||
import org.springblade.modules.common.mapper.TourOrderDetailMapper;
|
import org.springblade.modules.tour.mapper.TourOrderDetailMapper;
|
||||||
import org.springblade.modules.common.service.ITourOrderDetailService;
|
import org.springblade.modules.tour.service.ITourOrderDetailService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.service.impl;
|
package org.springblade.modules.tour.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -8,19 +8,18 @@ import org.springblade.core.log.exception.ServiceException;
|
|||||||
import org.springblade.modules.api.request.TourProductRequest;
|
import org.springblade.modules.api.request.TourProductRequest;
|
||||||
import org.springblade.modules.api.vo.CommonTourProductApiVO;
|
import org.springblade.modules.api.vo.CommonTourProductApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonTourProductDetailApiVO;
|
import org.springblade.modules.api.vo.CommonTourProductDetailApiVO;
|
||||||
import org.springblade.modules.common.convert.CommonTourProductConvert;
|
import org.springblade.modules.tour.convert.TourProductConvert;
|
||||||
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourProductVO;
|
import org.springblade.modules.tour.pojo.vo.TourProductVO;
|
||||||
import org.springblade.modules.common.mapper.TourProductMapper;
|
import org.springblade.modules.tour.mapper.TourProductMapper;
|
||||||
import org.springblade.modules.common.service.ICommonRegionsInfoService;
|
import org.springblade.modules.common.service.ICommonRegionsInfoService;
|
||||||
import org.springblade.modules.common.service.ITourProductService;
|
import org.springblade.modules.tour.service.ITourProductService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 旅游产品 服务实现类
|
* 旅游产品 服务实现类
|
||||||
@@ -153,7 +152,7 @@ public class TourProductServiceImpl extends BaseServiceImpl<TourProductMapper, T
|
|||||||
.orderByDesc(TourProductEntity::getVisitCount)
|
.orderByDesc(TourProductEntity::getVisitCount)
|
||||||
);
|
);
|
||||||
|
|
||||||
return result.convert(CommonTourProductConvert.INSTANCE::convertTourProductApiVO);
|
return result.convert(TourProductConvert.INSTANCE::convertTourProductApiVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -175,13 +174,13 @@ public class TourProductServiceImpl extends BaseServiceImpl<TourProductMapper, T
|
|||||||
.orderByDesc(TourProductEntity::getVisitCount)
|
.orderByDesc(TourProductEntity::getVisitCount)
|
||||||
);
|
);
|
||||||
|
|
||||||
return result.convert(CommonTourProductConvert.INSTANCE::convertTourProductApiVO);
|
return result.convert(TourProductConvert.INSTANCE::convertTourProductApiVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommonTourProductDetailApiVO tourProductDetail(Long id) {
|
public CommonTourProductDetailApiVO tourProductDetail(Long id) {
|
||||||
TourProductEntity tourProduct = getById(id);
|
TourProductEntity tourProduct = getById(id);
|
||||||
return CommonTourProductConvert.INSTANCE.convertTourProductDetailApiVO(tourProduct);
|
return TourProductConvert.INSTANCE.convertTourProductDetailApiVO(tourProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -23,12 +23,12 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.wrapper;
|
package org.springblade.modules.tour.wrapper;
|
||||||
|
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
import org.springblade.modules.tour.pojo.entity.TourOrderDetailEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourOrderDetailVO;
|
import org.springblade.modules.tour.pojo.vo.TourOrderDetailVO;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,12 +23,12 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.wrapper;
|
package org.springblade.modules.tour.wrapper;
|
||||||
|
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
import org.springblade.modules.tour.pojo.entity.TourProductEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.TourProductVO;
|
import org.springblade.modules.tour.pojo.vo.TourProductVO;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.controller;
|
package org.springblade.modules.tourismSpot.controller;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -16,10 +16,10 @@ import org.springblade.core.tool.api.R;
|
|||||||
import org.springblade.core.tool.utils.Func;
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
import org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
import org.springblade.modules.tourismSpot.pojo.vo.CulturalTourismSpotVO;
|
||||||
import org.springblade.modules.common.wrapper.CulturalTourismSpotWrapper;
|
import org.springblade.modules.tourismSpot.wrapper.CulturalTourismSpotWrapper;
|
||||||
import org.springblade.modules.common.service.ICulturalTourismSpotService;
|
import org.springblade.modules.tourismSpot.service.ICulturalTourismSpotService;
|
||||||
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package org.springblade.modules.common.convert;
|
package org.springblade.modules.tourismSpot.convert;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
||||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
import org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CommonTourismSpotConvert {
|
public interface TourismSpotConvert {
|
||||||
|
|
||||||
CommonTourismSpotConvert INSTANCE = Mappers.getMapper(CommonTourismSpotConvert.class);
|
TourismSpotConvert INSTANCE = Mappers.getMapper(TourismSpotConvert.class);
|
||||||
|
|
||||||
CommonTourismSpotApiVO convertTourismSpotApiVO(CulturalTourismSpotEntity culturalTourismSpotEntity);
|
CommonTourismSpotApiVO convertTourismSpotApiVO(CulturalTourismSpotEntity culturalTourismSpotEntity);
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.springblade.modules.common.mapper;
|
package org.springblade.modules.tourismSpot.mapper;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
import org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
import org.springblade.modules.tourismSpot.pojo.vo.CulturalTourismSpotVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.springblade.modules.common.mapper.CulturalTourismSpotMapper">
|
<mapper namespace="org.springblade.modules.tourismSpot.mapper.CulturalTourismSpotMapper">
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="culturalTourismSpotResultMap" type="org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity">
|
<resultMap id="culturalTourismSpotResultMap" type="org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity">
|
||||||
<result column="id" property="id"/>
|
<result column="id" property="id"/>
|
||||||
<result column="spot_name" property="spotName"/>
|
<result column="spot_name" property="spotName"/>
|
||||||
<result column="rating" property="rating"/>
|
<result column="rating" property="rating"/>
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.dto;
|
package org.springblade.modules.tourismSpot.pojo.dto;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
import org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.springblade.modules.common.pojo.entity;
|
package org.springblade.modules.tourismSpot.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -23,11 +23,12 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.pojo.vo;
|
package org.springblade.modules.tourismSpot.pojo.vo;
|
||||||
|
|
||||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package org.springblade.modules.common.service;
|
package org.springblade.modules.tourismSpot.service;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
||||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
import org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
import org.springblade.modules.tourismSpot.pojo.vo.CulturalTourismSpotVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseService;
|
import org.springblade.core.mp.base.BaseService;
|
||||||
|
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package org.springblade.modules.common.service.impl;
|
package org.springblade.modules.tourismSpot.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.springblade.core.log.exception.ServiceException;
|
import org.springblade.core.log.exception.ServiceException;
|
||||||
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
||||||
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
||||||
import org.springblade.modules.common.convert.CommonTourismSpotConvert;
|
import org.springblade.modules.tourismSpot.convert.TourismSpotConvert;
|
||||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
import org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
import org.springblade.modules.tourismSpot.pojo.vo.CulturalTourismSpotVO;
|
||||||
import org.springblade.modules.common.mapper.CulturalTourismSpotMapper;
|
import org.springblade.modules.tourismSpot.mapper.CulturalTourismSpotMapper;
|
||||||
import org.springblade.modules.common.service.ICulturalTourismSpotService;
|
import org.springblade.modules.tourismSpot.service.ICulturalTourismSpotService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
@@ -45,7 +45,7 @@ public class CulturalTourismSpotServiceImpl extends BaseServiceImpl<CulturalTour
|
|||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return result.convert(CommonTourismSpotConvert.INSTANCE::convertTourismSpotApiVO);
|
return result.convert(TourismSpotConvert.INSTANCE::convertTourismSpotApiVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -65,13 +65,13 @@ public class CulturalTourismSpotServiceImpl extends BaseServiceImpl<CulturalTour
|
|||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return result.convert(CommonTourismSpotConvert.INSTANCE::convertTourismSpotApiVO);
|
return result.convert(TourismSpotConvert.INSTANCE::convertTourismSpotApiVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommonTourismSpotDetailApiVO tourismSpotDetail(Long id) {
|
public CommonTourismSpotDetailApiVO tourismSpotDetail(Long id) {
|
||||||
CulturalTourismSpotEntity tourismSpot = getById(id);
|
CulturalTourismSpotEntity tourismSpot = getById(id);
|
||||||
return CommonTourismSpotConvert.INSTANCE.convertTourismSpotDetailApiVO(tourismSpot);
|
return TourismSpotConvert.INSTANCE.convertTourismSpotDetailApiVO(tourismSpot);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -23,12 +23,12 @@
|
|||||||
* <p>
|
* <p>
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
*/
|
*/
|
||||||
package org.springblade.modules.common.wrapper;
|
package org.springblade.modules.tourismSpot.wrapper;
|
||||||
|
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
import org.springblade.modules.tourismSpot.pojo.entity.CulturalTourismSpotEntity;
|
||||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
import org.springblade.modules.tourismSpot.pojo.vo.CulturalTourismSpotVO;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
package org.springblade.plugin.pay.controller;
|
||||||
|
|
||||||
|
import cn.hutool.http.ContentType;
|
||||||
|
import com.alipay.api.AlipayApiException;
|
||||||
|
import com.alipay.api.internal.util.AlipaySignature;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springblade.common.cache.PaymentCache;
|
||||||
|
import org.springblade.plugin.pay.entity.AliPayAccountConfig;
|
||||||
|
import org.springblade.plugin.pay.service.IOrderService;
|
||||||
|
import org.springblade.plugin.pay.service.IRefundService;
|
||||||
|
import org.springblade.plugin.pay.util.AliPayApiUtil;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RequestMapping( "blade-ali/callback")
|
||||||
|
public class AliCallbackController {
|
||||||
|
|
||||||
|
private final IOrderService orderService;
|
||||||
|
private final IRefundService refundService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝支付回调
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/alipay")
|
||||||
|
public void alipay(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
String result = "支付失败";
|
||||||
|
try {
|
||||||
|
// 获取支付宝POST过来反馈信息
|
||||||
|
Map<String, String> params = AliPayApiUtil.toMap(request);
|
||||||
|
System.out.println("支付宝回调参数:" + params);
|
||||||
|
String mchId = params.get("seller_id");
|
||||||
|
String appId = params.get("app_id");
|
||||||
|
if (StringUtils.isBlank(mchId)) {
|
||||||
|
result = "seller_id is not null";
|
||||||
|
AliPayApiUtil.render(response, ContentType.TEXT_PLAIN.getValue(), result, "encoding:UTF-8");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
AliPayAccountConfig config = PaymentCache.getAliConfig();
|
||||||
|
if (config == null) {
|
||||||
|
result = "该商户号尚未接入";
|
||||||
|
AliPayApiUtil.render(response, ContentType.TEXT_PLAIN.getValue(), result, "encoding:UTF-8");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String signType = config.getSignType();
|
||||||
|
String pubKey = config.getPubKey();
|
||||||
|
boolean verify_result = AlipaySignature.rsaCheckV1(params, pubKey, "UTF-8", signType);
|
||||||
|
if (!verify_result) {
|
||||||
|
result = "签名验证失败";
|
||||||
|
AliPayApiUtil.render(response, ContentType.TEXT_PLAIN.getValue(), result, "encoding:UTF-8");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//支付状态
|
||||||
|
String trade_status = params.get("trade_status");
|
||||||
|
// 总金额
|
||||||
|
String money = params.get("total_amount");
|
||||||
|
// 支付宝订单号
|
||||||
|
String payNo = params.get("trade_no");
|
||||||
|
// 商户订单号
|
||||||
|
String orderNo = params.get("out_trade_no");
|
||||||
|
//买家ID
|
||||||
|
String openId = params.get("buyer_id");
|
||||||
|
//支付时间
|
||||||
|
String payTime = params.get("gmt_payment");
|
||||||
|
//退款金额
|
||||||
|
String refund_fee = params.get("refund_fee");
|
||||||
|
//退款时间
|
||||||
|
String gmt_refund = params.get("gmt_refund");
|
||||||
|
//退款单号
|
||||||
|
String refundNo = params.get("out_biz_no");
|
||||||
|
switch (trade_status) {
|
||||||
|
case "WAIT_BUYER_PAY":
|
||||||
|
result = "wait buyer pay";
|
||||||
|
break;
|
||||||
|
case "TRADE_CLOSED":
|
||||||
|
//全额退款成功回调
|
||||||
|
if (refundService.refundSuccess(refundNo, mchId)) {
|
||||||
|
result = "success";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "TRADE_SUCCESS":
|
||||||
|
if (StringUtils.isBlank(refund_fee) && StringUtils.isBlank(gmt_refund)) {
|
||||||
|
//支付成功回调
|
||||||
|
if (orderService.paySuccess(orderNo, mchId, payNo, payTime, openId)) {
|
||||||
|
result = "success";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//部分退款回调
|
||||||
|
if (refundService.refundSuccess(refundNo, mchId)) {
|
||||||
|
result = "success";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "TRADE_FINISHED":
|
||||||
|
//交易结束,不可退款
|
||||||
|
result = "success";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
AliPayApiUtil.render(response, ContentType.TEXT_PLAIN.getValue(), result, "encoding:UTF-8");
|
||||||
|
} catch (AlipayApiException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
AliPayApiUtil.render(response, ContentType.TEXT_PLAIN.getValue(), e.getMessage(), "encoding:UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
AliPayApiUtil.render(response, ContentType.TEXT_PLAIN.getValue(), e.getMessage(), "encoding:UTF-8");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user