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 f6967c1e..751c6897 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 @@ -15,10 +15,7 @@ import com.nflg.mobilebroken.common.pojo.PageData; import com.nflg.mobilebroken.common.pojo.dto.ProductModelParamsExcelDTO; import com.nflg.mobilebroken.common.pojo.request.*; import com.nflg.mobilebroken.common.pojo.vo.*; -import com.nflg.mobilebroken.common.util.AdminUserUtil; -import com.nflg.mobilebroken.common.util.EecExcelUtil; -import com.nflg.mobilebroken.common.util.PageUtil; -import com.nflg.mobilebroken.common.util.VUtils; +import com.nflg.mobilebroken.common.util.*; import com.nflg.mobilebroken.repository.entity.*; import com.nflg.mobilebroken.repository.service.*; import lombok.extern.slf4j.Slf4j; @@ -312,6 +309,8 @@ public class ProductModelController extends ControllerBase{ public ApiResult deleteParamsIndexName(@Valid @RequestBody ParamsIndexNameDeleteRequest request) { ProductModelParams info = productModelParamsService.getById(request.getModelParamsId()); VUtils.trueThrowBusinessError(Objects.isNull(info)).throwMessage("无效的数据"); + VUtils.trueThrowBusinessError(!StrUtil.equals(info.getCreateBy(), AdminUserUtil.getUserName())) + .throwMessage("不能删除其他人创建的数据"); if (Objects.equals(info.getState(), PublishState.Published.getState())) { Integer oldId = request.getModelParamsId(); request.setModelParamsId(productModelParamsService.add(info.getModelId(),info.getBatchNumber())); @@ -396,6 +395,8 @@ public class ProductModelController extends ControllerBase{ VUtils.trueThrowBusinessError(Objects.isNull(request.getModelParamsId())).throwMessage("机型参数id不能为空"); ProductModelParams info = productModelParamsService.getById(request.getModelParamsId()); VUtils.trueThrowBusinessError(Objects.isNull(info)).throwMessage("无效的数据"); + VUtils.trueThrowBusinessError(!StrUtil.equals(info.getCreateBy(), AdminUserUtil.getUserName())) + .throwMessage("不能删除其他人创建的数据"); if (Objects.equals(info.getState(), PublishState.Published.getState())) { Integer oldId = request.getModelParamsId(); request.setModelParamsId(productModelParamsService.add(request.getModelId(),info.getBatchNumber())); @@ -744,88 +745,38 @@ public class ProductModelController extends ControllerBase{ } /** - * 添加图册 + * 获取主要参数列表用于排序 + */ + @GetMapping("/getMainParamsListForSort") + public ApiResult> getMainParamsListForSort(@Valid @RequestParam @NotNull Integer modelParamsId){ + return ApiResult.success(productModelParamsService.getMainListForSort(modelParamsId,Constant.DEFAULT_LANGUAGE_CODE)); + } + + /** + * 保存主要参数排序 * @param request 请求参数 */ - @PostMapping("/addImage") - public ApiResult addImage(@Valid @RequestBody ProductModelImageAddRequest request){ - productModelImageService.add(request); + @PostMapping("/saveMainParamsSort") + public ApiResult saveMainParamsSort(@Valid @RequestBody ParamsSortSaveRequest request){ + productModelParamsService.saveMainSort(request); return ApiResult.success(); } /** - * 修改图册 + * 获取重要参数列表用于排序 + */ + @GetMapping("/getImportantParamsListForSort") + public ApiResult> getImportantParamsListForSort(@Valid @RequestParam @NotNull Integer modelParamsId){ + return ApiResult.success(productModelParamsService.getImportantParamsListForSort(modelParamsId,Constant.DEFAULT_LANGUAGE_CODE)); + } + + /** + * 保存重要参数排序 * @param request 请求参数 */ - @PostMapping("/updateImage") - public ApiResult updateImage(@Valid @RequestBody ProductModelImageUpdateRequest request){ - return ApiResult.success(productModelImageService.update(request)); - } - - /** - * 启用/禁用图册 - * @param request 请求参数 - */ - @PostMapping("/enableImage") - public ApiResult enableImage(@Valid @RequestBody EnableRequest request){ - productModelImageService.enable(request); - return ApiResult.success(); - } - - /** - * 删除图册 - * @param request 请求参数 - */ - @PostMapping("/deleteImage") - public ApiResult deleteImage(@Valid @RequestBody BatchDeleteRequest request){ - productModelImageService.delete(request); - return ApiResult.success(); - } - - /** - * 发布或者取消发布图册 - * @param request 请求参数 - */ - @PostMapping("/publishImage") - public ApiResult publishImage(@Valid @RequestBody ProductPublishRequest request){ - productModelImageService.publish(request); - return ApiResult.success(); - } - - /** - * 获取图册列表 - * @param request 请求参数 - */ - @PostMapping("/getImageList") - public ApiResult> getImageList(@Valid @RequestBody ProductModelImageSearchRequest request){ - return ApiResult.success(productModelImageService.getList(request)); - } - - /** - * 获取图册详情 - * @param modelImagesId 图册ID - */ - @GetMapping("/getImageInfo") - public ApiResult getImageInfo(@RequestParam Integer modelImagesId){ - return ApiResult.success(productModelImageService.getInfo(modelImagesId)); - } - - /** - * 获取图册列表用于排序 - * @param modelId 机型ID - */ - @GetMapping("/getImageListForSort") - public ApiResult> getImageListForSort(@Valid @RequestParam @NotNull Integer modelId){ - return ApiResult.success(productModelImageService.getListForSort(modelId)); - } - - /** - * 保存图册排序 - * @param request 请求参数 - */ - @PostMapping("/saveImageSort") - public ApiResult saveImageSort(@Valid @RequestBody SortSaveRequest request){ - productModelImageService.saveSort(request); + @PostMapping("/saveImportantParamsSort") + public ApiResult saveImportantParamsSort(@Valid @RequestBody ParamsSortSaveRequest request){ + productModelParamsService.saveImportantSort(request); return ApiResult.success(); } diff --git a/nflg-mobilebroken-auth/src/main/java/com/nflg/mobilebroken/auth/controller/AppController.java b/nflg-mobilebroken-auth/src/main/java/com/nflg/mobilebroken/auth/controller/AppController.java index a6489140..3f82d380 100644 --- a/nflg-mobilebroken-auth/src/main/java/com/nflg/mobilebroken/auth/controller/AppController.java +++ b/nflg-mobilebroken-auth/src/main/java/com/nflg/mobilebroken/auth/controller/AppController.java @@ -120,13 +120,6 @@ public class AppController extends ControllerBase { @GetMapping("getPermissionMenus") public ApiResult> getPermissionMenus() { VUtils.trueThrow(!SaTokenAppUtil.isLogin()).throwMessage(STATE.LoginError, "请重新登录"); - if (StrUtil.equals(AppUserUtil.getFrom(), "app") && !AppUserUtil.isPrimary()) { - Integer primaryUserId = appUserService.getPrimaryByChild(AppUserUtil.getUserId()); - List menus = adminRoleService.getMenusByRoleCodes(AppUserUtil.getFrom(), primaryUserId, "app"); - menus.removeIf(menu -> StrUtil.equals(menu.getComponent(), "identityManagement")); - return ApiResult.success(menus); - } else { - return ApiResult.success(adminRoleService.getMenusByRoleCodes(AppUserUtil.getFrom(), AppUserUtil.getUserId(), "app")); - } + return ApiResult.success(adminRoleService.getMenusByRoleCodes(AppUserUtil.getFrom(), AppUserUtil.getUserId(), "app")); } } diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ParamsSortSaveRequest.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ParamsSortSaveRequest.java new file mode 100644 index 00000000..acaac56f --- /dev/null +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ParamsSortSaveRequest.java @@ -0,0 +1,20 @@ +package com.nflg.mobilebroken.common.pojo.request; + +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +@Data +public class ParamsSortSaveRequest { + + @NotNull + private Integer modelParamsId; + + /** + * 排序后的列表 + */ + @NotEmpty + private List batchNumbers; +} diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductModelParamsItemAddRequest.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductModelParamsItemAddRequest.java index 0949b746..471881f4 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductModelParamsItemAddRequest.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductModelParamsItemAddRequest.java @@ -43,8 +43,18 @@ public class ProductModelParamsItemAddRequest implements Serializable { */ private Boolean main=false; + /** + * 是否重要参数 + */ + private Boolean important=false; + /** * 是否参与比较 */ private Boolean compare=true; + + /** + * 图标 + */ + private String ico; } diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductModelVideoItemAddRequest.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductModelVideoItemAddRequest.java index de05b21c..9fccbd8e 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductModelVideoItemAddRequest.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductModelVideoItemAddRequest.java @@ -4,6 +4,7 @@ import lombok.Data; import lombok.experimental.Accessors; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; @Data @Accessors(chain = true) @@ -20,6 +21,12 @@ public class ProductModelVideoItemAddRequest { @NotBlank private String languageCode; + /** + * 类型,0-视频;1:图片 + */ + @NotNull + private Integer type; + /** * 图片 */ diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductPartAddRequest.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductPartAddRequest.java index e46f532f..faf54bed 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductPartAddRequest.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/request/ProductPartAddRequest.java @@ -15,6 +15,11 @@ public class ProductPartAddRequest { @NotNull private Integer attrId; + /** + * 描述 + */ + private String describe; + /** * 多语言数据 */ diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ParamsSortListVO.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ParamsSortListVO.java new file mode 100644 index 00000000..2c7a82f9 --- /dev/null +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ParamsSortListVO.java @@ -0,0 +1,10 @@ +package com.nflg.mobilebroken.common.pojo.vo; + +public class ParamsSortListVO { + + private String batchNumber; + + private String name; + + private Integer sort; +} diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductModelInfoVO.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductModelInfoVO.java index b0b435d6..ce105e0d 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductModelInfoVO.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductModelInfoVO.java @@ -77,9 +77,9 @@ public class ProductModelInfoVO { private List mainParams; /** - * 产品图册 + * 重要技术参数 */ - private List images; + private List importantParams; /** * 产品视频 diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductParamsItemVO.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductParamsItemVO.java index a3491943..fbb303d8 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductParamsItemVO.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductParamsItemVO.java @@ -31,11 +31,21 @@ public class ProductParamsItemVO { */ private Boolean main; + /** + * 是否重要参数 + */ + private Boolean important; + /** * 是否参与比较 */ private Boolean compare; + /** + * 图标 + */ + private String ico; + /** * 创建人 */ diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductPartSearchVO.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductPartSearchVO.java index 11edbc81..cbe436a4 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductPartSearchVO.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductPartSearchVO.java @@ -19,6 +19,11 @@ public class ProductPartSearchVO { */ private Integer attrId; + /** + * 描述 + */ + private String describe; + /** * 类别属性 */ diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductVideoVO.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductVideoVO.java index eaa05bbb..efc525cc 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductVideoVO.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductVideoVO.java @@ -2,9 +2,17 @@ package com.nflg.mobilebroken.common.pojo.vo; import lombok.Data; +import javax.validation.constraints.NotNull; + @Data public class ProductVideoVO extends ProductImageVO{ + /** + * 类型,0-视频;1:图片 + */ + @NotNull + private Integer type; + /** * 视频地址 */ diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelParamsItem.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelParamsItem.java index cb20f651..ecc82eae 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelParamsItem.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelParamsItem.java @@ -1,8 +1,6 @@ package com.nflg.mobilebroken.repository.entity; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; @@ -64,11 +62,33 @@ public class ProductModelParamsItem implements Serializable { */ private Boolean main; + /** + * 主要参数排序号 + */ + @TableField(updateStrategy=FieldStrategy.ALWAYS) + private Integer mainSort; + + /** + * 是否重要参数 + */ + private Boolean important; + + /** + * 重要参数排序号 + */ + @TableField(updateStrategy=FieldStrategy.ALWAYS) + private Integer importantSort; + /** * 是否参与比较 */ private Boolean compare; + /** + * 图标 + */ + private String ico; + /** * 创建人 */ diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelVideoItem.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelVideoItem.java index 23633899..849181fa 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelVideoItem.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductModelVideoItem.java @@ -3,11 +3,12 @@ package com.nflg.mobilebroken.repository.entity; import com.baomidou.mybatisplus.annotation.IdType; 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; + /** *

* 产品中心-产品机型-视频 @@ -37,6 +38,11 @@ public class ProductModelVideoItem implements Serializable { */ private String languageCode; + /** + * 类型,0-视频;1:图片 + */ + private Integer type; + /** * 视频地址 */ diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductPart.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductPart.java index 153e02fc..88e48a91 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductPart.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/ProductPart.java @@ -34,6 +34,11 @@ public class ProductPart implements Serializable { */ private String name; + /** + * 描述 + */ + private String describe; + /** * 部件类型id */ diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/ProductModelParamsMapper.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/ProductModelParamsMapper.java index dccf9277..575b7329 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/ProductModelParamsMapper.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/ProductModelParamsMapper.java @@ -1,6 +1,7 @@ package com.nflg.mobilebroken.repository.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.nflg.mobilebroken.common.pojo.vo.ParamsSortListVO; import com.nflg.mobilebroken.common.pojo.vo.ProductModelParamVO; import com.nflg.mobilebroken.common.pojo.vo.ProductParamsItemVO; import com.nflg.mobilebroken.repository.entity.ProductModelParams; @@ -24,4 +25,10 @@ public interface ProductModelParamsMapper extends BaseMapper void copyItems(Integer oldId, Integer newId); List getMainListByLanguage(Integer modelId, String language); + + List getMainListForSort(Integer paramId, String language); + + List getImportantParamsListForSort(Integer paramId, String language); + + List getImportantListByLanguage(Integer modelId, String language); } 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 c1740a43..825581b0 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 @@ -3,8 +3,10 @@ package com.nflg.mobilebroken.repository.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.nflg.mobilebroken.common.pojo.request.BatchDeleteRequest; +import com.nflg.mobilebroken.common.pojo.request.ParamsSortSaveRequest; import com.nflg.mobilebroken.common.pojo.request.ProductModelIntroSearchRequest; import com.nflg.mobilebroken.common.pojo.request.ProductPublishRequest; +import com.nflg.mobilebroken.common.pojo.vo.ParamsSortListVO; import com.nflg.mobilebroken.common.pojo.vo.ProductModelMainParamsItemChildrenVO; import com.nflg.mobilebroken.common.pojo.vo.ProductModelParamVO; import com.nflg.mobilebroken.common.pojo.vo.ProductParamsItemVO; @@ -52,4 +54,14 @@ public interface IProductModelParamsService extends IService List getCNList(Integer modelId); List getMainListByLanguage(Integer modelId, String language); + + List getMainListForSort(Integer paramId,String language); + + void saveMainSort(@Valid ParamsSortSaveRequest request); + + List getImportantParamsListForSort(@Valid @NotNull Integer modelParamsId, String language); + + void saveImportantSort(@Valid ParamsSortSaveRequest request); + + List getImportantListByLanguage(Integer modelId, String language); } diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductAttrServiceImpl.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductAttrServiceImpl.java index 3d6c5ddf..1a544b56 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductAttrServiceImpl.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductAttrServiceImpl.java @@ -78,6 +78,10 @@ public class ProductAttrServiceImpl extends ServiceImpl getMainListByLanguage(Integer modelId, String language) { return baseMapper.getMainListByLanguage(modelId,language); } + + @Override + public List getMainListForSort(Integer paramId,String language) { + return baseMapper.getMainListForSort(paramId,language); + } + + @Transactional + @Override + public void saveMainSort(ParamsSortSaveRequest request) { + for (int i = 0; i < request.getBatchNumbers().size(); i++) { + productModelParamsItemService.lambdaUpdate() + .set(ProductModelParamsItem::getMainSort, i + 1) + .set(ProductModelParamsItem::getUpdateBy, AdminUserUtil.getUserName()) + .set(ProductModelParamsItem::getUpdateTime, LocalDateTime.now()) + .eq(ProductModelParamsItem::getModelParamsId, request.getModelParamsId()) + .eq(ProductModelParamsItem::getBatchNumber, request.getBatchNumbers().get(i)) + .update(); + } + } + + @Override + public List getImportantParamsListForSort(Integer modelParamsId, String language) { + return baseMapper.getImportantParamsListForSort(modelParamsId,language); + } + + @Transactional + @Override + public void saveImportantSort(ParamsSortSaveRequest request) { + for (int i = 0; i < request.getBatchNumbers().size(); i++) { + productModelParamsItemService.lambdaUpdate() + .set(ProductModelParamsItem::getImportantSort, i + 1) + .set(ProductModelParamsItem::getUpdateBy, AdminUserUtil.getUserName()) + .set(ProductModelParamsItem::getUpdateTime, LocalDateTime.now()) + .eq(ProductModelParamsItem::getModelParamsId, request.getModelParamsId()) + .eq(ProductModelParamsItem::getBatchNumber, request.getBatchNumbers().get(i)) + .update(); + } + } + + @Override + public List getImportantListByLanguage(Integer modelId, String language) { + return baseMapper.getImportantListByLanguage(modelId,language); + } } diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelServiceImpl.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelServiceImpl.java index b759410e..050cc54a 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelServiceImpl.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelServiceImpl.java @@ -1,7 +1,6 @@ package com.nflg.mobilebroken.repository.service.impl; import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.convert.Convert; import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -221,6 +220,10 @@ public class ProductModelServiceImpl extends ServiceImpl new ProductModelVideoItem() .setModelVideoId(videoId) .setLanguageCode(it.getLanguageCode()) + .setType(it.getType()) .setVideo(it.getVideo()) .setContent(it.getContent()) .setImage(it.getImage()) @@ -49,6 +50,7 @@ public class ProductModelVideoItemServiceImpl extends ServiceImpl new ProductModelVideoItem() .setId(it.getId()) + .setType(it.getType()) .setContent(it.getContent()) .setImage(it.getImage()) .setVideo(it.getVideo()) @@ -66,6 +68,7 @@ public class ProductModelVideoItemServiceImpl extends ServiceImpl new ProductModelVideoItemAddRequest() .setId(it.getId()) .setLanguageCode(it.getLanguageCode()) + .setType(it.getType()) .setContent(it.getContent()) .setImage(it.getImage()) .setVideo(it.getVideo()) diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelVideoServiceImpl.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelVideoServiceImpl.java index 698a18df..3244e2cd 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelVideoServiceImpl.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductModelVideoServiceImpl.java @@ -102,6 +102,10 @@ public class ProductModelVideoServiceImpl extends ServiceImpl numbers = lambdaQuery() .in(ProductSeries::getId, request.getIds()) .list() diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductTypeServiceImpl.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductTypeServiceImpl.java index 4d284b89..ac58a811 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductTypeServiceImpl.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductTypeServiceImpl.java @@ -169,6 +169,10 @@ public class ProductTypeServiceImpl extends ServiceImpl list = lambdaQuery() .in(ProductType::getId, request.getIds()) .list(); diff --git a/nflg-mobilebroken-repository/src/main/resources/mapper/ProductModelParamsMapper.xml b/nflg-mobilebroken-repository/src/main/resources/mapper/ProductModelParamsMapper.xml index 05b92c74..44a89f4e 100644 --- a/nflg-mobilebroken-repository/src/main/resources/mapper/ProductModelParamsMapper.xml +++ b/nflg-mobilebroken-repository/src/main/resources/mapper/ProductModelParamsMapper.xml @@ -37,8 +37,30 @@ WHERE pmp.model_id = #{modelId} AND pmp.state = 1 AND pmpi.main = 1 - AND pmpi.compare = 1 AND pmpi.language_code = #{language} - ORDER BY pmp.id DESC + ORDER BY pmpi.main_sort + + + + + + +