diff --git a/muyu-auth/src/main/java/com/muyu/auth/service/SysLoginService.java b/muyu-auth/src/main/java/com/muyu/auth/service/SysLoginService.java index ff0af1a..bbe3536 100644 --- a/muyu-auth/src/main/java/com/muyu/auth/service/SysLoginService.java +++ b/muyu-auth/src/main/java/com/muyu/auth/service/SysLoginService.java @@ -66,6 +66,8 @@ public class SysLoginService { } // 查询用户信息 Result userResult = remoteUserService.getUserInfo(username, SecurityConstants.INNER); + LoginUser data = userResult.getData(); + System.out.println(data); if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData())) { recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在"); diff --git a/muyu-auth/src/main/resources/bootstrap.yml b/muyu-auth/src/main/resources/bootstrap.yml index 02ac350..705c17d 100644 --- a/muyu-auth/src/main/resources/bootstrap.yml +++ b/muyu-auth/src/main/resources/bootstrap.yml @@ -15,6 +15,7 @@ spring: discovery: # 服务注册地址 server-addr: 115.159.67.205:8848 + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 config: # 配置中心地址 server-addr: 115.159.67.205:8848 @@ -23,3 +24,4 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/ServiceException.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/ServiceException.java index 5039bc0..81e2570 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/ServiceException.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/ServiceException.java @@ -6,6 +6,7 @@ package com.muyu.common.core.exception; * @author muyu */ public final class ServiceException extends RuntimeException { + private static final long serialVersionUID = 1L; /** diff --git a/muyu-gateway/pom.xml b/muyu-gateway/pom.xml index 2d3ed58..26d7ce6 100644 --- a/muyu-gateway/pom.xml +++ b/muyu-gateway/pom.xml @@ -88,6 +88,7 @@ ${swagger.fox.version} + diff --git a/muyu-gateway/src/main/resources/bootstrap.yml b/muyu-gateway/src/main/resources/bootstrap.yml index 651a85b..b7e7926 100644 --- a/muyu-gateway/src/main/resources/bootstrap.yml +++ b/muyu-gateway/src/main/resources/bootstrap.yml @@ -15,6 +15,7 @@ spring: discovery: # 服务注册地址 server-addr: 115.159.67.205:8848 + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 config: # 配置中心地址 server-addr: 115.159.67.205:8848 @@ -23,6 +24,7 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 sentinel: # 取消控制台懒加载 eager: true diff --git a/muyu-modules/muyu-file/src/main/resources/bootstrap.yml b/muyu-modules/muyu-file/src/main/resources/bootstrap.yml index 74d6346..bc7bc39 100644 --- a/muyu-modules/muyu-file/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-file/src/main/resources/bootstrap.yml @@ -15,6 +15,7 @@ spring: discovery: # 服务注册地址 server-addr: 115.159.67.205:8848 + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 config: # 配置中心地址 server-addr: 115.159.67.205:8848 @@ -23,3 +24,4 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 diff --git a/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml b/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml index ed6e483..e92eab8 100644 --- a/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml @@ -15,6 +15,7 @@ spring: discovery: # 服务注册地址 server-addr: 115.159.67.205:8848 + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 config: # 配置中心地址 server-addr: 115.159.67.205:8848 @@ -23,3 +24,4 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 diff --git a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml index 2d493c6..9acd0f2 100644 --- a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml @@ -15,6 +15,7 @@ spring: discovery: # 服务注册地址 server-addr: 115.159.67.205:8848 + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 config: # 配置中心地址 server-addr: 115.159.67.205:8848 @@ -23,3 +24,4 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java index 918b02c..f557ba0 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java @@ -62,6 +62,11 @@ public class CategoryInfo extends TreeEntity { @ApiModelProperty(name = "介绍", value = "介绍") private String introduction; + + @Excel(name = "父级id") + @ApiModelProperty(name = "父级id", value = "父级id") + private Long parentId; + /** * 查询构造器 */ @@ -69,6 +74,7 @@ public class CategoryInfo extends TreeEntity { return CategoryInfo.builder() .name(categoryInfoQueryReq.getName()) .image(categoryInfoQueryReq.getImage()) + .parentId(categoryInfoQueryReq.getParentId()) .start(categoryInfoQueryReq.getStart()) .introduction(categoryInfoQueryReq.getIntroduction()) .build(); @@ -98,6 +104,7 @@ public class CategoryInfo extends TreeEntity { .name(categoryInfoEditReq.getName()) .image(categoryInfoEditReq.getImage()) .start(categoryInfoEditReq.getStart()) + .parentId(categoryInfoEditReq.getParentId()) .introduction(categoryInfoEditReq.getIntroduction()) .build(); } diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentInfo.java index 1d31c59..bb74a71 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentInfo.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentInfo.java @@ -50,7 +50,7 @@ public class CommentInfo extends BaseEntity { /** 图片 */ @Excel(name = "图片") @ApiModelProperty(name = "图片", value = "图片") - private String images; + private String image; /** 父类id */ @Excel(name = "父类id") @@ -64,7 +64,7 @@ public class CommentInfo extends BaseEntity { return CommentInfo.builder() .projectId(commentInfoQueryReq.getProjectId()) .comment(commentInfoQueryReq.getComment()) - .images(commentInfoQueryReq.getImages()) + .image(commentInfoQueryReq.getImages()) .parentId(commentInfoQueryReq.getParentId()) .build(); } @@ -76,7 +76,7 @@ public class CommentInfo extends BaseEntity { return CommentInfo.builder() .projectId(commentInfoSaveReq.getProjectId()) .comment(commentInfoSaveReq.getComment()) - .images(commentInfoSaveReq.getImages()) + .image(commentInfoSaveReq.getImages()) .parentId(commentInfoSaveReq.getParentId()) .build(); } @@ -89,7 +89,7 @@ public class CommentInfo extends BaseEntity { .id(id) .projectId(commentInfoEditReq.getProjectId()) .comment(commentInfoEditReq.getComment()) - .images(commentInfoEditReq.getImages()) + .image(commentInfoEditReq.getImages()) .parentId(commentInfoEditReq.getParentId()) .build(); } 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 db672c4..bc57973 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 @@ -1,8 +1,11 @@ package com.muyu.product.service; import java.util.List; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.muyu.product.domain.AsAttributeGroup; import com.baomidou.mybatisplus.extension.service.IService; +import com.muyu.product.domain.AsCategoryAttribute; /** * 属性与组中间Service接口 @@ -17,6 +20,6 @@ public interface AsAttributeGroupService extends IService { * @param asAttributeGroup 属性与组中间 * @return 属性与组中间集合 */ - public List list(AsAttributeGroup asAttributeGroup); + public List list(LambdaQueryWrapper asAttributeGroup); } 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 62e469e..c314380 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 @@ -3,6 +3,7 @@ package com.muyu.product.service.impl; import java.util.List; import com.muyu.common.core.utils.ObjUtils; +import com.muyu.product.domain.AsCategoryAttribute; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import com.muyu.product.mapper.AsAttributeGroupMapper; @@ -28,20 +29,18 @@ public class AsAttributeGroupServiceImpl extends ServiceImpl list(AsAttributeGroup asAttributeGroup) { + public List list(LambdaQueryWrapper 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()); - } - - - +// 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 85f52d1..196c605 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 @@ -62,6 +62,8 @@ public class AttributeGroupServiceImpl extends ServiceImpl implements CategoryInfoService { + + @Autowired + private AsAttributeGroupService asAttributeGroupService; + + @Autowired + private AsCategoryAttributeService asCategoryAttributeService; + + @Autowired + private AsCategoryBrandService asCategoryBrandService; + + @Autowired + private BrandInfoService brandInfoService; + + @Autowired + private AttributeInfoService attributeInfoService; + + + @Override + public List list(CategoryInfo categoryInfo) { + //创建一个查询条件 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + if (Objects.nonNull(categoryInfo.getName())){ + queryWrapper.like(CategoryInfo::getName,categoryInfo.getName()); + } + if (Objects.nonNull(categoryInfo.getImage())){ + queryWrapper.eq(CategoryInfo::getImage,categoryInfo.getImage()); + } + if (Objects.nonNull(categoryInfo.getParentId())){ + queryWrapper.eq(CategoryInfo::getParentId,categoryInfo.getParentId()); + } + if (Objects.nonNull(categoryInfo.getStart())){ + queryWrapper.eq(CategoryInfo::getStart,categoryInfo.getStart()); + } + if (Objects.nonNull(categoryInfo.getIntroduction())){ + queryWrapper.eq(CategoryInfo::getIntroduction,categoryInfo.getIntroduction()); + } + + return list(queryWrapper); + } + + @Override + @Transactional + public boolean save(CategoryInfoSaveModel categoryInfoSaveModel) { + //创建对象 + CategoryInfo categoryInfo = CategoryInfo.saveModelBuild(categoryInfoSaveModel); + boolean save = this.save(categoryInfo); + Long categoryInfoId = categoryInfo.getId(); + List attributeIdList = categoryInfoSaveModel.getAttributeIdList(); + if (attributeIdList!=null&& !attributeIdList.isEmpty()){ + + } + + return false; + } + + @Override + public List getAttributeGroup(Long categoryId) { + + return null; + } + + @Override + public List getBrand(Long categoryId) { + return null; + } + + @Override + public List getAttribute(Long categoryId) { + List attributeInfos = new ArrayList<>(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + asAttributeGroupService.list(queryWrapper); + + + return null; + } + + @Override + public CategoryParentCommonElementResp parentCommonElement(Long categoryId) { + + return null; + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CommentInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CommentInfoServiceImpl.java index 365a5c4..a7b82da 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CommentInfoServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CommentInfoServiceImpl.java @@ -40,8 +40,8 @@ public class CommentInfoServiceImpl extends ServiceImpl - select id, name, image, parent_id, start, introduction, remark, create_by, create_time, update_by, update_time from category_info + select id, name, image, start,parent_id, start, introduction, remark, create_by, create_time, update_by, update_time from category_info diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CommentInfoMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CommentInfoMapper.xml index 9afe06e..e4aeb4f 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CommentInfoMapper.xml +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CommentInfoMapper.xml @@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/MuYuSystemApplication.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/MuYuSystemApplication.java index 8dab51e..4fc4f85 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/MuYuSystemApplication.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/MuYuSystemApplication.java @@ -5,6 +5,7 @@ import com.muyu.common.security.annotation.EnableMyFeignClients; import com.muyu.common.swagger.annotation.EnableCustomSwagger2; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; /** * 系统模块 diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictDataController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictDataController.java index 418ce2a..9d7c62c 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictDataController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictDataController.java @@ -36,7 +36,7 @@ public class SysDictDataController extends BaseController { @RequiresPermissions("system:dict:list") @GetMapping("/list") - public Result> list (SysDictData dictData) { + public Result> list (@RequestBody SysDictData dictData) { startPage(); List list = dictDataService.selectDictDataList(dictData); return getDataTable(list); @@ -45,7 +45,7 @@ public class SysDictDataController extends BaseController { @Log(title = "字典数据", businessType = BusinessType.EXPORT) @RequiresPermissions("system:dict:export") @PostMapping("/export") - public void export (HttpServletResponse response, SysDictData dictData) { + public void export (HttpServletResponse response,@RequestBody SysDictData dictData) { List list = dictDataService.selectDictDataList(dictData); ExcelUtil util = new ExcelUtil(SysDictData.class); util.exportExcel(response, list, "字典数据"); diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java index 1e87a7e..24dab90 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java @@ -2,6 +2,7 @@ package com.muyu.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.common.system.domain.SysDictData; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -11,6 +12,7 @@ import java.util.List; * * @author muyu */ +@Mapper public interface SysDictDataMapper extends BaseMapper { /** * 根据条件分页查询字典数据 diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java index 0a4ffe6..04fe376 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java @@ -2,6 +2,7 @@ package com.muyu.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.common.system.domain.SysDictType; +import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -10,6 +11,7 @@ import java.util.List; * * @author muyu */ +@Mapper public interface SysDictTypeMapper extends BaseMapper { /** * 根据条件分页查询字典类型 diff --git a/muyu-modules/muyu-system/src/main/resources/bootstrap.yml b/muyu-modules/muyu-system/src/main/resources/bootstrap.yml index ae61d7d..df51c3c 100644 --- a/muyu-modules/muyu-system/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-system/src/main/resources/bootstrap.yml @@ -15,6 +15,7 @@ spring: discovery: # 服务注册地址 server-addr: 115.159.67.205:8848 + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 config: # 配置中心地址 server-addr: 115.159.67.205:8848 @@ -23,6 +24,7 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3 logging: level: com.muyu.system.mapper: DEBUG diff --git a/muyu-visual/muyu-monitor/src/main/resources/bootstrap.yml b/muyu-visual/muyu-monitor/src/main/resources/bootstrap.yml index dd3a139..bc39021 100644 --- a/muyu-visual/muyu-monitor/src/main/resources/bootstrap.yml +++ b/muyu-visual/muyu-monitor/src/main/resources/bootstrap.yml @@ -23,3 +23,4 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + namespace: e47d9b61-1cb9-48b7-97b3-2692bfaf34a3