소스 검색

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

chenchen 5 달 전
부모
커밋
33f387110c

+ 2 - 2
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/JobProjectToWebController.java

@@ -77,8 +77,8 @@ public class JobProjectToWebController {
         }
 
         MyOrderParam myOrderParam = new MyOrderParam();
-        myOrderParam.add(new MyOrderParam.OrderInfo("isHotspot",false,null));
-        myOrderParam.add(new MyOrderParam.OrderInfo("showOrder",false,null));
+            myOrderParam.add(new MyOrderParam.OrderInfo("isHotspot",false,null));
+            myOrderParam.add(new MyOrderParam.OrderInfo("showOrder",false,null));
         String orderBy = MyOrderParam.buildOrderBy(myOrderParam, JobProject.class);
 
         List<JobProject> jobProjectList = jobProjectService.getJobProjectListWithRelation(jobProjectFilter, orderBy);

+ 4 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/WechatDeliveryOrderController.java

@@ -1,6 +1,7 @@
 package com.tourism.webadmin.app.wechat.controller;
 
 import cn.dev33.satoken.annotation.SaIgnore;
+import cn.hutool.core.lang.Snowflake;
 import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.page.PageMethod;
 import com.tourism.common.additional.utils.StringUtils;
@@ -24,6 +25,7 @@ import com.tourism.webadmin.back.vo.DeliveryOrderVo;
 import com.tourism.common.additional.config.ApplicationConfig;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
+import org.junit.Ignore;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -60,6 +62,7 @@ public class WechatDeliveryOrderController {
         }
         Tuple2<DeliveryOrder, JSONObject> bizData = verifyResult.getData();
         DeliveryOrder deliveryOrder = bizData.getFirst();
+        deliveryOrder.setOrderNo(deliveryOrder.getId());
         deliveryOrder = deliveryOrderService.saveNewWithRelation(deliveryOrder, bizData.getSecond());
         return ResponseResult.success(deliveryOrder.getId().toString());
     }
@@ -177,4 +180,5 @@ public class WechatDeliveryOrderController {
         relationData.put("deliveryOrderItemsList", deliveryOrderItemsList);
         return ResponseResult.success(new Tuple2<>(deliveryOrder, relationData));
     }
+
 }

+ 14 - 14
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/WechatTourismIndexController.java

