谷粒商城day56-商品服务-API-平台属性-属性分组与分类绑定与分组关联属性

JavaScript性能优化:全链路性能优化策略 JavaScript性能优化是提升Web应用质量的核心要素,直接影响用户体验与业务成果。研究表明,页面加载延迟1秒可能导致转化率下降7%。高效的JavaScript执行能减少主线程阻塞,避免动画卡顿或操作延迟,尤其在移动端低性能设备上更为关键。优化内存管理与减少冗余计算可降低浏览器资源消耗,防止因内存泄漏导致的崩溃,提升应用稳定性。在竞争激烈的互联网环境中,性能优势已成为产品差异化的关键因素,直接影响用户留存与商业价值。因此,性能优化应作为开发全周期的核心实践,而非事后补救措施。 阅读详情

以下我做了这些事,创建属性分组与分类绑定

创建属性:包含规格参数与销售属性

属性分组界面可关联属性,

并给以上添加了一些测试数据

1.功能页面展示

2.service层核心代码

AttrServiceImpl
package com.atguigu.gulimall.product.service.impl;

import com.atguigu.common.constant.ProductConstant;
import com.atguigu.gulimall.product.dao.AttrAttrgroupRelationDao;
import com.atguigu.gulimall.product.dao.AttrGroupDao;
import com.atguigu.gulimall.product.dao.CategoryDao;
import com.atguigu.gulimall.product.entity.AttrAttrgroupRelationEntity;
import com.atguigu.gulimall.product.entity.AttrGroupEntity;
import com.atguigu.gulimall.product.entity.CategoryEntity;
import com.atguigu.gulimall.product.service.CategoryService;
import com.atguigu.gulimall.product.vo.AttrGroupRelationVo;
import com.atguigu.gulimall.product.vo.AttrRespVo;
import com.atguigu.gulimall.product.vo.AttrVo;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.common.utils.Query;

import com.atguigu.gulimall.product.dao.AttrDao;
import com.atguigu.gulimall.product.entity.AttrEntity;
import com.atguigu.gulimall.product.service.AttrService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;


@Service("attrService")
public class AttrServiceImpl extends ServiceImpl<AttrDao, AttrEntity> implements AttrService {

    @Autowired
    AttrAttrgroupRelationDao relationDao;

    @Autowired
    AttrGroupDao attrGroupDao;

    @Autowired
    CategoryDao categoryDao;

    @Autowired
    CategoryService categoryService;



    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<AttrEntity> page = this.page(
                new Query<AttrEntity>().getPage(params),
                new QueryWrapper<AttrEntity>()
        );

