Procházet zdrojové kódy

feat: 添加内容管理APP接口

luofeiyun před 1 měsícem
rodič
revize
9005e997ab
25 změnil soubory, kde provedl 112 přidání a 425 odebrání
  1. 1 1
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/advert/AppAdvertController.java
  2. 17 243
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/AppContentController.java
  3. 0 22
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppCatalogueRespVO.java
  4. 0 60
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppCategoryRespVO.java
  5. 25 0
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppContentPageReqVO.java
  6. 0 57
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppContentReqVO.java
  7. 0 3
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppContentRespVO.java
  8. 1 1
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/problem/AppProblemController.java
  9. 6 0
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/dal/mysql/catalogue/CatalogueMapper.java
  10. 25 0
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/dal/mysql/content/ContentMapper.java
  11. 1 1
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/enums/ErrorCodeConstants.java
  12. 1 3
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/service/catalogue/CatalogueService.java
  13. 2 4
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/service/catalogue/CatalogueServiceImpl.java
  14. 7 0
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/service/content/ContentService.java
  15. 17 0
      ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/service/content/ContentServiceImpl.java
  16. 1 1
      ship-module-ota/ship-module-ota-biz/src/main/java/com/yc/ship/module/ota/service/password/RSAUtils.java
  17. 1 5
      ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/api/link/LinkApi.java
  18. 1 5
      ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/api/store/StoreApi.java
  19. 1 5
      ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/enums/StoreBalanceTypeEnum.java
  20. 1 5
      ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/enums/StoreCreditTypeEnum.java
  21. 1 5
      ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/enums/TradeModeEnum.java
  22. 1 1
      ship-module-resource/ship-module-resource-biz/src/main/java/com/yc/ship/module/resource/controller/admin/vo/SiteRespDTO.java
  23. 0 1
      ship-module-resource/ship-module-resource-biz/src/main/resources/mapper/resourceroute/ResourceRouteMapper.xml
  24. 1 1
      ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/controller/app/otc/vo/AppTradeDetailBaseRespVO.java
  25. 1 1
      ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/utils/RSAUtils.java

+ 1 - 1
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/advert/AppAdvertController.java

@@ -31,7 +31,7 @@ import java.util.stream.Collectors;
 import static com.yc.ship.framework.common.pojo.CommonResult.success;
 
 /**
- * @author :yaochao
+ *
  * @description :TODO
  * @date :2024/8/19 17:13
  */

+ 17 - 243
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/AppContentController.java

@@ -1,280 +1,54 @@
 package com.yc.ship.module.miniapplet.controller.app.content;
 
 import com.yc.ship.framework.common.pojo.CommonResult;
+import com.yc.ship.framework.common.pojo.PageResult;
 import com.yc.ship.framework.common.util.object.BeanUtils;
-import com.yc.ship.module.miniapplet.controller.app.content.vo.AppCatalogueRespVO;
-import com.yc.ship.module.miniapplet.controller.app.content.vo.AppContentReqVO;
+import com.yc.ship.module.miniapplet.controller.app.content.vo.AppContentPageReqVO;
 import com.yc.ship.module.miniapplet.controller.app.content.vo.AppContentRespVO;
-import com.yc.ship.module.miniapplet.dal.dataobject.catalogue.CatalogueDO;
 import com.yc.ship.module.miniapplet.dal.dataobject.content.ContentDO;
-import com.yc.ship.module.miniapplet.service.catalogue.CatalogueService;
 import com.yc.ship.module.miniapplet.service.content.ContentService;
+import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
-import java.util.*;
 
 import static com.yc.ship.framework.common.pojo.CommonResult.success;
 
 /**
- * @author :yaochao
+ *
  * @description :TODO
  * @date :2024/8/19 17:13
  */
