From 55e63b36e65d2ef7d1a58e4b154d87f5ffa4dcf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Fri, 6 Jun 2025 17:17:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=A7=E5=93=81=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/ProductModelController.java | 6 +++--- .../common/pojo/request/ProductPublishRequest.java | 2 +- .../repository/entity/ProductModelIntroItem.java | 5 ++++- .../repository/service/IProductModelParamsService.java | 4 ++-- .../service/impl/ProductModelParamsServiceImpl.java | 8 +++++--- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/nflg-mobilebroken-admin/src/main/java/com/nflg/mobilebroken/admin/controller/ProductModelController.java b/nflg-mobilebroken-admin/src/main/java/com/nflg/mobilebroken/admin/controller/ProductModelController.java index 8642c977..113f9f7f 100644 --- a/nflg-mobilebroken-admin/src/main/java/com/nflg/mobilebroken/admin/controller/ProductModelController.java +++ b/nflg-mobilebroken-admin/src/main/java/com/nflg/mobilebroken/admin/controller/ProductModelController.java @@ -197,7 +197,7 @@ public class ProductModelController extends ControllerBase{ * 获取设备介绍详情 * @param introId 机型介绍id */ - @PostMapping("/getIntroInfo") + @GetMapping("/getIntroInfo") public ApiResult> getIntroInfo(@Valid @RequestParam @NotNull Integer introId){ return ApiResult.success(productModelIntroService.getInfo(introId)); } @@ -218,7 +218,7 @@ public class ProductModelController extends ControllerBase{ */ @PostMapping("/publishParams") public ApiResult publishParams(@Valid @RequestBody ProductPublishRequest request){ - productModelParamsService.publish(request,false); + productModelParamsService.publish(request); return ApiResult.success(); } @@ -228,7 +228,7 @@ public class ProductModelController extends ControllerBase{ */ @PostMapping("/getParamsList") public ApiResult> getParamsList(@Valid @RequestBody ProductModelIntroSearchRequest request){ - return ApiResult.success(productModelParamsService.getList(request,false)); + return ApiResult.success(productModelParamsService.getList(request)); } /** diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductPublishRequest.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductPublishRequest.java index 1ebc6375..ec95f346 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductPublishRequest.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductPublishRequest.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; public class ProductPublishRequest { @NotNull - private String id; + private Integer id; /** * 发布状态,1:发布;2:取消发布; diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelIntroItem.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelIntroItem.java index 3424e68b..811563d1 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelIntroItem.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelIntroItem.java @@ -1,13 +1,15 @@ package com.nflg.mobilebroken.repository.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import java.io.Serializable; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; +import java.io.Serializable; + /** *

* @@ -40,6 +42,7 @@ public class ProductModelIntroItem implements Serializable { /** * 机型介绍 */ + @TableField("`desc`") private String desc; /** diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IProductModelParamsService.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IProductModelParamsService.java index 884349d6..64d87023 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IProductModelParamsService.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IProductModelParamsService.java @@ -33,9 +33,9 @@ public interface IProductModelParamsService extends IService void delete(@Valid BatchDeleteRequest request); - void publish(@Valid ProductPublishRequest request,boolean main); + void publish(@Valid ProductPublishRequest request); - IPage getList(ProductModelIntroSearchRequest request, boolean main); + IPage getList(ProductModelIntroSearchRequest request); List getListByLanguage(Integer modelId, String language,boolean main); diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelParamsServiceImpl.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelParamsServiceImpl.java index cf52808f..a0d03c33 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelParamsServiceImpl.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelParamsServiceImpl.java @@ -55,7 +55,9 @@ public class ProductModelParamsServiceImpl extends ServiceImpl getList(ProductModelIntroSearchRequest request, boolean main) { + public IPage getList(ProductModelIntroSearchRequest request) { return lambdaQuery() .eq(ProductModelParams::getModelId, request.getModelId()) .eq(Objects.nonNull(request.getState()), ProductModelParams::getState, request.getState())