From 02c5be6c3d8715d05b9fd2b6a04c1ec53d1df19c Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Sun, 3 Mar 2024 09:56:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=B1=9E=E6=80=A7=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- muyu-auth/src/main/resources/bootstrap.yml | 4 +-- muyu-gateway/src/main/resources/bootstrap.yml | 8 ++--- .../src/main/resources/bootstrap.yml | 4 +-- .../muyu-gen/src/main/resources/bootstrap.yml | 4 +-- .../muyu-job/src/main/resources/bootstrap.yml | 4 +-- .../com/muyu/product/domain/BrandInfo.java | 8 ++--- .../com/muyu/product/domain/ProjectInfo.java | 8 ++--- .../product/domain/req/BrandInfoEditReq.java | 2 +- .../product/domain/req/BrandInfoQueryReq.java | 2 +- .../product/domain/req/BrandInfoSaveReq.java | 2 +- .../domain/req/ProjectInfoEditReq.java | 2 +- .../domain/req/ProjectInfoQueryReq.java | 2 +- .../domain/req/ProjectInfoSaveReq.java | 2 +- .../controller/AttributeInfoController.java | 3 +- .../mapper/AsAttributeGroupMapper.java | 1 + .../service/AsAttributeGroupService.java | 13 +------ .../service/AttributeGroupService.java | 11 +----- .../product/service/AttributeInfoService.java | 6 +--- .../impl/AsAttributeGroupServiceImpl.java | 11 ++---- .../impl/AttributeGroupServiceImpl.java | 18 ++++------ .../impl/AttributeInfoServiceImpl.java | 35 ++++++++----------- .../service/impl/BrandInfoServiceImpl.java | 4 +-- .../service/impl/ProjectInfoServiceImpl.java | 4 +-- .../src/main/resources/bootstrap.yml | 4 +-- .../mapper/product/BrandInfoMapper.xml | 4 +-- .../mapper/product/ProjectInfoMapper.xml | 2 +- .../src/main/resources/bootstrap.yml | 4 +-- 27 files changed, 66 insertions(+), 106 deletions(-) diff --git a/muyu-auth/src/main/resources/bootstrap.yml b/muyu-auth/src/main/resources/bootstrap.yml index cf75dca..1deffc4 100644 --- a/muyu-auth/src/main/resources/bootstrap.yml +++ b/muyu-auth/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 config: # 配置中心地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-gateway/src/main/resources/bootstrap.yml b/muyu-gateway/src/main/resources/bootstrap.yml index b597354..aeb3037 100644 --- a/muyu-gateway/src/main/resources/bootstrap.yml +++ b/muyu-gateway/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 config: # 配置中心地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 # 配置文件格式 file-extension: yml # 共享配置 @@ -28,12 +28,12 @@ spring: eager: true transport: # 控制台地址 - dashboard: 127.0.0.1:8718 + dashboard: 101.34.248.9:8718 # nacos配置持久化 datasource: ds1: nacos: - server-addr: 127.0.0.1:8848 + server-addr: 101.34.248.9:8848 dataId: sentinel-muyu-gateway groupId: DEFAULT_GROUP data-type: json diff --git a/muyu-modules/muyu-file/src/main/resources/bootstrap.yml b/muyu-modules/muyu-file/src/main/resources/bootstrap.yml index b366183..eee7c97 100644 --- a/muyu-modules/muyu-file/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-file/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 config: # 配置中心地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml b/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml index d6a3264..73bdfff 100644 --- a/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 config: # 配置中心地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml index 5f483d5..f94cd7e 100644 --- a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 config: # 配置中心地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java index d94d3af..0c20c69 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java @@ -44,7 +44,7 @@ public class BrandInfo extends BaseEntity { */ @Excel(name = "品牌名称") @ApiModelProperty(name = "品牌名称", value = "品牌名称", required = true) - private String nam; + private String name; /** * LOGO @@ -72,7 +72,7 @@ public class BrandInfo extends BaseEntity { */ public static BrandInfo queryBuild(BrandInfoQueryReq brandInfoQueryReq) { return BrandInfo.builder() - .nam(brandInfoQueryReq.getNam()) + .name(brandInfoQueryReq.getName()) .logo(brandInfoQueryReq.getLogo()) .start(brandInfoQueryReq.getStart()) .introduction(brandInfoQueryReq.getIntroduction()) @@ -84,7 +84,7 @@ public class BrandInfo extends BaseEntity { */ public static BrandInfo saveBuild(BrandInfoSaveReq brandInfoSaveReq) { return BrandInfo.builder() - .nam(brandInfoSaveReq.getNam()) + .name(brandInfoSaveReq.getName()) .logo(brandInfoSaveReq.getLogo()) .start(brandInfoSaveReq.getStart()) .introduction(brandInfoSaveReq.getIntroduction()) @@ -98,7 +98,7 @@ public class BrandInfo extends BaseEntity { public static BrandInfo editBuild(Long id, BrandInfoEditReq brandInfoEditReq) { return BrandInfo.builder() .id(id) - .nam(brandInfoEditReq.getNam()) + .name(brandInfoEditReq.getName()) .logo(brandInfoEditReq.getLogo()) .start(brandInfoEditReq.getStart()) .introduction(brandInfoEditReq.getIntroduction()) diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectInfo.java index 2688652..64570a4 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectInfo.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectInfo.java @@ -50,7 +50,7 @@ public class ProjectInfo extends BaseEntity { /** 主类型 */ @Excel(name = "主类型") @ApiModelProperty(name = "主类型", value = "主类型") - private String mianType; + private String mainType; /** 父类型 */ @Excel(name = "父类型") @@ -94,7 +94,7 @@ public class ProjectInfo extends BaseEntity { return ProjectInfo.builder() .name(projectInfoQueryReq.getName()) .introduction(projectInfoQueryReq.getIntroduction()) - .mianType(projectInfoQueryReq.getMianType()) + .mainType(projectInfoQueryReq.getMainType()) .parentType(projectInfoQueryReq.getParentType()) .type(projectInfoQueryReq.getType()) .image(projectInfoQueryReq.getImage()) @@ -112,7 +112,7 @@ public class ProjectInfo extends BaseEntity { return ProjectInfo.builder() .name(projectInfoSaveReq.getName()) .introduction(projectInfoSaveReq.getIntroduction()) - .mianType(projectInfoSaveReq.getMianType()) + .mainType(projectInfoSaveReq.getMainType()) .parentType(projectInfoSaveReq.getParentType()) .type(projectInfoSaveReq.getType()) .image(projectInfoSaveReq.getImage()) @@ -131,7 +131,7 @@ public class ProjectInfo extends BaseEntity { .id(id) .name(projectInfoEditReq.getName()) .introduction(projectInfoEditReq.getIntroduction()) - .mianType(projectInfoEditReq.getMianType()) + .mainType(projectInfoEditReq.getMainType()) .parentType(projectInfoEditReq.getParentType()) .type(projectInfoEditReq.getType()) .image(projectInfoEditReq.getImage()) diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoEditReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoEditReq.java index b9b6c4d..7ac5cfa 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoEditReq.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoEditReq.java @@ -25,7 +25,7 @@ public class BrandInfoEditReq extends BaseEntity { /** 品牌名称 */ @ApiModelProperty(name = "品牌名称", value = "品牌名称", required = true) - private String nam; + private String name; /** LOGO */ @ApiModelProperty(name = "LOGO", value = "LOGO", required = true) diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoQueryReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoQueryReq.java index 5c17d05..540b07f 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoQueryReq.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoQueryReq.java @@ -25,7 +25,7 @@ public class BrandInfoQueryReq extends BaseEntity { /** 品牌名称 */ @ApiModelProperty(name = "品牌名称", value = "品牌名称") - private String nam; + private String name; /** LOGO */ @ApiModelProperty(name = "LOGO", value = "LOGO") diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoSaveReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoSaveReq.java index 15d7c84..4a3ac9d 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoSaveReq.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/BrandInfoSaveReq.java @@ -31,7 +31,7 @@ public class BrandInfoSaveReq extends BaseEntity { /** 品牌名称 */ @ApiModelProperty(name = "品牌名称", value = "品牌名称", required = true) - private String nam; + private String name; /** LOGO */ diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoEditReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoEditReq.java index f6dc539..9a376b7 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoEditReq.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoEditReq.java @@ -33,7 +33,7 @@ public class ProjectInfoEditReq extends BaseEntity { /** 主类型 */ @ApiModelProperty(name = "主类型", value = "主类型") - private String mianType; + private String mainType; /** 父类型 */ @ApiModelProperty(name = "父类型", value = "父类型") diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoQueryReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoQueryReq.java index 72f5185..b731f2c 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoQueryReq.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoQueryReq.java @@ -33,7 +33,7 @@ public class ProjectInfoQueryReq extends BaseEntity { /** 主类型 */ @ApiModelProperty(name = "主类型", value = "主类型") - private String mianType; + private String mainType; /** 父类型 */ @ApiModelProperty(name = "父类型", value = "父类型") diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoSaveReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoSaveReq.java index 8907e6d..dc800fa 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoSaveReq.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/ProjectInfoSaveReq.java @@ -41,7 +41,7 @@ public class ProjectInfoSaveReq extends BaseEntity { /** 主类型 */ @ApiModelProperty(name = "主类型", value = "主类型") - private String mianType; + private String mainType; /** 父类型 */ diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeInfoController.java index 3e777c3..6665a49 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeInfoController.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeInfoController.java @@ -94,13 +94,14 @@ public class AttributeInfoController extends BaseController { * 修改商品属性 */ @RequiresPermissions("product:attribute:edit") - @Log(title = "商品属性", businessType = BusinessType.UPDATE) + @Log(title = "商品属性",businessType = BusinessType.UPDATE) @PutMapping("/{id}") @ApiOperation("修改商品属性") public Result edit(@PathVariable Long id, @RequestBody AttributeInfoEditReq attributeInfoEditReq) { return toAjax(attributeInfoService.updateById(AttributeInfo.editBuild(id,attributeInfoEditReq))); } + /** * 删除商品属性 */ diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java index 207725b..003fae1 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java @@ -14,6 +14,7 @@ import org.apache.ibatis.annotations.Param; */ @Mapper public interface AsAttributeGroupMapper extends BaseMapper { + void deleteAsAttributeGroup(@Param("attributeIds") List attributeIds); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AsAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AsAttributeGroupService.java index e0377ea..0bf5f00 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AsAttributeGroupService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AsAttributeGroupService.java @@ -4,21 +4,10 @@ import java.util.List; import com.muyu.product.domain.AsAttributeGroup; import com.baomidou.mybatisplus.extension.service.IService; -/** - * 属性与组中间Service接口 - * - * @author DongZeLiang - * @date 2024-02-27 - */ public interface AsAttributeGroupService extends IService { /** - * 查询属性与组中间列表 - * - * @param asAttributeGroup 属性与组中间 - * @return 属性与组中间集合 + * 查询属性组列表 */ public List list(AsAttributeGroup asAttributeGroup); - void deleteAsAttributeGroup(List attributeId); - } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java index 455262a..1d4659a 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java @@ -20,25 +20,16 @@ public interface AttributeGroupService extends IService { /** * 分页查询 - * @param attributeGroup 分组对象 - * @return 返回结果 */ public TableDataInfo page(AttributeGroup attributeGroup); /** * 查询属性组列表 - * - * @param attributeGroup 属性组 - * @return 属性组集合 */ public List list(AttributeGroup attributeGroup); - /** - * 保存 - * @param attributeGroupSaveModel 属性组保存模型 - * @return 是否成功 - */ public Boolean save(AttributeGroupSaveModel attributeGroupSaveModel); void updateAsAttributeGrop(AttributeGroupEditReq attributeGroupEditReq,Long groupId); + } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeInfoService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeInfoService.java index 14d9431..a2d46fa 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeInfoService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeInfoService.java @@ -11,18 +11,14 @@ import com.baomidou.mybatisplus.extension.service.IService; * @date 2024-02-27 */ public interface AttributeInfoService extends IService { + /** * 查询商品属性列表 - * - * @param attributeInfo 商品属性 - * @return 商品属性集合 */ public List list(AttributeInfo attributeInfo); /** * 通过groupId查询属性集合 - * @param groupId 属性组Id - * @return 属性集合 */ public List attributeListByGroupId(Long groupId); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.java index 83ec3a4..2542640 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.java @@ -20,7 +20,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; */ @Slf4j @Service -public class AsAttributeGroupServiceImpl extends ServiceImpl implements AsAttributeGroupService { +public class AsAttributeGroupServiceImpl extends ServiceImpl implements AsAttributeGroupService +{ @Autowired private AsAttributeGroupMapper asAttributeGroupMapper; @@ -34,20 +35,12 @@ public class AsAttributeGroupServiceImpl extends ServiceImpl list(AsAttributeGroup asAttributeGroup) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - - if (ObjUtils.notNull(asAttributeGroup.getGroupId())){ queryWrapper.eq(AsAttributeGroup::getGroupId, asAttributeGroup.getGroupId()); } - if (ObjUtils.notNull(asAttributeGroup.getAttributeId())){ queryWrapper.eq(AsAttributeGroup::getAttributeId, asAttributeGroup.getAttributeId()); } - - - - - return list(queryWrapper); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java index 3e20118..8686a4e 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java @@ -68,27 +68,23 @@ public class AttributeGroupServiceImpl extends ServiceImpl list (AttributeGroup attributeGroup) { + public List list(AttributeGroup attributeGroup) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - if (ObjUtils.notNull(attributeGroup.getName())) { - queryWrapper.like(AttributeGroup::getName, attributeGroup.getName()); + if(ObjUtils.notNull(attributeGroup.getName())){ + queryWrapper.like(AttributeGroup::getName,attributeGroup.getName()); } - if (ObjUtils.notNull(attributeGroup.getStates())) { - queryWrapper.eq(AttributeGroup::getStates, attributeGroup.getStates()); + if(ObjUtils.notNull(attributeGroup.getStates())){ + queryWrapper.eq(AttributeGroup::getStates,attributeGroup.getStates()); } - return list(queryWrapper); } + /** * 保存 * diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeInfoServiceImpl.java index 6795bea..d6ede10 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeInfoServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeInfoServiceImpl.java @@ -2,6 +2,7 @@ package com.muyu.product.service.impl; import java.util.ArrayList; import java.util.List; +import java.util.stream.Stream; import com.muyu.common.core.exception.ServiceException; import com.muyu.common.core.utils.ObjUtils; @@ -26,26 +27,20 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @Service public class AttributeInfoServiceImpl extends ServiceImpl implements AttributeInfoService { +// @Autowired +// private AsAttributeGroupService asAttributeGroupService; + @Autowired private AsAttributeGroupService asAttributeGroupService; - /** - * 查询商品属性列表 - * - * @param attributeInfo 商品属性 - * @return 商品属性 - */ @Override public List list(AttributeInfo attributeInfo) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - - - if (ObjUtils.notNull(attributeInfo.getName())){ - queryWrapper.like(AttributeInfo::getName, attributeInfo.getName()); + if(ObjUtils.notNull(attributeInfo.getName())){ + queryWrapper.like(AttributeInfo::getName,attributeInfo.getName()); } - - if (ObjUtils.notNull(attributeInfo.getCode())){ - queryWrapper.like(AttributeInfo::getCode, attributeInfo.getCode()); + if(ObjUtils.notNull(attributeInfo.getCode())){ + queryWrapper.like(AttributeInfo::getCode,attributeInfo.getCode()); } return list(queryWrapper); @@ -53,27 +48,25 @@ public class AttributeInfoServiceImpl extends ServiceImpl attributeListByGroupId (Long groupId) { - if (groupId == null){ + public List attributeListByGroupId(Long groupId) { + if(groupId == null){ throw new ServiceException("查询商品属性组,属性组ID不可为空"); } LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(AsAttributeGroup::getGroupId, groupId); + queryWrapper.eq(AsAttributeGroup::getGroupId,groupId); List longs = asAttributeGroupService.list(queryWrapper).stream() .map(AsAttributeGroup::getAttributeId) .toList(); - System.out.println("====="+longs.toString()); + System.out.println("===="+longs.toString()); List longs1 = new ArrayList<>(); return this.listByIds( asAttributeGroupService.list(queryWrapper).stream() .map(AsAttributeGroup::getAttributeId) .toList() ); + } + } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java index 5159f78..a277e62 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java @@ -34,8 +34,8 @@ public class BrandInfoServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - if (ObjUtils.notNull(brandInfo.getNam())){ - queryWrapper.eq(BrandInfo::getNam, brandInfo.getNam()); + if (ObjUtils.notNull(brandInfo.getName())){ + queryWrapper.eq(BrandInfo::getName, brandInfo.getName()); } if (ObjUtils.notNull(brandInfo.getLogo())){ diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProjectInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProjectInfoServiceImpl.java index 37d05e1..8efb565 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProjectInfoServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProjectInfoServiceImpl.java @@ -40,8 +40,8 @@ public class ProjectInfoServiceImpl extends ServiceImpl - + @@ -18,6 +18,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, nam, logo, start, introduction, remark, create_by, create_time, update_by, update_time from brand_info + select id, name, logo, start, introduction, remark, create_by, create_time, update_by, update_time from brand_info diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProjectInfoMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProjectInfoMapper.xml index 52ca6e6..50c0705 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProjectInfoMapper.xml +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProjectInfoMapper.xml @@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + diff --git a/muyu-modules/muyu-system/src/main/resources/bootstrap.yml b/muyu-modules/muyu-system/src/main/resources/bootstrap.yml index 4255625..abca4cf 100644 --- a/muyu-modules/muyu-system/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-system/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 config: # 配置中心地址 - server-addr: 43.142.44.217:8848 + server-addr: 101.34.248.9:8848 # 配置文件格式 file-extension: yml # 共享配置