Эх сурвалжийг харах

Merge remote-tracking branch 'origin/v0.1' into v0.1

chenchen 5 сар өмнө
parent
commit
c83b5b6c5c
19 өөрчлөгдсөн 493 нэмэгдсэн , 37 устгасан
  1. 43 1
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/CleanDataController.java
  2. 54 1
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourismProjectToWebController.java
  3. 13 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/DatePriceSaveDto.java
  4. 11 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourismBookProjectDto.java
  5. 3 3
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/DateRangePriceVo.java
  6. 2 2
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/DateRangesPriceVo.java
  7. 19 11
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/DeliveryOrderController.java
  8. 4 4
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/DeliveryOrderItemsController.java
  9. 124 12
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/ExtraController.java
  10. 4 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/DeliveryOrderMapper.xml
  11. 17 2
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourBookInfoMapper.xml
  12. 31 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourBookInfoDto.java
  13. 21 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/model/DeliveryOrder.java
  14. 31 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourBookInfo.java
  15. 13 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/service/DeliveryOrderService.java
  16. 50 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/service/impl/DeliveryOrderServiceImpl.java
  17. 19 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/vo/DeliveryOrderVo.java
  18. 31 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/vo/TourBookInfoVo.java
  19. 3 1
      common/common-core/src/main/java/com/tourism/common/core/constant/ErrorCodeEnum.java

+ 43 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/CleanDataController.java

@@ -1,13 +1,25 @@
 //package com.tourism.webadmin.app.website.controller;
 //
 //import cn.dev33.satoken.annotation.SaIgnore;
+//import com.tourism.common.core.util.MyDateUtil;
+//import com.tourism.webadmin.back.model.TourismDatePrice;
+//import com.tourism.webadmin.back.model.TourismProject;
+//import com.tourism.webadmin.back.service.TourismDatePriceService;
+//import com.tourism.webadmin.back.service.TourismProjectService;
 //import io.swagger.v3.oas.annotations.tags.Tag;
 //import lombok.extern.slf4j.Slf4j;
+//import org.apache.commons.lang3.time.DateUtils;
 //import org.springframework.beans.factory.annotation.Autowired;
 //import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.PostMapping;
 //import org.springframework.web.bind.annotation.RequestMapping;
 //import org.springframework.web.bind.annotation.RestController;
 //import com.tourism.webadmin.app.website.service.CleanDataService;
+//
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//
 ///**
 // * 数据清洗接口。
 // *
@@ -17,12 +29,15 @@
 //@Tag(name = "数据清洗接口")
 //@Slf4j
 //@RestController
-//@SaIgnore
 //@RequestMapping("/cleanData")
 //public class CleanDataController {
 //
 //    @Autowired
 //    private CleanDataService cleanDataService;
+//    @Autowired
+//    private TourismProjectService tourismProjectService;
+//    @Autowired
+//    private TourismDatePriceService tourismDatePriceService;
 //
 //    /**
 //     * 列出符合过滤条件个人订单列表。
@@ -30,8 +45,35 @@
 //     *
 //     * @return 应答结果对象,包含查询结果集。
 //     */
+//    @SaIgnore
 //    @GetMapping("/cleanRichTextData")
 //    public void cleanRichTextData() throws Exception{
 //        cleanDataService.cleanRichTextData();
 //    }
+//
+//    /**
+//     * 根据项目生成未来三个月的日历价格。
+//     * @return 应答结果对象,包含查询结果集。
+//     */
+//    @PostMapping("/generateDatePrice")
+//    public void generateDatePrice(){
+//        TourismProject tourismProject = new TourismProject();
+//        List<TourismProject> tourismProjectList =
+//                tourismProjectService.getTourismProjectList(tourismProject, "");
+//        //for循环根据日期遍历
+//        tourismProjectList.stream().forEach(item->{
+//            Date date = DateUtils.addMonths(MyDateUtil.truncateToDay(new Date()),3);
+//            List<TourismDatePrice> tourismDatePriceList = new ArrayList<>();
+//            for(Date date1 = MyDateUtil.truncateToDay(new Date());date1.before(date);date1 = DateUtils.addDays(date1,1)) {
+//                TourismDatePrice tourismDatePrice = new TourismDatePrice();
+//                tourismDatePrice.setProjectId(item.getId());
+//                tourismDatePrice.setAdultPrice(item.getPrice());
+//                tourismDatePrice.setChildrenPrice(item.getPrice());
+//                tourismDatePrice.setDepartureDate(date1);
+//                tourismDatePriceList.add(tourismDatePrice);
+//            }
+//            tourismDatePriceService.saveNewBatch(tourismDatePriceList);
+//        });
+//
+//    }
 //}

+ 54 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourismProjectToWebController.java

@@ -10,19 +10,26 @@ import com.tourism.common.additional.utils.StringUtils;
 import com.tourism.common.additional.utils.UrlConvertUtils;
 import com.tourism.common.core.constant.ErrorCodeEnum;
 import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.IpUtil;
 import com.tourism.common.core.util.MyDateUtil;
 import com.tourism.common.core.util.MyModelUtil;
 import com.tourism.common.core.util.MyPageUtil;
+import com.tourism.webadmin.app.website.dto.TourismBookProjectDto;
 import com.tourism.webadmin.app.website.dto.TourismProjectToWebDto;
 import com.tourism.webadmin.app.website.vo.DateRange;
 import com.tourism.webadmin.app.website.vo.TourismProjectDatePriceVo;
 import com.tourism.webadmin.app.website.vo.WebSiteProjectDatePriceVo;