        return new PageUtils(page);
    }

    @Transactional
    @Override
    public void saveAttr(AttrVo attr) {
        AttrEntity attrEntity = new AttrEntity();
//        attrEntity.setAttrName(attr.getAttrName());
        BeanUtils.copyProperties(attr,attrEntity);
        //1、保存基本数据
        this.save(attrEntity);
        //2、保存关联关系
        if(attr.getAttrType() == ProductConstant.AttrEnum.ATTR_TYPE_BASE.getCode() && attr.getAttrGroupId()!=null){
            AttrAttrgroupRelationEntity relationEntity = new AttrAttrgroupRelationEntity();
            relationEntity.setAttrGroupId(attr.getAttrGroupId());
            relationEntity.setAttrId(attrEntity.getAttrId());
            relationDao.insert(relationEntity);
        }


    }

    @Override
    public PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String type) {
        QueryWrapper<AttrEntity> queryWrapper = new QueryWrapper<AttrEntity>().eq("attr_type","base".equalsIgnoreCase(type)?ProductConstant.AttrEnum.ATTR_TYPE_BASE.getCode():ProductConstant.AttrEnum.ATTR_TYPE_SALE.getCode());

        if(catelogId != 0){
            queryWrapper.eq("catelog_id",catelogId);
        }

        String key = (String) params.get("key");
        if(!StringUtils.isEmpty(key)){
            //attr_id  attr_name
            queryWrapper.and((wrapper)->{
                wrapper.eq("attr_id",key).or().like("attr_name",key);
            });
        }

        IPage<AttrEntity> page = this.page(
                new Query<AttrEntity>().getPage(params),
                queryWrapper
        );

        PageUtils pageUtils = new PageUtils(page);
        List<AttrEntity> records = page.getRecords();
        List<AttrRespVo> respVos = records.stream().map((attrEntity) -> {
            AttrRespVo attrRespVo = new AttrRespVo();
            BeanUtils.copyProperties(attrEntity, attrRespVo);

            //1、设置分类和分组的名字
            if("base".equalsIgnoreCase(type)){
                AttrAttrgroupRelationEntity attrId = relationDao.selectOne(new QueryWrapper<AttrAttrgroupRelationEntity>().eq("attr_id", attrEntity.getAttrId()));
                if (attrId != null && attrId.getAttrGroupId()!=null) {
                    AttrGroupEntity attrGroupEntity = attrGroupDao.selectById(attrId.getAttrGroupId());
                    attrRespVo.setGroupName(attrGroupEntity.getAttrGroupName());
                }

            }


            CategoryEntity categoryEntity = categoryDao.selectById(attrEntity.getCatelogId());
            if (categoryEntity != null) {
                attrRespVo.setCatelogName(categoryEntity.getName());
            }
            return attrRespVo;
        }).collect(Collectors.toList());

        pageUtils.setList(respVos);
        return pageUtils;
    }

    @Override
    public AttrRespVo getAttrInfo(Long attrId) {
        AttrRespVo respVo = new AttrRespVo();
        AttrEntity attrEntity = this.getById(attrId);
        BeanUtils.copyProperties(attrEntity,respVo);



        if(attrEntity.getAttrType() == ProductConstant.AttrEnum.ATTR_TYPE_BASE.getCode()){
            //1、设置分组信息
            AttrAttrgroupRelationEntity attrgroupRelation = relationDao.selectOne(new QueryWrapper<AttrAttrgroupRelationEntity>().eq("attr_id", attrId));
            if(attrgroupRelation!=null){
                respVo.setAttrGroupId(attrgroupRelation.getAttrGroupId());
                AttrGroupEntity attrGroupEntity = attrGroupDao.selectById(attrgroupRelation.getAttrGroupId());
                if(attrGroupEntity!=null){
                    respVo.setGroupName(attrGroupEntity.getAttrGroupName());
                }
            }
        }


        //2、设置分类信息
        Long catelogId = attrEntity.getCatelogId();
        Long[] catelogPath = categoryService.findCatelogPath(catelogId);
        respVo.setCatelogPath(catelogPath);

        CategoryEntity categoryEntity = categoryDao.selectById(catelogId);
        if(categoryEntity!=null){
            respVo.setCatelogName(categoryEntity.getName());
        }


        return respVo;
    }

    @Transactional
    @Override
    public void updateAttr(AttrVo attr) {
        AttrEntity attrEntity = new AttrEntity();
        BeanUtils.copyProperties(attr,attrEntity);
        this.updateById(attrEntity);

        if(attrEntity.getAttrType() == ProductConstant.AttrEnum.ATTR_TYPE_BASE.getCode()){
            //1、修改分组关联
            AttrAttrgroupRelationEntity relationEntity = new AttrAttrgroupRelationEntity();

            relationEntity.setAttrGroupId(attr.getAttrGroupId());
            relationEntity.setAttrId(attr.getAttrId());

            Integer count = relationDao.selectCount(new QueryWrapper<AttrAttrgroupRelationEntity>().eq("attr_id", attr.getAttrId()));
            if(count>0){

                relationDao.update(relationEntity,new UpdateWrapper<AttrAttrgroupRelationEntity>().eq("attr_id",attr.getAttrId()));

            }else{
                relationDao.insert(relationEntity);
            }
        }


    }

    /**
     * 根据分组id查找关联的所有基本属性
     * @param attrgroupId
     * @return
     */
    @Override
    public List<AttrEntity> getRelationAttr(Long attrgroupId) {
        List<AttrAttrgroupRelationEntity> entities = relationDao.selectList(new QueryWrapper<AttrAttrgroupRelationEntity>().eq("attr_group_id", attrgroupId));

        List<Long> attrIds = entities.stream().map((attr) -> {
            return attr.getAttrId();
        }).collect(Collectors.toList());

        if(attrIds == null || attrIds.size() == 0){
            return null;
        }
        Collection<AttrEntity> attrEntities = this.listByIds(attrIds);
        return (List<AttrEntity>) attrEntities;
    }

    @Override
    public void deleteRelation(AttrGroupRelationVo[] vos) {
        //relationDao.delete(new QueryWrapper<>().eq("attr_id",1L).eq("attr_group_id",1L));
        //
        List<AttrAttrgroupRelationEntity> entities = Arrays.asList(vos).stream().map((item) -> {
            AttrAttrgroupRelationEntity relationEntity = new AttrAttrgroupRelationEntity();
            BeanUtils.copyProperties(item, relationEntity);
            return relationEntity;
        }).collect(Collectors.toList());
        relationDao.deleteBatchRelation(entities);
    }

    /**
     * 获取当前分组没有关联的所有属性
     * @param params
     * @param attrgroupId
     * @return
     */
    @Override
    public PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId) {
        //1、当前分组只能关联自己所属的分类里面的所有属性
        AttrGroupEntity attrGroupEntity = attrGroupDao.selectById(attrgroupId);
        Long catelogId = attrGroupEntity.getCatelogId();
        //2、当前分组只能关联别的分组没有引用的属性
        //2.1)、当前分类下的其他分组
        List<AttrGroupEntity> group = attrGroupDao.selectList(new QueryWrapper<AttrGroupEntity>().eq("catelog_id", catelogId));
        List<Long> collect = group.stream().map(item -> {
            return item.getAttrGroupId();
        }).collect(Collectors.toList());

        //2.2)、这些分组关联的属性
        List<AttrAttrgroupRelationEntity> groupId = relationDao.selectList(new QueryWrapper<AttrAttrgroupRelationEntity>().in("attr_group_id", collect));
        List<Long> attrIds = groupId.stream().map(item -> {
            return item.getAttrId();
        }).collect(Collectors.toList());

        //2.3)、从当前分类的所有属性中移除这些属性;
        QueryWrapper<AttrEntity> wrapper = new QueryWrapper<AttrEntity>().eq("catelog_id", catelogId).eq("attr_type",ProductConstant.AttrEnum.ATTR_TYPE_BASE.getCode());
        if(attrIds!=null && attrIds.size()>0){
            wrapper.notIn("attr_id", attrIds);
        }
        String key = (String) params.get("key");
        if(!StringUtils.isEmpty(key)){
            wrapper.and((w)->{
                w.eq("attr_id",key).or().like("attr_name",key);
            });
        }
        IPage<AttrEntity> page = this.page(new Query<AttrEntity>().getPage(params), wrapper);

        PageUtils pageUtils = new PageUtils(page);

        return pageUtils;
    }

}
AttrGroupServiceImpl
package com.atguigu.gulimall.product.service.impl;

