소스 검색

fix 1.去掉项目优质推荐字段,修改优质推荐项目接口2.去掉项目二维码字段

classic_blue 5 달 전
부모
커밋
c784b724f1

+ 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);

+ 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);
     }
 

+ 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 项目图集。

+ 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;
+
 }