-@Tag(name = "用户 APP - 目录/栏目/产品分组分类")
+@Tag(name = "用户 APP - 内容接口")
 @RestController
 @RequestMapping("/applet/content")
 @Validated
 @Slf4j
 public class AppContentController {
 
-
-    @Resource
-    private CatalogueService catalogueService;
-
     @Resource
     private ContentService contentService;
 
 
-    @PostMapping("/catalogueList")
-//    @Operation(summary = "获取目录/栏目/产品分组分类列表")
-    public CommonResult<List<AppCatalogueRespVO>> catalogueList(@RequestBody @Valid AppContentReqVO reqVO) {
-        List<CatalogueDO> catalogueDOS = catalogueService.getCatalogueList(reqVO);
-        List<AppCatalogueRespVO> respVOS = BeanUtils.toBean(catalogueDOS, AppCatalogueRespVO.class);
-        return success(respVOS);
+    @PostMapping("/page")
+    @Operation(summary = "获取内容分页列表")
+    public CommonResult<PageResult<AppContentRespVO>> content(@RequestBody @Valid AppContentPageReqVO reqVO) {
+        PageResult<ContentDO> page = contentService.getAppContentPage(reqVO);
+        return success(BeanUtils.toBean(page, AppContentRespVO.class));
     }
 
-//    @PostMapping("/catalogue")
-////    @Operation(summary = "获取目录/栏目/产品分组分类详情")
-//    public CommonResult<AppCatalogueRespVO> catalogue(@RequestBody @Valid AppContentReqVO reqVO) {
-////        CatalogueDO catalogueDO = catalogueService.getCatalogue(reqVO.getCatalogueId());
-////        AppCatalogueRespVO respVO = BeanUtils.toBean(catalogueDO, AppCatalogueRespVO.class);
-//        CatalogueRespVO catalogueResp = catalogueService.getCatalogueResp(reqVO.getCatalogueId());
-//        AppCatalogueRespVO respVO = BeanUtils.toBean(catalogueResp, AppCatalogueRespVO.class);
-//        if (catalogueResp.getBusinessType() == 1) {
-//            List<AppCategoryRespVO> categoryList = getCategoryRespList(reqVO);
-//            if (StringUtils.isBlank(respVO.getImgUrl())) {
-//                respVO.setImgUrl(categoryList.stream()
-//                        .filter(category -> StringUtils.isNotBlank(category.getExtraInfo().getImg()))
-//                        .map(category -> category.getExtraInfo().getImg())
-//                        .findFirst()
-//                        .orElse(null));
-//            }
-//            respVO.setCategoryList(categoryList);
-//            reqVO.setCatalogueParentId(reqVO.getCatalogueId());
-//            reqVO.setCatalogueId(null);
-//            List<CatalogueDO> childCatalogueDOS = catalogueService.getCatalogueList(reqVO);
-//            List<AppCatalogueRespVO> respVOS = BeanUtils.toBean(childCatalogueDOS, AppCatalogueRespVO.class);
-//            for (AppCatalogueRespVO catalogueRespVO : respVOS) {
-//                reqVO.setCatalogueId(catalogueRespVO.getId());
-//                List<AppCategoryRespVO> childCategoryList = getCategoryRespList(reqVO);
-//                catalogueRespVO.setCategoryList(childCategoryList);
-//                if (StringUtils.isBlank(catalogueRespVO.getImgUrl())) {
-//                    respVO.setImgUrl(childCategoryList.stream()
-//                            .filter(category -> StringUtils.isNotBlank(category.getExtraInfo().getImg()))
-//                            .map(category -> category.getExtraInfo().getImg())
-//                            .findFirst()
-//                            .orElse(null));
-//                }
-//            }
-//            respVO.setCatalogueList(respVOS);
-//        }
-//        return success(respVO);
-//    }
-
-    @PostMapping("/contentList")
-//    @Operation(summary = "获取内容列表")
-    public CommonResult<List<AppContentRespVO>> contentList(@RequestBody @Valid AppContentReqVO reqVO) {
-        List<AppContentRespVO> respVOS = new ArrayList<>();
-        if (reqVO.getCatalogueId() == null) {
-            List<CatalogueDO> catalogueDOS = catalogueService.getCatalogueList(reqVO);
-            if (!catalogueDOS.isEmpty()) {
-                reqVO.setCatalogueId(catalogueDOS.get(0).getId());
-            } else {
-                return success(respVOS);
-            }
-        }
-        List<ContentDO> contentDOS = contentService.getContentList(reqVO.getCatalogueId(), 1);
-        respVOS = BeanUtils.toBean(contentDOS, AppContentRespVO.class);
-        return success(respVOS);
+    // 内容详情
+    @GetMapping("/detail")
+    @Operation(summary = "获取内容详情")
+    public CommonResult<AppContentRespVO> detail(@RequestParam("id") Long id) {
+        ContentDO content = contentService.getContent(id);
+        return success(BeanUtils.toBean(content, AppContentRespVO.class));
     }
 
-    @PostMapping("/content")
-//    @Operation(summary = "获取内容详情")
-    public CommonResult<AppContentRespVO> content(@RequestBody @Valid AppContentReqVO reqVO) {
-        ContentDO contentDO = contentService.getContent(reqVO.getId());
-        AppContentRespVO respVO = BeanUtils.toBean(contentDO, AppContentRespVO.class);
-        return success(respVO);
-    }
-
-//    @PostMapping("/productList")
-////    @Operation(summary = "获取子产品列表")
-//    public CommonResult<List<AppProductSpuRespVO>> productList(@RequestBody @Valid AppContentReqVO reqVO) {
-//        return success(getProductList(reqVO.getCategoryId(), reqVO.getProductName()));
-//    }
-
-//    @PostMapping("/product")
-////    @Operation(summary = "获取子产品详情")
-//    public CommonResult<AppProductSpuRespVO> product(@RequestBody @Valid AppContentReqVO reqVO) {
-//        AppProductSpuRespVO respVO = getProduct(reqVO.getProductId());
-//        return success(respVO);
-//    }
-
-//    @PostMapping("/search")
-////    @Operation(summary = "查询产品和子产品")
-//    public CommonResult<?> search(@RequestBody @Valid AppContentReqVO reqVO) {
-//        String search = reqVO.getSearch() == null ? "" : reqVO.getSearch();
-//        List<CategoryRespDTO> respVOS = productApi.getCategoryListByName(search).getCheckedData();
-//        respVOS = respVOS.stream().filter(item -> item.getUseStatus()!=null && item.getUseStatus() == 1).collect(Collectors.toList());
-//        List<AppCategoryRespVO> categoryList = BeanUtils.toBean(respVOS, AppCategoryRespVO.class);
-//        Map<String, Object> respVO = new HashMap<>();
-//        respVO.put("categoryList", categoryList);
-//        List<ProductDO> productDOS = productService.getProductListByCategoryId(null, search, 1);
-//        List<AppProductSpuRespVO> productList = BeanUtils.toBean(productDOS, AppProductSpuRespVO.class);
-//        respVO.put("productList", productList);
-//        return success(respVO);
-//    }
-
-//    @PostMapping("/searchRelationProduct")
-////    @Operation(summary = "根据产品ID或子产品ID查询产品关联的子产品")
-//    public CommonResult<?> searchRelationProduct(@RequestBody @Valid AppContentReqVO reqVO) {
-//        Long productId = reqVO.getProductId();
-//        Long categoryId = reqVO.getCategoryId();
-//        if (productId == null && categoryId == null) {
-//            return error(130_003, "产品ID或子产品ID至少有一个必传");
-//        }
-//        if (categoryId == null) {
-//            ProductDO product = productService.getProduct(productId);
-//            if (product != null) {
-//                categoryId = product.getCategoryId();
-//            }
-//        }
-//        CategoryRespDTO category = productApi.getCategory(categoryId).getCheckedData();
-//        String relationProducts = category.getExtraInfo().getAppletProducts();
-//        List<AppProductSpuRespVO> respVOS = new ArrayList<>(3);
-//        if (StringUtils.isNotBlank(relationProducts)) {
-//            JSONArray jsonArray = JSONUtil.parseArray(relationProducts);
-//            for (int i = 0; i < jsonArray.size(); i++) {
-//                JSONObject jsonObject = jsonArray.getJSONObject(i);
-//                Long relationProductId = jsonObject.getLong("id");
-//                AppProductSpuRespVO respVO = getProduct(relationProductId);
-//                respVOS.add(respVO);
-//            }
-//        }
-//        return success(respVOS);
-//    }
-
-
-//    @PostMapping("/day/price/get")
-//    @Operation(summary = "获得日历价")
-//    public CommonResult<List<AppProductDayPriceRespVO>> getAppletDayPrice(@Valid @RequestBody AppletDayStockPriceReqVO reqVO) {
-//        return success( productService.getProductDayPrice(reqVO));
-//    }
-
-//    private AppProductSpuRespVO getProduct(Long productId) {
-//        ProductDO product = productService.getProduct(productId);
-//        AppProductSpuRespVO respVO = BeanUtils.toBean(product, AppProductSpuRespVO.class);
-//
-//        List<ProductGroupDO> groupDOList = productGroupService.getListByAppletProductId(productId);
-//        if (groupDOList != null && !groupDOList.isEmpty()) {
-//            respVO.setProductGroupList(BeanUtils.toBean(groupDOList, ProductGroupRespVO.class));
-//        }
-//        if (getLoginUserId() != null && product.getId() != null) {
-//            respVO.setFavoriteId(productApi.getAppIsFavorite(getLoginUserId(), product.getId()).getCheckedData());
-//        }
-//        CategoryRespDTO categoryDTOS = productApi.getCategory(product.getCategoryId()).getCheckedData();
-//        if (categoryDTOS != null) {
-//            respVO.setSpuType(categoryDTOS.getExtraInfo().getSpuType());
-//            respVO.setCatalogueType(categoryDTOS.getExtraInfo().getType());
-//        }
-//        if (respVO.getStatus() == 2) {
-//            throw exception0(130_003, "该商品已下架");
-//        }
-//        return respVO;
-//    }
-
-//    private List<AppProductSpuRespVO> getProductList(Long categoryId, String productName) {
-//        List<ProductDO> productList = productService.getProductAndGroup(categoryId, productName);
-//        List<AppProductSpuRespVO> respVOS = BeanUtils.toBean(productList, AppProductSpuRespVO.class);
-//        respVOS = respVOS.stream().filter(item -> {
-//            if (item.getStatus() == 1) {
-//                if (getLoginUserId() != null && item.getId() != null) {
-//                    item.setFavoriteId(productApi.getAppIsFavorite(getLoginUserId(), item.getId()).getCheckedData());
-//                }
-//                return true;
-//            }
-//            return false;
-//        }).collect(Collectors.toList());
-//        return respVOS;
-//    }
 
-    /**
-     * @param reqVO
-     * @return
-     */
-//    private List<AppCategoryRespVO> getCategoryRespList(AppContentReqVO reqVO) {
-//        List<CategoryRespDTO> categoryDTOS = productApi.getCategoryListByCatalogueId(reqVO.getCatalogueId(), 1).getCheckedData();
-//        List<AppCategoryRespVO> categoryList = BeanUtils.toBean(categoryDTOS, AppCategoryRespVO.class);
-//        if (StringUtils.isNotBlank(reqVO.getLongitude()) && StringUtils.isNotBlank(reqVO.getLatitude()) && reqVO.getRice() != null) {
-//            // 根据经纬度查询产品分组(小程序产品)
-//            double[] bounds = GeoUtils.calculateBoundingCoordinates(Double.parseDouble(reqVO.getLatitude()), Double.parseDouble(reqVO.getLongitude()), reqVO.getRice());
-//            // 开始纬度
-//            double latitude1 = bounds[0];
-//            // 结束纬度
-//            double latitude2 = bounds[2];
-//            // 开始经度
-//            double longitude1 = bounds[1];
-//            // 开始经度
-//            double longitude2 = bounds[3];
-//            categoryList = categoryList.stream().filter(e -> {
-//                CategoryExtraRespDTO extraInfo = e.getExtraInfo();
-//                if (extraInfo != null && StringUtils.isNotBlank(extraInfo.getCoordinate())) {
-//                    String[] split = extraInfo.getCoordinate().split(",");
-//                    double latitude = Double.parseDouble(split[1]);
-//                    double longitude = Double.parseDouble(split[0]);
-//                    return latitude >= latitude1 && latitude <= latitude2 && longitude >= longitude1 && longitude <= longitude2;
-//                }
-//                return false;
-//            }).collect(Collectors.toList());
-//        }
-//        for (AppCategoryRespVO appCategoryRespVO : categoryList) {
-//            List<AppProductSpuRespVO> spuList = getProductList(appCategoryRespVO.getId(), null);
-//            // 使用 Stream API 找到最低售价
-//            Optional<BigDecimal> minPrice = spuList.stream()
-//                    .map(AppProductSpuRespVO::getSalePrice)
-//                    .min(BigDecimal::compareTo);
-//            // 使用 Stream API 计算售卖总数
-//            int sellNum = 0;
-//            if (!spuList.isEmpty()) {
-//                sellNum = spuList.stream()
-//                        .mapToInt(AppProductSpuRespVO::getSellNum)
-//                        .sum();
-//            }
-//            spuList = spuList.stream().filter(e -> {
-//                CategoryExtraRespDTO extraInfo = appCategoryRespVO.getExtraInfo();
-//                e.setSpuType(extraInfo.getSpuType());
-//                return true;
-//            }).collect(Collectors.toList());
-//            appCategoryRespVO.setSalePrice(minPrice.orElse(BigDecimal.ZERO));
-//            appCategoryRespVO.setSellNum(sellNum);
-//            appCategoryRespVO.setSpuList(spuList);
-//            appCategoryRespVO.setResourceNum(spuList.size());
-//        }
-//        List<CatalogueDetailRespVO> respVOS = catalogueService.getCatalogueDetailList(reqVO.getCatalogueId());
-//        Map<Long, Integer> sortNumMap = respVOS.stream()
-//                .collect(Collectors.toMap(CatalogueDetailRespVO::getCategoryId, CatalogueDetailRespVO::getSortNum));
-//        for (AppCategoryRespVO category : categoryList) {
-//            category.setSortNum(sortNumMap.getOrDefault(category.getId(), 0));
-//        }
-//        categoryList.sort(Comparator.comparing(AppCategoryRespVO::getSortNum));
-//        return categoryList;
-//    }
 
 }

+ 0 - 22
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppCatalogueRespVO.java

@@ -1,22 +0,0 @@
-package com.yc.ship.module.miniapplet.controller.app.content.vo;
-
-import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
-import com.yc.ship.module.miniapplet.controller.admin.catalogue.vo.CatalogueRespVO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-@EqualsAndHashCode(callSuper = true)
-@Schema(description = "小程序接口 - 目录类型 Response VO")
-@Data
-@ExcelIgnoreUnannotated
-public class AppCatalogueRespVO extends CatalogueRespVO {
-
-    @Schema(description = "产品分组列表")
-    private List<AppCategoryRespVO> categoryList;
-
-    @Schema(description = "子目录/子栏目/子分类")
-    private List<AppCatalogueRespVO> catalogueList;
-}

+ 0 - 60
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppCategoryRespVO.java

@@ -1,60 +0,0 @@
-package com.yc.ship.module.miniapplet.controller.app.content.vo;
-
-import com.yc.ship.module.miniapplet.dal.dto.CategoryExtraRespDTO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Schema(description = "RPC 服务 - Category 产品分组/资源 Response VO")
-@Data
-public class AppCategoryRespVO {
-
-    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21187")
-    private Long id;
-
-    @Schema(description = "父ID", example = "27454")
-    private Long parentId;
-
-    @Schema(description = "状态", example = "2")
-    private Integer useStatus;
-
-    @Schema(description = "编码")
-    private String cateCode;
-
-    @Schema(description = "分类名称", example = "芋艿")
-    private String cateName;
-
-    @Schema(description = "排序号")
-    private Integer sortNum;
-
-    @Schema(description = "类型;0资源分类 1产品分类 2小程序产品分类", example = "1")
-    private Integer type;
-
-    @Schema(description = "父路径;逗号分隔")
-    private String parentPath;
-
-    @Schema(description = "创建时间")
-    private LocalDateTime createTime;
-
-    @Schema(description = "销售价")
-    private BigDecimal salePrice;
-
-    @Schema(description = "已售数量", example = "1")
-    private Integer sellNum;
-
-    @Schema(description = "关联资源数量")
-    private Integer resourceNum;
-
-//    @Schema(description = "分组类型 1.票务类 2.文创类 3.酒店类 4.餐饮类", example = "2")
-//    private Integer groupType;
-
-    @Schema(description = "小程序信息")
-    private CategoryExtraRespDTO extraInfo;
-
-//    @Schema(description = "分类产品集合")
-//    private List<AppProductSpuRespVO> spuList;
-
-}

+ 25 - 0
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppContentPageReqVO.java

@@ -0,0 +1,25 @@
+package com.yc.ship.module.miniapplet.controller.app.content.vo;
+
+import com.yc.ship.framework.common.pojo.PageParam;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.validation.constraints.NotNull;
+
+@Schema(description = "小程序 - 查询内容相关请求参数")
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class AppContentPageReqVO extends PageParam {
+
+    @Schema(description = "内容关键词", example = "1024")
+    private String keyword;
+
+    @Schema(description = "目录编码")
+    @NotNull(message = "目录编码不能为空")
+    private String code;
+}

+ 0 - 57
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppContentReqVO.java

@@ -1,57 +0,0 @@
-package com.yc.ship.module.miniapplet.controller.app.content.vo;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Schema(description = "小程序 - 查询内容相关请求参数")
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-@Builder
-public class AppContentReqVO {
-
-    @Schema(description = "产品名称或者子产品名称 search接口使用", example = "1024")
-    private String search;
-
-    @Schema(description = "内容id", example = "1024")
-    private Long id;
-
-    @Schema(description = "目录/栏目/产品分组分类id", example = "1024")
-    private Long catalogueId;
-
-    @Schema(description = "父级目录/栏目/产品分组分类id", example = "1024")
-    private Long catalogueParentId;
-
-    @Schema(description = "业务类型 0.目录 1.栏目 2.分类", example = "2")
-    private Integer businessType;
-
-    @Schema(description = "类型 :business_type =0 (1.列表 2.内容 3.外部链接) business_type =1 (无) business_type =2 (1.票务类 2.文创类 3.酒店类 4.餐饮类)", example = "1")
-    private Integer type;
-
-    @Schema(description = "目录编码")
-    private String code;
-
-    @Schema(description = "小程序产品ID 根据产品查子产品使用", example = "1024")
-    private Long categoryId;
-
-    @Schema(description = "小程序产品名称 根据产品查子产品详情", example = "1024")
-    private String categoryName;
-
-    @Schema(description = "小程序子产品ID 根据子产品查子产品详情", example = "1024")
-    private Long productId;
-
-    @Schema(description = "小程序子产品名称 根据子产品查子产品详情", example = "1024")
-    private String productName;
-
-    @Schema(description = "经度", example = "1")
-    private String longitude;
-
-    @Schema(description = "纬度", example = "1")
-    private String latitude;
-
-    @Schema(description = "米", example = "1")
-    private Integer rice;
-}

+ 0 - 3
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/content/vo/AppContentRespVO.java

@@ -33,9 +33,6 @@ public class AppContentRespVO {
     @Schema(description = "文章介绍")
     private String introduce;
 
-    @Schema(description = "关键词")
-    private String keyword;
-
     @Schema(description = "封面图")
     private String cover;
 

+ 1 - 1
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/controller/app/problem/AppProblemController.java

@@ -25,7 +25,7 @@ import java.util.List;
 import static com.yc.ship.framework.common.pojo.CommonResult.success;
 
 /**
- * @author :yaochao
+ *
  * @description :TODO
  * @date :2024/8/19 17:13
  */

+ 6 - 0
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/dal/mysql/catalogue/CatalogueMapper.java

@@ -63,4 +63,10 @@ public interface CatalogueMapper extends BaseMapperX<CatalogueDO> {
         wrapper.orderByAsc(CatalogueDO::getSortNum);
         return selectList(wrapper);
     }
+
+    default CatalogueDO selectByCode(String code) {
+        return selectOne(new LambdaQueryWrapperX<CatalogueDO>()
+                .eq(CatalogueDO::getCode, code)
+                .last("limit 1"));
+    }
 }

+ 25 - 0
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/dal/mysql/content/ContentMapper.java

@@ -4,7 +4,9 @@ import com.yc.ship.framework.common.pojo.PageResult;
 import com.yc.ship.framework.mybatis.core.mapper.BaseMapperX;
 import com.yc.ship.framework.mybatis.core.query.LambdaQueryWrapperX;
 import com.yc.ship.module.miniapplet.controller.admin.content.vo.ContentPageReqVO;
+import com.yc.ship.module.miniapplet.controller.app.content.vo.AppContentPageReqVO;
 import com.yc.ship.module.miniapplet.dal.dataobject.content.ContentDO;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
@@ -45,4 +47,27 @@ public interface ContentMapper extends BaseMapperX<ContentDO> {
         queryWrapperX.orderByDesc(ContentDO::getReleaseTime);
         return selectList(queryWrapperX);
     }
+
+    /**
+     * 获取小程序内容分页
+     * @param reqVO
+     * @return
+     */
+    default PageResult<ContentDO> selectAppContentPage(AppContentPageReqVO reqVO, Long catalogueId) {
+        LambdaQueryWrapperX<ContentDO> wrapperX = new LambdaQueryWrapperX<>();
+        wrapperX.eq(ContentDO::getReleaseStatus, 1);
+        wrapperX.eq(ContentDO::getCatalogueId, catalogueId);
+        wrapperX.and(StringUtils.isNotBlank(reqVO.getKeyword()), i -> {
+            i.like(ContentDO::getName, reqVO.getKeyword())
+                    .or()
+                    .like(ContentDO::getTitle, reqVO.getKeyword())
+                    .or()
+                    .like(ContentDO::getContent, reqVO.getKeyword())
+                    .or()
+                    .like(ContentDO::getIntroduce, reqVO.getKeyword())
+                    .or()
+                    .like(ContentDO::getKeyword, reqVO.getKeyword());
+        });
+        return selectPage(reqVO, wrapperX);
+    }
 }

+ 1 - 1
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/enums/ErrorCodeConstants.java

@@ -28,7 +28,7 @@ public interface ErrorCodeConstants {
 
     ErrorCode CATALOGUE_DETAIL_NOT_EXISTS = new ErrorCode(180_001, "栏目产品排序不存在");
 
-    ErrorCode CATALOGUE_NOT_EXISTS = new ErrorCode(10_001, "目录类型不存在");
+    ErrorCode CATALOGUE_NOT_EXISTS = new ErrorCode(10_001, "目录不存在");
 
     ErrorCode CATALOGUE_BINDING = new ErrorCode(10_002, "当前数据已被绑定");
 

+ 1 - 3
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/service/catalogue/CatalogueService.java

@@ -4,7 +4,6 @@ import com.yc.ship.framework.common.pojo.PageResult;
 import com.yc.ship.module.miniapplet.controller.admin.catalogue.vo.CataloguePageReqVO;
 import com.yc.ship.module.miniapplet.controller.admin.catalogue.vo.CatalogueRespVO;
 import com.yc.ship.module.miniapplet.controller.admin.catalogue.vo.CatalogueSaveReqVO;
-import com.yc.ship.module.miniapplet.controller.app.content.vo.AppContentReqVO;
 import com.yc.ship.module.miniapplet.dal.dataobject.catalogue.CatalogueDO;
 
 import javax.validation.Valid;
@@ -76,6 +75,5 @@ public interface CatalogueService {
 
     List<CatalogueDO> getCatalogueListByStatus(Integer status);
 
-    List<CatalogueDO> getCatalogueList(AppContentReqVO reqVO);
-
+    CatalogueDO getByCode(String code);
 }

+ 2 - 4
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/service/catalogue/CatalogueServiceImpl.java

@@ -7,12 +7,10 @@ import com.yc.ship.framework.common.util.object.BeanUtils;
 import com.yc.ship.module.miniapplet.controller.admin.catalogue.vo.CataloguePageReqVO;
 import com.yc.ship.module.miniapplet.controller.admin.catalogue.vo.CatalogueRespVO;
 import com.yc.ship.module.miniapplet.controller.admin.catalogue.vo.CatalogueSaveReqVO;
-import com.yc.ship.module.miniapplet.controller.app.content.vo.AppContentReqVO;
 import com.yc.ship.module.miniapplet.dal.dataobject.catalogue.CatalogueDO;
 import com.yc.ship.module.miniapplet.dal.dataobject.content.ContentDO;
 import com.yc.ship.module.miniapplet.dal.mysql.catalogue.CatalogueMapper;
 import com.yc.ship.module.miniapplet.service.content.ContentService;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.validation.annotation.Validated;
@@ -118,8 +116,8 @@ public class CatalogueServiceImpl implements CatalogueService {
     }
 
     @Override
-    public List<CatalogueDO> getCatalogueList(AppContentReqVO reqVO) {
-        return catalogueMapper.getCatalogueList(reqVO.getCatalogueId(), reqVO.getCatalogueParentId(), reqVO.getCode(), reqVO.getCategoryName());
+    public CatalogueDO getByCode(String code) {
+        return catalogueMapper.selectByCode(code);
     }
 
     private List<Map<String, Object>> getCatalogueTree(Long prentId) {

+ 7 - 0
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/service/content/ContentService.java

@@ -4,6 +4,7 @@ package com.yc.ship.module.miniapplet.service.content;
 import com.yc.ship.framework.common.pojo.PageResult;
 import com.yc.ship.module.miniapplet.controller.admin.content.vo.ContentPageReqVO;
 import com.yc.ship.module.miniapplet.controller.admin.content.vo.ContentSaveReqVO;
+import com.yc.ship.module.miniapplet.controller.app.content.vo.AppContentPageReqVO;
 import com.yc.ship.module.miniapplet.dal.dataobject.content.ContentDO;
 
 import javax.validation.Valid;
@@ -63,4 +64,10 @@ public interface ContentService {
      */
     List<ContentDO> getContentList(Long catalogueId,Integer releaseStatus);
 
+    /**
+     * 获取小程序上的内容分页
+     * @param reqVO
+     * @return
+     */
+    PageResult<ContentDO> getAppContentPage(AppContentPageReqVO reqVO);
 }

+ 17 - 0
ship-module-miniapplet/src/main/java/com/yc/ship/module/miniapplet/service/content/ContentServiceImpl.java

@@ -5,8 +5,12 @@ import com.yc.ship.framework.common.pojo.PageResult;
 import com.yc.ship.framework.common.util.object.BeanUtils;
 import com.yc.ship.module.miniapplet.controller.admin.content.vo.ContentPageReqVO;
 import com.yc.ship.module.miniapplet.controller.admin.content.vo.ContentSaveReqVO;
+import com.yc.ship.module.miniapplet.controller.app.content.vo.AppContentPageReqVO;
+import com.yc.ship.module.miniapplet.dal.dataobject.catalogue.CatalogueDO;
 import com.yc.ship.module.miniapplet.dal.dataobject.content.ContentDO;
+import com.yc.ship.module.miniapplet.dal.mysql.catalogue.CatalogueMapper;
 import com.yc.ship.module.miniapplet.dal.mysql.content.ContentMapper;
+import com.yc.ship.module.miniapplet.service.catalogue.CatalogueService;
 import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
 
@@ -15,6 +19,7 @@ import java.time.LocalDateTime;
 import java.util.List;
 
 import static com.yc.ship.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static com.yc.ship.module.miniapplet.enums.ErrorCodeConstants.CATALOGUE_NOT_EXISTS;
 import static com.yc.ship.module.miniapplet.enums.ErrorCodeConstants.CONTENT_NOT_EXISTS;
 
 
@@ -30,6 +35,9 @@ public class ContentServiceImpl implements ContentService {
     @Resource
     private ContentMapper contentMapper;
 
+    @Resource
+    private CatalogueMapper catalogueMapper;
+
     @Override
     public Long createContent(ContentSaveReqVO createReqVO) {
         // 插入
@@ -84,4 +92,13 @@ public class ContentServiceImpl implements ContentService {
         return contentMapper.getContentList(catalogueId, releaseStatus);
     }
 
+    @Override
+    public PageResult<ContentDO> getAppContentPage(AppContentPageReqVO reqVO) {
+        CatalogueDO catalogue = catalogueMapper.selectByCode(reqVO.getCode());
+        if(catalogue == null) {
+            throw exception(CATALOGUE_NOT_EXISTS);
+        }
+        return contentMapper.selectAppContentPage(reqVO, catalogue.getId());
+    }
+
 }

+ 1 - 1
ship-module-ota/ship-module-ota-biz/src/main/java/com/yc/ship/module/ota/service/password/RSAUtils.java

@@ -25,7 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- * @author :yaochao
+ *
  * @description :TODO
  * @date :2022/5/6 15:42
  */

+ 1 - 5
ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/api/link/LinkApi.java

@@ -8,11 +8,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 
 import javax.annotation.security.PermitAll;
 
-/**
- * @author :yaochao
- * @description :TODO
- * @date :2025/8/7 13:40
- */
+
 @Tag(name = "RPC 服务 - 链接")
 public interface LinkApi {
 

+ 1 - 5
ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/api/store/StoreApi.java

@@ -10,11 +10,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 import javax.annotation.security.PermitAll;
 import java.util.List;
 
-/**
- * @author :yaochao
- * @description :TODO
- * @date :2025/8/7 13:40
- */
+
 @Tag(name = "RPC 服务 - 门店")
 public interface StoreApi {
 

+ 1 - 5
ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/enums/StoreBalanceTypeEnum.java

@@ -6,11 +6,7 @@ import lombok.RequiredArgsConstructor;
 
 import java.util.Arrays;
 
-/**
- * @author :yaochao
- * @description :TODO
- * @date :2025/8/6 15:48
- */
+
 @RequiredArgsConstructor
 @Getter
 public enum StoreBalanceTypeEnum implements IntArrayValuable {

+ 1 - 5
ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/enums/StoreCreditTypeEnum.java

@@ -6,11 +6,7 @@ import lombok.RequiredArgsConstructor;
 
 import java.util.Arrays;
 
-/**
- * @author :yaochao
- * @description :TODO
- * @date :2025/8/6 15:48
- */
+
 @RequiredArgsConstructor
 @Getter
 public enum StoreCreditTypeEnum implements IntArrayValuable {

+ 1 - 5
ship-module-otc/ship-module-otc-api/src/main/java/com/yc/ship/module/otc/enums/TradeModeEnum.java

@@ -5,11 +5,7 @@ import lombok.RequiredArgsConstructor;
 
 import java.util.Arrays;
 
-/**
- * @author :yaochao
- * @description :TODO
- * @date :2025/8/6 15:48
- */
+
 @RequiredArgsConstructor
 @Getter
 public enum TradeModeEnum {

+ 1 - 1
ship-module-resource/ship-module-resource-biz/src/main/java/com/yc/ship/module/resource/controller/admin/vo/SiteRespDTO.java

@@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 /**
- * @author :yaochao
+ *
  * @description :TODO
  * @date :2025/6/6 16:27
  */

+ 0 - 1
ship-module-resource/ship-module-resource-biz/src/main/resources/mapper/resourceroute/ResourceRouteMapper.xml

@@ -18,7 +18,6 @@
            rr.on_dock_id dock_id,
            rp.id port_id,
            rr.short_name route_short_name,
-           rr.direction,
            rr.duration,
            rs.id ship_id,
            rs.NAME ship_name,

+ 1 - 1
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/controller/app/otc/vo/AppTradeDetailBaseRespVO.java

@@ -6,7 +6,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 /**
- * @author :yaochao
+ *
  * @description :TODO
  * @date :2025/9/26 08:31
  */

+ 1 - 1
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/utils/RSAUtils.java

@@ -25,7 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- * @author :yaochao
+ *
  * @description :TODO
  * @date :2022/5/6 15:42
  */