import com.atguigu.gulimall.product.entity.AttrEntity;
import com.atguigu.gulimall.product.service.AttrService;
import com.atguigu.gulimall.product.vo.AttrGroupWithAttrsVo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.common.utils.Query;

import com.atguigu.gulimall.product.dao.AttrGroupDao;
import com.atguigu.gulimall.product.entity.AttrGroupEntity;
import com.atguigu.gulimall.product.service.AttrGroupService;
import org.springframework.util.StringUtils;


@Service("attrGroupService")
public class AttrGroupServiceImpl extends ServiceImpl<AttrGroupDao, AttrGroupEntity> implements AttrGroupService {

    @Autowired
    AttrService attrService;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<AttrGroupEntity> page = this.page(
                new Query<AttrGroupEntity>().getPage(params),
                new QueryWrapper<AttrGroupEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public PageUtils queryPage(Map<String, Object> params, Long catelogId) {
        String key = (String) params.get("key");
        //select * from pms_attr_group where catelog_id=? and (attr_group_id=key or attr_group_name like %key%)
        QueryWrapper<AttrGroupEntity> wrapper = new QueryWrapper<AttrGroupEntity>();
        if(!StringUtils.isEmpty(key)){
            wrapper.and((obj)->{
                obj.eq("attr_group_id",key).or().like("attr_group_name",key);
            });
        }

        if( catelogId == 0){
            IPage<AttrGroupEntity> page = this.page(new Query<AttrGroupEntity>().getPage(params),
                    wrapper);
            return new PageUtils(page);
        }else {
            wrapper.eq("catelog_id",catelogId);
            IPage<AttrGroupEntity> page = this.page(new Query<AttrGroupEntity>().getPage(params),
                    wrapper);
            return new PageUtils(page);
        }

    }

    /**
     * 根据分类id查出所有的分组以及这些组里面的属性
     * @param catelogId
     * @return
     */
    @Override
    public List<AttrGroupWithAttrsVo> getAttrGroupWithAttrsByCatelogId(Long catelogId) {
            //com.atguigu.gulimall.product.vo
        //1、查询分组信息
        List<AttrGroupEntity> attrGroupEntities = this.list(new QueryWrapper<AttrGroupEntity>().eq("catelog_id", catelogId));

        //2、查询所有属性
        List<AttrGroupWithAttrsVo> collect = attrGroupEntities.stream().map(group -> {
            AttrGroupWithAttrsVo attrsVo = new AttrGroupWithAttrsVo();
            BeanUtils.copyProperties(group,attrsVo);
            List<AttrEntity> attrs = attrService.getRelationAttr(attrsVo.getAttrGroupId());
            attrsVo.setAttrs(attrs);
            return attrsVo;
        }).collect(Collectors.toList());

        return collect;


    }

}

 

AttrAttrgroupRelationServiceImpl
package com.atguigu.gulimall.product.service.impl;

import com.atguigu.gulimall.product.vo.AttrGroupRelationVo;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.common.utils.Query;

import com.atguigu.gulimall.product.dao.AttrAttrgroupRelationDao;
import com.atguigu.gulimall.product.entity.AttrAttrgroupRelationEntity;
import com.atguigu.gulimall.product.service.AttrAttrgroupRelationService;


@Service("attrAttrgroupRelationService")
public class AttrAttrgroupRelationServiceImpl extends ServiceImpl<AttrAttrgroupRelationDao, AttrAttrgroupRelationEntity> implements AttrAttrgroupRelationService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<AttrAttrgroupRelationEntity> page = this.page(
                new Query<AttrAttrgroupRelationEntity>().getPage(params),
                new QueryWrapper<AttrAttrgroupRelationEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public void saveBatch(List<AttrGroupRelationVo> vos) {
        List<AttrAttrgroupRelationEntity> collect = vos.stream().map(item -> {
            AttrAttrgroupRelationEntity relationEntity = new AttrAttrgroupRelationEntity();
            BeanUtils.copyProperties(item, relationEntity);
            return relationEntity;
        }).collect(Collectors.toList());
        this.saveBatch(collect);
    }

}

 

高通9008模式隐藏技巧:不拆机用ADB命令+Diag协议进入EDL 本文深入解析高通EDL模式(紧急下载模式)的技术原理与实战应用,详细介绍了通过ADB命令和Diag协议无需拆机进入EDL的方法。涵盖硬件/软件触发方案、跨平台工具配置、Firehose协议解析及设备救砖流程,为开发者提供从基础到进阶的完整指南。 阅读详情

相关推荐

DIY一个SM2262ENG 2TB Nvme固态硬盘,慧荣SM2262EN主控

网友订做的 材料: 慧荣科技的62en,2片1G 三星DDR4缓存,4颗PF29F04T2AOCTH1,8CE B17A。SM2262EN属于慧荣第二代PCIe SSD主控,支持PCIe G3×4通道和全新的NVMe 1.3规范、8个NAND通道设计,并提供完整固件设计,最大循序读取速度高达3.5GB/s,循序写入速度达3.0GB/s,随机读写则高达420K IOPS和420K IOPS。此外,还采用目前最先进的低功耗设计,无论是在待机还是在工作状态下,均展现超低功耗,有效减少30%的功耗,满足用户追求超

m0_55207244的博客 1万+

【new TypeReference】泛型报错【does not have type parameters】

因导入了错误的包。。。【注意】【要导入 jackson 中的 包】 如下图,泛型便显示正确

weixin_44443938的博客 5591

Cadence Allegro新手避坑:从原理图到PCB,解决‘netrev.lst does not exist’的完整流程

本文详细介绍了Cadence Allegro从原理图设计到PCB导入网表的完整流程,特别针对新手常见的'netrev.lst does not exist'错误提供了系统解决方案。内容包括环境准备、原理图设计规范、网表生成与导入技巧,以及设计数据管理最佳实践,帮助工程师高效完成PCB设计任务。

weixin_42685438的博客 487

使用Retrofit的过程中遇到 type "xxx.xxx.xxx"does not have type parameters

原因:导入了错误的包 解决方法:删除掉错误的包,重新导入

android blog 8432

Scipy优化踩坑实录:trust-constr和SLSQP约束定义到底差在哪?

本文深入解析了Scipy优化模块中trust-constr和SLSQP两种方法在约束定义上的差异。通过对比面向对象的trust-constr和字典式定义的SLSQP,揭示了它们各自的优势与适用场景,帮助开发者在有约束优化问题中选择合适的算法,提升计算效率与准确性。

weixin_42573113的博客 271

PCB设计AD规则设置(按照嘉立创设置)

按照嘉立创的相关加工能力进行设置: 1.Hole Size(钻孔孔径) 嘉立创要求钻孔孔径在0.2-6.3mm,并给了公差(如下图给出了钻孔孔径和公差) 规则设置位置:Manufacturing->Hole Size,这里就改一下数值,最小设置为0.2mm,最大设置为6.3mm 2.Width(线宽) 嘉立创要求线宽多层板双层板最小为3.5mil,单双层板最小为5mil(如下图给出了线宽) 规则设置位置:Routing->Width,我目前只画过双层板,按我的设置如下,最小的线宽设置为10

subtitle_的博客 4万+

【商城项目19】剩下的API编写

【商城项目19】剩下的API编写 1.新增属性 特点:1.用到了org.springframework.beans.BeanUtils; BeanUtils.copyProperties(attr,attrEntity); 2.用到了vo模型:把接受的json数据变成一个打自定义对象。 http://localhost:11000/product/attr/save { "attrGroupId": 0, "attrName": "像素", "attrType": 0, "catelo

qq_34591921的博客 283

ipsec 加密流程(一):ipsec策略匹配

《openswan》专栏系列文章主要是记录openswan源码学习过程中的笔记。 Author: Toney Email: vip_13031075266@163.com Date: 2020.11.22 Copyright: 未经同意不得转载!!! Version:2.6.51.5 Reference:https://download.openswan.org/openswan/ 1. ipsec策略匹配流程(ipsec_tunnel_start_xmit) 注:open...

遇见你是我最美丽的意外 9122

Type ‘java.awt.List‘ does not have type parameters

前言 今天在开发过程中遇到了问题,为了告诉自己是个菜鸡,我决定要把它记录下来balabala~ 如果你点进来了,麻烦分个类,把我扔进你的收藏夹和关注夹,最后在不要脸的跟你要个赞! 问题截图 Type ‘java.awt.List’ does not have type parameters 原因分析 解决方案 最后 ...

天天开心鸭! 3318

【HALCON工业视觉应用探索】02. C# + Halcon铸件毛刺机器人打磨引导:点云处理从实验室到工业现场的全流程落地

摘要:铸件毛刺的自动化打磨是机械制造领域的重要难题,其随机性(高度0.1-3mm)和复杂工况导致人工打磨效率低(3分钟/件)、工伤率高。本文基于Halcon 24.11与.NET 6,构建了一套点云处理方案:通过线激光扫描仪获取三维点云,经预处理、毛刺检测、路径规划三大模块,引导机器人完成打磨。虚拟实验测试显示,对高度>1mm的毛刺检出率达100%,定位误差±0.08mm,但工业现场受油污、粉尘影响,性能降至检出率68-75%、处理时间>45秒。

专注于人工智能、软件开发、工控自动化、工厂数字化及智能化等领域,希望和大家共同进步! 1128

借助AI高效写出结构严谨、内容专业的课题申报书:10大核心模块拆解(附实用提示词)

在很多老师和科研人员眼中,写一份高质量的课题申报,确实是一件非常困难的事。难就难在不只是要说清楚写了什么研究内容,还要体现申报书的可行性和创新性。七哥除了自己写课题,也经常指导会员同仁使用高级学术版搞定课题的申报工作,摸索出了一套行之有效的借助AI申报课题的技巧,在这篇文章中,我将给大家点明课题申报书的10大核心模块的写作技巧,还会给大家一些提示词模板供大家参考,如果你也正准备申报课题,那么这篇文章一定不要错过!特别说明的是,提示词的使用并不是一蹴而就的,是专业思考的延伸和AI化专业表达,过程中需要多次的调

智能AI让学术科研更容易 445

谷粒商城-04-P44-P60

商品服务-api-三级分类-递归查询树形数据结构获取 1、导入数据 向数据库gulimall_pms中的表pms_category导入数据,脚本如下: DROP TABLE IF EXISTS `pms_category`; CREATE TABLE `pms_category` ( `cat_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '分类id', `name` char(50) DEFAULT NULL COMMENT '分类名称', `

weixin_45041878的博客 681

(5)ModalAI VOXL2

Ardupilot官网关于《Non-GPS navigation》的翻译 —《(5) ModalAI VOXL2》。

无人机开发(开源Ardupilot) 1万+

Type ‘java.util.Observable‘ does not have type parameters

错误: 解决方法:发现是导包的问题,导成了工具类下面的包,修改即可

weixin_47134320的博客 1971

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

谷粒商城学习笔记(13.认证服务(注册,登录,加密,三方登录,单点登录))

本章主要完成商城注册,以及登录功能的编写。包括运用阿里云短信验证码服务,以及对用户密码加密解密认证,还有涉及第三方社交登录功能的编写。

Kiritoasu的博客 910

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

《谷粒商城》开发实录:016-027 搭建后台管理系统

脚手架工程(人人开源)、Nacos、OpenFeign、Gateway等。

拉里小猪的博客 901

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

谷粒商城笔记+踩坑(5)——商品服务-属性分组、品牌关联分类,spu+sku+分页拦截器

SPU和SKU、属性分组的增删改查、QueryWrapper的and和or用法、获取当前品牌关联的所有分类

种一棵树最好的时间是十年前,其次是现在 5895

分类添加属性之关联引用

前两天去面试被别人问了一个分类是否可以添加属性的问题,因为以前没有使用过,觉得好像是不可以,但是回头查了一下的相关资料,发现是可以的,主要是利用了objc_setAssociatedObject ,objc_getAssociatedObject这两个方法来实现set,get方法。 下面是我从网上找来的一篇博文特意分享给大家 转载地址:http://www.2cto.com/kf/201505/

1294

商品管理系统属性分组关联属性功能实现

一分组控制器AttrGroupController package com.atguigu.gulimall.product.controller; import com.atguigu.common.utils.PageUtils; import com.atguigu.common.utils.R; import com.atguigu.gulimall.product.entity.AttrEntity; import com.atguigu.gulimall.product.entity...

实践求真知 1198

Objective-C 给分类添加属性——关联对象

给分类添加“属性”咱们知道,分类中可以添加方法,却无法添加属性。那咱们有其他的方法来实现吗? 先来看看下面这段代码:@interface UIView (nl_Frame) @property (nonatomic, assign) CGFloat nl_width; @end @implementation UIView (nl_Frame) - (void)setNl_width:(CGFlo

听榆大叔的专栏 6376

10. 类的关系——关联关系

10. 类的关系——关联关系 1、类的四种关系 · 关联关系 · 依赖关系 · 继承关系 · 实现关系(本质也是继承关系) 2、关联关系 在关联关系中,没有新的语法和概念,不过是一种思想。 对象和对象之间的连接。在Java中,关联关系的代码表现形式为一个类做为另一个类的属性类型存在。即语义上是“有”的关系:”has-a”。 2.1 按整体和部分分类: (1)组合——同生共死 (2)聚合——不同生不同死 区别:生命周期不同 例:组合——同生同死 ​ 创建整体时部分也同时创建,整体销毁部分也销毁 /

baidu_41907361的博客 3595

商城项目13_查询分组关联属性、删除、新增、查询分组未关联的属性、调整会员服务、获取分类关联的品牌

查询分组关联属性、删除、新增、查询分组未关联的属性、调整会员服务、获取分类关联的品牌

所得皆惊喜 759

Object - C运行时应用(二)—— 使用对象关联为分类增加属性(每个对象的属性互不干扰)

一、对象的关联方法有 1、 void objc_setAssociatedObject(id object, const void *key, id value,objc_AssociationPolicy policy) ,关联对象(将值value与对象object关联起来) 参数key:将来可以通过key取出这个存储的值 参数policy:存储策略(assign、copy、ret

爱家人,爱老婆,爱生活,爱coding,爱运动的有爱青年 943

分布式电商项目四十:分组关联属性的新增

分组关联属性的新增 在能够正确显示未关联属性之后,添加能够新增关联属性的功能,对应前端页面,可以看到对应的新增请求还是404的返回: 新增功能对应的API文档: 首先来到控制响应层: ... @Autowired AttrAttrgroupRelationService relationService; ... /** * 处理响应/product/attrgroup/attr/relation * @param vos 添加管理的列表 * @ret

LastYHM的博客 501

商品服务-新增商品-获取分类下所有分组&关联属性

1.接口文档 2.新建AttrGroupWithAttrsVo package com.atguigu.gulimall.product.vo; import com.atguigu.gulimall.product.entity.AttrEntity; import com.baomidou.mybatisplus.annotation.TableId; import lombok.Data; import java.util.List; /** * 属性分组与属性VO */ @Data p

小生不才的博客 1015

各个包的含义Controlle,service,impl,mapper

各个包的含义Controlle,service,impl,mapper

m0_63014311的博客 1749
上一篇: day79-商城业务-商品上架-nested数据类型场景
下一篇: 谷粒商城day57-商品服务-API-新增商品-调试会员等级相关接口
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

我才是真的封不觉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值