+import com.tourism.webadmin.back.dto.TourBookInfoDto;
 import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.TourBookInfoService;
+import com.tourism.webadmin.back.service.TourUserService;
 import com.tourism.webadmin.back.service.TourismDatePriceService;
 import com.tourism.webadmin.back.service.TourismProjectService;
 import com.tourism.webadmin.back.vo.TourismProjectVo;
 import com.tourism.common.additional.config.ApplicationConfig;
+import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
 import jakarta.validation.Valid;
 import jakarta.validation.constraints.NotNull;
 import lombok.extern.slf4j.Slf4j;
@@ -50,7 +57,6 @@ import static java.util.stream.Collectors.toList;
 @Tag(name = "门户旅游项目管理接口")
 @Slf4j
 @RestController
-@SaIgnore
 @RequestMapping("/website/tourism/project")
 @Validated
 public class TourismProjectToWebController {
@@ -61,6 +67,10 @@ public class TourismProjectToWebController {
     private ApplicationConfig applicationConfig;
     @Autowired
     private TourismDatePriceService tourismDatePriceService;
+    @Autowired
+    private TourUserService tourUserService;
+    @Autowired
+    private TourBookInfoService tourBookInfoService;
 
     /**
      * 列出符合过滤条件的旅游项目管理列表。
@@ -68,6 +78,7 @@ public class TourismProjectToWebController {
      * @param tourismProjectDtoFilter 过滤对象。
      * @return 应答结果对象,包含查询结果集。
      */
+    @SaIgnore
     @GetMapping("/list")
     public ResponseResult<MyPageData<TourismProjectVo>> list(
             @Valid @ModelAttribute TourismProjectToWebDto tourismProjectDtoFilter) {
@@ -116,6 +127,7 @@ public class TourismProjectToWebController {
      * @param id 指定对象主键Id。
      * @return 应答结果对象,包含对象详情。
      */
+    @SaIgnore
 //    @SaCheckPermission("tourismProject.view")
     @GetMapping("/detail")
     public ResponseResult<TourismProjectVo> detail(@NotNull(message = "所属目录(id)不能为空") Long id) {
@@ -156,6 +168,7 @@ public class TourismProjectToWebController {
      * @param projectId 项目id。
      * @return 应答结果对象,包含对象详情。
      */
+    @SaIgnore
     @GetMapping("/viewDatePrice")
     public ResponseResult<WebSiteProjectDatePriceVo> view(@RequestParam Long projectId) {
 
@@ -205,4 +218,44 @@ public class TourismProjectToWebController {
         webSiteProjectDatePriceVo.setDateRange(dateRange);
         return ResponseResult.success(webSiteProjectDatePriceVo);
     }
+
+    /**
+    * 项目详情页面的预定接口
+    *
+    * @param tourismBookProjectDto 预定项目的Dto
+    * @return 应答结果对象,包含对象详情。
+    */
+    @PostMapping("/bookProject")
+    public ResponseResult<Void> view(HttpServletRequest request,@RequestBody TourismBookProjectDto tourismBookProjectDto) {
+        //获取用户的手机号
+        Long userId = TokenData.takeFromRequest().getUserId();
+        TourUser tourUser = tourUserService.getById(userId);
+        String mobile = tourUser.getMobile();
+
+        //根据当前日期,查询当天的项目日历价格
+        TourismDatePrice tourismDatePrice = new TourismDatePrice();
+//        tourismDatePrice.setDepartureDate(MyDateUtil.truncateToDay(new Date()));
+        tourismDatePrice.setProjectId(tourismBookProjectDto.getProjectId());
+        tourismDatePrice.setDepartureDate(tourismBookProjectDto.getStartDate());
+        TourismDatePrice tourismDatePriceOne = tourismDatePriceService.getOne(tourismDatePrice);
+
+        //构建预定的数据进行保存
+        TourBookInfo tourBookInfo = new TourBookInfo();
+        tourBookInfo.setType(tourismBookProjectDto.getType());
+        tourBookInfo.setProjectId(tourismBookProjectDto.getProjectId());
+        tourBookInfo.setAdultNumber(tourismBookProjectDto.getAdultNumber());
+        tourBookInfo.setChildrenNumber(tourismBookProjectDto.getChildrenNumber());
+        tourBookInfo.setAdultPrice(tourismDatePriceOne.getAdultPrice());
+        tourBookInfo.setChildrenPrice(tourismDatePriceOne.getChildrenPrice());
+        tourBookInfo.setBookMobile(mobile);
+        tourBookInfo.setBookName(mobile);
+        tourBookInfo.setBookTime(tourismBookProjectDto.getStartDate());
+        tourBookInfo.setTotalPrice( tourismDatePriceOne.getAdultPrice().multiply(BigDecimal.valueOf(tourismBookProjectDto.getAdultNumber()))
+                .add(tourismDatePriceOne.getChildrenPrice().multiply(BigDecimal.valueOf(tourismBookProjectDto.getChildrenNumber()))));
+//        tourBookInfo.setBookIp(IpUtil.getRemoteIpAddress(request));
+
+        tourBookInfoService.saveNew(tourBookInfo);
+        return ResponseResult.success();
+    }
+
 }

+ 13 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/DatePriceSaveDto.java

@@ -0,0 +1,13 @@
+package com.tourism.webadmin.app.website.dto;
+
+import com.tourism.webadmin.app.website.vo.DateRangesPriceVo;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class DatePriceSaveDto {
+
+    private Long projectId;
+    private List<DateRangesPriceVo> dateRangesPriceVoList;
+}

+ 11 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourismBookProjectDto.java

@@ -0,0 +1,11 @@
+package com.tourism.webadmin.app.website.dto;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class TourismBookProjectDto {
+    private Integer type;private Long projectId;
+    private Integer adultNumber;private Integer childrenNumber;private Date startDate;
+}

+ 3 - 3
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/DateRangePriceVo.java

@@ -9,15 +9,15 @@ import java.util.Date;
 @Data
 public class DateRangePriceVo {
 
-    private Date startDate;
+    private LocalDate startDate;
 
-    private Date endDate;
+    private LocalDate endDate;
 
     private BigDecimal adultPrice;
 
     private BigDecimal childrenPrice;
 
-    public DateRangePriceVo(Date startDate, Date endDate, BigDecimal adultPrice, BigDecimal childrenPrice) {
+    public DateRangePriceVo(LocalDate startDate, LocalDate endDate, BigDecimal adultPrice, BigDecimal childrenPrice) {
         this.startDate = startDate;
         this.endDate = endDate;
         this.adultPrice = adultPrice;

+ 2 - 2
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/DateRangesPriceVo.java

@@ -1,16 +1,16 @@
 package com.tourism.webadmin.app.website.vo;
 
+import ch.qos.logback.core.joran.sanity.Pair;
 import lombok.Data;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.util.Date;
 import java.util.List;
-
 @Data
 public class DateRangesPriceVo {
 
-    private List<Date> departureDate;
+    private List<LocalDate> dateRange;
 
     private BigDecimal adultPrice;
 

+ 19 - 11
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/DeliveryOrderController.java

@@ -5,16 +5,14 @@ import com.alibaba.fastjson.JSONObject;
 import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;
 import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
 import com.tourism.common.core.object.*;
 import com.tourism.common.core.util.*;
 import com.tourism.common.core.constant.*;
 import com.tourism.common.core.annotation.MyRequestBody;
-import com.tourism.webadmin.back.dto.DeliveryOrderDto;
-import com.tourism.webadmin.back.dto.DeliveryOrderItemsDto;
-import com.tourism.webadmin.back.model.DeliveryOrder;
-import com.tourism.webadmin.back.model.DeliveryOrderItems;
-import com.tourism.webadmin.back.service.DeliveryOrderService;
-import com.tourism.webadmin.back.vo.DeliveryOrderVo;
 import com.tourism.common.additional.config.ApplicationConfig;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -191,6 +189,11 @@ public class DeliveryOrderController {
         Set<String> translatedDictFieldSet = new HashSet<>();
         List<DeliveryOrder> dataList =
                 ImportUtil.doImport(headerInfos, skipHeader, filename, DeliveryOrder.class, translatedDictFieldSet);
+        CallResult result = deliveryOrderService.verifyImportList(dataList, translatedDictFieldSet);
+        if (!result.isSuccess()) {
+            // result中返回了具体的验证失败对象,如果需要返回更加详细的错误,可根据实际情况手动修改。
+            return ResponseResult.errorFrom(result);
+        }
         deliveryOrderService.saveNewBatch(dataList, -1);
         return ResponseResult.success();
     }
@@ -215,7 +218,7 @@ public class DeliveryOrderController {
         // 导出文件的标题数组
         // NOTE: 下面的代码中仅仅导出了主表数据,主表聚合计算数据和主表关联字典的数据。
         // 一对一从表数据的导出,可根据需要自行添加。如:headerMap.put("slaveFieldName.xxxField", "标题名称")
-        Map<String, String> headerMap = new LinkedHashMap<>(21);
+        Map<String, String> headerMap = new LinkedHashMap<>(22);
         headerMap.put("id", "主键");
         headerMap.put("deliveryTime", "配送时间");
         headerMap.put("deliveryAddress", "配送地址");
@@ -224,12 +227,12 @@ public class DeliveryOrderController {
         headerMap.put("tableware", "餐具数量");
         headerMap.put("orderNo", "订单号");
         headerMap.put("orderTime", "下单时间");
-        headerMap.put("payType", "支付方式");
+        headerMap.put("payTypeDictMap.name", "支付方式");
         headerMap.put("orderAmount", "订单金额");
         headerMap.put("payAmount", "实付金额");
-        headerMap.put("orderStatus", "订单状态");
+        headerMap.put("orderStatusDictMap.name", "订单状态");
         headerMap.put("customerId", "用户id");
-        headerMap.put("refundStatus", "退款状态");
+        headerMap.put("refundStatusDictMap.name", "退款状态");
         headerMap.put("packCharge", "打包费");
         headerMap.put("deliveryFee", "配送费");
         headerMap.put("createUserId", "创建用户");
@@ -237,6 +240,7 @@ public class DeliveryOrderController {
         headerMap.put("updateUserId", "更新用户");
         headerMap.put("updateTime", "更新时间");
         headerMap.put("dataState", "删除标记(1: 正常 -1: 已删除)");
+        headerMap.put("shopName", "店铺名称");
         ExportUtil.doExport(resultList, headerMap, "deliveryOrder.xlsx");
     }
 
@@ -276,7 +280,7 @@ public class DeliveryOrderController {
         CallResult verifyResult;
         // 下面是输入参数中,主表关联数据的验证。
         DeliveryOrder deliveryOrder = MyModelUtil.copyTo(deliveryOrderDto, DeliveryOrder.class);
-        DeliveryOrder originalData;
+        DeliveryOrder originalData = null;
         if (forUpdate && deliveryOrder != null) {
             originalData = deliveryOrderService.getById(deliveryOrder.getId());
             if (originalData == null) {
@@ -284,6 +288,10 @@ public class DeliveryOrderController {
             }
             relationData.put("originalData", originalData);
         }
+        verifyResult = deliveryOrderService.verifyRelatedData(deliveryOrder, originalData);
+        if (!verifyResult.isSuccess()) {
+            return ResponseResult.errorFrom(verifyResult);
+        }
         // 处理主表的一对多关联 [DeliveryOrderItems]
         List<DeliveryOrderItems> deliveryOrderItemsList =
                 MyModelUtil.copyCollectionTo(deliveryOrderItemsDtoList, DeliveryOrderItems.class);

+ 4 - 4
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/DeliveryOrderItemsController.java

@@ -4,14 +4,14 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;
 import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
 import com.tourism.common.core.object.*;
 import com.tourism.common.core.util.*;
 import com.tourism.common.core.constant.*;
 import com.tourism.common.core.annotation.MyRequestBody;
-import com.tourism.webadmin.back.dto.DeliveryOrderItemsDto;
-import com.tourism.webadmin.back.model.DeliveryOrderItems;
-import com.tourism.webadmin.back.service.DeliveryOrderItemsService;
-import com.tourism.webadmin.back.vo.DeliveryOrderItemsVo;
 import com.tourism.common.additional.config.ApplicationConfig;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.v3.oas.annotations.tags.Tag;

+ 124 - 12
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/ExtraController.java

@@ -1,24 +1,28 @@
 package com.tourism.webadmin.back.controller;
 
+import ch.qos.logback.core.joran.sanity.Pair;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.tourism.common.core.constant.ErrorCodeEnum;
 import com.tourism.common.core.object.MyOrderParam;
 import com.tourism.common.core.object.MyRelationParam;
 import com.tourism.common.core.object.ResponseResult;
+import com.tourism.common.core.util.MyDateUtil;
 import com.tourism.common.core.util.MyModelUtil;
+import com.tourism.webadmin.app.website.dto.DatePriceSaveDto;
 import com.tourism.webadmin.app.website.vo.DateRangePriceVo;
 import com.tourism.webadmin.app.website.vo.DateRangesPriceVo;
 import com.tourism.webadmin.back.model.TourismDatePrice;
 import com.tourism.webadmin.back.model.TourismProject;
 import com.tourism.webadmin.back.service.TourismDatePriceService;
+import com.tourism.webadmin.back.service.TourismProjectService;
 import com.tourism.webadmin.back.vo.TourismProjectVo;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.time.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-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 org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
@@ -43,8 +47,10 @@ public class ExtraController {
 
     @Autowired
     private TourismDatePriceService tourismDatePriceService;
+    @Autowired
+    private TourismProjectService tourismProjectService;
     /**
-     * 查看指定旅游项目管理对象详情。
+     * 查看指定旅游项目的日历价格
      *
      * @param projectId 项目id。
      * @return 应答结果对象,包含对象详情。
@@ -66,53 +72,159 @@ public class ExtraController {
         List<TourismDatePrice> tourismDatePriceList =
                 tourismDatePriceService.getTourismDatePriceList(tourismDatePrice, orderBy);
 
-        // 使用 reduce 方法处理
         List<DateRangePriceVo> result = new ArrayList<>();
         Date startDate = null;
         Date endDate = null;
         BigDecimal currentAdultPrice = null;
         BigDecimal currentChildrenPrice = null;
+        Date lastDate = null;
         for (int i = 0; i < tourismDatePriceList.size(); i++) {
             TourismDatePrice current = tourismDatePriceList.get(i);
             Date currentDate = current.getDepartureDate();
             BigDecimal currentPrice = current.getAdultPrice();
             BigDecimal currentChildPrice = current.getChildrenPrice();
 
-            if (i == 0 || (currentDate.equals(startDate) || currentDate.equals(new Date(startDate.getTime() + 24 * 60 * 60 * 1000))) && currentPrice.equals(currentAdultPrice) && currentChildPrice.equals(currentChildrenPrice)) {
+            if (i == 0 || (currentDate.equals(new Date(lastDate.getTime() + 24 * 60 * 60 * 1000)) && currentPrice.equals(currentAdultPrice) && currentChildPrice.equals(currentChildrenPrice))) {
                 if (startDate == null) {
                     startDate = currentDate;
                 }
                 endDate = currentDate;
                 currentAdultPrice = currentPrice;
                 currentChildrenPrice = currentChildPrice;
+                lastDate = currentDate;
             } else {
                 if (startDate != null) {
-                    result.add(new DateRangePriceVo(startDate, endDate, currentAdultPrice, currentChildrenPrice));
-//                    result.add(new DateRangePriceVo(startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), currentAdultPrice, currentChildrenPrice));
+                    result.add(new DateRangePriceVo(startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), currentAdultPrice, currentChildrenPrice));
                 }
                 startDate = currentDate;
                 endDate = currentDate;
                 currentAdultPrice = currentPrice;
                 currentChildrenPrice = currentChildPrice;
+                lastDate = currentDate;
             }
         }
 
         // 添加最后一个范围
         if (startDate != null) {
-            result.add(new DateRangePriceVo(startDate, endDate, currentAdultPrice, currentChildrenPrice));
+            result.add(new DateRangePriceVo(startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), currentAdultPrice, currentChildrenPrice));
         }
+
         List<DateRangesPriceVo> dateRangesPriceVoList = new ArrayList<>();
 
         result.stream().forEach(u->{
             DateRangesPriceVo dateRangesPriceVo = new DateRangesPriceVo();
             dateRangesPriceVo.setAdultPrice(u.getAdultPrice());
             dateRangesPriceVo.setChildrenPrice(u.getChildrenPrice());
-            List<Date> list = new ArrayList<>();
+            List<LocalDate> list = new ArrayList<>();
             list.add(u.getStartDate());list.add(u.getEndDate());
-            dateRangesPriceVo.setDepartureDate(list);
+            dateRangesPriceVo.setDateRange(list);
             dateRangesPriceVoList.add(dateRangesPriceVo);
         });
         return ResponseResult.success(dateRangesPriceVoList);
 
     }
+    /**
+     * 保存指定旅游项目的日历价格。
+     *
+     * @param datePriceSaveDto 日历价格数组。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @Transactional
+    @SaCheckPermission("tourismProject.view")
+    @PostMapping("/saveDatePrice")
+    public ResponseResult<Void> saveDatePrice(@RequestBody DatePriceSaveDto datePriceSaveDto) {
+        //dateRangesPriceVoList为空的话,直接返回成功
+        if(CollectionUtils.isEmpty(datePriceSaveDto.getDateRangesPriceVoList())){
+            return ResponseResult.success();
+        }
+        //取旅游项目的价格,来对列表数据进行对比,如果列表数据低于旅游项目的价格,则进行提示
+        TourismProject tourismProject = tourismProjectService.getById(datePriceSaveDto.getProjectId());
+        if(tourismProject == null){
+            return ResponseResult.error(ErrorCodeEnum.DATA_SAVE_FAILED,"旅游项目不存在");
+        }else {
+            ArrayList<BigDecimal> adultPriceList =
+                    datePriceSaveDto.getDateRangesPriceVoList().stream().map(DateRangesPriceVo::getAdultPrice).collect(Collectors.toCollection(ArrayList::new));
+            ArrayList<BigDecimal> childrenPriceList =
+                    datePriceSaveDto.getDateRangesPriceVoList().stream().map(DateRangesPriceVo::getChildrenPrice).collect(Collectors.toCollection(ArrayList::new));
+
+            for(BigDecimal adultPrice : adultPriceList){
+                if(tourismProject.getPrice().compareTo(adultPrice) > 0){
+                return ResponseResult.error(ErrorCodeEnum.PRICE_ERROR,"成人价格不能低于旅游项目的价格");
+                }
+            }
+            for(BigDecimal childrenPrice : childrenPriceList){
+                if(tourismProject.getPrice().compareTo(childrenPrice) > 0){
+                    return ResponseResult.error(ErrorCodeEnum.PRICE_ERROR,"儿童价格不能低于旅游项目的价格");
+                }
+            }
+        }
+
+        //进行时间范围的判断,判断时间段是否交错;交错的话,则返回时间交错的信息
+        List<DateRangePriceVo> result = new ArrayList<>();
+        for (DateRangesPriceVo dateRangesPriceVo : datePriceSaveDto.getDateRangesPriceVoList()) {
+            DateRangePriceVo dateRangePriceVo = new DateRangePriceVo(
+                    dateRangesPriceVo.getDateRange().get(0),dateRangesPriceVo.getDateRange().get(1),
+                    dateRangesPriceVo.getAdultPrice(),dateRangesPriceVo.getChildrenPrice());
+            result.add(dateRangePriceVo);
+        }
+        //转换出来时间后,判断时间是否交错
+        for(int i=0;i<result.size();i++) {
+            if (result.get(i).getStartDate().isEqual(result.get(i).getEndDate()) || result.get(i).getStartDate().isBefore(result.get(i).getEndDate())){
+                for (int j = 0; j < result.size(); j++) {
+                    if (i == j) {
+                        continue;
+                    }
+                    //如果两条数据的开始日期或者结束日期一致的话,则进行报错返回
+                    if (result.get(i).getStartDate().isEqual(result.get(j).getStartDate()) || (result.get(i).getStartDate().isEqual(result.get(j).getEndDate()))) {
+//                        return ResponseResult.error(ErrorCodeEnum.DATE_OVERLAP, "开始日期为:" + result.get(i).getStartDate() + "和" + result.get(j).getStartDate() + "的时间段有重叠");
+                        return ResponseResult.error(ErrorCodeEnum.DATE_OVERLAP, "第"+ (i+1) +"条数据和第" + (j+1) + "条数据的时间段有重叠");
+                    }
+                    if (result.get(i).getStartDate().isAfter(result.get(j).getStartDate()) && result.get(i).getStartDate().isBefore(result.get(j).getEndDate())) {
+//                        return ResponseResult.error(ErrorCodeEnum.DATE_OVERLAP, "开始日期为:" + result.get(i).getStartDate() + "和" + result.get(j).getStartDate() + "的时间段有重叠");
+                        return ResponseResult.error(ErrorCodeEnum.DATE_OVERLAP, "第"+ (i+1) +"条数据和第" + (j+1) + "条数据的时间段有重叠");
+                    }
+                    if (result.get(i).getEndDate().isAfter(result.get(j).getStartDate()) && result.get(i).getEndDate().isBefore(result.get(j).getEndDate())) {
+//                        return ResponseResult.error(ErrorCodeEnum.DATE_OVERLAP, "开始日期为:" + result.get(i).getStartDate() + "和" + result.get(j).getStartDate() + "的时间段有重叠");
+                        return ResponseResult.error(ErrorCodeEnum.DATE_OVERLAP, "第"+ (i+1) +"条数据和第" + (j+1) + "条数据的时间段有重叠");
+                    }
+                }
+        }else {
+                return ResponseResult.error(ErrorCodeEnum.DATE_OVERLAP, "开始日期为:" + result.get(i).getStartDate() + ",结束日期为:" + result.get(i).getEndDate() + "的时间段有误,请重新输入");
+            }
+        }
+        //时间没有问题的话,则进行项目日历的查询,先进行删除
+        TourismDatePrice filter = new TourismDatePrice();
+        filter.setProjectId(datePriceSaveDto.getProjectId());
+        filter.setNowDate(MyDateUtil.truncateToDay(new Date()));
+        List<TourismDatePrice> tourismDatePriceList = tourismDatePriceService.getTourismDatePriceList(filter, "");
+        if(!CollectionUtils.isEmpty(tourismDatePriceList)){
+            tourismDatePriceService.removeByIds(tourismDatePriceList.stream().map(TourismDatePrice::getId).collect(Collectors.toList()));
+        }
+        //根据result构建新增的数据,再进行新增
+        result.stream().forEach(item-> {
+            if (item.getStartDate().equals(item.getEndDate())) {
+                TourismDatePrice tourismDatePrice = new TourismDatePrice();
+                tourismDatePrice.setProjectId(datePriceSaveDto.getProjectId());
+                tourismDatePrice.setDepartureDate(Date.from(item.getStartDate().atStartOfDay(ZoneId.systemDefault()).toInstant()));
+                tourismDatePrice.setAdultPrice(item.getAdultPrice());
+                tourismDatePrice.setChildrenPrice(item.getChildrenPrice());
+                tourismDatePriceService.saveNew(tourismDatePrice);
+            } else {
+                //对item的开始日期进行新增,直到新增到item的endDate,把中间的日期进行汇总,形成一个新的list
+                List<TourismDatePrice> tourismDatePriceList1 = new ArrayList<>();
+                for (LocalDate date = item.getStartDate(); date.isBefore(item.getEndDate().plusDays(1)); date = date.plusDays(1)) {
+                    TourismDatePrice tourismDatePrice = new TourismDatePrice();
+                    tourismDatePrice.setProjectId(datePriceSaveDto.getProjectId());
+                    tourismDatePrice.setDepartureDate(Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant()));
+                    tourismDatePrice.setAdultPrice(item.getAdultPrice());
+                    tourismDatePrice.setChildrenPrice(item.getChildrenPrice());
+                    tourismDatePriceList1.add(tourismDatePrice);
+                }
+                //批量新增
+                tourismDatePriceService.saveNewBatch(tourismDatePriceList1);
+            }
+        });
+        return ResponseResult.success();
+    }
+
 }

+ 4 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/DeliveryOrderMapper.xml

@@ -87,6 +87,10 @@
     <!-- 这里仅包含调用接口输入的主表过滤条件 -->
     <sql id="inputFilterRef">
         <if test="deliveryOrderFilter != null">
+            <if test="deliveryOrderFilter.shopName != null and deliveryOrderFilter.shopName != ''">
+                <bind name = "safeDeliveryOrderShopName" value = "'%' + deliveryOrderFilter.shopName + '%'" />
+                AND tour_delivery_order.shop_name LIKE #{safeDeliveryOrderShopName}
+            </if>
             <if test="deliveryOrderFilter.deliveryPhone != null and deliveryOrderFilter.deliveryPhone != ''">
                 <bind name = "safeDeliveryOrderDeliveryPhone" value = "'%' + deliveryOrderFilter.deliveryPhone + '%'" />
                 AND tour_delivery_order.delivery_phone LIKE #{safeDeliveryOrderDeliveryPhone}

+ 17 - 2
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourBookInfoMapper.xml

@@ -15,6 +15,11 @@
         <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
         <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
         <result column="deleted_flag" jdbcType="INTEGER" property="deletedFlag"/>
+        <result column="adult_price" jdbcType="DECIMAL" property="adultPrice"/>
+        <result column="children_price" jdbcType="DECIMAL" property="childrenPrice"/>
+        <result column="adult_number" jdbcType="INTEGER" property="adultNumber"/>
+        <result column="children_number" jdbcType="INTEGER" property="childrenNumber"/>
+        <result column="total_price" jdbcType="DECIMAL" property="totalPrice"/>
     </resultMap>
 
     <insert id="insertList">
@@ -31,7 +36,12 @@
             project_id,
             update_user_id,
             update_time,
-            deleted_flag)
+            deleted_flag,
+            adult_price,
+            children_price,
+            adult_number,
+            children_number,
+            total_price)
         VALUES
         <foreach collection="list" index="index" item="item" separator="," >
             (#{item.id},
@@ -46,7 +56,12 @@
             #{item.projectId},
             #{item.updateUserId},
             #{item.updateTime},
-            #{item.deletedFlag})
+            #{item.deletedFlag},
+            #{item.adultPrice},
+            #{item.childrenPrice},
+            #{item.adultNumber},
+            #{item.childrenNumber},
+            #{item.totalPrice})
         </foreach>
     </insert>
 

+ 31 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourBookInfoDto.java

@@ -7,6 +7,7 @@ import lombok.Data;
 
 import jakarta.validation.constraints.*;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -77,6 +78,36 @@ public class TourBookInfoDto {
     private Long projectId;
 
     /**
+     * 成人价格。
+     */
+    @Schema(description = "成人价格。")
+    private BigDecimal adultPrice;
+
+    /**
+     * 儿童价格。
+     */
+    @Schema(description = "儿童价格。")
+    private BigDecimal childrenPrice;
+
+    /**
+     * 成人人数。
+     */
+    @Schema(description = "成人人数。")
+    private Integer adultNumber;
+
+    /**
+     * 儿童人数。
+     */
+    @Schema(description = "儿童人数。")
+    private Integer childrenNumber;
+
+    /**
+     * 总价格。
+     */
+    @Schema(description = "总价格。")
+    private BigDecimal totalPrice;
+
+    /**
      * book_mobile / book_name LIKE搜索字符串。
      * NOTE: 可支持LIKE操作符的列表数据过滤。
      */

+ 21 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/model/DeliveryOrder.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.tourism.common.core.annotation.MaskField;
+import com.tourism.common.core.annotation.RelationGlobalDict;
 import com.tourism.common.core.base.model.BaseModel;
 import com.tourism.common.core.constant.MaskFieldTypeEnum;
 import lombok.Data;
@@ -13,6 +14,7 @@ import lombok.EqualsAndHashCode;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 外卖订单管理实体对象。
@@ -140,4 +142,23 @@ public class DeliveryOrder extends BaseModel {
      */
     @TableField(exist = false)
     private List<DeliveryOrderItems> itemList;
+
+
+    @RelationGlobalDict(
+            masterIdField = "payType",
+            dictCode = "DeliveryPayType")
+    @TableField(exist = false)
+    private Map<String, Object> payTypeDictMap;
+
+    @RelationGlobalDict(
+            masterIdField = "orderStatus",
+            dictCode = "DeliveryOrderStatus")
+    @TableField(exist = false)
+    private Map<String, Object> orderStatusDictMap;
+
+    @RelationGlobalDict(
+            masterIdField = "refundStatus",
+            dictCode = "DeliveryOrderRefundStatus")
+    @TableField(exist = false)
+    private Map<String, Object> refundStatusDictMap;
 }

+ 31 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourBookInfo.java

@@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.Map;
 
@@ -79,6 +80,36 @@ public class TourBookInfo extends BaseModel {
     private Integer deletedFlag;
 
     /**
+     * 成人价格。
+     */
+    @TableField(value = "adult_price")
+    private BigDecimal adultPrice;
+
+    /**
+     * 儿童价格。
+     */
+    @TableField(value = "children_price")
+    private BigDecimal childrenPrice;
+
+    /**
+     * 成人人数。
+     */
+    @TableField(value = "adult_number")
+    private Integer adultNumber;
+
+    /**
+     * 儿童人数。
+     */
+    @TableField(value = "children_number")
+    private Integer childrenNumber;
+
+    /**
+     * 总价格。
+     */
+    @TableField(value = "total_price")
+    private BigDecimal totalPrice;
+
+    /**
      * book_mobile / book_name LIKE搜索字符串。
      */
     @TableField(exist = false)

+ 13 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/service/DeliveryOrderService.java

@@ -2,6 +2,7 @@ package com.tourism.webadmin.back.service;
 
 import com.alibaba.fastjson.JSONObject;
 import com.tourism.common.core.base.service.IBaseService;
+import com.tourism.common.core.object.CallResult;
 import com.tourism.webadmin.back.model.DeliveryOrder;
 
 import java.util.*;
@@ -93,4 +94,16 @@ public interface DeliveryOrderService extends IBaseService<DeliveryOrder, Long>
      * @return 查询结果集。
      */
     List<DeliveryOrder> getDeliveryOrderListWithRelation(DeliveryOrder filter, String orderBy);
+
+
+    /**
+     * 对批量导入数据列表进行数据合法性验证。
+     * 验证逻辑主要覆盖主表的常量字典字段、字典表字典字段、数据源字段和一对一关联数据是否存在。
+     *
+     * @param dataList 主表的数据列表。
+     * @param ignoreFieldSet 需要忽略校验的字典字段集合。通常对于字典反向翻译过来的字段适用,
+     *                       避免了二次验证,以提升效率。
+     * @return 验证结果。如果失败,包含具体的错误信息和导致错误的数据对象。
+     */
+    CallResult verifyImportList(List<DeliveryOrder> dataList, Set<String> ignoreFieldSet);
 }

+ 50 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/service/impl/DeliveryOrderServiceImpl.java

@@ -9,6 +9,7 @@ import com.tourism.common.core.annotation.MyDataSource;
 import com.tourism.common.core.base.dao.BaseDaoMapper;
 import com.tourism.common.core.base.service.BaseService;
 import com.tourism.common.core.constant.GlobalDeletedFlag;
+import com.tourism.common.core.object.CallResult;
 import com.tourism.common.core.object.MyRelationParam;
 import com.tourism.common.core.util.MyModelUtil;
 import com.tourism.common.sequence.wrapper.IdGeneratorWrapper;
@@ -22,8 +23,10 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import com.tourism.common.dict.service.GlobalDictService;
 
 import java.util.List;
+import java.util.Set;
 
 /**
  * 外卖订单管理数据操作服务类。
@@ -42,6 +45,8 @@ public class DeliveryOrderServiceImpl extends BaseService<DeliveryOrder, Long> i
     private DeliveryOrderMapper deliveryOrderMapper;
     @Autowired
     private DeliveryOrderItemsService deliveryOrderItemsService;
+    @Autowired
+    private GlobalDictService globalDictService;
 
     /**
      * 返回当前Service的主表Mapper对象。
@@ -172,4 +177,49 @@ public class DeliveryOrderServiceImpl extends BaseService<DeliveryOrder, Long> i
         MyModelUtil.setDefaultValue(deliveryOrder, "shopName", "");
         return deliveryOrder;
     }
+
+    @Override
+    public CallResult verifyImportList(List<DeliveryOrder> dataList, Set<String> ignoreFieldSet) {
+        CallResult callResult;
+        if (!CollUtil.contains(ignoreFieldSet, "payType")) {
+            callResult = verifyImportForGlobalDict(dataList, "payTypeDictMap", DeliveryOrder::getPayType);
+            if (!callResult.isSuccess()) {
+                return callResult;
+            }
+        }
+        if (!CollUtil.contains(ignoreFieldSet, "orderStatus")) {
+            callResult = verifyImportForGlobalDict(dataList, "orderStatusDictMap", DeliveryOrder::getOrderStatus);
+            if (!callResult.isSuccess()) {
+                return callResult;
+            }
+        }
+        if (!CollUtil.contains(ignoreFieldSet, "refundStatus")) {
+            callResult = verifyImportForGlobalDict(dataList, "refundStatusDictMap", DeliveryOrder::getRefundStatus);
+            if (!callResult.isSuccess()) {
+                return callResult;
+            }
+        }
+        return CallResult.ok();
+    }
+
+    @Override
+    public CallResult verifyRelatedData(DeliveryOrder deliveryOrder, DeliveryOrder originalDeliveryOrder) {
+        String errorMessageFormat = "数据验证失败,关联的%s并不存在,请刷新后重试!";
+        //这里是基于字典的验证。
+        if (this.needToVerify(deliveryOrder, originalDeliveryOrder, DeliveryOrder::getPayType)
+                && !globalDictService.existDictItemFromCache("DeliveryPayType", deliveryOrder.getPayType())) {
+            return CallResult.error(String.format(errorMessageFormat, "支付方式"));
+        }
+        //这里是基于字典的验证。
+        if (this.needToVerify(deliveryOrder, originalDeliveryOrder, DeliveryOrder::getOrderStatus)
+                && !globalDictService.existDictItemFromCache("DeliveryOrderStatus", deliveryOrder.getOrderStatus())) {
+            return CallResult.error(String.format(errorMessageFormat, "订单状态"));
+        }
+        //这里是基于字典的验证。
+        if (this.needToVerify(deliveryOrder, originalDeliveryOrder, DeliveryOrder::getRefundStatus)
+                && !globalDictService.existDictItemFromCache("DeliveryOrderRefundStatus", deliveryOrder.getRefundStatus())) {
+            return CallResult.error(String.format(errorMessageFormat, "退款状态"));
+        }
+        return CallResult.ok();
+    }
 }

+ 19 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/vo/DeliveryOrderVo.java

@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 外卖订单管理VO视图对象。
@@ -126,4 +127,22 @@ public class DeliveryOrderVo extends BaseVo {
      * 订单明细。
      */
     private List<DeliveryOrderItemsVo> itemList;
+
+    /**
+     * payType 全局字典关联数据。
+     */
+    @Schema(description = "payType 全局字典关联数据")
+    private Map<String, Object> payTypeDictMap;
+
+    /**
+     * orderStatus 全局字典关联数据。
+     */
+    @Schema(description = "orderStatus 全局字典关联数据")
+    private Map<String, Object> orderStatusDictMap;
+
+    /**
+     * refundStatus 全局字典关联数据。
+     */
+    @Schema(description = "refundStatus 全局字典关联数据")
+    private Map<String, Object> refundStatusDictMap;
 }

+ 31 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/vo/TourBookInfoVo.java

@@ -8,6 +8,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.Map;
 
@@ -71,6 +72,36 @@ public class TourBookInfoVo extends BaseVo {
     private String projectId;
 
     /**
+     * 成人价格。
+     */
+    @Schema(description = "成人价格")
+    private BigDecimal adultPrice;
+
+    /**
+     * 儿童价格。
+     */
+    @Schema(description = "儿童价格")
+    private BigDecimal childrenPrice;
+
+    /**
+     * 成人人数。
+     */
+    @Schema(description = "成人人数")
+    private Integer adultNumber;
+
+    /**
+     * 儿童人数。
+     */
+    @Schema(description = "儿童人数")
+    private Integer childrenNumber;
+
+    /**
+     * 总价格。
+     */
+    @Schema(description = "总价格")
+    private BigDecimal totalPrice;
+
+    /**
      * isHandle 全局字典关联数据。
      */
     @Schema(description = "isHandle 全局字典关联数据")

+ 3 - 1
common/common-core/src/main/java/com/tourism/common/core/constant/ErrorCodeEnum.java

@@ -69,7 +69,9 @@ public enum ErrorCodeEnum {
     SMS_CODE_TIMEOUT_ERR("短信验证码错误,请重试!"),
     PICTURE_CODE_ERR("图片验证码错误,请重试!"),
     MOBILE_EXIST("该手机号已被注册!"),
-    PROJECT_ALREADY_BOOKING("该项目已被您预定,请选择其他项目!");
+    PROJECT_ALREADY_BOOKING("该项目已被您预定,请选择其他项目!"),
+    DATE_OVERLAP("日期重叠,请重新选择!"),
+    PRICE_ERROR("价格错误,请重新填写!");
     // 下面的枚举值为特定枚举值,即开发者可以根据自己的项目需求定义更多的非通用枚举值
 
     /**