@@ -201,8 +201,9 @@ public class WechatTourismIndexController {
         filter.setIsHotspot(1);
 
         MyOrderParam myOrderParam = new MyOrderParam();
-        new MyOrderParam.OrderInfo("likeCount",true, null);
+        new MyOrderParam.OrderInfo("recommendationRate",true, null);
         new MyOrderParam.OrderInfo("pageViewCount",true, null);
+        new MyOrderParam.OrderInfo("likeCount",true, null);
         String orderBy = MyOrderParam.buildOrderBy(myOrderParam, TourismProject.class);
 
         System.out.println(orderBy);
@@ -288,19 +289,26 @@ public class WechatTourismIndexController {
         TourismProject filter = new TourismProject();
         filter.setEnable(1);
         filter.setDataState(1);
-        filter.setIsQualityRecommendation(1);
 
         MyOrderParam myOrderParam = new MyOrderParam();
         new MyOrderParam.OrderInfo("recommendationRate",true, null);
+        new MyOrderParam.OrderInfo("pageViewCount",true, null);
+        new MyOrderParam.OrderInfo("likeCount",true, null);
         String orderBy = MyOrderParam.buildOrderBy(myOrderParam, TourismProject.class);
 
-        if (pageInfo.getPageNum() != null && pageInfo.getPageSize() != null && pageInfo.getCount() != null) {
-            PageMethod.startPage(pageInfo.getPageNum(), pageInfo.getPageSize(), pageInfo.getCount());
-        }
+
+        int pageNum = pageInfo.getPageNum() != null ? pageInfo.getPageNum() : 1;
+        int pageSize = pageInfo.getPageSize() != null ? pageInfo.getPageSize() : 8;
+
+        int offset = (pageNum - 1) * pageSize + 2; // 跳过前两条数据
+
+        PageMethod.startPage(offset / pageSize + 1, pageSize);
+
         List<TourismProject> list = tourismProjectService.getTourismProjectList(filter, orderBy);
 
         MyPageData<IndexDestinationProjectVo> pageData = MyPageUtil.makeResponseData(list, IndexDestinationProjectVo.class);
         List<IndexDestinationProjectVo> voList = pageData.getDataList();
+
         voList.stream().forEach(o->{
 
             TourismFile filter1 = new TourismFile();
@@ -360,15 +368,7 @@ public class WechatTourismIndexController {
             tourismProjectVo.setTourismContent(MapConvertUtils.convertObjectToMap(tourismContent));
         }
 
-        //二维码路径赋值
-//        tourismProjectVo.setContactCode("[{\"name\":\"微信图片_20241021154757.png\",\"downloadUri\":\"/admin/app/tourTourismProjectTravelNotes/download\",\"filename\":\"6b92b75edcc04da1bd6e4af056911730.png\",\"uploadPath\":\"image/TourTourismProjectTravelNotes/contactCode\"}]");
-//        List<String> urlConvertList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getContactCode());
-//        if(CollectionUtils.isNotEmpty(urlConvertList)) {
-//            tourismProjectVo.setContactCodeConvert(urlConvertList.get(0));
-//        }
-        if(tourismProjectVo != null) {
-            tourismProjectVo.setContactCodeConvert("https://v.xiaoyaotravel.com/image/ContactQRCode/tourism.png");
-        }
+
         return ResponseResult.success(tourismProjectVo);
     }
 

+ 6 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/dto/WechatIndexJobProjectDto.java

@@ -35,4 +35,10 @@ public class WechatIndexJobProjectDto extends PageInfo{
      */
     @Schema(description = "是否启用,0禁用,1启用")
     private Integer enable;
+
+    /**
+     * 项目Title。
+     */
+    @Schema(description = "项目Title")
+    private String jobTitle;
 }

+ 15 - 20
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/vo/tourism/IndexDestinationProjectVo.java

@@ -189,17 +189,17 @@ public class IndexDestinationProjectVo {
     @Schema(description = "推荐指数")
     private Integer recommendationRate;
 
-    /**
-     * 上传的联系二维码。
-     */
-    @Schema(description = "上传的联系二维码")
-    private String contactCode;
+//    /**
+//     * 上传的联系二维码。
+//     */
+//    @Schema(description = "上传的联系二维码")
+//    private String contactCode;
 
-    /**
-     * 是否优质推荐。
-     */
-    @Schema(description = "是否优质推荐")
-    private Integer isQualityRecommendation;
+//    /**
+//     * 是否优质推荐。
+//     */
+//    @Schema(description = "是否优质推荐")
+//    private Integer isQualityRecommendation;
 
 
     /**
@@ -250,17 +250,12 @@ public class IndexDestinationProjectVo {
     @Schema(description = "travelNotesBanner转换后的图片对象")
     private List<String> travelNotesBannerAfterConvert;
 
-    /**
-     * contactCode 上传的联系二维码。
-     */
-    @Schema(description = "上传的联系二维码 contactCode转换后的图片对象")
-    private String contactCodeConvert;
+//    /**
+//     * contactCode 上传的联系二维码。
+//     */
+//    @Schema(description = "上传的联系二维码 contactCode转换后的图片对象")
+//    private String contactCodeConvert;
 
-    /**
-     * isQualityRecommendation 全局字典关联数据。
-     */
-    @Schema(description = "isQualityRecommendation 全局字典关联数据")
-    private Map<String, Object> isQualityRecommendationDictMap;
 
     /**
      * fileList 项目图集。

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

@@ -26,7 +26,7 @@
         <result column="shop_name" jdbcType="VARCHAR" property="shopName"/>
     </resultMap>
 
-    <insert id="insertList">
+    <insert id="insertList" useGeneratedKeys="true" keyProperty="id">
         INSERT INTO tour_delivery_order
             (id,
             delivery_time,
@@ -91,13 +91,14 @@
                 <bind name = "safeDeliveryOrderShopName" value = "'%' + deliveryOrderFilter.shopName + '%'" />
                 AND tour_delivery_order.shop_name LIKE #{safeDeliveryOrderShopName}
             </if>
+            <if test="deliveryOrderFilter.orderNo != null and deliveryOrderFilter.orderNo != ''">
+                <bind name = "safeDeliveryOrderOrderNo" value = "'%' + deliveryOrderFilter.orderNo + '%'" />
+                AND tour_delivery_order.order_no LIKE #{safeDeliveryOrderDeliveryorderNo}
+            </if>
             <if test="deliveryOrderFilter.deliveryPhone != null and deliveryOrderFilter.deliveryPhone != ''">
                 <bind name = "safeDeliveryOrderDeliveryPhone" value = "'%' + deliveryOrderFilter.deliveryPhone + '%'" />
                 AND tour_delivery_order.delivery_phone LIKE #{safeDeliveryOrderDeliveryPhone}
             </if>
-            <if test="deliveryOrderFilter.orderNo != null and deliveryOrderFilter.orderNo != ''">
-                AND tour_delivery_order.order_no = #{deliveryOrderFilter.orderNo}
-            </if>
             <if test="deliveryOrderFilter.payType != null">
                 AND tour_delivery_order.pay_type = #{deliveryOrderFilter.payType}
             </if>

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

@@ -35,7 +35,6 @@
         <result column="departure_time" jdbcType="TIMESTAMP" property="departureTime"/>
         <result column="average_cost" jdbcType="VARCHAR" property="averageCost"/>
         <result column="recommendation_rate" jdbcType="TINYINT" property="recommendationRate"/>
-        <result column="is_quality_recommendation" jdbcType="TINYINT" property="isQualityRecommendation"/>
     </resultMap>
 
     <resultMap id="BaseResultMapWithTourTravelNotesProjectRelation" type="com.tourism.webadmin.back.model.TourismProject" extends="BaseResultMap">
@@ -77,8 +76,7 @@
             role,
             departure_time,
             average_cost,
-            recommendation_rate,
-        is_quality_recommendation)
+            recommendation_rate
 
         VALUES
         <foreach collection="list" index="index" item="item" separator="," >
@@ -114,8 +112,7 @@
             #{item.role},
             #{item.departureTime},
             #{item.averageCost},
-            #{item.recommendationRate},
-            #{item.isQualityRecommendation})
+            #{item.recommendationRate})
         </foreach>
     </insert>
 
@@ -147,9 +144,6 @@
             <if test="tourismProjectFilter.enable != null">
                 AND tour_tourism_project.enable = #{tourismProjectFilter.enable}
             </if>
-            <if test="tourismProjectFilter.isQualityRecommendation != null">
-                AND tour_tourism_project.is_quality_recommendation = #{tourismProjectFilter.isQualityRecommendation}
-            </if>
             <if test="tourismProjectFilter.directoryInfoIds != null and tourismProjectFilter.directoryInfoIds.size() > 0">
                 AND tour_tourism_project.belong_tab IN
                 <foreach item="id" index="index" collection="tourismProjectFilter.directoryInfoIds" open="(" separator="," close=")">

+ 0 - 3
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourismProjectDto.java

@@ -201,9 +201,6 @@ public class TourismProjectDto {
     @Schema(description = "推荐指数。")
     private Integer recommendationRate;
 
-    @Schema(description = "是否优质推荐。可支持等于操作符的列表数据过滤。")
-    private Integer isQualityRecommendation;
-
 
     /**
      * project_title LIKE搜索字符串。

+ 0 - 11
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourismProject.java

@@ -213,12 +213,6 @@ public class TourismProject extends BaseModel {
 //    private String contactCode;
 
     /**
-     * 是否优质推荐。
-     */
-    @TableField(value = "is_quality_recommendation")
-    private Integer isQualityRecommendation;
-
-    /**
      * project_title LIKE搜索字符串。
      */
     @TableField(exist = false)
@@ -281,9 +275,4 @@ public class TourismProject extends BaseModel {
     @TableField(exist = false)
     private String content;
 
-    @RelationGlobalDict(
-            masterIdField = "isQualityRecommendation",
-            dictCode = "IsQualityRecommendation")
-    @TableField(exist = false)
-    private Map<String, Object> isQualityRecommendationDictMap;
 }

+ 1 - 18
application-webadmin/src/main/java/com/tourism/webadmin/back/vo/TourismProjectVo.java

@@ -195,19 +195,6 @@ public class TourismProjectVo extends BaseVo {
     private Integer recommendationRate;
 
     /**
-     * 上传的联系二维码。
-     */
-    @Schema(description = "上传的联系二维码")
-    private String contactCode;
-
-    /**
-     * 是否优质推荐。
-     */
-    @Schema(description = "是否优质推荐")
-    private Integer isQualityRecommendation;
-
-
-    /**
      * id 的一对一关联数据对象,数据对应类型为TourismFileVo。
      */
     @Schema(description = "id 的一对一关联数据对象,数据对应类型为TourismFileVo")
@@ -261,9 +248,5 @@ public class TourismProjectVo extends BaseVo {
     @Schema(description = "上传的联系二维码 contactCode转换后的图片对象")
     private String contactCodeConvert;
 
-    /**
-     * isQualityRecommendation 全局字典关联数据。
-     */
-    @Schema(description = "isQualityRecommendation 全局字典关联数据")
-    private Map<String, Object> isQualityRecommendationDictMap;
+
 }