属性属性组

master
Jiang Peng 2024-03-03 09:56:44 +08:00
parent 7310116a85
commit 02c5be6c3d
27 changed files with 66 additions and 106 deletions

View File

@ -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
# 共享配置

View File

@ -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

View File

@ -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
# 共享配置

View File

@ -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
# 共享配置

View File

@ -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
# 共享配置

View File

@ -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())

View File

@ -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())

View File

@ -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)

View File

@ -25,7 +25,7 @@ public class BrandInfoQueryReq extends BaseEntity {
/** 品牌名称 */
@ApiModelProperty(name = "品牌名称", value = "品牌名称")
private String nam;
private String name;
/** LOGO */
@ApiModelProperty(name = "LOGO", value = "LOGO")

View File

@ -31,7 +31,7 @@ public class BrandInfoSaveReq extends BaseEntity {
/** 品牌名称 */
@ApiModelProperty(name = "品牌名称", value = "品牌名称", required = true)
private String nam;
private String name;
/** LOGO */

View File

@ -33,7 +33,7 @@ public class ProjectInfoEditReq extends BaseEntity {
/** 主类型 */
@ApiModelProperty(name = "主类型", value = "主类型")
private String mianType;
private String mainType;
/** 父类型 */
@ApiModelProperty(name = "父类型", value = "父类型")

View File

@ -33,7 +33,7 @@ public class ProjectInfoQueryReq extends BaseEntity {
/** 主类型 */
@ApiModelProperty(name = "主类型", value = "主类型")
private String mianType;
private String mainType;
/** 父类型 */
@ApiModelProperty(name = "父类型", value = "父类型")

View File

@ -41,7 +41,7 @@ public class ProjectInfoSaveReq extends BaseEntity {
/** 主类型 */
@ApiModelProperty(name = "主类型", value = "主类型")
private String mianType;
private String mainType;
/** 父类型 */

View File

@ -101,6 +101,7 @@ public class AttributeInfoController extends BaseController {
return toAjax(attributeInfoService.updateById(AttributeInfo.editBuild(id,attributeInfoEditReq)));
}
/**
*
*/

View File

@ -14,6 +14,7 @@ import org.apache.ibatis.annotations.Param;
*/
@Mapper
public interface AsAttributeGroupMapper extends BaseMapper<AsAttributeGroup> {
void deleteAsAttributeGroup(@Param("attributeIds") List<Long> attributeIds);
}

View File

@ -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<AsAttributeGroup> {
/**
*
*
* @param asAttributeGroup
* @return
*
*/
public List<AsAttributeGroup> list(AsAttributeGroup asAttributeGroup);
void deleteAsAttributeGroup(List<Long> attributeId);
}

View File

@ -20,25 +20,16 @@ public interface AttributeGroupService extends IService<AttributeGroup> {
/**
*
* @param attributeGroup
* @return
*/
public TableDataInfo<AttributeGroupPageResp> page(AttributeGroup attributeGroup);
/**
*
*
* @param attributeGroup
* @return
*/
public List<AttributeGroup> list(AttributeGroup attributeGroup);
/**
*
* @param attributeGroupSaveModel
* @return
*/
public Boolean save(AttributeGroupSaveModel attributeGroupSaveModel);
void updateAsAttributeGrop(AttributeGroupEditReq attributeGroupEditReq,Long groupId);
}

View File

@ -11,18 +11,14 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @date 2024-02-27
*/
public interface AttributeInfoService extends IService<AttributeInfo> {
/**
*
*
* @param attributeInfo
* @return
*/
public List<AttributeInfo> list(AttributeInfo attributeInfo);
/**
* groupId
* @param groupId Id
* @return
*/
public List<AttributeInfo> attributeListByGroupId(Long groupId);
}

View File

@ -20,7 +20,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
*/
@Slf4j
@Service
public class AsAttributeGroupServiceImpl extends ServiceImpl<AsAttributeGroupMapper, AsAttributeGroup> implements AsAttributeGroupService {
public class AsAttributeGroupServiceImpl extends ServiceImpl<AsAttributeGroupMapper, AsAttributeGroup> implements AsAttributeGroupService
{
@Autowired
private AsAttributeGroupMapper asAttributeGroupMapper;
@ -34,20 +35,12 @@ public class AsAttributeGroupServiceImpl extends ServiceImpl<AsAttributeGroupMap
@Override
public List<AsAttributeGroup> list(AsAttributeGroup asAttributeGroup) {
LambdaQueryWrapper<AsAttributeGroup> 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);
}

View File

@ -68,11 +68,7 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
}
/**
*
*
* @param attributeGroup
*
* @return
*
*/
@Override
public List<AttributeGroup> list(AttributeGroup attributeGroup) {
@ -85,10 +81,10 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
if(ObjUtils.notNull(attributeGroup.getStates())){
queryWrapper.eq(AttributeGroup::getStates,attributeGroup.getStates());
}
return list(queryWrapper);
}
/**
*
*

View File

@ -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,24 +27,18 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@Service
public class AttributeInfoServiceImpl extends ServiceImpl<AttributeInfoMapper, AttributeInfo> implements AttributeInfoService {
// @Autowired
// private AsAttributeGroupService asAttributeGroupService;
@Autowired
private AsAttributeGroupService asAttributeGroupService;
/**
*
*
* @param attributeInfo
* @return
*/
@Override
public List<AttributeInfo> list(AttributeInfo attributeInfo) {
LambdaQueryWrapper<AttributeInfo> queryWrapper = new LambdaQueryWrapper<>();
if(ObjUtils.notNull(attributeInfo.getName())){
queryWrapper.like(AttributeInfo::getName,attributeInfo.getName());
}
if(ObjUtils.notNull(attributeInfo.getCode())){
queryWrapper.like(AttributeInfo::getCode,attributeInfo.getCode());
}
@ -53,10 +48,6 @@ public class AttributeInfoServiceImpl extends ServiceImpl<AttributeInfoMapper, A
/**
* groupId
*
* @param groupId Id
*
* @return
*/
@Override
public List<AttributeInfo> attributeListByGroupId(Long groupId) {
@ -68,12 +59,14 @@ public class AttributeInfoServiceImpl extends ServiceImpl<AttributeInfoMapper, A
List<Long> longs = asAttributeGroupService.list(queryWrapper).stream()
.map(AsAttributeGroup::getAttributeId)
.toList();
System.out.println("====="+longs.toString());
System.out.println("===="+longs.toString());
List<Long> longs1 = new ArrayList<>();
return this.listByIds(
asAttributeGroupService.list(queryWrapper).stream()
.map(AsAttributeGroup::getAttributeId)
.toList()
);
}
}

View File

@ -34,8 +34,8 @@ public class BrandInfoServiceImpl extends ServiceImpl<BrandInfoMapper, BrandInfo
LambdaQueryWrapper<BrandInfo> 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())){

View File

@ -40,8 +40,8 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
queryWrapper.eq(ProjectInfo::getIntroduction, projectInfo.getIntroduction());
}
if (ObjUtils.notNull(projectInfo.getMianType())){
queryWrapper.eq(ProjectInfo::getMianType, projectInfo.getMianType());
if (ObjUtils.notNull(projectInfo.getMainType())){
queryWrapper.eq(ProjectInfo::getMainType, projectInfo.getMainType());
}
if (ObjUtils.notNull(projectInfo.getParentType())){

View File

@ -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
server-addr: 101.34.248.9
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.muyu.product.domain.BrandInfo" id="BrandInfoResult">
<result property="id" column="id" />
<result property="nam" column="nam" />
<result property="name" column="name" />
<result property="logo" column="logo" />
<result property="start" column="start" />
<result property="introduction" column="introduction" />
@ -18,6 +18,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectBrandInfoVo">
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
</sql>
</mapper>

View File

@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="name" column="name" />
<result property="introduction" column="introduction" />
<result property="mianType" column="mian_type" />
<result property="mainType" column="main_type" />
<result property="parentType" column="parent_type" />
<result property="type" column="type" />
<result property="image" column="image" />

View File

@ -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
# 共享配置