文旅景点,资讯, 商家店铺,旅游团
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
package org.springblade.common.handler;
|
||||
|
||||
import org.apache.ibatis.type.BaseTypeHandler;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||
import org.apache.ibatis.type.MappedTypes;
|
||||
import org.locationtech.jts.geom.Coordinate;
|
||||
import org.locationtech.jts.geom.GeometryFactory;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
import org.locationtech.jts.io.ParseException;
|
||||
import org.locationtech.jts.io.WKTReader;
|
||||
|
||||
import java.sql.*;
|
||||
|
||||
@MappedJdbcTypes(JdbcType.OTHER) // 对应 PG 的 point 类型
|
||||
@MappedTypes(Point.class)
|
||||
public class PgJtsPointTypeHandler extends BaseTypeHandler<Point> {
|
||||
|
||||
private static final GeometryFactory FACTORY = new GeometryFactory();
|
||||
private static final WKTReader WKT_READER = new WKTReader(FACTORY);
|
||||
|
||||
@Override
|
||||
public void setNonNullParameter(PreparedStatement ps, int i, Point parameter, JdbcType jdbcType) throws SQLException {
|
||||
if (parameter == null) {
|
||||
ps.setNull(i, java.sql.Types.OTHER);
|
||||
return;
|
||||
}
|
||||
|
||||
double x = parameter.getX(); // 经度
|
||||
double y = parameter.getY(); // 纬度
|
||||
|
||||
// 【修正】使用 WKT 格式:POINT(经度 纬度)
|
||||
// 注意:中间是空格,不是逗号;必须有 POINT 前缀
|
||||
String wkt = String.format("POINT(%f %f)", x, y);
|
||||
|
||||
// 打印日志方便调试(可选)
|
||||
// System.out.println("Inserting WKT: " + wkt);
|
||||
|
||||
// 将 WKT 字符串传入,PostGIS 会自动识别并转换
|
||||
ps.setObject(i, wkt, java.sql.Types.OTHER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
||||
// 关键:获取字符串并解析
|
||||
return parse(rs.getString(columnName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
||||
return parse(rs.getString(columnIndex));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
||||
return parse(cs.getString(columnIndex));
|
||||
}
|
||||
|
||||
private Point parse(String value) throws SQLException {
|
||||
if (value == null || value.trim().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 1. 尝试直接作为 WKT 解析 (兼容 "POINT(x y)")
|
||||
try {
|
||||
return (Point) WKT_READER.read(value);
|
||||
} catch (ParseException e) {
|
||||
// 2. 如果失败,尝试解析 PG 原生格式 "(x,y)"
|
||||
// PG 原生格式不是标准 WKT,WKTReader 会报错,进入这里
|
||||
if (value.startsWith("(") && value.endsWith(")")) {
|
||||
try {
|
||||
String content = value.substring(1, value.length() - 1);
|
||||
String[] parts = content.split(",");
|
||||
if (parts.length == 2) {
|
||||
double x = Double.parseDouble(parts[0].trim());
|
||||
double y = Double.parseDouble(parts[1].trim());
|
||||
return FACTORY.createPoint(new Coordinate(x, y));
|
||||
}
|
||||
} catch (NumberFormatException ex) {
|
||||
throw new SQLException("Invalid Point format: " + value, ex);
|
||||
}
|
||||
}
|
||||
throw new SQLException("Failed to parse Point: " + value, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.springblade.common.utils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class IdCardValidatorUtil {
|
||||
|
||||
private static final Pattern REGEX_18 = Pattern.compile("^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[\\dXx]$");
|
||||
|
||||
// 加权因子
|
||||
private static final int[] WEIGHTS = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
|
||||
// 校验码映射
|
||||
private static final String[] CHECK_CODES = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"};
|
||||
|
||||
public static Boolean validateIdCard(String idCard) {
|
||||
if (StringUtils.isBlank(idCard)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 1. 格式初筛 (15位直接淘汰,只留18位)
|
||||
if (!REGEX_18.matcher(idCard).matches()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 2. 核心算法校验 (校验最后一位是否正确)
|
||||
return verifyCheckSum(idCard.toUpperCase());
|
||||
}
|
||||
|
||||
/**
|
||||
* ISO 7064:1983.MOD 11-2 校验算法
|
||||
*/
|
||||
private static boolean verifyCheckSum(String idCard) {
|
||||
int sum = 0;
|
||||
// 只取前17位进行计算
|
||||
for (int i = 0; i < 17; i++) {
|
||||
int digit = Character.getNumericValue(idCard.charAt(i));
|
||||
if (digit < 0 || digit > 9) {
|
||||
return false;
|
||||
}
|
||||
sum += digit * WEIGHTS[i];
|
||||
}
|
||||
|
||||
int mod = sum % 11;
|
||||
String expectedCheckCode = CHECK_CODES[mod];
|
||||
String actualCheckCode = String.valueOf(idCard.charAt(17));
|
||||
|
||||
return expectedCheckCode.equals(actualCheckCode);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.springblade.job.processor;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.modules.market.pojo.entity.MarketBenefitPackageEntity;
|
||||
import org.springblade.modules.market.pojo.entity.MarketBenefitPackageTemplateEntity;
|
||||
import org.springblade.modules.market.service.IMarketBenefitPackageService;
|
||||
import org.springblade.modules.market.service.IMarketBenefitPackageTemplateService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import tech.powerjob.worker.core.processor.ProcessResult;
|
||||
import tech.powerjob.worker.core.processor.TaskContext;
|
||||
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 统计福利包兑换数量
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class StatsBenefitPackageProcessor implements BasicProcessor {
|
||||
|
||||
private final IMarketBenefitPackageTemplateService packageTemplateService;
|
||||
private final IMarketBenefitPackageService benefitPackageService;
|
||||
|
||||
@Override
|
||||
public ProcessResult process(TaskContext taskContext) throws Exception {
|
||||
|
||||
|
||||
List<MarketBenefitPackageTemplateEntity> templateList = packageTemplateService.list(
|
||||
Wrappers.<MarketBenefitPackageTemplateEntity>lambdaQuery()
|
||||
.orderByDesc(MarketBenefitPackageTemplateEntity::getId)
|
||||
);
|
||||
|
||||
templateList.forEach(template -> {
|
||||
|
||||
long count = benefitPackageService.count(
|
||||
Wrappers.<MarketBenefitPackageEntity>lambdaQuery()
|
||||
.eq(MarketBenefitPackageEntity::getType , 1)
|
||||
.eq(MarketBenefitPackageEntity::getPackageId, template.getId())
|
||||
.eq(MarketBenefitPackageEntity::getStatus, 2)
|
||||
);
|
||||
template.setExchangedQuantity(Math.toIntExact(count));
|
||||
|
||||
});
|
||||
|
||||
packageTemplateService.updateBatchById(templateList);
|
||||
|
||||
return new ProcessResult(true, "result is success");
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,7 @@ public class StatsCalculatorCashProcessor implements BasicProcessor {
|
||||
List<CommonUserOrderEntity> orderPageList = userOrderService.list(
|
||||
Wrappers.lambdaQuery(CommonUserOrderEntity.class)
|
||||
.eq(CommonUserOrderEntity::getPaymentStatus, 1)
|
||||
.eq(CommonUserOrderEntity::getPaymentType, List.of(1,2))
|
||||
.ge(CommonUserOrderEntity::getCreateTime, startDate)
|
||||
.le(CommonUserOrderEntity::getCreateTime, endDate)
|
||||
.orderByAsc(CommonUserOrderEntity::getId) // 稳定排序
|
||||
|
||||
@@ -9,10 +9,10 @@ import jakarta.validation.constraints.Min;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.redis.debounce.RedisDebounce;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.request.ForgetPwdSmsRequest;
|
||||
import org.springblade.modules.api.request.ResetPasswordRequest;
|
||||
import org.springblade.modules.api.request.*;
|
||||
import org.springblade.modules.api.vo.*;
|
||||
import org.springblade.modules.common.pojo.vo.AppCommonRegionsInfoVO;
|
||||
import org.springblade.modules.common.service.ICommonRegionsInfoService;
|
||||
import org.springblade.modules.common.service.*;
|
||||
import org.springblade.modules.system.service.IUserService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class APPCommonController {
|
||||
|
||||
private final IUserService userService;
|
||||
private final ICommonRegionsInfoService commonRegionsInfoService;
|
||||
|
||||
private final ICommonTourInfoService commonTourInfoService;
|
||||
|
||||
/**
|
||||
* 最新版本
|
||||
@@ -69,5 +69,27 @@ public class APPCommonController {
|
||||
return R.status(userService.retrievePassword(request));
|
||||
}
|
||||
|
||||
@GetMapping("/tour-info-list")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "出行人列表")
|
||||
public R<List<CommonTourInfoApiVO>> tourUserProfileList() {
|
||||
return R.data(commonTourInfoService.tourUserProfileList());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/submit-tour-info")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增出行人信息")
|
||||
public R<Boolean> submitTourUserProfile(@RequestBody CommonTourUserInfoRequest request) {
|
||||
return R.data(commonTourInfoService.submitTourUserProfile(request));
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-tour-info")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "删除出行人信息")
|
||||
public R<Boolean> removeTourUserProfile(@RequestBody CommonRemoveTourRequest request) {
|
||||
return R.data(commonTourInfoService.removeTourUserProfile(request.getIds()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,35 @@
|
||||
package org.springblade.modules.api.app;
|
||||
|
||||
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.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.vo.MallProductApiVO;
|
||||
import org.springblade.modules.mall.service.IMallProductService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Hidden
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/app-eco")
|
||||
@Tag(name = "APP生态产品接口", description = "APP生态产品接口")
|
||||
public class APPEcoController {
|
||||
|
||||
private final IMallProductService productService;
|
||||
/**
|
||||
* 生态产品-商品列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "生态产品-商品列表")
|
||||
public R<List<MallProductApiVO>> ecosystemProductList() {
|
||||
return R.data(productService.apiVoListToCategory(2033413760969809921L));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.springblade.modules.api.app;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -36,7 +37,10 @@ public class APPMallController {
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "列表")
|
||||
public R<List<MallCategoryApiVO>> categories() {
|
||||
List<MallCategoryEntity> list = categoryService.list();
|
||||
List<MallCategoryEntity> list = categoryService.list(
|
||||
Wrappers.lambdaQuery(MallCategoryEntity.class)
|
||||
.notIn(MallCategoryEntity::getId, List.of(2033413707249164290L ,2033413760969809921L))
|
||||
);
|
||||
return R.data(AppMallConvert.INSTANCE.convertMallCategoryApiListVO(list));
|
||||
}
|
||||
|
||||
@@ -60,6 +64,19 @@ public class APPMallController {
|
||||
return R.data(productService.apiDetailVO(vo.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 自营商城-商品列表
|
||||
*/
|
||||
@GetMapping("/direct-mall-list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "自营商城-商品列表")
|
||||
public R<List<MallProductApiVO>> directMallList() {
|
||||
return R.data(productService.apiVoListToCategory(2033413707249164290L));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.springblade.modules.api.app;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
||||
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
||||
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
||||
import org.springblade.modules.common.service.INewsCategoryService;
|
||||
import org.springblade.modules.common.service.INewsContentService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Hidden
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/app-news")
|
||||
@Tag(name = "APP资讯接口", description = "APP资讯接口")
|
||||
public class APPNewsController {
|
||||
|
||||
private final INewsCategoryService newsCategoryService;
|
||||
private final INewsContentService newsContentService;
|
||||
|
||||
@GetMapping("/category-list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "资讯分类列表")
|
||||
public R<List<CommonNewsCategoryApiVO>> newsCategoryList() {
|
||||
return R.data(newsCategoryService.newsCategoryList());
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "资讯列表")
|
||||
public R<IPage<CommonNewsContentApiVO>> newsContentList(IPage<CommonNewsContentApiVO> page , @RequestParam(required = false) Long categoryId) {
|
||||
return R.data(newsContentService.newsCategoryList(page , categoryId));
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "资讯详情")
|
||||
public R<CommonNewsContentDetailApiVO> newsContentDetail(CommonNewsContentApiVO vo) {
|
||||
return R.data(newsContentService.newsContentDetail(vo.getId()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.springblade.modules.api.app;
|
||||
|
||||
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.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
||||
import org.springblade.modules.common.service.IMerchantFlagshipStoreService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Hidden
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/app-store")
|
||||
@Tag(name = "APP商家店铺接口", description = "APP商家店铺接口")
|
||||
public class APPStoreController {
|
||||
|
||||
private final IMerchantFlagshipStoreService merchantFlagshipStoreService;
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "商家店铺列表")
|
||||
public R<List<CommonMerchantStoreApiVO>> merchantStoreList(MerchantStoreRequest request) {
|
||||
return R.data(merchantFlagshipStoreService.merchantStoreList(request));
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "商家店铺详情")
|
||||
public R<CommonMerchantStoreDetailApiVO> merchantStoreDetail(CommonMerchantStoreApiVO vo) {
|
||||
return R.data(merchantFlagshipStoreService.merchantStoreDetail(vo.getId()));
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,23 @@
|
||||
package org.springblade.modules.api.app;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.request.CommonRemoveTourRequest;
|
||||
import org.springblade.modules.api.request.CommonTourUserInfoRequest;
|
||||
import org.springblade.modules.api.request.TourProductRequest;
|
||||
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.service.ICommonTourInfoService;
|
||||
import org.springblade.modules.common.service.ITourProductService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Hidden
|
||||
@RestController
|
||||
@@ -12,4 +25,31 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/app-tour")
|
||||
@Tag(name = "APP旅游团接口", description = "APP旅游团接口")
|
||||
public class APPTourController {
|
||||
|
||||
private final ITourProductService tourProductService;
|
||||
|
||||
|
||||
@GetMapping("/product-list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "旅游团列表")
|
||||
public R<IPage<CommonTourProductApiVO>> tourProductList(IPage<CommonTourProductApiVO> page , TourProductRequest request) {
|
||||
return R.data(tourProductService.tourProductList(page ,request));
|
||||
}
|
||||
|
||||
@GetMapping("/product-top-list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "旅游团推荐列表")
|
||||
public R<IPage<CommonTourProductApiVO>> tourProductTopList(IPage<CommonTourProductApiVO> page , TourProductRequest request) {
|
||||
return R.data(tourProductService.tourProductTopList(page ,request));
|
||||
}
|
||||
|
||||
@GetMapping("/product-detail")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "旅游团详情")
|
||||
public R<CommonTourProductDetailApiVO> tourProductDetail(CommonTourProductApiVO vo) {
|
||||
return R.data(tourProductService.tourProductDetail(vo.getId()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.springblade.modules.api.app;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
||||
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
||||
import org.springblade.modules.common.service.ICulturalTourismSpotService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Hidden
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/app-tourism-spot")
|
||||
@Tag(name = "APP文旅接口", description = "APP文旅接口")
|
||||
public class APPTourismSpotController {
|
||||
|
||||
private final ICulturalTourismSpotService culturalTourismSpotService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "文旅景点列表")
|
||||
public R<IPage<CommonTourismSpotApiVO>> tourismSpotList(IPage<CommonTourismSpotApiVO> page) {
|
||||
return R.data(culturalTourismSpotService.tourismSpotList(page));
|
||||
}
|
||||
|
||||
@GetMapping("/top-list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "文旅景点推荐列表")
|
||||
public R<IPage<CommonTourismSpotApiVO>> tourismSpotTopList(IPage<CommonTourismSpotApiVO> page) {
|
||||
return R.data(culturalTourismSpotService.tourismSpotTopList(page));
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "文旅景点详情")
|
||||
public R<CommonTourismSpotDetailApiVO> tourismSpotDetail(CommonTourismSpotApiVO vo) {
|
||||
return R.data(culturalTourismSpotService.tourismSpotDetail(vo.getId()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CommonRemoveTourRequest implements Serializable {
|
||||
@NotEmpty(message = "至少选择一条出行人信息")
|
||||
private List<Long> ids;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CommonTourUserInfoRequest implements Serializable {
|
||||
private Long id;
|
||||
private String contactPhone;
|
||||
private String userName;
|
||||
private String idCardNo;
|
||||
private String passportNo;
|
||||
private String hkMacauPassNo;
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,19 +1,22 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CreateOrderRequest implements Serializable {
|
||||
|
||||
@NotEmpty(message = "请填写联系人")
|
||||
// @NotEmpty(message = "请填写联系人")
|
||||
private String consignee;
|
||||
|
||||
@NotEmpty(message = "请填写联系电话")
|
||||
// @NotEmpty(message = "请填写联系电话")
|
||||
private String consigneePhone;
|
||||
|
||||
@NotEmpty(message = "订单类型为空")
|
||||
@@ -22,11 +25,11 @@ public class CreateOrderRequest implements Serializable {
|
||||
@NotEmpty(message = "商品编号为空")
|
||||
private String itemCode;
|
||||
|
||||
@NotNull(message = "商品数量不能为空")
|
||||
// @NotNull(message = "商品数量不能为空")
|
||||
@Min(value = 1, message = "无效商品数量")
|
||||
private Integer quantity;
|
||||
|
||||
@NotEmpty(message = "请填写收货地址")
|
||||
// @NotEmpty(message = "请填写收货地址")
|
||||
private String address;
|
||||
|
||||
@NotNull(message = "无效支付方式")
|
||||
@@ -34,4 +37,19 @@ public class CreateOrderRequest implements Serializable {
|
||||
|
||||
@NotNull(message = "无效标识")
|
||||
private Boolean isOfflinePayment;
|
||||
|
||||
|
||||
/**
|
||||
* 旅行团出行日期
|
||||
*/
|
||||
private Date tourStartDate;
|
||||
/**
|
||||
* 旅行团返回日期
|
||||
*/
|
||||
private Date tourEndDate;
|
||||
|
||||
private List<Long> tourInfoIds;
|
||||
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class MerchantStoreRequest implements Serializable {
|
||||
|
||||
private BigDecimal longitude;
|
||||
private BigDecimal latitude;
|
||||
private BigDecimal distance = new BigDecimal("2000");
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class TourProductRequest implements Serializable {
|
||||
|
||||
private String cityName;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonMerchantStoreApiVO implements Serializable {
|
||||
|
||||
@NotNull(message = "无效店铺")
|
||||
private Long id;
|
||||
|
||||
private String storeName;
|
||||
|
||||
private String fullAddress;
|
||||
|
||||
private String thumbnailUrl;
|
||||
|
||||
private BigDecimal distance;
|
||||
|
||||
private BigDecimal lng;
|
||||
private BigDecimal lat;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonMerchantStoreDetailApiVO implements Serializable {
|
||||
|
||||
|
||||
private String storeName;
|
||||
|
||||
private String contactPhone;
|
||||
|
||||
private String fullAddress;
|
||||
|
||||
private List<String> mainImageUrl;
|
||||
|
||||
private List<String> detailImages;
|
||||
|
||||
private String businessHours;
|
||||
|
||||
private String storeDescription;
|
||||
|
||||
private BigDecimal lng;
|
||||
private BigDecimal lat;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 文旅景点信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonNewsCategoryApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String categoryName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 文旅景点信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonNewsContentApiVO implements Serializable {
|
||||
|
||||
@NotNull(message = "无效资讯")
|
||||
private Long id;
|
||||
|
||||
|
||||
private String title;
|
||||
|
||||
private String summary;
|
||||
|
||||
private Integer type;
|
||||
/**
|
||||
* 视频链接
|
||||
*/
|
||||
private String videoUrl;
|
||||
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
private String thumbnailUrl;
|
||||
|
||||
/**
|
||||
* 评论数量
|
||||
*/
|
||||
private Long commentCount;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 资讯内容
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonNewsContentDetailApiVO implements Serializable {
|
||||
|
||||
private String videoUrl;
|
||||
private Long playCount;
|
||||
|
||||
private List<String> mainImageUrl;
|
||||
|
||||
private List<String> detailImages;
|
||||
|
||||
private String articleContent;
|
||||
|
||||
private Long commentCount;
|
||||
|
||||
|
||||
private Long viewCount;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 旅游团信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonTourInfoApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
private String contactPhone;
|
||||
private String userName;
|
||||
private String idCardNo;
|
||||
private String hkMacauPassNo;
|
||||
private String passportNo;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 旅游团信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonTourProductApiVO implements Serializable {
|
||||
|
||||
@NotNull(message = "无效旅游团")
|
||||
private Long id;
|
||||
|
||||
private String productName;
|
||||
|
||||
private String subTitle;
|
||||
|
||||
private String thumbnailUrl;
|
||||
|
||||
private Integer visitCount;
|
||||
|
||||
private Integer rating;
|
||||
|
||||
private BigDecimal basePrice;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 旅游团信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonTourProductDetailApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
private String productName;
|
||||
|
||||
private String subTitle;
|
||||
private Integer durationDays;
|
||||
private Integer durationNights;
|
||||
|
||||
private List<String> mainImageUrl;
|
||||
|
||||
private List<String> detailImages;
|
||||
|
||||
private BigDecimal basePrice;
|
||||
|
||||
private BigDecimal adultPrice;
|
||||
|
||||
private BigDecimal childPrice;
|
||||
|
||||
private BigDecimal elderlyPrice;
|
||||
|
||||
private Integer minPeople;
|
||||
|
||||
private Integer maxPeople;
|
||||
|
||||
private Integer requireIdCard;
|
||||
|
||||
private Integer requirePassport;
|
||||
|
||||
private Integer requireHkMacauPass;
|
||||
|
||||
private String description;
|
||||
|
||||
private Integer visitCount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 文旅景点信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonTourismSpotApiVO implements Serializable {
|
||||
|
||||
@NotNull(message = "无效景点")
|
||||
private Long id;
|
||||
|
||||
private String spotName;
|
||||
|
||||
private BigDecimal rating;
|
||||
|
||||
private Integer visitCount;
|
||||
|
||||
private String thumbnailUrl;
|
||||
|
||||
private String summary;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文旅景点信息
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
public class CommonTourismSpotDetailApiVO implements Serializable {
|
||||
|
||||
private List<String> mainImageUrl;
|
||||
private List<String> detailImages;
|
||||
private String videoUrl;
|
||||
private String description;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.springblade.modules.common.client;
|
||||
|
||||
|
||||
import com.dtflys.forest.annotation.Get;
|
||||
import com.dtflys.forest.annotation.Query;
|
||||
import com.dtflys.forest.annotation.Var;
|
||||
import org.springblade.modules.common.request.GeoInfoRequest;
|
||||
import org.springblade.modules.common.response.GeoInfoResponse;
|
||||
|
||||
|
||||
|
||||
public interface AMapClient {
|
||||
|
||||
@Get("{baseUrl}/geocode/geo")
|
||||
GeoInfoResponse geoInfo(@Var("baseUrl") String baseUrl, @Query GeoInfoRequest request);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springblade.modules.common.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "amap")
|
||||
public class AMapConfiguration {
|
||||
|
||||
private String key;
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -36,6 +37,8 @@ import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.modules.common.convert.CommonRegionConvert;
|
||||
import org.springblade.modules.common.pojo.vo.CommonRegionsDicVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
||||
@@ -44,6 +47,8 @@ import org.springblade.modules.common.wrapper.CommonRegionsInfoWrapper;
|
||||
import org.springblade.modules.common.service.ICommonRegionsInfoService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 地区详情表 控制器
|
||||
*
|
||||
@@ -129,4 +134,17 @@ public class CommonRegionsInfoController extends BladeController {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(regionsInfoService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("selectProvinceAndCity/{parentCode}")
|
||||
@ApiOperationSupport(order = 8)
|
||||
public R<List<CommonRegionsDicVO>> selectProvinceAndCity(@PathVariable String parentCode) {
|
||||
List<CommonRegionsInfoEntity> regionList = regionsInfoService.list(
|
||||
Wrappers.lambdaQuery(CommonRegionsInfoEntity.class)
|
||||
.eq(CommonRegionsInfoEntity::getPid, Integer.valueOf(parentCode))
|
||||
);
|
||||
|
||||
return R.data(CommonRegionConvert.INSTANCE.convertRegionsListToVO(regionList));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonTourInfoVO;
|
||||
import org.springblade.modules.common.wrapper.CommonTourInfoWrapper;
|
||||
import org.springblade.modules.common.service.ICommonTourInfoService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 基础出行人档案 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("common/tour-info/commonTourInfo")
|
||||
@Tag(name = "基础出行人档案", description = "基础出行人档案接口")
|
||||
public class CommonTourInfoController extends BladeController {
|
||||
|
||||
private final ICommonTourInfoService commonTourInfoService;
|
||||
|
||||
/**
|
||||
* 基础出行人档案 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入commonTourInfo")
|
||||
public R<CommonTourInfoVO> detail(CommonTourInfoEntity commonTourInfo) {
|
||||
CommonTourInfoEntity detail = commonTourInfoService.getOne(Condition.getQueryWrapper(commonTourInfo));
|
||||
return R.data(CommonTourInfoWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 基础出行人档案 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入commonTourInfo")
|
||||
public R<IPage<CommonTourInfoVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> commonTourInfo, Query query) {
|
||||
IPage<CommonTourInfoEntity> pages = commonTourInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(commonTourInfo, CommonTourInfoEntity.class));
|
||||
return R.data(CommonTourInfoWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础出行人档案 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入commonTourInfo")
|
||||
public R<IPage<CommonTourInfoVO>> page(CommonTourInfoVO commonTourInfo, Query query) {
|
||||
IPage<CommonTourInfoVO> pages = commonTourInfoService.selectCommonTourInfoPage(Condition.getPage(query), commonTourInfo);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础出行人档案 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入commonTourInfo")
|
||||
public R save(@Valid @RequestBody CommonTourInfoEntity commonTourInfo) {
|
||||
return R.status(commonTourInfoService.save(commonTourInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础出行人档案 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入commonTourInfo")
|
||||
public R update(@Valid @RequestBody CommonTourInfoEntity commonTourInfo) {
|
||||
return R.status(commonTourInfoService.updateById(commonTourInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础出行人档案 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入commonTourInfo")
|
||||
public R submit(@Valid @RequestBody CommonTourInfoEntity commonTourInfo) {
|
||||
return R.status(commonTourInfoService.saveOrUpdate(commonTourInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础出行人档案 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(commonTourInfoService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -40,6 +40,7 @@ import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.modules.common.manager.CommonUserManager;
|
||||
import org.springblade.modules.common.pojo.vo.CommonImportUserBackOrderError;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserTourOrderVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -103,6 +104,14 @@ public class CommonUserOrderController extends BladeController {
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
@GetMapping("/tour-order-page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入order")
|
||||
public R<IPage<CommonUserTourOrderVO>> tourOrderPage(CommonUserTourOrderVO order, Query query) {
|
||||
IPage<CommonUserTourOrderVO> pages = orderService.selectTourOrderPage(Condition.getPage(query), order);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户订单 新增
|
||||
*/
|
||||
@@ -175,14 +184,28 @@ public class CommonUserOrderController extends BladeController {
|
||||
@GetMapping("/export-order-to-excel")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@Operation(summary = "导出用户订单")
|
||||
public void exportFlowToExcel(@RequestParam String account , @RequestParam List<String> searchDateRange , HttpServletResponse response) {
|
||||
List<CommonUserOrderExcel> excelList = commonUserManager.exportUserOrderToExcel(account ,searchDateRange);
|
||||
public void exportFlowToExcel(@RequestParam(required = false) Integer orderStatus ,
|
||||
@RequestParam(required = false) String account ,
|
||||
@RequestParam List<String> searchDateRange , HttpServletResponse response) {
|
||||
List<CommonUserOrderExcel> excelList = commonUserManager.exportUserMallOrderToExcel(orderStatus , account ,searchDateRange);
|
||||
ExcelUtil.export(response, "用户积分流水日志" + org.springblade.core.tool.utils.DateUtil.time(), "用户订单日志", excelList, CommonUserOrderExcel.class);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/export-tour-order-to-excel")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@Operation(summary = "导出用户订单")
|
||||
public void exportTourFlowToExcel(@RequestParam(required = false) Integer orderStatus ,
|
||||
@RequestParam(required = false) String account ,
|
||||
@RequestParam List<String> searchDateRange , HttpServletResponse response) {
|
||||
List<CommonUserOrderExcel> excelList = commonUserManager.exportUserTourOrderToExcel(orderStatus , account ,searchDateRange);
|
||||
ExcelUtil.export(response, "用户积分流水日志" + org.springblade.core.tool.utils.DateUtil.time(), "用户订单日志", excelList, CommonUserOrderExcel.class);
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/import-user-back-order")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@ApiOperationSupport(order = 13)
|
||||
@Operation(summary = "批量导入补单", description = "传入excel")
|
||||
public R<List<CommonImportUserBackOrderError>> importUserBackOrder(MultipartFile file) {
|
||||
return R.data(commonUserManager.importUserBackOrder(file));
|
||||
@@ -192,7 +215,7 @@ public class CommonUserOrderController extends BladeController {
|
||||
* 用户订单 填写快递
|
||||
*/
|
||||
@PostMapping("/fill-express")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@ApiOperationSupport(order = 14)
|
||||
@Operation(summary = "填写快递", description = "传入order")
|
||||
public R fillExpress(@Valid @RequestBody CommonUserOrderEntity order) {
|
||||
return R.status(orderService.fillExpress(order.getId(), order.getExpressNo()));
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
||||
import org.springblade.modules.common.wrapper.CulturalTourismSpotWrapper;
|
||||
import org.springblade.modules.common.service.ICulturalTourismSpotService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 文旅景点信息 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("common/tourism-spot")
|
||||
@Tag(name = "文旅景点信息", description = "文旅景点信息接口")
|
||||
public class CulturalTourismSpotController extends BladeController {
|
||||
|
||||
private final ICulturalTourismSpotService culturalTourismSpotService;
|
||||
|
||||
/**
|
||||
* 文旅景点信息 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入culturalTourismSpot")
|
||||
public R<CulturalTourismSpotVO> detail(CulturalTourismSpotEntity culturalTourismSpot) {
|
||||
CulturalTourismSpotEntity detail = culturalTourismSpotService.getOne(Condition.getQueryWrapper(culturalTourismSpot));
|
||||
return R.data(CulturalTourismSpotWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 文旅景点信息 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入culturalTourismSpot")
|
||||
public R<IPage<CulturalTourismSpotVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> culturalTourismSpot, Query query) {
|
||||
IPage<CulturalTourismSpotEntity> pages = culturalTourismSpotService.page(Condition.getPage(query), Condition.getQueryWrapper(culturalTourismSpot, CulturalTourismSpotEntity.class));
|
||||
return R.data(CulturalTourismSpotWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 文旅景点信息 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入culturalTourismSpot")
|
||||
public R<IPage<CulturalTourismSpotVO>> page(CulturalTourismSpotVO culturalTourismSpot, Query query) {
|
||||
IPage<CulturalTourismSpotVO> pages = culturalTourismSpotService.selectCulturalTourismSpotPage(Condition.getPage(query), culturalTourismSpot);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文旅景点信息 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入culturalTourismSpot")
|
||||
public R save(@Valid @RequestBody CulturalTourismSpotEntity culturalTourismSpot) {
|
||||
return R.status(culturalTourismSpotService.save(culturalTourismSpot));
|
||||
}
|
||||
|
||||
/**
|
||||
* 文旅景点信息 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入culturalTourismSpot")
|
||||
public R update(@Valid @RequestBody CulturalTourismSpotEntity culturalTourismSpot) {
|
||||
return R.status(culturalTourismSpotService.updateById(culturalTourismSpot));
|
||||
}
|
||||
|
||||
/**
|
||||
* 文旅景点信息 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入culturalTourismSpot")
|
||||
public R submit(@Valid @RequestBody CulturalTourismSpotEntity culturalTourismSpot) {
|
||||
if(!isValidRating(culturalTourismSpot.getRating())){
|
||||
throw new ServiceException("评分在0.1在5.0之间");
|
||||
}
|
||||
return R.status(culturalTourismSpotService.saveOrUpdate(culturalTourismSpot));
|
||||
}
|
||||
|
||||
/**
|
||||
* 文旅景点信息 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(culturalTourismSpotService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
private boolean isValidRating(BigDecimal rating) {
|
||||
if (rating == null) {
|
||||
return false;
|
||||
}
|
||||
BigDecimal min = new BigDecimal("0.1");
|
||||
BigDecimal max = new BigDecimal("5.0");
|
||||
|
||||
if (rating.compareTo(min) < 0 || rating.compareTo(max) > 0) {
|
||||
return false;
|
||||
}
|
||||
int scale = rating.stripTrailingZeros().scale();
|
||||
return scale <= 1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
||||
import org.springblade.modules.common.wrapper.MerchantFlagshipStoreWrapper;
|
||||
import org.springblade.modules.common.service.IMerchantFlagshipStoreService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("common/merchant-store")
|
||||
@Tag(name = "商家旗舰店信息", description = "商家旗舰店信息接口")
|
||||
public class MerchantFlagshipStoreController extends BladeController {
|
||||
|
||||
private final IMerchantFlagshipStoreService merchantFlagshipStoreService;
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入merchantFlagshipStore")
|
||||
public R<MerchantFlagshipStoreVO> detail(MerchantFlagshipStoreEntity merchantFlagshipStore) {
|
||||
MerchantFlagshipStoreEntity detail = merchantFlagshipStoreService.getById(merchantFlagshipStore.getId());
|
||||
return R.data(MerchantFlagshipStoreWrapper.build().entityVO(detail));
|
||||
|
||||
}
|
||||
/**
|
||||
* 商家旗舰店信息 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入merchantFlagshipStore")
|
||||
public R<IPage<MerchantFlagshipStoreVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> merchantFlagshipStore, Query query) {
|
||||
IPage<MerchantFlagshipStoreEntity> pages = merchantFlagshipStoreService.page(Condition.getPage(query), Condition.getQueryWrapper(merchantFlagshipStore, MerchantFlagshipStoreEntity.class));
|
||||
return R.data(MerchantFlagshipStoreWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入merchantFlagshipStore")
|
||||
public R<IPage<MerchantFlagshipStoreVO>> page(MerchantFlagshipStoreVO merchantFlagshipStore, Query query) {
|
||||
IPage<MerchantFlagshipStoreVO> pages = merchantFlagshipStoreService.selectMerchantFlagshipStorePage(Condition.getPage(query), merchantFlagshipStore);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入merchantFlagshipStore")
|
||||
public R save(@Valid @RequestBody MerchantFlagshipStoreVO merchantFlagshipStore) {
|
||||
return R.status(merchantFlagshipStoreService.saveStore(merchantFlagshipStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入merchantFlagshipStore")
|
||||
public R update(@Valid @RequestBody MerchantFlagshipStoreVO merchantFlagshipStore) {
|
||||
return R.status(merchantFlagshipStoreService.updateStore(merchantFlagshipStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入merchantFlagshipStore")
|
||||
public R submit(@Valid @RequestBody MerchantFlagshipStoreEntity merchantFlagshipStore) {
|
||||
return R.status(merchantFlagshipStoreService.saveOrUpdate(merchantFlagshipStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(merchantFlagshipStoreService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
||||
import org.springblade.modules.common.pojo.vo.NewsCategoryVO;
|
||||
import org.springblade.modules.common.wrapper.NewsCategoryWrapper;
|
||||
import org.springblade.modules.common.service.INewsCategoryService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 资讯分类 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("common/news-category")
|
||||
@Tag(name = "资讯分类", description = "资讯分类接口")
|
||||
public class NewsCategoryController extends BladeController {
|
||||
|
||||
private final INewsCategoryService newsCategoryService;
|
||||
|
||||
/**
|
||||
* 资讯分类 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入newsCategory")
|
||||
public R<NewsCategoryVO> detail(NewsCategoryEntity newsCategory) {
|
||||
NewsCategoryEntity detail = newsCategoryService.getOne(Condition.getQueryWrapper(newsCategory));
|
||||
return R.data(NewsCategoryWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 资讯分类 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入newsCategory")
|
||||
public R<IPage<NewsCategoryVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> newsCategory, Query query) {
|
||||
IPage<NewsCategoryEntity> pages = newsCategoryService.page(Condition.getPage(query), Condition.getQueryWrapper(newsCategory, NewsCategoryEntity.class));
|
||||
return R.data(NewsCategoryWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯分类 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入newsCategory")
|
||||
public R<IPage<NewsCategoryVO>> page(NewsCategoryVO newsCategory, Query query) {
|
||||
IPage<NewsCategoryVO> pages = newsCategoryService.selectNewsCategoryPage(Condition.getPage(query), newsCategory);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯分类 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入newsCategory")
|
||||
public R save(@Valid @RequestBody NewsCategoryEntity newsCategory) {
|
||||
return R.status(newsCategoryService.save(newsCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯分类 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入newsCategory")
|
||||
public R update(@Valid @RequestBody NewsCategoryEntity newsCategory) {
|
||||
return R.status(newsCategoryService.updateById(newsCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯分类 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入newsCategory")
|
||||
public R submit(@Valid @RequestBody NewsCategoryEntity newsCategory) {
|
||||
return R.status(newsCategoryService.saveOrUpdate(newsCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯分类 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(newsCategoryService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
@GetMapping("/dictionary")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "获取字典", description = "获取字典")
|
||||
public R<List<NewsCategoryEntity>> dictionary() {
|
||||
List<NewsCategoryEntity> list = newsCategoryService.list();
|
||||
return R.data(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
||||
import org.springblade.modules.common.pojo.vo.NewsContentVO;
|
||||
import org.springblade.modules.common.wrapper.NewsContentWrapper;
|
||||
import org.springblade.modules.common.service.INewsContentService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 资讯内容 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("common/news-content")
|
||||
@Tag(name = "资讯内容", description = "资讯内容接口")
|
||||
public class NewsContentController extends BladeController {
|
||||
|
||||
private final INewsContentService newsContentService;
|
||||
|
||||
/**
|
||||
* 资讯内容 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入newsContent")
|
||||
public R<NewsContentVO> detail(NewsContentEntity newsContent) {
|
||||
NewsContentEntity detail = newsContentService.getOne(Condition.getQueryWrapper(newsContent));
|
||||
return R.data(NewsContentWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 资讯内容 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入newsContent")
|
||||
public R<IPage<NewsContentVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> newsContent, Query query) {
|
||||
IPage<NewsContentEntity> pages = newsContentService.page(Condition.getPage(query), Condition.getQueryWrapper(newsContent, NewsContentEntity.class));
|
||||
return R.data(NewsContentWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯内容 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入newsContent")
|
||||
public R<IPage<NewsContentVO>> page(NewsContentVO newsContent, Query query) {
|
||||
IPage<NewsContentVO> pages = newsContentService.selectNewsContentPage(Condition.getPage(query), newsContent);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯内容 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入newsContent")
|
||||
public R save(@Valid @RequestBody NewsContentEntity newsContent) {
|
||||
return R.status(newsContentService.save(newsContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯内容 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入newsContent")
|
||||
public R update(@Valid @RequestBody NewsContentEntity newsContent) {
|
||||
return R.status(newsContentService.updateById(newsContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯内容 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入newsContent")
|
||||
public R submit(@Valid @RequestBody NewsContentEntity newsContent) {
|
||||
return R.status(newsContentService.saveOrUpdate(newsContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资讯内容 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(newsContentService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserOrderEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
||||
import org.springblade.modules.common.pojo.vo.TourOrderDetailVO;
|
||||
import org.springblade.modules.common.wrapper.TourOrderDetailWrapper;
|
||||
import org.springblade.modules.common.service.ITourOrderDetailService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("common/tour-order-detail")
|
||||
@Tag(name = "旅游团订单详情", description = "旅游团订单详情接口")
|
||||
public class TourOrderDetailController extends BladeController {
|
||||
|
||||
private final ITourOrderDetailService tourOrderDetailService;
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入tourOrderDetail")
|
||||
public R<TourOrderDetailVO> detail(TourOrderDetailEntity tourOrderDetail) {
|
||||
TourOrderDetailEntity detail = tourOrderDetailService.getOne(Condition.getQueryWrapper(tourOrderDetail));
|
||||
return R.data(TourOrderDetailWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 旅游团订单详情 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入tourOrderDetail")
|
||||
public R<IPage<TourOrderDetailVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> tourOrderDetail, Query query) {
|
||||
IPage<TourOrderDetailEntity> pages = tourOrderDetailService.page(Condition.getPage(query), Condition.getQueryWrapper(tourOrderDetail, TourOrderDetailEntity.class));
|
||||
return R.data(TourOrderDetailWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入tourOrderDetail")
|
||||
public R<IPage<TourOrderDetailVO>> page(TourOrderDetailVO tourOrderDetail, Query query) {
|
||||
IPage<TourOrderDetailVO> pages = tourOrderDetailService.selectTourOrderDetailPage(Condition.getPage(query), tourOrderDetail);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入tourOrderDetail")
|
||||
public R save(@Valid @RequestBody TourOrderDetailEntity tourOrderDetail) {
|
||||
return R.status(tourOrderDetailService.save(tourOrderDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入tourOrderDetail")
|
||||
public R update(@Valid @RequestBody TourOrderDetailEntity tourOrderDetail) {
|
||||
return R.status(tourOrderDetailService.updateById(tourOrderDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入tourOrderDetail")
|
||||
public R submit(@Valid @RequestBody TourOrderDetailEntity tourOrderDetail) {
|
||||
return R.status(tourOrderDetailService.saveOrUpdate(tourOrderDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(tourOrderDetailService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
@PostMapping("/confirm-guide-info")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "提交导游信息", description = "传入order")
|
||||
public R confirmGuideInfo(@Valid @RequestBody TourOrderDetailVO order) {
|
||||
return R.status(tourOrderDetailService.confirmGuideInfo(order.getId() , order.getGuideName(), order.getGuidePhone()));
|
||||
}
|
||||
|
||||
@PostMapping("/fill-contractUrl")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "提交电子合同", description = "传入order")
|
||||
public R fillContractUrl(@Valid @RequestBody TourOrderDetailVO order) {
|
||||
return R.status(tourOrderDetailService.fillContractUrl(order.getId() , order.getContractUrl()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
||||
import org.springblade.modules.common.pojo.vo.TourProductVO;
|
||||
import org.springblade.modules.common.wrapper.TourProductWrapper;
|
||||
import org.springblade.modules.common.service.ITourProductService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 旅游产品 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("common/tour-product")
|
||||
@Tag(name = "旅游产品", description = "旅游产品接口")
|
||||
public class TourProductController extends BladeController {
|
||||
|
||||
private final ITourProductService tourProductService;
|
||||
|
||||
/**
|
||||
* 旅游产品 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入tourProduct")
|
||||
public R<TourProductVO> detail(TourProductEntity tourProduct) {
|
||||
TourProductEntity detail = tourProductService.getOne(Condition.getQueryWrapper(tourProduct));
|
||||
return R.data(TourProductWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 旅游产品 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入tourProduct")
|
||||
public R<IPage<TourProductVO>> list(TourProductEntity tourProduct, Query query) {
|
||||
IPage<TourProductEntity> pages = tourProductService.page(Condition.getPage(query), Condition.getQueryWrapper(tourProduct).orderByDesc("id"));
|
||||
return R.data(TourProductWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游产品 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入tourProduct")
|
||||
public R<IPage<TourProductVO>> page(TourProductVO tourProduct, Query query) {
|
||||
IPage<TourProductVO> pages = tourProductService.selectTourProductPage(Condition.getPage(query), tourProduct);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游产品 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入tourProduct")
|
||||
public R save(@Valid @RequestBody TourProductVO tourProduct) {
|
||||
return R.status(tourProductService.saveTourProduct(tourProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游产品 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入tourProduct")
|
||||
public R update(@Valid @RequestBody TourProductVO tourProduct) {
|
||||
return R.status(tourProductService.updateTourProduct(tourProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游产品 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入tourProduct")
|
||||
public R submit(@Valid @RequestBody TourProductEntity tourProduct) {
|
||||
return R.status(tourProductService.saveOrUpdate(tourProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅游产品 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(tourProductService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -40,6 +40,24 @@ public interface AppCommonConvert {
|
||||
@Mapping(target = "imageUrl", source = "product.thumbImageUrl")
|
||||
CommonUserOrderEntity convertMallProductToOrder(CreateOrderRequest request, MallProductEntity product);
|
||||
|
||||
|
||||
@Mapping(target = "id", ignore = true)
|
||||
@Mapping(target = "createTime", ignore = true)
|
||||
@Mapping(target = "createUser", ignore = true)
|
||||
@Mapping(target = "createDept", ignore = true)
|
||||
@Mapping(target = "updateTime", ignore = true)
|
||||
@Mapping(target = "updateUser", ignore = true)
|
||||
@Mapping(target = "status", ignore = true)
|
||||
@Mapping(target = "isDeleted", ignore = true)
|
||||
@Mapping(target = "consigneePhone", source = "request.consigneePhone")
|
||||
@Mapping(target = "consignee", source = "request.consignee")
|
||||
@Mapping(target = "itemCode", source = "request.itemCode")
|
||||
@Mapping(target = "quantity", source = "request.quantity")
|
||||
@Mapping(target = "deliveryAddress", source = "request.address")
|
||||
@Mapping(target = "itemName", source = "product.productName")
|
||||
@Mapping(target = "imageUrl", source = "product.thumbnailUrl")
|
||||
CommonUserOrderEntity convertTourProductToOrder(CreateOrderRequest request, TourProductEntity product);
|
||||
|
||||
CommonUserOrderApiVO convertUserOrderEntityToApi(CommonUserOrderEntity entity);
|
||||
|
||||
List<CommonUserOrderApiVO> convertUserOrderEntityListTOApiList(List<CommonUserOrderEntity> entityList);
|
||||
@@ -62,4 +80,11 @@ public interface AppCommonConvert {
|
||||
|
||||
CommonUserAddressEntity convertRequestToPo(AddressSubmitRequest request);
|
||||
|
||||
TourOrderDetailEntity.TravelerDetail convertTourInfoListToOrderDetail(CommonTourInfoEntity entity);
|
||||
|
||||
List<TourOrderDetailEntity.TravelerDetail> convertTourInfoListToOrderDetail(List<CommonTourInfoEntity> list);
|
||||
|
||||
TourOrderDetailEntity.ProductDetail convertTourProductToOrderDetail(TourProductEntity tourProduct);
|
||||
|
||||
List<TourOrderDetailEntity.ProductDetail> convertTourProductListToOrderDetail(List<TourProductEntity> tourProduct);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.springblade.modules.common.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springblade.modules.api.vo.CommonNewsCategoryApiVO;
|
||||
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
||||
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CommonNewsContentConvert {
|
||||
|
||||
CommonNewsContentConvert INSTANCE = Mappers.getMapper(CommonNewsContentConvert.class);
|
||||
|
||||
|
||||
List<CommonNewsCategoryApiVO> convertNewsCategoryApiVO(List<NewsCategoryEntity> categoryList);
|
||||
|
||||
@Mapping(target = "type", source = "contentType")
|
||||
CommonNewsContentApiVO convertNewsContentApiVO(NewsContentEntity newsContentEntity);
|
||||
|
||||
CommonNewsContentDetailApiVO convertNewsContentDetailApiVO(NewsContentEntity entity);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.springblade.modules.common.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonRegionsDicVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CommonRegionConvert {
|
||||
|
||||
CommonRegionConvert INSTANCE = Mappers.getMapper(CommonRegionConvert.class);
|
||||
|
||||
|
||||
|
||||
@Mapping(target = "code", expression = "java(String.valueOf(entity.getId()))")
|
||||
CommonRegionsDicVO convertRegionsToVO(CommonRegionsInfoEntity entity);
|
||||
|
||||
List<CommonRegionsDicVO> convertRegionsListToVO(List<CommonRegionsInfoEntity> list);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.springblade.modules.common.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
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.TourProductEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CommonTourInfoConvert {
|
||||
|
||||
CommonTourInfoConvert INSTANCE = Mappers.getMapper(CommonTourInfoConvert.class);
|
||||
|
||||
CommonTourInfoApiVO convertTourInfoApiVO(CommonTourInfoEntity entity);
|
||||
|
||||
|
||||
List<CommonTourInfoApiVO> convertTourInfoListApiVO(List<CommonTourInfoEntity> list);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.springblade.modules.common.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springblade.modules.api.vo.*;
|
||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CommonTourProductConvert {
|
||||
|
||||
CommonTourProductConvert INSTANCE = Mappers.getMapper(CommonTourProductConvert.class);
|
||||
|
||||
CommonTourProductApiVO convertTourProductApiVO(TourProductEntity entity);
|
||||
|
||||
CommonTourProductDetailApiVO convertTourProductDetailApiVO(TourProductEntity entity);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.springblade.modules.common.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
||||
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
||||
|
||||
@Mapper
|
||||
public interface CommonTourismSpotConvert {
|
||||
|
||||
CommonTourismSpotConvert INSTANCE = Mappers.getMapper(CommonTourismSpotConvert.class);
|
||||
|
||||
CommonTourismSpotApiVO convertTourismSpotApiVO(CulturalTourismSpotEntity culturalTourismSpotEntity);
|
||||
|
||||
CommonTourismSpotDetailApiVO convertTourismSpotDetailApiVO(CulturalTourismSpotEntity tourismSpot);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package org.springblade.modules.common.eums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Getter
|
||||
public enum ExcelOrderStatus {
|
||||
|
||||
PENDING_PAYMENT(0, "待支付"),
|
||||
PAID(1, "已支付"),
|
||||
CANCELLED(2, "已取消"),
|
||||
SHIPPED(3, "已发货"),
|
||||
COMPLETED(4, "已完成"),
|
||||
CLOSED_TIMEOUT(5, "已关闭"),
|
||||
REFUNDING(6, "退款中"),
|
||||
REFUNDED(7, "已退款");
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
|
||||
ExcelOrderStatus(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
public String formatUserMessage(String orderId) {
|
||||
return message.formatted(orderId);
|
||||
}
|
||||
|
||||
|
||||
private static final Map<Integer, ExcelOrderStatus> BY_CODE = Stream.of(values())
|
||||
.collect(Collectors.toUnmodifiableMap(ExcelOrderStatus::getCode, Function.identity()));
|
||||
|
||||
/**
|
||||
* 根据状态码(int)获取对应的 OrderStatus 枚举
|
||||
*
|
||||
* @throws IllegalArgumentException 如果状态码无效
|
||||
*/
|
||||
public static ExcelOrderStatus fromCode(int code) {
|
||||
ExcelOrderStatus status = BY_CODE.get(code);
|
||||
if (status == null) {
|
||||
throw new IllegalArgumentException("无效的订单状态码: " + code);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全版本:根据状态码获取枚举,若无效则返回 null(适用于非严格场景)
|
||||
*/
|
||||
public static ExcelOrderStatus fromCodeOrNull(int code) {
|
||||
return BY_CODE.get(code);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,10 +7,9 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.common.utils.date.DateUtil;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
import org.springblade.modules.common.eums.BusinessModule;
|
||||
import org.springblade.modules.common.eums.OrderStatus;
|
||||
import org.springblade.modules.common.eums.PaymentStatus;
|
||||
import org.springblade.modules.common.eums.PaymentType;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.oauth2.exception.UserInvalidException;
|
||||
import org.springblade.modules.common.eums.*;
|
||||
import org.springblade.modules.common.event.PaymentSuccessEvent;
|
||||
import org.springblade.modules.common.excel.CommonUserBackOrderExcel;
|
||||
import org.springblade.modules.common.excel.CommonUserOrderExcel;
|
||||
@@ -52,16 +51,16 @@ public class CommonUserManager {
|
||||
.eq(User::getAccount, account)
|
||||
);
|
||||
Assert.notNull(user, "账号不存在");
|
||||
Date startDate = null ;
|
||||
Date endDate = null ;
|
||||
if (searchDateRange == null){
|
||||
Date startDate = null;
|
||||
Date endDate = null;
|
||||
if (searchDateRange == null) {
|
||||
throw new RuntimeException("请选择时间范围");
|
||||
}
|
||||
|
||||
startDate = DateUtil.convertFromString(searchDateRange.get(0), "yyyy-MM-dd hh:mm:ss");
|
||||
endDate = DateUtil.convertFromString(searchDateRange.get(1), "yyyy-MM-dd hh:mm:ss");
|
||||
|
||||
if (startDate.getTime() >=endDate.getTime()){
|
||||
if (startDate.getTime() >= endDate.getTime()) {
|
||||
throw new RuntimeException("开始时间不能大于结束时间");
|
||||
}
|
||||
|
||||
@@ -95,28 +94,23 @@ public class CommonUserManager {
|
||||
|
||||
}
|
||||
|
||||
public List<CommonUserOrderExcel> exportUserOrderToExcel(String account, List<String> searchDateRange) {
|
||||
Assert.isTrue(StringUtils.hasLength(account), "请选择账号");
|
||||
public List<CommonUserOrderExcel> exportUserMallOrderToExcel(Integer orderStatus, String account, List<String> searchDateRange) {
|
||||
|
||||
User user = userService.getOne(
|
||||
Wrappers.lambdaQuery(User.class)
|
||||
.eq(User::getAccount, account)
|
||||
);
|
||||
Assert.notNull(user, "账号不存在");
|
||||
Date startDate = null ;
|
||||
Date endDate = null ;
|
||||
if (searchDateRange == null){
|
||||
throw new RuntimeException("请选择时间范围");
|
||||
|
||||
Date startDate = null;
|
||||
Date endDate = null;
|
||||
if (searchDateRange == null) {
|
||||
throw new ServiceException("请选择时间范围");
|
||||
}
|
||||
|
||||
startDate = DateUtil.convertFromString(searchDateRange.get(0), "yyyy-MM-dd hh:mm:ss");
|
||||
endDate = DateUtil.convertFromString(searchDateRange.get(1), "yyyy-MM-dd hh:mm:ss");
|
||||
|
||||
if (startDate.getTime() >=endDate.getTime()){
|
||||
throw new RuntimeException("开始时间不能大于结束时间");
|
||||
if (startDate.getTime() >= endDate.getTime()) {
|
||||
throw new ServiceException("开始时间不能大于结束时间");
|
||||
}
|
||||
|
||||
List<CommonUserOrderVO> commonUserOrderList = commonUserOrderService.exportUserOrderToExcel(user.getId(), startDate, endDate);
|
||||
List<CommonUserOrderVO> commonUserOrderList = commonUserOrderService.exportUserMallOrderToExcel(orderStatus, account, startDate, endDate);
|
||||
|
||||
List<CommonUserOrderExcel> excelList = new ArrayList<>();
|
||||
|
||||
@@ -147,7 +141,7 @@ public class CommonUserManager {
|
||||
commonUserOrderExcel.setPaymentTime(order.getPaymentTime());
|
||||
commonUserOrderExcel.setPaymentStatus(PaymentStatus.fromCodeOrNull(order.getPaymentStatus()).getDescription());
|
||||
commonUserOrderExcel.setCreateTime(order.getCreateTime());
|
||||
|
||||
commonUserOrderExcel.setOrderStatus(ExcelOrderStatus.fromCode(order.getOrderStatus()).getMessage());
|
||||
excelList.add(commonUserOrderExcel);
|
||||
|
||||
});
|
||||
@@ -155,6 +149,51 @@ public class CommonUserManager {
|
||||
return excelList;
|
||||
}
|
||||
|
||||
public List<CommonUserOrderExcel> exportUserTourOrderToExcel(Integer orderStatus, String account, List<String> searchDateRange) {
|
||||
Date startDate = null;
|
||||
Date endDate = null;
|
||||
if (searchDateRange == null) {
|
||||
throw new ServiceException("请选择时间范围");
|
||||
}
|
||||
|
||||
startDate = DateUtil.convertFromString(searchDateRange.get(0), "yyyy-MM-dd hh:mm:ss");
|
||||
endDate = DateUtil.convertFromString(searchDateRange.get(1), "yyyy-MM-dd hh:mm:ss");
|
||||
|
||||
if (startDate.getTime() >= endDate.getTime()) {
|
||||
throw new ServiceException("开始时间不能大于结束时间");
|
||||
}
|
||||
|
||||
List<CommonUserOrderVO> commonUserOrderList = commonUserOrderService.exportUserTourOrderToExcel(orderStatus, account, startDate, endDate);
|
||||
|
||||
List<CommonUserOrderExcel> excelList = new ArrayList<>();
|
||||
|
||||
commonUserOrderList.forEach(order -> {
|
||||
|
||||
CommonUserOrderExcel commonUserOrderExcel = new CommonUserOrderExcel();
|
||||
commonUserOrderExcel.setId(order.getId());
|
||||
commonUserOrderExcel.setAccount(order.getAccount());
|
||||
commonUserOrderExcel.setConsigneePhone(order.getConsigneePhone());
|
||||
commonUserOrderExcel.setConsignee(order.getConsignee());
|
||||
commonUserOrderExcel.setDeliveryAddress(order.getDeliveryAddress());
|
||||
commonUserOrderExcel.setItemName(order.getItemName());
|
||||
commonUserOrderExcel.setImageUrl(order.getImageUrl());
|
||||
commonUserOrderExcel.setQuantity(order.getQuantity());
|
||||
|
||||
commonUserOrderExcel.setTotalAmount(order.getTotalAmount());
|
||||
commonUserOrderExcel.setActualAmount(order.getActualAmount());
|
||||
commonUserOrderExcel.setPaymentType(PaymentType.fromCodeOrNull(order.getPaymentType()).getName());
|
||||
commonUserOrderExcel.setPaymentTime(order.getPaymentTime());
|
||||
commonUserOrderExcel.setPaymentStatus(PaymentStatus.fromCodeOrNull(order.getPaymentStatus()).getDescription());
|
||||
commonUserOrderExcel.setCreateTime(order.getCreateTime());
|
||||
commonUserOrderExcel.setOrderStatus(ExcelOrderStatus.fromCode(order.getOrderStatus()).getMessage());
|
||||
excelList.add(commonUserOrderExcel);
|
||||
|
||||
});
|
||||
|
||||
return excelList;
|
||||
}
|
||||
|
||||
|
||||
public List<CommonImportUserBackOrderError> importUserBackOrder(MultipartFile file) {
|
||||
|
||||
List<CommonUserBackOrderExcel> read = ExcelUtil.read(file, CommonUserBackOrderExcel.class);
|
||||
@@ -166,59 +205,59 @@ public class CommonUserManager {
|
||||
|
||||
CommonUserBackOrderExcel backOrderExcel = read.get(i);
|
||||
|
||||
if (backOrderExcel.getOrderNo() == null || backOrderExcel.getActualAmount() == null){
|
||||
if (backOrderExcel.getOrderNo() == null || backOrderExcel.getActualAmount() == null) {
|
||||
log.error("第{}行错误 ,订单号或金额必填", row);
|
||||
|
||||
errorExcelList.add(
|
||||
new CommonImportUserBackOrderError()
|
||||
.setOrderNo(backOrderExcel.getOrderNo())
|
||||
.setAmount(backOrderExcel.getActualAmount())
|
||||
.setErrorMsg("第"+ row +"行错误 ,订单号或金额必填")
|
||||
.setErrorMsg("第" + row + "行错误 ,订单号或金额必填")
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
CommonUserOrderEntity userOrder = commonUserOrderService.getById(backOrderExcel.getOrderNo());
|
||||
|
||||
if (userOrder == null){
|
||||
if (userOrder == null) {
|
||||
log.error("第{}行错误 ,订单号不存在", row);
|
||||
|
||||
errorExcelList.add(
|
||||
new CommonImportUserBackOrderError()
|
||||
.setOrderNo(backOrderExcel.getOrderNo())
|
||||
.setAmount(backOrderExcel.getActualAmount())
|
||||
.setErrorMsg("第"+ row +"行错误 ,订单号不存在")
|
||||
.setErrorMsg("第" + row + "行错误 ,订单号不存在")
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (userOrder.getPaymentStatus() != 0){
|
||||
if (userOrder.getPaymentStatus() != 0) {
|
||||
|
||||
log.error("第{}行错误 ,订单:{}", row , PaymentStatus.fromCodeOrNull(userOrder.getPaymentStatus()).getDescription());
|
||||
log.error("第{}行错误 ,订单:{}", row, PaymentStatus.fromCodeOrNull(userOrder.getPaymentStatus()).getDescription());
|
||||
errorExcelList.add(
|
||||
new CommonImportUserBackOrderError()
|
||||
.setOrderNo(backOrderExcel.getOrderNo())
|
||||
.setAmount(backOrderExcel.getActualAmount())
|
||||
.setErrorMsg("第"+ row +"行错误 ,订单:" + PaymentStatus.fromCodeOrNull(userOrder.getPaymentStatus()).getDescription())
|
||||
.setErrorMsg("第" + row + "行错误 ,订单:" + PaymentStatus.fromCodeOrNull(userOrder.getPaymentStatus()).getDescription())
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (userOrder.getOrderStatus() >= 1){
|
||||
log.error("第{}行错误 ,订单:已支付 ", row );
|
||||
if (userOrder.getOrderStatus() >= 1) {
|
||||
log.error("第{}行错误 ,订单:已支付 ", row);
|
||||
errorExcelList.add(
|
||||
new CommonImportUserBackOrderError()
|
||||
.setOrderNo(backOrderExcel.getOrderNo())
|
||||
.setAmount(backOrderExcel.getActualAmount())
|
||||
.setErrorMsg("第"+ row +"行错误 ,订单:已支付")
|
||||
.setErrorMsg("第" + row + "行错误 ,订单:已支付")
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (userOrder.getActualAmount().compareTo(backOrderExcel.getActualAmount()) != 0){
|
||||
if (userOrder.getActualAmount().compareTo(backOrderExcel.getActualAmount()) != 0) {
|
||||
log.error("第{}行错误 ,订单金额不一致", row);
|
||||
errorExcelList.add(
|
||||
new CommonImportUserBackOrderError()
|
||||
.setOrderNo(backOrderExcel.getOrderNo())
|
||||
.setAmount(backOrderExcel.getActualAmount())
|
||||
.setErrorMsg("第"+ row +"行错误 ,订单金额不一致")
|
||||
.setErrorMsg("第" + row + "行错误 ,订单金额不一致")
|
||||
);
|
||||
continue;
|
||||
}
|
||||
@@ -240,7 +279,7 @@ public class CommonUserManager {
|
||||
new CommonImportUserBackOrderError()
|
||||
.setOrderNo(backOrderExcel.getOrderNo())
|
||||
.setAmount(backOrderExcel.getActualAmount())
|
||||
.setErrorMsg("第"+ row +"行错误 ,订单号提交,请刷新重试")
|
||||
.setErrorMsg("第" + row + "行错误 ,订单号提交,请刷新重试")
|
||||
);
|
||||
continue;
|
||||
}
|
||||
@@ -252,4 +291,5 @@ public class CommonUserManager {
|
||||
return errorExcelList;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonTourInfoVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 基础出行人档案 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
public interface CommonTourInfoMapper extends BaseMapper<CommonTourInfoEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param commonTourInfo 查询参数
|
||||
* @return List<CommonTourInfoVO>
|
||||
*/
|
||||
List<CommonTourInfoVO> selectCommonTourInfoPage(IPage page, CommonTourInfoVO commonTourInfo);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.CommonTourInfoMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="commonTourInfoResultMap" type="org.springblade.modules.common.pojo.entity.CommonTourInfoEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="id_card_no" property="idCardNo"/>
|
||||
<result column="passport_no" property="passportNo"/>
|
||||
<result column="hk_macau_pass_no" property="hkMacauPassNo"/>
|
||||
<result column="user_name" property="userName"/>
|
||||
<result column="gender" property="gender"/>
|
||||
<result column="contact_phone" property="contactPhone"/>
|
||||
<result column="traveler_type" property="travelerType"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectCommonTourInfoPage" resultMap="commonTourInfoResultMap">
|
||||
select * from common_tour_info where is_deleted = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -32,6 +32,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserTourOrderVO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -53,6 +54,8 @@ public interface CommonUserOrderMapper extends BaseMapper<CommonUserOrderEntity>
|
||||
*/
|
||||
List<CommonUserOrderVO> selectOrderPage(IPage page, CommonUserOrderVO order);
|
||||
|
||||
List<CommonUserTourOrderVO> selectTourOrderPage(IPage page, CommonUserTourOrderVO order);
|
||||
|
||||
List<CommonUserOrderEntity> selectOrderEntityPage(IPage page, CommonUserOrderEntity order);
|
||||
|
||||
|
||||
@@ -64,5 +67,7 @@ public interface CommonUserOrderMapper extends BaseMapper<CommonUserOrderEntity>
|
||||
*/
|
||||
List<CommonUserOrderExcel> exportOrder(@Param("ew") Wrapper<CommonUserOrderEntity> queryWrapper);
|
||||
|
||||
List<CommonUserOrderVO> selectOrderExcelList(Long userId, Date startDate, Date endDate);
|
||||
List<CommonUserOrderVO> selectOrderExcelList(Integer orderStatus, String account ,Date startDate, Date endDate , String orderType);
|
||||
|
||||
Long countOrderExcelList(Integer orderStatus, String account ,Date startDate, Date endDate , String orderType);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,13 @@
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="CommonUserTourOrderResultMap" type="org.springblade.modules.common.pojo.vo.CommonUserTourOrderVO">
|
||||
<id property="id" column="id"/>
|
||||
<result column="traveler_detail" property="travelerDetail" typeHandler="org.springblade.common.handler.PgJsonbTypeHandler"/>
|
||||
<result column="product_snapshot" property="productSnapshot" typeHandler="org.springblade.common.handler.PgJsonbTypeHandler"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectOrderPage" resultMap="CommonUserOrderResultMap">
|
||||
select uo.*, bu.account as account , mp.specs
|
||||
@@ -66,14 +73,62 @@
|
||||
and uo.create_time < #{order.endDate}
|
||||
</if>
|
||||
|
||||
<if test="order.orderType != null and order.orderType !='' ">
|
||||
AND UPPER(uo.order_type) = UPPER(#{order.orderType})
|
||||
</if>
|
||||
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectTourOrderPage" resultMap="CommonUserTourOrderResultMap">
|
||||
select
|
||||
tod.id as order_detail_id,
|
||||
tod.traveler_detail,
|
||||
tod.product_snapshot,
|
||||
tod.contract_url,
|
||||
tod.contract_status,
|
||||
tod.guide_name,
|
||||
tod.guide_phone,
|
||||
tod.start_date as tour_start_date,
|
||||
tod.end_date as tour_end_date,
|
||||
tod.remark,
|
||||
uo.*,
|
||||
bu.account as account
|
||||
from tour_order_detail tod
|
||||
left join user_order uo on tod.order_id = uo.id
|
||||
left join blade_user bu on uo.user_id = bu.id
|
||||
where tod.is_deleted = 0
|
||||
<if test="order.id != null">
|
||||
and uo.id = #{order.id}
|
||||
</if>
|
||||
<if test="order.account != null">
|
||||
and bu.account = #{order.account}
|
||||
</if>
|
||||
<if test="order.paymentStatus !=null">
|
||||
and uo.payment_status = #{order.paymentStatus}
|
||||
</if>
|
||||
<if test="order.paymentType !=null">
|
||||
and uo.payment_type = #{order.paymentType}
|
||||
</if>
|
||||
<if test="order.orderStatus != null">
|
||||
and uo.order_status = #{order.orderStatus}
|
||||
</if>
|
||||
|
||||
<if test="order.startDate != null">
|
||||
and uo.create_time >= #{order.startDate}
|
||||
and uo.create_time < #{order.endDate}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOrderEntityPage" resultType="org.springblade.modules.common.pojo.entity.CommonUserOrderEntity">
|
||||
select * from user_order where is_deleted = 0 and user_id = #{order.userId}
|
||||
<if test="order.orderStatus !=null and order.orderStatus > 0 ">
|
||||
and order_status = #{order.orderStatus}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
@@ -88,10 +143,17 @@
|
||||
left join blade_user bu on uo.user_id = bu.id
|
||||
left join mall_product mp ON CAST(uo.item_code AS BIGINT) = mp.id
|
||||
where uo.is_deleted = 0
|
||||
and uo.payment_status = 1
|
||||
|
||||
<if test="userId != null">
|
||||
and uo.user_id = #{userId}
|
||||
<if test="orderStatus != null ">
|
||||
and uo.order_status = #{orderStatus}
|
||||
</if>
|
||||
|
||||
<if test="orderType != null and orderType !='' ">
|
||||
AND UPPER(uo.order_type) = UPPER(#{orderType})
|
||||
</if>
|
||||
|
||||
<if test="account != null and account != '' ">
|
||||
and bu.account = #{account}
|
||||
</if>
|
||||
|
||||
<if test="startDate != null">
|
||||
@@ -102,4 +164,35 @@
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="countOrderExcelList" resultType="java.lang.Long">
|
||||
select count(*)
|
||||
from user_order uo
|
||||
left join blade_user bu on uo.user_id = bu.id
|
||||
left join mall_product mp ON CAST(uo.item_code AS BIGINT) = mp.id
|
||||
where uo.is_deleted = 0
|
||||
and uo.payment_status = 1
|
||||
|
||||
<if test="orderStatus != null">
|
||||
and uo.order_status = #{orderStatus}
|
||||
</if>
|
||||
|
||||
<if test="orderType != null and orderType !='' ">
|
||||
AND UPPER(uo.order_type) = UPPER(#{orderType})
|
||||
</if>
|
||||
|
||||
<if test="account != null and account != '' ">
|
||||
and bu.account = #{account}
|
||||
</if>
|
||||
|
||||
<if test="startDate != null">
|
||||
and uo.create_time >= #{startDate}
|
||||
and uo.create_time < #{endDate}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文旅景点信息 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
public interface CulturalTourismSpotMapper extends BaseMapper<CulturalTourismSpotEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param culturalTourismSpot 查询参数
|
||||
* @return List<CulturalTourismSpotVO>
|
||||
*/
|
||||
List<CulturalTourismSpotVO> selectCulturalTourismSpotPage(IPage page, CulturalTourismSpotVO culturalTourismSpot);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.CulturalTourismSpotMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="culturalTourismSpotResultMap" type="org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="spot_name" property="spotName"/>
|
||||
<result column="rating" property="rating"/>
|
||||
<result column="visit_count" property="visitCount"/>
|
||||
<result column="thumbnail_url" property="thumbnailUrl"/>
|
||||
<result column="main_image_url" property="mainImageUrl" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="detail_images" property="detailImages" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="video_url" property="videoUrl"/>
|
||||
<result column="summary" property="summary"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectCulturalTourismSpotPage" resultMap="culturalTourismSpotResultMap">
|
||||
select * from cultural_tourism_spot where is_deleted = 0 order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
public interface MerchantFlagshipStoreMapper extends BaseMapper<MerchantFlagshipStoreEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param merchantFlagshipStore 查询参数
|
||||
* @return List<MerchantFlagshipStoreVO>
|
||||
*/
|
||||
List<MerchantFlagshipStoreVO> selectMerchantFlagshipStorePage(IPage page, MerchantFlagshipStoreVO merchantFlagshipStore);
|
||||
|
||||
|
||||
List<CommonMerchantStoreApiVO> merchantStoreList(MerchantStoreRequest request);
|
||||
|
||||
CommonMerchantStoreDetailApiVO merchantStoreDetail(Long id);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.MerchantFlagshipStoreMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="merchantFlagshipStoreResultMap" type="org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="store_name" property="storeName"/>
|
||||
<result column="contact_phone" property="contactPhone"/>
|
||||
<result column="regions_id" property="regionsId"/>
|
||||
<result column="full_address" property="fullAddress"/>
|
||||
<result column="main_image_url" property="mainImageUrl" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="thumbnail_url" property="thumbnailUrl"/>
|
||||
<result column="detail_images" property="detailImages" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="business_hours" property="businessHours"/>
|
||||
<result column="store_description" property="storeDescription"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="merchantStoreDetailApiMap" type="org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO">
|
||||
<result column="store_name" property="storeName"/>
|
||||
<result column="contact_phone" property="contactPhone"/>
|
||||
<result column="full_address" property="fullAddress"/>
|
||||
<result column="main_image_url" property="mainImageUrl" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="detail_images" property="detailImages" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="business_hours" property="businessHours"/>
|
||||
<result column="store_description" property="storeDescription"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectMerchantFlagshipStorePage" resultMap="merchantFlagshipStoreResultMap">
|
||||
select * from merchant_flagship_store where is_deleted = 0 order by id desc
|
||||
</select>
|
||||
|
||||
<select id="merchantStoreList" resultType="org.springblade.modules.api.vo.CommonMerchantStoreApiVO">
|
||||
|
||||
SELECT
|
||||
id,
|
||||
store_name,
|
||||
full_address,
|
||||
thumbnail_url,
|
||||
ST_X(location) AS lng,
|
||||
ST_Y(location) AS lat,
|
||||
ROUND(ST_DistanceSphere(location,ST_SetSRID(ST_Point(#{longitude}, #{latitude}), 4326))::numeric,2) AS distance
|
||||
FROM
|
||||
merchant_flagship_store
|
||||
WHERE
|
||||
|
||||
ST_DWithin(location,ST_SetSRID(ST_Point(#{longitude}, #{latitude}), 4326),#{distance})
|
||||
|
||||
AND is_deleted = 0
|
||||
ORDER BY
|
||||
location <-> ST_SetSRID(ST_Point(#{longitude}, #{latitude}), 4326)
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="merchantStoreDetail" resultMap="merchantStoreDetailApiMap">
|
||||
select
|
||||
store_name,
|
||||
contact_phone,
|
||||
full_address,
|
||||
main_image_url,
|
||||
detail_images,
|
||||
business_hours,
|
||||
store_description,
|
||||
ST_X(location) AS lng,
|
||||
ST_Y(location) AS lat
|
||||
from
|
||||
merchant_flagship_store
|
||||
where
|
||||
is_deleted = 0 and id = #{id}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
||||
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.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资讯分类 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
public interface NewsCategoryMapper extends BaseMapper<NewsCategoryEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param newsCategory 查询参数
|
||||
* @return List<NewsCategoryVO>
|
||||
*/
|
||||
List<NewsCategoryVO> selectNewsCategoryPage(IPage page, NewsCategoryVO newsCategory);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.NewsCategoryMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="newsCategoryResultMap" type="org.springblade.modules.common.pojo.entity.NewsCategoryEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="category_name" property="categoryName"/>
|
||||
<result column="sort_order" property="sortOrder"/>
|
||||
<result column="is_top" property="isTop"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectNewsCategoryPage" resultMap="newsCategoryResultMap">
|
||||
select * from news_category where is_deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
||||
import org.springblade.modules.common.pojo.vo.NewsContentVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资讯内容 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
public interface NewsContentMapper extends BaseMapper<NewsContentEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param newsContent 查询参数
|
||||
* @return List<NewsContentVO>
|
||||
*/
|
||||
List<NewsContentVO> selectNewsContentPage(IPage page, NewsContentVO newsContent);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.NewsContentMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="newsContentResultMap" type="org.springblade.modules.common.pojo.entity.NewsContentEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="category_id" property="categoryId"/>
|
||||
<result column="title" property="title"/>
|
||||
<result column="summary" property="summary"/>
|
||||
<result column="content_type" property="contentType"/>
|
||||
<result column="video_url" property="videoUrl"/>
|
||||
<result column="play_count" property="playCount"/>
|
||||
<result column="thumbnail_url" property="thumbnailUrl"/>
|
||||
<result column="main_image_url" property="mainImageUrl" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="detail_images" property="detailImages" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="article_content" property="articleContent"/>
|
||||
<result column="comment_count" property="commentCount"/>
|
||||
<result column="is_featured" property="isFeatured"/>
|
||||
<result column="sort_order" property="sortOrder"/>
|
||||
<result column="view_count" property="viewCount"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectNewsContentPage" resultMap="newsContentResultMap">
|
||||
select * from news_content where is_deleted = 0 order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
||||
import org.springblade.modules.common.pojo.vo.TourOrderDetailVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
public interface TourOrderDetailMapper extends BaseMapper<TourOrderDetailEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param tourOrderDetail 查询参数
|
||||
* @return List<TourOrderDetailVO>
|
||||
*/
|
||||
List<TourOrderDetailVO> selectTourOrderDetailPage(IPage page, TourOrderDetailVO tourOrderDetail);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.TourOrderDetailMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="tourOrderDetailResultMap" type="org.springblade.modules.common.pojo.entity.TourOrderDetailEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="order_id" property="orderId"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="traveler_detail" property="travelerDetail" typeHandler="org.springblade.common.handler.PgJsonbTypeHandler"/>
|
||||
<result column="product_snapshot" property="productSnapshot" typeHandler="org.springblade.common.handler.PgJsonbTypeHandler"/>
|
||||
<result column="contract_url" property="contractUrl"/>
|
||||
<result column="contract_status" property="contractStatus"/>
|
||||
<result column="guide_name" property="guideName"/>
|
||||
<result column="guide_phone" property="guidePhone"/>
|
||||
<result column="start_date" property="startDate"/>
|
||||
<result column="end_date" property="endDate"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectTourOrderDetailPage" resultMap="tourOrderDetailResultMap">
|
||||
select * from tour_order_detail where is_deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
||||
import org.springblade.modules.common.pojo.vo.TourProductVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 旅游产品 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
public interface TourProductMapper extends BaseMapper<TourProductEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param tourProduct 查询参数
|
||||
* @return List<TourProductVO>
|
||||
*/
|
||||
List<TourProductVO> selectTourProductPage(IPage page, TourProductVO tourProduct);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.TourProductMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="tourProductResultMap" type="org.springblade.modules.common.pojo.entity.TourProductEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="product_name" property="productName"/>
|
||||
<result column="sub_title" property="subTitle"/>
|
||||
<result column="thumbnail_url" property="thumbnailUrl"/>
|
||||
<result column="main_image_url" property="mainImageUrl" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="detail_images" property="detailImages" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
|
||||
<result column="city_name" property="cityName"/>
|
||||
<result column="duration_days" property="durationDays"/>
|
||||
<result column="duration_nights" property="durationNights"/>
|
||||
<result column="base_price" property="basePrice"/>
|
||||
<result column="adult_price" property="adultPrice"/>
|
||||
<result column="child_price" property="childPrice"/>
|
||||
<result column="elderly_price" property="elderlyPrice"/>
|
||||
<result column="min_people" property="minPeople"/>
|
||||
<result column="max_people" property="maxPeople"/>
|
||||
<result column="require_id_card" property="requireIdCard"/>
|
||||
<result column="require_passport" property="requirePassport"/>
|
||||
<result column="require_hk_macau_pass" property="requireHkMacauPass"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="visit_count" property="visitCount"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectTourProductPage" resultMap="tourProductResultMap">
|
||||
select * from tour_product where is_deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 基础出行人档案 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonTourInfoDTO extends CommonTourInfoEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 文旅景点信息 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CulturalTourismSpotDTO extends CulturalTourismSpotEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class LocationDTO implements Serializable {
|
||||
|
||||
private Double longitude;
|
||||
|
||||
private Double latitude;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MerchantFlagshipStoreDTO extends MerchantFlagshipStoreEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 资讯分类 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NewsCategoryDTO extends NewsCategoryEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 资讯内容 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NewsContentDTO extends NewsContentEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TourOrderDetailDTO extends TourOrderDetailEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 旅游产品 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TourProductDTO extends TourProductEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 基础出行人档案 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("common_tour_info")
|
||||
@Schema(description = "CommonTourInfo对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonTourInfoEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关联系统用户ID (所属人)
|
||||
*/
|
||||
@Schema(description = "关联系统用户ID (所属人)")
|
||||
private Long userId;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@Schema(description = "身份证号")
|
||||
private String idCardNo;
|
||||
/**
|
||||
* 护照号码
|
||||
*/
|
||||
@Schema(description = "护照号码")
|
||||
private String passportNo;
|
||||
/**
|
||||
* 港澳通行证号码
|
||||
*/
|
||||
@Schema(description = "港澳通行证号码")
|
||||
private String hkMacauPassNo;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Schema(description = "姓名")
|
||||
private String userName;
|
||||
/**
|
||||
* 性别:1=男,2=女
|
||||
*/
|
||||
@Schema(description = "性别:1=男,2=女")
|
||||
private Integer gender;
|
||||
/**
|
||||
* 本人手机号
|
||||
*/
|
||||
@Schema(description = "本人手机号")
|
||||
private String contactPhone;
|
||||
/**
|
||||
* 默认人员类型:1=成人,2=儿童,3=老人
|
||||
*/
|
||||
@Schema(description = "默认人员类型:1=成人,2=儿童,3=老人")
|
||||
private Integer travelerType;
|
||||
/**
|
||||
* 备注偏好
|
||||
*/
|
||||
@Schema(description = "备注偏好")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文旅景点信息 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cultural_tourism_spot", autoResultMap = true)
|
||||
@Schema(description = "CulturalTourismSpot对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CulturalTourismSpotEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "是否推荐,0:否,1:是")
|
||||
private Integer isRecommended;
|
||||
/**
|
||||
* 景点全称
|
||||
*/
|
||||
@Schema(description = "景点全称,如:神农溪")
|
||||
private String spotName;
|
||||
/**
|
||||
* 用户评分,范围0.00~5.00
|
||||
*/
|
||||
@Schema(description = "用户评分,范围0.00~5.00")
|
||||
private BigDecimal rating;
|
||||
|
||||
/**
|
||||
* 出行人数
|
||||
*/
|
||||
@Schema(description = "出行人数")
|
||||
private Integer visitCount;
|
||||
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
@Schema(description = "缩略图")
|
||||
private String thumbnailUrl;
|
||||
/**
|
||||
* 主图
|
||||
*/
|
||||
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
|
||||
@Schema(description = "主图")
|
||||
private List<String> mainImageUrl;
|
||||
/**
|
||||
* 详情图
|
||||
*/
|
||||
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
|
||||
@Schema(description = "详情图")
|
||||
private List<String> detailImages;
|
||||
/**
|
||||
* 宣传视频
|
||||
*/
|
||||
@Schema(description = "宣传视频")
|
||||
private String videoUrl;
|
||||
/**
|
||||
* 简短摘要,列表页显示,如:“中国最美的地方”
|
||||
*/
|
||||
@Schema(description = "简短摘要")
|
||||
private String summary;
|
||||
/**
|
||||
* 详细介绍
|
||||
*/
|
||||
@Schema(description = "详细介绍")
|
||||
private String description;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
import org.springblade.common.handler.PgJtsPointTypeHandler;
|
||||
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "merchant_flagship_store" , autoResultMap = true)
|
||||
@Schema(description = "MerchantFlagshipStore对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MerchantFlagshipStoreEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 商家全称
|
||||
*/
|
||||
@Schema(description = "商家全称")
|
||||
private String storeName;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Schema(description = "联系电话")
|
||||
private String contactPhone;
|
||||
/**
|
||||
* 地址id
|
||||
*/
|
||||
@Schema(description = "地址id")
|
||||
private Long regionsId;
|
||||
/**
|
||||
* 完整详细地址文本
|
||||
*/
|
||||
@Schema(description = "完整详细地址文本")
|
||||
private String fullAddress;
|
||||
/**
|
||||
* 地理坐标 POINT(经度,纬度),用于地图定位和距离计算
|
||||
*/
|
||||
@JsonIgnore
|
||||
@TableField(typeHandler = PgJtsPointTypeHandler.class)
|
||||
@Schema(description = "地理坐标 POINT(经度,纬度),用于地图定位和距离计算")
|
||||
private Point location;
|
||||
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
@Schema(description = "缩略图")
|
||||
private String thumbnailUrl;
|
||||
|
||||
/**
|
||||
* 商家主图
|
||||
*/
|
||||
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
|
||||
@Schema(description = "商家主图")
|
||||
private List<String> mainImageUrl;
|
||||
|
||||
/**
|
||||
* 详情图
|
||||
*/
|
||||
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
|
||||
@Schema(description = "详情图")
|
||||
private List<String> detailImages;
|
||||
|
||||
/**
|
||||
* 营业时间,如:10:00--23:00
|
||||
*/
|
||||
@Schema(description = "营业时间,如:10:00--23:00")
|
||||
private String businessHours;
|
||||
/**
|
||||
* 商家详细介绍,包含功效、故事等富文本内容
|
||||
*/
|
||||
@Schema(description = "商家详细介绍")
|
||||
private String storeDescription;
|
||||
|
||||
|
||||
public void setLocation(double longitude, double latitude) {
|
||||
this.location = new org.locationtech.jts.geom.GeometryFactory()
|
||||
.createPoint(new org.locationtech.jts.geom.Coordinate(longitude, latitude));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.util.Date;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 资讯分类 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "news_category" , autoResultMap = true)
|
||||
@Schema(description = "NewsCategory对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NewsCategoryEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
@Schema(description = "分类名称")
|
||||
private String categoryName;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sortOrder;
|
||||
/**
|
||||
* 是否置顶
|
||||
*/
|
||||
@Schema(description = "是否置顶")
|
||||
private Integer isTop;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.util.Date;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
import java.io.Serial;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资讯内容 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "news_content" , autoResultMap = true)
|
||||
@Schema(description = "NewsContent对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NewsContentEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 所属分类ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "所属分类ID")
|
||||
private Long categoryId;
|
||||
/**
|
||||
* 资讯标题
|
||||
*/
|
||||
@Schema(description = "资讯标题")
|
||||
private String title;
|
||||
/**
|
||||
* 简短摘要
|
||||
*/
|
||||
@Schema(description = "简短摘要")
|
||||
private String summary;
|
||||
/**
|
||||
* 内容类型 0-图文 1-视频
|
||||
*/
|
||||
@Schema(description = "内容类型 0-图文 1-视频")
|
||||
private Integer contentType;
|
||||
/**
|
||||
* 视频链接
|
||||
*/
|
||||
@Schema(description = "视频链接")
|
||||
private String videoUrl;
|
||||
/**
|
||||
* 视频播放次数
|
||||
*/
|
||||
@Schema(description = "视频播放次数")
|
||||
private Long playCount;
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
@Schema(description = "缩略图")
|
||||
private String thumbnailUrl;
|
||||
/**
|
||||
* 主图
|
||||
*/
|
||||
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
|
||||
@Schema(description = "主图")
|
||||
private List<String> mainImageUrl;
|
||||
/**
|
||||
* 详情图
|
||||
*/
|
||||
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
|
||||
@Schema(description = "详情图")
|
||||
private List<String> detailImages;
|
||||
/**
|
||||
* 正文内容
|
||||
*/
|
||||
@Schema(description = "正文内容")
|
||||
private String articleContent;
|
||||
/**
|
||||
* 评论数量
|
||||
*/
|
||||
@Schema(description = "评论数量")
|
||||
private Long commentCount;
|
||||
/**
|
||||
* 是否置顶
|
||||
*/
|
||||
@Schema(description = "是否置顶")
|
||||
private Integer isFeatured;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序数字越大越靠前")
|
||||
private Integer sortOrder;
|
||||
/**
|
||||
* 浏览次数
|
||||
*/
|
||||
@Schema(description = "浏览次数")
|
||||
private Long viewCount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.common.handler.PgJsonbTypeHandler;
|
||||
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("tour_order_detail")
|
||||
@Schema(description = "TourOrderDetail对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TourOrderDetailEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关联订单ID
|
||||
*/
|
||||
@Schema(description = "关联订单ID")
|
||||
private Long orderId;
|
||||
/**
|
||||
* 下单用户ID
|
||||
*/
|
||||
@Schema(description = "下单用户ID")
|
||||
private Long userId;
|
||||
/**
|
||||
* 出行人信息快照 (JSONB数组)
|
||||
*/
|
||||
@TableField(typeHandler = PgJsonbTypeHandler.class)
|
||||
@Schema(description = "出行人信息快照 (JSONB数组)")
|
||||
private List<TravelerDetail> travelerDetail;
|
||||
/**
|
||||
* 产品信息快照 (JSONB数组)
|
||||
*/
|
||||
@TableField(typeHandler = PgJsonbTypeHandler.class)
|
||||
@Schema(description = "产品信息快照 (JSONB数组)")
|
||||
private List<ProductDetail> productSnapshot;
|
||||
/**
|
||||
* 电子合同地址或编号
|
||||
*/
|
||||
@Schema(description = "电子合同地址或编号")
|
||||
private String contractUrl;
|
||||
/**
|
||||
* 合同签署状态:0=未签署,1=已签署,2=已过期
|
||||
*/
|
||||
@Schema(description = "合同签署状态:0=未签署,1=已签署,2=已过期")
|
||||
private Integer contractStatus;
|
||||
/**
|
||||
* 导游姓名
|
||||
*/
|
||||
@Schema(description = "导游姓名")
|
||||
private String guideName;
|
||||
/**
|
||||
* 导游联系电话
|
||||
*/
|
||||
@Schema(description = "导游联系电话")
|
||||
private String guidePhone;
|
||||
/**
|
||||
* 出行日期
|
||||
*/
|
||||
@Schema(description = "出行日期")
|
||||
private Date startDate;
|
||||
/**
|
||||
* 预计返回日期
|
||||
*/
|
||||
@Schema(description = "预计返回日期")
|
||||
private Date endDate;
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Schema(description = "备注信息")
|
||||
private String remark;
|
||||
|
||||
|
||||
@Data
|
||||
public static class TravelerDetail implements Serializable {
|
||||
|
||||
private String idCardNo;
|
||||
/**
|
||||
* 护照号码
|
||||
*/
|
||||
private String passportNo;
|
||||
/**
|
||||
* 港澳通行证号码
|
||||
*/
|
||||
private String hkMacauPassNo;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 性别:1=男,2=女
|
||||
*/
|
||||
private Integer gender;
|
||||
/**
|
||||
* 本人手机号
|
||||
*/
|
||||
private String contactPhone;
|
||||
/**
|
||||
* 默认人员类型:1=成人,2=儿童,3=老人
|
||||
*/
|
||||
private Integer travelerType;
|
||||
/**
|
||||
* 备注偏好
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ProductDetail implements Serializable {
|
||||
private String productName;
|
||||
|
||||
private String subTitle;
|
||||
private String thumbnailUrl;
|
||||
|
||||
private List<String> mainImageUrl;
|
||||
|
||||
private List<String> detailImages;
|
||||
|
||||
private String cityName;
|
||||
|
||||
private Integer durationDays;
|
||||
|
||||
private Integer durationNights;
|
||||
|
||||
private BigDecimal basePrice;
|
||||
|
||||
private BigDecimal adultPrice;
|
||||
|
||||
private BigDecimal childPrice;
|
||||
|
||||
private BigDecimal elderlyPrice;
|
||||
|
||||
private Integer minPeople;
|
||||
|
||||
private Integer maxPeople;
|
||||
|
||||
private Integer isRecommended;
|
||||
|
||||
private Integer requireIdCard;
|
||||
|
||||
private Integer requirePassport;
|
||||
|
||||
private Integer requireHkMacauPass;
|
||||
|
||||
private String description;
|
||||
|
||||
private Integer visitCount;
|
||||
|
||||
private BigDecimal rating;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 旅游产品 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@TableName( value = "tour_product" , autoResultMap = true)
|
||||
@Schema(description = "TourProduct对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TourProductEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 产品名称 (如:恩施硒茶文化之旅)
|
||||
*/
|
||||
@Schema(description = "产品名称 (如:恩施硒茶文化之旅)")
|
||||
private String productName;
|
||||
/**
|
||||
* 副标题/亮点 (如:4天3晚 | 研学之旅)
|
||||
*/
|
||||
@Schema(description = "副标题/亮点 (如:4天3晚 | 研学之旅)")
|
||||
private String subTitle;
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
@Schema(description = "缩略图")
|
||||
private String thumbnailUrl;
|
||||
/**
|
||||
* 商家主图 (数组)
|
||||
*/
|
||||
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
|
||||
@Schema(description = "商家主图 (数组)")
|
||||
private List<String> mainImageUrl;
|
||||
/**
|
||||
* 详情展示多图 (数组)
|
||||
*/
|
||||
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
|
||||
@Schema(description = "详情展示多图 (数组)")
|
||||
private List<String> detailImages;
|
||||
/**
|
||||
* 目的地城市名称
|
||||
*/
|
||||
@Schema(description = "目的地城市名称")
|
||||
private String cityName;
|
||||
/**
|
||||
* 行程天数
|
||||
*/
|
||||
@Schema(description = "行程天数")
|
||||
private Integer durationDays;
|
||||
/**
|
||||
* 住宿晚数
|
||||
*/
|
||||
@Schema(description = "住宿晚数")
|
||||
private Integer durationNights;
|
||||
/**
|
||||
* 基础起售价
|
||||
*/
|
||||
@Schema(description = "基础起售价")
|
||||
private BigDecimal basePrice;
|
||||
/**
|
||||
* 成人单价
|
||||
*/
|
||||
@Schema(description = "成人单价")
|
||||
private BigDecimal adultPrice;
|
||||
/**
|
||||
* 儿童单价
|
||||
*/
|
||||
@Schema(description = "儿童单价")
|
||||
private BigDecimal childPrice;
|
||||
/**
|
||||
* 老年人单价
|
||||
*/
|
||||
@Schema(description = "老年人单价")
|
||||
private BigDecimal elderlyPrice;
|
||||
/**
|
||||
* 最小成团人数
|
||||
*/
|
||||
@Schema(description = "最小成团人数")
|
||||
private Integer minPeople;
|
||||
/**
|
||||
* 最大接待人数
|
||||
*/
|
||||
@Schema(description = "最大接待人数")
|
||||
private Integer maxPeople;
|
||||
|
||||
@Schema(description = "是否推荐,0:否,1:是")
|
||||
private Integer isRecommended;
|
||||
|
||||
/**
|
||||
* 是否强制身份证:0=否,1=是
|
||||
*/
|
||||
@Schema(description = "是否强制身份证:0=否,1=是")
|
||||
private Integer requireIdCard;
|
||||
/**
|
||||
* 是否强制护照:0=否,1=是
|
||||
*/
|
||||
@Schema(description = "是否强制护照:0=否,1=是")
|
||||
private Integer requirePassport;
|
||||
/**
|
||||
* 是否强制港澳通行证:0=否,1=是
|
||||
*/
|
||||
@Schema(description = "是否强制港澳通行证:0=否,1=是")
|
||||
private Integer requireHkMacauPass;
|
||||
/**
|
||||
* 产品详情描述
|
||||
*/
|
||||
@Schema(description = "产品详情描述")
|
||||
private String description;
|
||||
/**
|
||||
* 已成团次数/销量
|
||||
*/
|
||||
@Schema(description = "已成团次数/销量")
|
||||
private Integer visitCount;
|
||||
|
||||
@Schema(description = "评分,范围0.00~5.00")
|
||||
private BigDecimal rating;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 基础出行人档案 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonTourInfoVO extends CommonTourInfoEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
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 org.springblade.common.handler.PgJsonbTypeHandler;
|
||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户旅行团订单
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-06
|
||||
*/
|
||||
@Data
|
||||
public class CommonUserTourOrderVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String account;
|
||||
|
||||
private String consigneePhone;
|
||||
|
||||
private String consignee;
|
||||
|
||||
|
||||
private String orderType;
|
||||
|
||||
private String itemName;
|
||||
|
||||
private String imageUrl;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private Integer orderStatus;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
private Integer paymentType;
|
||||
|
||||
private Date paymentTime;
|
||||
|
||||
private Integer paymentStatus;
|
||||
|
||||
private Long createUser;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Long updateUser;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private Long orderDetailId;
|
||||
|
||||
private List<TravelerDetail> travelerDetail;
|
||||
|
||||
private List<ProductDetail> productSnapshot;
|
||||
|
||||
private String contractUrl;
|
||||
|
||||
private Integer contractStatus;
|
||||
|
||||
private String guideName;
|
||||
|
||||
private String guidePhone;
|
||||
|
||||
private Date tourStartDate;
|
||||
|
||||
private Date tourEndDate;
|
||||
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
private List<String> searchDateRange;
|
||||
private Date startDate;
|
||||
private Date endDate;
|
||||
|
||||
|
||||
@Data
|
||||
public static class TravelerDetail implements Serializable {
|
||||
|
||||
private String idCardNo;
|
||||
/**
|
||||
* 护照号码
|
||||
*/
|
||||
private String passportNo;
|
||||
/**
|
||||
* 港澳通行证号码
|
||||
*/
|
||||
private String hkMacauPassNo;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 性别:1=男,2=女
|
||||
*/
|
||||
private Integer gender;
|
||||
/**
|
||||
* 本人手机号
|
||||
*/
|
||||
private String contactPhone;
|
||||
/**
|
||||
* 默认人员类型:1=成人,2=儿童,3=老人
|
||||
*/
|
||||
private Integer travelerType;
|
||||
/**
|
||||
* 备注偏好
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ProductDetail implements Serializable {
|
||||
private String productName;
|
||||
|
||||
private String subTitle;
|
||||
private String thumbnailUrl;
|
||||
|
||||
private List<String> mainImageUrl;
|
||||
|
||||
private List<String> detailImages;
|
||||
|
||||
private String cityName;
|
||||
|
||||
private Integer durationDays;
|
||||
|
||||
private Integer durationNights;
|
||||
|
||||
private BigDecimal basePrice;
|
||||
|
||||
private BigDecimal adultPrice;
|
||||
|
||||
private BigDecimal childPrice;
|
||||
|
||||
private BigDecimal elderlyPrice;
|
||||
|
||||
private Integer minPeople;
|
||||
|
||||
private Integer maxPeople;
|
||||
|
||||
private Integer isRecommended;
|
||||
|
||||
private Integer requireIdCard;
|
||||
|
||||
private Integer requirePassport;
|
||||
|
||||
private Integer requireHkMacauPass;
|
||||
|
||||
private String description;
|
||||
|
||||
private Integer visitCount;
|
||||
|
||||
private BigDecimal rating;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 文旅景点信息 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CulturalTourismSpotVO extends CulturalTourismSpotEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Data;
|
||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class MerchantFlagshipStoreVO extends MerchantFlagshipStoreEntity {
|
||||
|
||||
|
||||
private Long area;
|
||||
private String addressDetail;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.NewsCategoryEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 资讯分类 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NewsCategoryVO extends NewsCategoryEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 资讯内容 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NewsContentVO extends NewsContentEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TourOrderDetailVO extends TourOrderDetailEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 旅游产品 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TourProductVO extends TourProductEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long city;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.springblade.modules.common.request;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class GeoInfoRequest implements Serializable {
|
||||
|
||||
private String key;
|
||||
|
||||
private String address;
|
||||
|
||||
private String output = "json";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package org.springblade.modules.common.response;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class GeoInfoResponse implements Serializable {
|
||||
|
||||
private String status;
|
||||
|
||||
private String info;
|
||||
|
||||
@JSONField(name = "infocode")
|
||||
private String infoCode;
|
||||
|
||||
private String count;
|
||||
|
||||
@JSONField(name = "geocodes")
|
||||
private List<GeoInfo> geoInfos;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class GeoInfo implements Serializable{
|
||||
|
||||
@JSONField(name = "formatted_address")
|
||||
private String formattedAddress;
|
||||
|
||||
private String country;
|
||||
|
||||
private String province;
|
||||
|
||||
private String city;
|
||||
|
||||
private String district;
|
||||
|
||||
private String street;
|
||||
|
||||
private String number;
|
||||
|
||||
private String location;
|
||||
|
||||
private String level;
|
||||
|
||||
@JSONField(name = "citycode")
|
||||
private String cityCode;
|
||||
|
||||
@JSONField(name = "adcode")
|
||||
private String adCode;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
|
||||
import org.springblade.modules.common.pojo.dto.LocationDTO;
|
||||
|
||||
public interface AMapService {
|
||||
|
||||
LocationDTO defaultLocation(String address);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
import org.springblade.modules.api.request.CommonRemoveTourRequest;
|
||||
import org.springblade.modules.api.request.CommonTourUserInfoRequest;
|
||||
import org.springblade.modules.api.vo.CommonTourInfoApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonTourInfoVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 基础出行人档案 服务类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
public interface ICommonTourInfoService extends BaseService<CommonTourInfoEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param commonTourInfo 查询参数
|
||||
* @return IPage<CommonTourInfoVO>
|
||||
*/
|
||||
IPage<CommonTourInfoVO> selectCommonTourInfoPage(IPage<CommonTourInfoVO> page, CommonTourInfoVO commonTourInfo);
|
||||
|
||||
List<CommonTourInfoApiVO> tourUserProfileList();
|
||||
|
||||
Boolean submitTourUserProfile(CommonTourUserInfoRequest request);
|
||||
|
||||
Boolean removeTourUserProfile(List<Long> ids);
|
||||
}
|
||||
@@ -39,6 +39,7 @@ import org.springblade.modules.common.pojo.vo.CommonUserOrderVO;
|
||||
import org.springblade.modules.common.excel.CommonUserOrderExcel;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserTourOrderVO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -59,7 +60,10 @@ public interface ICommonUserOrderService extends IService<CommonUserOrderEntity>
|
||||
*/
|
||||
IPage<CommonUserOrderVO> selectOrderPage(IPage<CommonUserOrderVO> page, CommonUserOrderVO order);
|
||||
|
||||
List<CommonUserOrderVO> exportUserOrderToExcel(Long userId , Date startDate , Date endDate);
|
||||
IPage<CommonUserTourOrderVO> selectTourOrderPage(IPage<CommonUserTourOrderVO> page, CommonUserTourOrderVO order);
|
||||
|
||||
List<CommonUserOrderVO> exportUserMallOrderToExcel(Integer orderStatus , String account ,Date startDate , Date endDate);
|
||||
List<CommonUserOrderVO> exportUserTourOrderToExcel(Integer orderStatus, String account, Date startDate, Date endDate);
|
||||
/**
|
||||
* 导出数据
|
||||
*
|
||||
@@ -81,4 +85,7 @@ public interface ICommonUserOrderService extends IService<CommonUserOrderEntity>
|
||||
boolean fillExpress(Long id, String expressNo);
|
||||
|
||||
boolean confirm(ConfirmOrderRequest request);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
||||
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
/**
|
||||
* 文旅景点信息 服务类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
public interface ICulturalTourismSpotService extends BaseService<CulturalTourismSpotEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param culturalTourismSpot 查询参数
|
||||
* @return IPage<CulturalTourismSpotVO>
|
||||
*/
|
||||
IPage<CulturalTourismSpotVO> selectCulturalTourismSpotPage(IPage<CulturalTourismSpotVO> page, CulturalTourismSpotVO culturalTourismSpot);
|
||||
|
||||
|
||||
IPage<CommonTourismSpotApiVO> tourismSpotList(IPage<CommonTourismSpotApiVO> page);
|
||||
|
||||
IPage<CommonTourismSpotApiVO> tourismSpotTopList(IPage<CommonTourismSpotApiVO> page);
|
||||
|
||||
CommonTourismSpotDetailApiVO tourismSpotDetail(@NotNull(message = "无效景点") Long id);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 服务类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
public interface IMerchantFlagshipStoreService extends BaseService<MerchantFlagshipStoreEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param merchantFlagshipStore 查询参数
|
||||
* @return IPage<MerchantFlagshipStoreVO>
|
||||
*/
|
||||
IPage<MerchantFlagshipStoreVO> selectMerchantFlagshipStorePage(IPage<MerchantFlagshipStoreVO> page, MerchantFlagshipStoreVO merchantFlagshipStore);
|
||||
|
||||
|
||||
boolean saveStore(@Valid MerchantFlagshipStoreVO merchantFlagshipStore);
|
||||
|
||||
boolean updateStore(@Valid MerchantFlagshipStoreVO merchantFlagshipStore);
|
||||
|
||||
List<CommonMerchantStoreApiVO> merchantStoreList(MerchantStoreRequest request);
|
||||
|
||||
CommonMerchantStoreDetailApiVO merchantStoreDetail(@NotNull(message = "无效店铺") Long id);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package org.springblade.modules.common.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.common.pojo.entity.NewsCategoryEntity;
|
||||
import org.springblade.modules.common.pojo.vo.NewsCategoryVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资讯分类 服务类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
public interface INewsCategoryService extends BaseService<NewsCategoryEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param newsCategory 查询参数
|
||||
* @return IPage<NewsCategoryVO>
|
||||
*/
|
||||
IPage<NewsCategoryVO> selectNewsCategoryPage(IPage<NewsCategoryVO> page, NewsCategoryVO newsCategory);
|
||||
|
||||
|
||||
List<CommonNewsCategoryApiVO> newsCategoryList();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springblade.modules.api.vo.CommonNewsContentApiVO;
|
||||
import org.springblade.modules.api.vo.CommonNewsContentDetailApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.NewsContentEntity;
|
||||
import org.springblade.modules.common.pojo.vo.NewsContentVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
|
||||
/**
|
||||
* 资讯内容 服务类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
public interface INewsContentService extends BaseService<NewsContentEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param newsContent 查询参数
|
||||
* @return IPage<NewsContentVO>
|
||||
*/
|
||||
IPage<NewsContentVO> selectNewsContentPage(IPage<NewsContentVO> page, NewsContentVO newsContent);
|
||||
|
||||
|
||||
IPage<CommonNewsContentApiVO> newsCategoryList(IPage<CommonNewsContentApiVO> page , Long categoryId);
|
||||
|
||||
CommonNewsContentDetailApiVO newsContentDetail(@NotNull(message = "无效资讯") Long id);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
||||
import org.springblade.modules.common.pojo.vo.TourOrderDetailVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
/**
|
||||
* 旅游团订单详情 服务类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
public interface ITourOrderDetailService extends BaseService<TourOrderDetailEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param tourOrderDetail 查询参数
|
||||
* @return IPage<TourOrderDetailVO>
|
||||
*/
|
||||
IPage<TourOrderDetailVO> selectTourOrderDetailPage(IPage<TourOrderDetailVO> page, TourOrderDetailVO tourOrderDetail);
|
||||
|
||||
|
||||
boolean confirmGuideInfo(Long id, String guideName, String guidePhone);
|
||||
|
||||
boolean fillContractUrl(Long id, String contractUrl);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springblade.modules.api.request.TourProductRequest;
|
||||
import org.springblade.modules.api.vo.CommonTourProductApiVO;
|
||||
import org.springblade.modules.api.vo.CommonTourProductDetailApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
||||
import org.springblade.modules.common.pojo.vo.TourProductVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 旅游产品 服务类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
public interface ITourProductService extends BaseService<TourProductEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param tourProduct 查询参数
|
||||
* @return IPage<TourProductVO>
|
||||
*/
|
||||
IPage<TourProductVO> selectTourProductPage(IPage<TourProductVO> page, TourProductVO tourProduct);
|
||||
|
||||
|
||||
boolean saveTourProduct(@Valid TourProductVO tourProduct);
|
||||
|
||||
boolean updateTourProduct(@Valid TourProductVO tourProduct);
|
||||
|
||||
IPage<CommonTourProductApiVO> tourProductList(IPage<CommonTourProductApiVO> page, TourProductRequest request);
|
||||
|
||||
IPage<CommonTourProductApiVO> tourProductTopList(IPage<CommonTourProductApiVO> page, TourProductRequest request);
|
||||
|
||||
CommonTourProductDetailApiVO tourProductDetail(@NotNull(message = "无效旅游团") Long id);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.springblade.modules.common.service.impl;
|
||||
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.modules.common.client.AMapClient;
|
||||
import org.springblade.modules.common.config.AMapConfiguration;
|
||||
import org.springblade.modules.common.pojo.dto.LocationDTO;
|
||||
import org.springblade.modules.common.request.GeoInfoRequest;
|
||||
import org.springblade.modules.common.response.GeoInfoResponse;
|
||||
import org.springblade.modules.common.service.AMapService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class AMapServiceImpl implements AMapService {
|
||||
|
||||
@Resource
|
||||
private AMapClient client;
|
||||
|
||||
private final AMapConfiguration configuration;
|
||||
|
||||
|
||||
@Override
|
||||
public LocationDTO defaultLocation(String address) {
|
||||
GeoInfoResponse geoInfoResponse = client.geoInfo(configuration.getBaseUrl(), new GeoInfoRequest().setKey(configuration.getKey()).setAddress(address));
|
||||
log.info("地址解析结果:{}", geoInfoResponse);
|
||||
if (geoInfoResponse.getStatus().equals("1")) {
|
||||
GeoInfoResponse.GeoInfo geoInfo = geoInfoResponse.getGeoInfos().get(0);
|
||||
String[] location = geoInfo.getLocation().split(StringPool.COMMA);
|
||||
return new LocationDTO().setLongitude(Double.parseDouble(location[0])).setLatitude(Double.parseDouble(location[1]));
|
||||
}
|
||||
throw new ServiceException(String.valueOf(geoInfoResponse));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
package org.springblade.modules.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springblade.common.utils.IdCardValidatorUtil;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.modules.api.request.CommonRemoveTourRequest;
|
||||
import org.springblade.modules.api.request.CommonTourUserInfoRequest;
|
||||
import org.springblade.modules.api.vo.CommonTourInfoApiVO;
|
||||
import org.springblade.modules.common.convert.CommonTourInfoConvert;
|
||||
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonTourInfoVO;
|
||||
import org.springblade.modules.common.mapper.CommonTourInfoMapper;
|
||||
import org.springblade.modules.common.service.ICommonTourInfoService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 基础出行人档案 服务实现类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class CommonTourInfoServiceImpl extends BaseServiceImpl<CommonTourInfoMapper, CommonTourInfoEntity> implements ICommonTourInfoService {
|
||||
|
||||
private static final int MAX_TRAVELER_COUNT = 30;
|
||||
|
||||
@Override
|
||||
public IPage<CommonTourInfoVO> selectCommonTourInfoPage(IPage<CommonTourInfoVO> page, CommonTourInfoVO commonTourInfo) {
|
||||
return page.setRecords(baseMapper.selectCommonTourInfoPage(page, commonTourInfo));
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = RuntimeException.class)
|
||||
@Override
|
||||
public List<CommonTourInfoApiVO> tourUserProfileList() {
|
||||
List<CommonTourInfoEntity> list = list(
|
||||
Wrappers.lambdaQuery(CommonTourInfoEntity.class)
|
||||
.eq(CommonTourInfoEntity::getUserId, AuthUtil.getUserId())
|
||||
.orderByDesc(CommonTourInfoEntity::getId)
|
||||
);
|
||||
return CommonTourInfoConvert.INSTANCE.convertTourInfoListApiVO(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean submitTourUserProfile(CommonTourUserInfoRequest request) {
|
||||
|
||||
// 1. 获取当前登录用户ID
|
||||
Long currentUserId = AuthUtil.getUserId();
|
||||
if (currentUserId == null) {
|
||||
throw new ServiceException("用户未登录");
|
||||
}
|
||||
|
||||
// 2. 判断是新增还是修改
|
||||
boolean isUpdate = request.getId() != null;
|
||||
|
||||
// 3. 基础校验:身份证号格式 (仅当提供了身份证号时)
|
||||
if (StringUtils.isNotBlank(request.getIdCardNo())) {
|
||||
if (!IdCardValidatorUtil.validateIdCard(request.getIdCardNo())) {
|
||||
throw new ServiceException("身份证号格式错误");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LambdaQueryWrapper<CommonTourInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CommonTourInfoEntity::getUserId, currentUserId);
|
||||
|
||||
// 【关键逻辑】如果是修改操作,必须排除当前记录本身,防止“自己跟自己重复”
|
||||
if (isUpdate) {
|
||||
queryWrapper.ne(CommonTourInfoEntity::getId, request.getId());
|
||||
}
|
||||
|
||||
// 只查询必要的字段,减少网络传输
|
||||
queryWrapper.select(
|
||||
CommonTourInfoEntity::getId,
|
||||
CommonTourInfoEntity::getIdCardNo,
|
||||
CommonTourInfoEntity::getPassportNo,
|
||||
CommonTourInfoEntity::getHkMacauPassNo
|
||||
);
|
||||
|
||||
List<CommonTourInfoEntity> existingList = this.list(queryWrapper);
|
||||
|
||||
// 5. 内存中校验重复性 (身份证、护照、港澳证)
|
||||
for (CommonTourInfoEntity existing : existingList) {
|
||||
// 校验身份证
|
||||
if (StringUtils.isNotBlank(request.getIdCardNo())
|
||||
&& StringUtils.equals(request.getIdCardNo(), existing.getIdCardNo())) {
|
||||
throw new ServiceException("该身份证号已存在于您的常用联系人列表中");
|
||||
}
|
||||
// 校验护照
|
||||
if (StringUtils.isNotBlank(request.getPassportNo())
|
||||
&& StringUtils.equals(request.getPassportNo(), existing.getPassportNo())) {
|
||||
throw new ServiceException("该护照号码已存在于您的常用联系人列表中");
|
||||
}
|
||||
// 校验港澳通行证
|
||||
if (StringUtils.isNotBlank(request.getHkMacauPassNo())
|
||||
&& StringUtils.equals(request.getHkMacauPassNo(), existing.getHkMacauPassNo())) {
|
||||
throw new ServiceException("该港澳通行证号码已存在于您的常用联系人列表中");
|
||||
}
|
||||
}
|
||||
|
||||
// 6. 校验数量限制
|
||||
// existingList.size() 已经是排除了当前修改记录后的真实数量
|
||||
if (existingList.size() >= MAX_TRAVELER_COUNT) {
|
||||
throw new ServiceException("每位用户最多添加 " + MAX_TRAVELER_COUNT + " 个常用出行人");
|
||||
}
|
||||
|
||||
// 7. 构建并填充实体对象
|
||||
CommonTourInfoEntity entity = new CommonTourInfoEntity();
|
||||
|
||||
// 拷贝基础属性 (userName, phone, remark, certificates 等)
|
||||
BeanUtils.copyProperties(request, entity);
|
||||
|
||||
// 设置系统字段
|
||||
entity.setUserId(currentUserId);
|
||||
|
||||
// 8. 智能计算性别和人员类型 (仅当有身份证号时)
|
||||
if (StringUtils.isNotBlank(request.getIdCardNo())) {
|
||||
try {
|
||||
int gender = getGenderFromIdCard(request.getIdCardNo());
|
||||
entity.setGender(gender);
|
||||
|
||||
int age = getAgeFromIdCard(request.getIdCardNo());
|
||||
int travelerType = calculateTravelerType(age);
|
||||
entity.setTravelerType(travelerType);
|
||||
|
||||
log.info("用户 [{}] 添加/修改联系人,自动识别年龄: {}, 类型: {}", currentUserId, age, travelerType);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.warn("身份证解析失败,将使用前端传入或默认值。Error: {}", e.getMessage());
|
||||
// 如果解析失败,不阻断流程,依赖前端传入的 gender/travelerType 或默认值
|
||||
ensureDefaultValues(entity);
|
||||
}
|
||||
} else {
|
||||
// 如果没有身份证号(纯护照/港澳台用户),确保关键字段有值
|
||||
ensureDefaultValues(entity);
|
||||
}
|
||||
|
||||
// 9. 执行保存或更新
|
||||
boolean result = this.saveOrUpdate(entity);
|
||||
if (!result) {
|
||||
throw new ServiceException("操作失败,请稍后重试");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private int calculateTravelerType(int age) {
|
||||
if (age < 18) {
|
||||
return 2; // 儿童
|
||||
} else if (age >= 65) {
|
||||
return 3; // 老人
|
||||
} else {
|
||||
return 1; // 成人
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean removeTourUserProfile(List<Long> ids) {
|
||||
return removeByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
// 验证身份证号
|
||||
|
||||
|
||||
// 获取年龄
|
||||
public static int getAgeFromIdCard(String idCard) {
|
||||
|
||||
String birthdayStr;
|
||||
// 2. 提取出生日期字符串
|
||||
if (idCard.trim().length() == 18) {
|
||||
// 18位:第7-14位 (索引6到13)
|
||||
birthdayStr = idCard.trim().substring(6, 14);
|
||||
} else {
|
||||
// 15位旧身份证:第7-12位,年份需补全为19xx
|
||||
// 例:880101 -> 19880101
|
||||
birthdayStr = "19" + idCard.trim().substring(6, 12);
|
||||
}
|
||||
|
||||
try {
|
||||
// 3. 解析日期
|
||||
LocalDate birthDate = LocalDate.parse(birthdayStr, DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
LocalDate today = LocalDate.now();
|
||||
|
||||
// 4. 计算周期 (Period 会自动处理闰年和“生日未过”的逻辑)
|
||||
Period period = Period.between(birthDate, today);
|
||||
|
||||
// 如果出生日期在未来 (非法数据),返回 -1
|
||||
if (period.isNegative()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return period.getYears();
|
||||
} catch (DateTimeParseException e) {
|
||||
// 日期格式错误 (如 20230230)
|
||||
return -1;
|
||||
} catch (Exception e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureDefaultValues(CommonTourInfoEntity entity) {
|
||||
if (entity.getGender() == null) {
|
||||
entity.setGender(1); // 默认男,或根据业务抛错要求前端必传
|
||||
}
|
||||
if (entity.getTravelerType() == null) {
|
||||
entity.setTravelerType(1); // 默认成人
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Integer getGenderFromIdCard(String idCard) {
|
||||
|
||||
if (idCard == null || idCard.isBlank()){
|
||||
return -1;
|
||||
}
|
||||
|
||||
char genderChar;
|
||||
// 2. 定位性别位
|
||||
if (idCard.trim().length() == 18) {
|
||||
// 18位:第17位 (索引从0开始,所以是16)
|
||||
genderChar = idCard.trim().charAt(16);
|
||||
} else {
|
||||
// 15位:第15位 (索引14)
|
||||
genderChar = idCard.trim().charAt(14);
|
||||
}
|
||||
|
||||
// 3. 校验该位是否为数字
|
||||
if (!Character.isDigit(genderChar)) {
|
||||
// 理论上这里不会发生,因为正则校验过,但为了健壮性保留
|
||||
return null;
|
||||
}
|
||||
|
||||
// 4. 判断奇偶
|
||||
int genderNum = Character.getNumericValue(genderChar);
|
||||
|
||||
return (genderNum % 2 == 1) ? 1 : 2;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -29,6 +29,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import io.jsonwebtoken.lang.Assert;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springblade.common.utils.date.DateUtil;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
@@ -46,12 +48,15 @@ import org.springblade.modules.common.eums.PaymentStatus;
|
||||
import org.springblade.modules.common.eums.PaymentType;
|
||||
import org.springblade.modules.common.event.FillExpressEvent;
|
||||
import org.springblade.modules.common.event.PaymentSuccessEvent;
|
||||
import org.springblade.modules.common.pojo.entity.CommonTourInfoEntity;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserOrderEntity;
|
||||
import org.springblade.modules.common.pojo.entity.TourOrderDetailEntity;
|
||||
import org.springblade.modules.common.pojo.entity.TourProductEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserOrderVO;
|
||||
import org.springblade.modules.common.excel.CommonUserOrderExcel;
|
||||
import org.springblade.modules.common.mapper.CommonUserOrderMapper;
|
||||
import org.springblade.modules.common.service.ICommonUserOrderService;
|
||||
import org.springblade.modules.common.service.ICommonUserPointService;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserTourOrderVO;
|
||||
import org.springblade.modules.common.service.*;
|
||||
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
||||
import org.springblade.modules.mall.service.IMallProductService;
|
||||
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
|
||||
@@ -66,9 +71,11 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 用户订单 服务实现类
|
||||
@@ -82,10 +89,11 @@ import java.util.Random;
|
||||
public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMapper, CommonUserOrderEntity> implements ICommonUserOrderService {
|
||||
|
||||
private final IMallProductService productService;
|
||||
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
|
||||
private final ICommonUserPointService userPointService;
|
||||
private final ITourProductService tourProductService;
|
||||
private final ICommonTourInfoService commonTourInfoService;
|
||||
private final ITourOrderDetailService tourOrderDetailService;
|
||||
|
||||
private final IMarketUserCommissionService commissionService;
|
||||
|
||||
@@ -103,13 +111,45 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
||||
}
|
||||
}
|
||||
|
||||
order.setOrderType(BusinessModule.SELF_OPERATED_MALL.getCode());
|
||||
|
||||
return page.setRecords(baseMapper.selectOrderPage(page, order));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonUserOrderVO> exportUserOrderToExcel(Long userId, Date startDate, Date endDate) {
|
||||
public IPage<CommonUserTourOrderVO> selectTourOrderPage(IPage<CommonUserTourOrderVO> page, CommonUserTourOrderVO order) {
|
||||
if (order.getSearchDateRange() != null) {
|
||||
order.setStartDate(DateUtil.convertFromString(order.getSearchDateRange().get(0), "yyyy-MM-dd hh:mm:ss"));
|
||||
order.setEndDate(DateUtil.convertFromString(order.getSearchDateRange().get(1), "yyyy-MM-dd hh:mm:ss"));
|
||||
if (order.getStartDate().getTime() >= order.getEndDate().getTime()) {
|
||||
throw new RuntimeException("开始时间不能大于结束时间");
|
||||
}
|
||||
}
|
||||
|
||||
return baseMapper.selectOrderExcelList(userId, startDate, endDate);
|
||||
order.setOrderType(BusinessModule.TRAVEL_GROUP.getCode());
|
||||
|
||||
return page.setRecords(baseMapper.selectTourOrderPage(page, order));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonUserOrderVO> exportUserMallOrderToExcel(Integer orderStatus, String account ,Date startDate, Date endDate) {
|
||||
|
||||
Long countItem = baseMapper.countOrderExcelList(orderStatus, account, startDate, endDate, BusinessModule.SELF_OPERATED_MALL.getCode());
|
||||
if (countItem > 10000) {
|
||||
throw new ServiceException("导出数据量过大,超过" + 10000 + "条数据,请缩小范围导出");
|
||||
}
|
||||
|
||||
return baseMapper.selectOrderExcelList(orderStatus, account ,startDate, endDate ,BusinessModule.SELF_OPERATED_MALL.getCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonUserOrderVO> exportUserTourOrderToExcel(Integer orderStatus, String account, Date startDate, Date endDate) {
|
||||
Long countItem = baseMapper.countOrderExcelList(orderStatus, account, startDate, endDate, BusinessModule.TRAVEL_GROUP.getCode());
|
||||
if (countItem > 10000) {
|
||||
throw new ServiceException("导出数据量过大,超过" + 10000 + "条数据,请缩小范围导出");
|
||||
}
|
||||
|
||||
return baseMapper.selectOrderExcelList(orderStatus, account ,startDate, endDate ,BusinessModule.TRAVEL_GROUP.getCode());
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +171,14 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
||||
}
|
||||
return switch (BusinessModule.fromCodeIgnoreCaseOrNull(orderType)) {
|
||||
case SELF_OPERATED_MALL -> {
|
||||
if (request.getConsigneePhone() == null){
|
||||
throw new ServiceException("请填写联系电话");
|
||||
}
|
||||
|
||||
if (request.getConsignee() == null){
|
||||
throw new ServiceException("请填写联系人");
|
||||
}
|
||||
|
||||
MallProductEntity product = productService.getById(Long.valueOf(request.getItemCode()));
|
||||
Assert.notNull(product, "无效商品");
|
||||
CommonUserOrderEntity order = AppCommonConvert.INSTANCE.convertMallProductToOrder(request, product);
|
||||
@@ -147,7 +195,126 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
||||
yield new CreateOrderResponse(String.valueOf(order.getId()), actualAmount, totalAmount, discount);
|
||||
}
|
||||
case TRAVEL_GROUP -> {
|
||||
yield new CreateOrderResponse("", BigDecimal.ZERO, BigDecimal.ZERO, discount);
|
||||
|
||||
Long productId;
|
||||
try {
|
||||
productId = Long.valueOf(request.getItemCode());
|
||||
} catch (NumberFormatException e) {
|
||||
throw new ServiceException("商品ID格式非法");
|
||||
}
|
||||
|
||||
if (request.getPaymentType() != 1 && request.getPaymentType() != 2){
|
||||
throw new ServiceException("请选择正确的支付方式");
|
||||
}
|
||||
|
||||
List<Long> travelerIds = request.getTourInfoIds();
|
||||
if (CollectionUtils.isEmpty(travelerIds)) {
|
||||
throw new ServiceException("请至少选择一名出行人");
|
||||
}
|
||||
|
||||
if (request.getTourStartDate() == null || request.getTourEndDate() == null){
|
||||
throw new ServiceException("请选择出行时间");
|
||||
}
|
||||
|
||||
if (request.getTourStartDate().getTime() >= request.getTourEndDate().getTime()){
|
||||
throw new ServiceException("开始时间不能大于结束时间");
|
||||
}
|
||||
|
||||
TourProductEntity tourProduct = tourProductService.getById(productId);
|
||||
if (tourProduct == null || tourProduct.getStatus() != 1) { // 假设 1=上架
|
||||
throw new ServiceException("该旅游产品已下架或不存在");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int selectedCount = travelerIds.size();
|
||||
// 使用 Optional 处理数据库中可能为 NULL 的最大/最小人数限制
|
||||
int minPeople = Optional.ofNullable(tourProduct.getMinPeople()).orElse(1);
|
||||
int maxPeople = Optional.ofNullable(tourProduct.getMaxPeople()).orElse(9999);
|
||||
|
||||
if (selectedCount < minPeople || selectedCount > maxPeople) {
|
||||
throw new ServiceException(String.format("出行人数超出限制:最少 %d 人,最多 %d 人 (当前选择 %d 人)",
|
||||
minPeople, maxPeople, selectedCount));
|
||||
}
|
||||
|
||||
// 3. 【核心安全】查询出行人信息 (增加 userId 校验,防止越权)
|
||||
// 原代码未校验 userId,恶意用户可遍历 ID 盗用他人信息下单
|
||||
List<CommonTourInfoEntity> travelerList = commonTourInfoService.list(
|
||||
Wrappers.lambdaQuery(CommonTourInfoEntity.class)
|
||||
.in(CommonTourInfoEntity::getId, travelerIds)
|
||||
.eq(CommonTourInfoEntity::getUserId, AuthUtil.getUserId())
|
||||
.orderByDesc(CommonTourInfoEntity::getId)
|
||||
);
|
||||
|
||||
// 校验是否所有请求的 ID 都成功查出(防止传入不存在的 ID 或他人的 ID)
|
||||
if (travelerList.size() != selectedCount) {
|
||||
throw new ServiceException("部分出行人信息无效或无权选择,请重新选择");
|
||||
}
|
||||
|
||||
|
||||
// 4. 【金额计算】安全累加与证件校验
|
||||
BigDecimal totalAmount = BigDecimal.ZERO;
|
||||
// 提前获取价格并兜底为 0,防止数据库脏数据导致 NPE
|
||||
BigDecimal adultPrice = Optional.ofNullable(tourProduct.getAdultPrice()).orElse(BigDecimal.ZERO);
|
||||
BigDecimal childPrice = Optional.ofNullable(tourProduct.getChildPrice()).orElse(BigDecimal.ZERO);
|
||||
BigDecimal elderPrice = Optional.ofNullable(tourProduct.getBasePrice()).orElse(BigDecimal.ZERO);
|
||||
|
||||
for (CommonTourInfoEntity traveler : travelerList) {
|
||||
Integer type = Optional.ofNullable(traveler.getTravelerType()).orElse(1); // 默认成人
|
||||
|
||||
// 累加金额
|
||||
totalAmount = switch (type) {
|
||||
case 1 -> totalAmount.add(adultPrice);
|
||||
case 2 -> totalAmount.add(childPrice);
|
||||
case 3 -> totalAmount.add(elderPrice);
|
||||
default -> totalAmount.add(adultPrice); // 未知类型按成人算
|
||||
};
|
||||
|
||||
// 证件合规性校验 (提取为独立方法,保持主流程清晰)
|
||||
validateCertificates(traveler, tourProduct);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BigDecimal actualAmount = totalAmount.subtract(discount);
|
||||
if (actualAmount.compareTo(BigDecimal.ZERO) < 0) {
|
||||
actualAmount = BigDecimal.ZERO; // 防止实付金额为负
|
||||
}
|
||||
|
||||
|
||||
CommonUserOrderEntity order = AppCommonConvert.INSTANCE.convertTourProductToOrder(request, tourProduct);
|
||||
order.setConsigneePhone(travelerList.get(0).getContactPhone());
|
||||
order.setConsignee(travelerList.get(0).getUserName());
|
||||
order.setUserId(AuthUtil.getUserId());
|
||||
order.setOrderType(BusinessModule.TRAVEL_GROUP.getCode());
|
||||
order.setTotalAmount(totalAmount);
|
||||
order.setActualAmount(actualAmount);
|
||||
order.setOrderType(orderType);
|
||||
order.setPaymentType(request.getPaymentType());
|
||||
order.setCreateTime(new Date());
|
||||
|
||||
this.save(order);
|
||||
if (order.getId() == null) {
|
||||
throw new ServiceException("订单创建失败:无法生成订单号");
|
||||
}
|
||||
|
||||
// 7. 【构建订单】详情表 (快照)
|
||||
TourOrderDetailEntity detail = new TourOrderDetailEntity();
|
||||
detail.setOrderId(order.getId());
|
||||
detail.setUserId(AuthUtil.getUserId());
|
||||
detail.setStartDate(request.getTourStartDate());
|
||||
detail.setEndDate(request.getTourEndDate());
|
||||
detail.setRemark(request.getRemark());
|
||||
detail.setContractStatus(0);
|
||||
|
||||
// 转换快照数据
|
||||
detail.setTravelerDetail(AppCommonConvert.INSTANCE.convertTourInfoListToOrderDetail(travelerList));
|
||||
detail.setProductSnapshot(AppCommonConvert.INSTANCE.convertTourProductListToOrderDetail(List.of(tourProduct)));
|
||||
|
||||
tourOrderDetailService.save(detail);
|
||||
|
||||
yield new CreateOrderResponse(String.valueOf(order.getId()), actualAmount, totalAmount, discount);
|
||||
}
|
||||
default -> throw new IllegalArgumentException("不支持的订单类型: " + request.getOrderType());
|
||||
};
|
||||
@@ -204,6 +371,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
||||
if (order == null) {
|
||||
throw new IllegalStateException("订单更新成功但查询不到,id=" + id);
|
||||
}
|
||||
// userPointService.grantPointsByUserOrder(order);
|
||||
|
||||
eventPublisher.publishEvent(new PaymentSuccessEvent(id, order.getUserId(), BusinessModule.SELF_OPERATED_MALL));
|
||||
|
||||
@@ -260,4 +428,24 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void validateCertificates(CommonTourInfoEntity traveler, TourProductEntity product) {
|
||||
String name = Optional.ofNullable(traveler.getUserName()).orElse("未知用户");
|
||||
|
||||
// 兼容 Boolean 和 Integer 类型的字段定义 (视具体实体类定义而定)
|
||||
boolean needIdCard = product.getRequireIdCard() == 1;
|
||||
boolean needPassport = product.getRequirePassport() == 1;
|
||||
boolean needHkMacau = product.getRequireHkMacauPass() == 1;
|
||||
|
||||
if (needIdCard && StringUtils.isBlank(traveler.getIdCardNo())) {
|
||||
throw new ServiceException(String.format("出行人 [%s] 未填写身份证号", name));
|
||||
}
|
||||
if (needPassport && StringUtils.isBlank(traveler.getPassportNo())) {
|
||||
throw new ServiceException(String.format("出行人 [%s] 未填写护照号", name));
|
||||
}
|
||||
if (needHkMacau && StringUtils.isBlank(traveler.getHkMacauPassNo())) {
|
||||
throw new ServiceException(String.format("出行人 [%s] 未填写港澳通行证", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package org.springblade.modules.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springblade.modules.api.vo.CommonTourismSpotApiVO;
|
||||
import org.springblade.modules.api.vo.CommonTourismSpotDetailApiVO;
|
||||
import org.springblade.modules.common.convert.CommonTourismSpotConvert;
|
||||
import org.springblade.modules.common.pojo.entity.CulturalTourismSpotEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CulturalTourismSpotVO;
|
||||
import org.springblade.modules.common.mapper.CulturalTourismSpotMapper;
|
||||
import org.springblade.modules.common.service.ICulturalTourismSpotService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
|
||||
/**
|
||||
* 文旅景点信息 服务实现类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Service
|
||||
public class CulturalTourismSpotServiceImpl extends BaseServiceImpl<CulturalTourismSpotMapper, CulturalTourismSpotEntity> implements ICulturalTourismSpotService {
|
||||
|
||||
@Override
|
||||
public IPage<CulturalTourismSpotVO> selectCulturalTourismSpotPage(IPage<CulturalTourismSpotVO> page, CulturalTourismSpotVO culturalTourismSpot) {
|
||||
return page.setRecords(baseMapper.selectCulturalTourismSpotPage(page, culturalTourismSpot));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CommonTourismSpotApiVO> tourismSpotList(IPage<CommonTourismSpotApiVO> spotApiPage) {
|
||||
Page<CulturalTourismSpotEntity> result = page(
|
||||
new Page<>(spotApiPage.getCurrent(), spotApiPage.getSize()),
|
||||
Wrappers.lambdaQuery(CulturalTourismSpotEntity.class)
|
||||
.select(CulturalTourismSpotEntity::getId,
|
||||
CulturalTourismSpotEntity::getSpotName,
|
||||
CulturalTourismSpotEntity::getRating,
|
||||
CulturalTourismSpotEntity::getVisitCount,
|
||||
CulturalTourismSpotEntity::getThumbnailUrl,
|
||||
CulturalTourismSpotEntity::getSummary)
|
||||
.eq(CulturalTourismSpotEntity::getIsRecommended, 0)
|
||||
.orderByDesc(CulturalTourismSpotEntity::getVisitCount)
|
||||
|
||||
);
|
||||
|
||||
return result.convert(CommonTourismSpotConvert.INSTANCE::convertTourismSpotApiVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CommonTourismSpotApiVO> tourismSpotTopList(IPage<CommonTourismSpotApiVO> spotApiPage) {
|
||||
Page<CulturalTourismSpotEntity> result = page(
|
||||
new Page<>(spotApiPage.getCurrent(), spotApiPage.getSize()),
|
||||
Wrappers.lambdaQuery(CulturalTourismSpotEntity.class)
|
||||
.select(CulturalTourismSpotEntity::getId,
|
||||
CulturalTourismSpotEntity::getSpotName,
|
||||
CulturalTourismSpotEntity::getRating,
|
||||
CulturalTourismSpotEntity::getVisitCount,
|
||||
CulturalTourismSpotEntity::getThumbnailUrl,
|
||||
CulturalTourismSpotEntity::getSummary)
|
||||
.eq(CulturalTourismSpotEntity::getIsRecommended, 1)
|
||||
.orderByDesc(CulturalTourismSpotEntity::getVisitCount)
|
||||
|
||||
);
|
||||
|
||||
return result.convert(CommonTourismSpotConvert.INSTANCE::convertTourismSpotApiVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonTourismSpotDetailApiVO tourismSpotDetail(Long id) {
|
||||
CulturalTourismSpotEntity tourismSpot = getById(id);
|
||||
return CommonTourismSpotConvert.INSTANCE.convertTourismSpotDetailApiVO(tourismSpot);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package org.springblade.modules.common.service.impl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.modules.api.request.MerchantStoreRequest;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreApiVO;
|
||||
import org.springblade.modules.api.vo.CommonMerchantStoreDetailApiVO;
|
||||
import org.springblade.modules.common.pojo.dto.LocationDTO;
|
||||
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
||||
import org.springblade.modules.common.pojo.entity.MerchantFlagshipStoreEntity;
|
||||
import org.springblade.modules.common.pojo.vo.MerchantFlagshipStoreVO;
|
||||
import org.springblade.modules.common.mapper.MerchantFlagshipStoreMapper;
|
||||
import org.springblade.modules.common.service.AMapService;
|
||||
import org.springblade.modules.common.service.ICommonRegionsInfoService;
|
||||
import org.springblade.modules.common.service.IMerchantFlagshipStoreService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商家旗舰店信息 服务实现类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-03-17
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MerchantFlagshipStoreServiceImpl extends BaseServiceImpl<MerchantFlagshipStoreMapper, MerchantFlagshipStoreEntity> implements IMerchantFlagshipStoreService {
|
||||
|
||||
private final AMapService mapService;
|
||||
private final ICommonRegionsInfoService commonRegionsInfoService;
|
||||
|
||||
@Override
|
||||
public IPage<MerchantFlagshipStoreVO> selectMerchantFlagshipStorePage(IPage<MerchantFlagshipStoreVO> page, MerchantFlagshipStoreVO merchantFlagshipStore) {
|
||||
return page.setRecords(baseMapper.selectMerchantFlagshipStorePage(page, merchantFlagshipStore));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveStore(MerchantFlagshipStoreVO storeVO) {
|
||||
if (storeVO.getArea() == null){
|
||||
throw new ServiceException("请选择地址");
|
||||
}
|
||||
|
||||
CommonRegionsInfoEntity regionsInfo = commonRegionsInfoService.getById(storeVO.getArea());
|
||||
if (regionsInfo == null){
|
||||
throw new ServiceException("请选择正确的地址");
|
||||
}
|
||||
LocationDTO locationDTO = mapService.defaultLocation(regionsInfo.getFullName() + storeVO.getAddressDetail());
|
||||
|
||||
|
||||
|
||||
MerchantFlagshipStoreEntity store = new MerchantFlagshipStoreEntity();
|
||||
|
||||
store.setLocation(locationDTO.getLongitude() , locationDTO.getLatitude());
|
||||
store.setRegionsId(regionsInfo.getId());
|
||||
store.setFullAddress(regionsInfo.getFullName() + storeVO.getAddressDetail());
|
||||
|
||||
store.setStoreName(storeVO.getStoreName());
|
||||
store.setContactPhone(storeVO.getContactPhone());
|
||||
store.setThumbnailUrl(storeVO.getThumbnailUrl());
|
||||
store.setMainImageUrl(storeVO.getMainImageUrl());
|
||||
store.setDetailImages(storeVO.getDetailImages());
|
||||
store.setBusinessHours(storeVO.getBusinessHours());
|
||||
store.setStoreDescription(storeVO.getStoreDescription());
|
||||
|
||||
log.info("店铺信息:{}", store);
|
||||
|
||||
return save(store);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateStore(MerchantFlagshipStoreVO storeVO) {
|
||||
if (storeVO.getArea() == null) {
|
||||
throw new ServiceException("请选择地址");
|
||||
}
|
||||
|
||||
CommonRegionsInfoEntity regionsInfo = commonRegionsInfoService.getById(storeVO.getArea());
|
||||
if (regionsInfo == null) {
|
||||
throw new ServiceException("请选择正确的地址");
|
||||
}
|
||||
|
||||
LocationDTO locationDTO = mapService.defaultLocation(regionsInfo.getFullName() + storeVO.getAddressDetail());
|
||||
|
||||
MerchantFlagshipStoreEntity store = new MerchantFlagshipStoreEntity();
|
||||
|
||||
store.setLocation(locationDTO.getLongitude(), locationDTO.getLatitude());
|
||||
store.setRegionsId(regionsInfo.getId());
|
||||
store.setFullAddress(regionsInfo.getFullName() + storeVO.getAddressDetail());
|
||||
|
||||
store.setId(storeVO.getId());
|
||||
store.setStoreName(storeVO.getStoreName());
|
||||
store.setContactPhone(storeVO.getContactPhone());
|
||||
store.setThumbnailUrl(storeVO.getThumbnailUrl());
|
||||
store.setMainImageUrl(storeVO.getMainImageUrl());
|
||||
store.setDetailImages(storeVO.getDetailImages());
|
||||
store.setBusinessHours(storeVO.getBusinessHours());
|
||||
store.setStoreDescription(storeVO.getStoreDescription());
|
||||
return updateById(store);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonMerchantStoreApiVO> merchantStoreList(MerchantStoreRequest request) {
|
||||
return this.baseMapper.merchantStoreList(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonMerchantStoreDetailApiVO merchantStoreDetail(Long id) {
|
||||
return this.baseMapper.merchantStoreDetail(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user