谷粒商城day53-商品服务-API-品牌管理-品牌分类关联与级联更新

视觉定位避坑指南:基于双mark点的坐标转换常见错误排查 本文详细解析了工业视觉项目中基于双mark点的坐标转换常见错误及排查方法,涵盖旋转矩阵构建、坐标系原点选择、图像预处理优化等关键环节。通过实战案例和代码示例,帮助工程师避免定位偏差,提升系统精度,特别适用于自动化检测和精密制造场景。 阅读详情

1.添加分页拦截器

2.品牌管理界面添加查询接口

代码如下 BrandServiceImpl

@Service("brandService")
public class BrandServiceImpl extends ServiceImpl<BrandDao, BrandEntity> implements BrandService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {

        QueryWrapper<BrandEntity> brandEntityQueryWrapper = new QueryWrapper<>();


        String key = (String)params.get("key");
        if(StringUtils.isNotEmpty(key)){
            brandEntityQueryWrapper.like("brand_id",key).or()
                    .like("name",key);
        }
        IPage<BrandEntity> page = this.page(
                new Query<BrandEntity>().getPage(params),
                brandEntityQueryWrapper
        );

        return new PageUtils(page);
    }

}

 

3.新增一些品牌 

4.品牌与分类做关联

品牌跟分类是多对多的关系,比如小米这个品牌下有多种类型的产品,手机,平板 手机这个分类下又有多个品牌比如华为 苹果 

获取品牌关联的分类列表 

@getmapping

电商系统中大表数据的中间表可以通过加冗余字段来减少关联查询,比如关联表中不止可以放一方的ID还可以放name,code等一些常用的属性

放了之后修改某表数据的时候这些关联表中的内容也要记得一并修改,比如关联表内不止放了分类ID而且为了查询时方便还放了分类名称,此时就

在新增关联时要获取name等字段进行保存

并且需要对原本分类的修改方法进行改造如下

分类修改

品牌修改

页面这里就不演示了

 

 

 

TensorFlow2深度学习实战(十四):目标检测算法 YOLOv4 解析 最易上手的【计算机视觉】小白教程! 阅读详情

相关推荐

scRNA-seq的fastq文件处理流程——持续更新

获得了一批新的scRNA-seq的fastq.gz文件,每个样本的数据形式为: 我打算使用10X cellranger处理fastq.gz文件,下载及安装方式在官网:https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/2.0这个网址写了10X cellranger处理fastq.gz文件的命名规则https://support.10xgenomics.com/single-cell-gene-expr

watermel__的博客 3198

谷粒商城-基础篇-Day07-品牌分类关联与级联更新

将品牌分类和品牌名称的关系放在pms_category_brand_relation表中获取该列表品牌所有的关联信息新增创建saveDetail方法。

qq_57907966的博客 697

一文详解声码器

声码器(Vocoder)是语音信号处理领域的核心技术,其本质是通过“分析 - 参数化 - 合成” 的闭环流程,实现语音的高效编码、转换或生成。它不仅是早期语音通信的关键工具,更是现代 AI 语音技术(如 TTS、语音转换)的核心组件。以下从原理、技术分类、关键模块、应用及发展趋势展开详细解析。

weixin_41413777的博客 1354

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

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

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

接地设计的本质:按电流类型选择物理连接方式

接地是电子系统中实现电位参考、噪声抑制与安全保护的基础技术,其核心原理在于为不同性质的电流提供可控的低阻抗返回路径。从直流到GHz频段,电流的频率特性、能量等级和持续时间决定了接地的物理实现方式——工频安全电流依赖低电阻导体,高频噪声需低感平面或磁珠衰减,ESD脉冲要求受控泄放电阻,浪涌能量则必须通过独立短路径导入大地。这种‘目的决定方式’的设计逻辑,直接关联EMC合规性、信号完整性与系统可靠性。本文聚焦PCB级与设备级工程实践,详解安全地、功能地、浪涌地与静电地的判据差异及六种典型连接策略,帮助硬件工程师

weixin_36369848的博客 260

小白学习图像处理6——Canny边缘检测算法原理

目录结构一、高斯滤波二、梯度计算1、原理2、代码如下三、非极大值抑制三、双阈值检测四、matlab 的 edge函数五、总结 Canny边缘检测算法主要步骤:高斯滤波、梯度计算、非极大值抑制和双阈值检测。 一、高斯滤波   使用高斯滤波的目的是平滑图像,滤除图像中的部分噪声(因为微分算子对噪声很敏感)。高斯滤波具体办法是生成一个高斯模板,使用卷积进行时域滤波: img = im2double(im...

我有两颗糖 7791

谷粒商城p188-页面排序-排序字段回显-代码精简

谷粒商城p188 排序字段回显,代码精简,可读性相较于视频有所提升。

m0_56738550的博客 244

LightTools手动创建菲涅尔透镜的5个实用技巧(附详细步骤图)

本文详细介绍了在LightTools中手动创建菲涅尔透镜的5个核心技巧,包括理解旋转体与折线原理、高效构建多齿轮廓、编辑优化、坐标系定位以及属性设置与验证。通过分步图解和实用策略,帮助用户突破内置工具限制,实现对非标准齿形和复杂光学设计的完全掌控,提升建模精度与仿真效率。

onion的博客 775

谷粒商城实战笔记-75-商品服务-API-品牌管理-品牌分类关联与级联更新

在这里,我们冗余了分类和品牌的名称,为的查询时不用管理品牌表和分类表就能查询到品牌名称和分类名称。比如在分类和品牌的更新接口中,增加更新关联表的冗余字段的逻辑。当然,这样做也是有风险的,如果品牌表的品牌名称更新,但关联表的品牌名称没有及时可惜,就会出现数据不一致。这个接口的功能是根据brandId查询其关联的所有分类,结果用于在列表中展示。基于代码生成工具生成的代码,有最基本的增删改查功能,但有很多功能待完善。打开品牌管理界面,页面底部的分页就有问题,后端没有返回正确的分页数据。

epitomizelu的专栏 900

Label Studio 数据标注平台,大模型预训练与微调必备

摘要:LabelStudio是一款开源数据标注工具,支持文本、图像等多种数据类型的标注。本文介绍了其安装方法(通过conda创建环境并pip安装)、基础使用流程(创建项目、导入数据、设置标签、标注导出)以及AI自动标注功能的实现。重点讲解了如何通过MLBackend集成LangChain模型实现自动标注:创建自定义模型类、构建预测链、处理返回结果,最后配置到LabelStudio项目中。该功能可显著提升标注效率,标注人员只需在AI预测结果基础上进行修正。

技术引领业务创新 290

OpenClaw赚钱实录:从“养龙虾“到可持续变现的实践指南——OpenClaw的赚钱底层逻辑与“记忆”革命

AI 的商业价值不在于替代思考,而在于沉淀关系。当 Agent 记住你的偏好、你的历史、你的目标,它就不再是冷冰冰的软件,而是成为数字化的关系资产。这种资产的稀缺性不在于技术复杂度,而在于时间无法被压缩——你无法用更好的算法替代 3 个月的协作记忆。在这场“记忆革命”中,护城河不是模型参数,而是用户与 AI 共同书写的历史。OpenClaw 用一套优雅的文件系统架构,将这种历史转化为可积累、可复用、可变现的数字资产。从“计算即服务”(CaaS)到“记忆即服务”(MaaS)。

冯·诺依曼 1341

关于使用ssm的@autowire或者@service的自动注入失败问题

[org.springframework.web.servlet.DispatcherServlet] - Context initialization failed   org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'aaAction': Unsati...

王冬冬 4229

【华为OD技术面试手撕真题】25、验证IP地址 | 手撕真题+思路参考+代码解析(C & C++ & Java & Python & JS)

验证IP地址 华为od机试真题,华为OD技术二面,华为od机考,华为od手撕真题,华为od技术二面,华为od机试,华为OD机试的高频手撕代码题,华为od八股文

KJ.JK 4043

Spring注解@Component、@Repository、@Service、@Controller区别

https://blog.youkuaiyun.com/xiao190128/article/details/54890759/   service  是有用的相当于 xml配置中得bean  id = service  也可以不指定 不指定相当于 bean id =  com. service.service 就是这个类的全限定名,表示给当前类命名一个别名,方便注入到其他需要用到的类中;不加的话,默认别名就...

weixin_33940102的博客 6882

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

75、商品服务-API-品牌管理-品牌分类关联与级联更新

分页没效果 package com.atguigu.gulimall.product.config; import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; import com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize; import org.mybatis.spring.a.

pyd1040201698的博客 714

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

零基础学分布式锁-Redisson

一、Redisson简介和整合# 1、简介# Redisson 是一个在Redis的基础上实现的Java驻内存数据网格(In-Memory Data Grid)。它不仅提供了一系列的分布式的Java常用对象,还提供了许多分布式服务。其中包括(BitSet, Set, Multimap, SortedSet, Map, List, Queue, BlockingQueue, Deque, BlockingDeque, Semaphore, Lock, AtomicLong, CountDownLatch, P

a203206868的博客 280

[项目练手笔记-谷粒商城(SpringCloud Alibaba+vue前后端分离)]day11品牌分类关联与级联更新

[项目练手笔记-谷粒商城]day11品牌分类关联与级联更新 一、品牌分类关联与级联更新 1.分页功能编写 使用mybatis-plus的分页功能 @EnableTransactionManagement @Configuration @MapperScan("com.xiaoxiao.gulimall.product.dao") public class MyBatisConfig { @Bean public PaginationInterceptor paginationIntercep

叶落雨飘的博客 1296

10. 谷粒商城查询、新增品牌分类关联,优化更新品牌、更新分类

查询品牌的关联分类 需求 后端 AdminCategoryBrandRelationController.java /** * 获取当前品牌关联的所有分类列表 */ @ApiOperation("获取当前品牌关联的所有分类列表") @GetMapping("/category/list/{brandId}") public R categoryList(@PathVariable Long brandId){ QueryWrapper&

UnityAlvin 541

分类实现-自连接查询子分类

不能使用通用mapper 编写pojo CategoryVO package com.imooc.pojo.vo; import java.util.List; public class CategoryVO { private Integer id; private String name; private String type; private Integer fatherId; private List<SubCategoryVO>

weixin_43434182的博客 379

【商城项目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

谷粒商城的前端商品发布功能选择分类后没有发送请求获取关联品牌的相关问题解决

问题描述 控制台报错: 我复制的前端vue源码一开始是Pubsub没定义(Pubsub是消息订阅与发布组件),后来我安装了Pubsub。 安装指令 npm install --save pubsub-js --registry https://registry.npm.taobao.org 然后在brand-select.vue和category-cascader.vue中分别引入Pubsub, 两个都是在export 上面import就行了。 <script> //这里可以导入其他文件(

qq_47768542的博客 1647

谷粒商城-后端-品牌分类关联及级联更新

先去看接口文档的关联的 接口需要在哪里写参数是什么 然后 然后实现方法

gjm00000的博客 779

谷粒商城day50 -商品服务-API-属性分组-获取分类属性分组

实现这样一个效果,左边点击三级分类右边表格内查询出该三级分类关联的属性分组 1.controller层代码 @RequestMapping("/list/{catelogId}") public R list(@RequestParam Map<String, Object> params,@PathVariable("catelogId") Long catelogId){ // PageUtils page = attrGroupService.query

JavaCoder_juejue的博客 428

商城解析(关于编写新增商品表单,实现接收用户写入的品牌名,商品分类,图片等,并且传入到数据库)

首先看到这个页面,可以看到我们点击了品牌管理,新增品牌后,就会弹出一个这样的窗口,我们所看到的这些都是前端做的窗口,但是我们该如何在后端编写对应的业务逻辑呢?首先我们要知道这里对应的是哪个地址,在前端程序的哪一个页面,然后我们需要找到那一个页面,去看看它对应的参数是什么,然后我们需要去把这些参数拿过来,获取这些参数并且赋值。 那我们应该如何在前端程序中找到这个组件呢? 首先我们点击了品牌管理,可以看到他网址里面有相对应的地址,我们可以记住这个地址,然后在前端里面找到这个地址对应的路由。 根据这个路由找到.

Andre_dong的博客 1212

谷粒商城第五天(属性分组以及品牌分类关联)

谷粒商城第五天(属性分组以及品牌分类关联)

qq_52947924的博客 403

谷粒商城P85【商品系统】-> 【商品维护】->【发布商品】~ 获取三级分类下所有属性分组及其关联的属性

点击下一步会发送一个请求: vo: @Data public class AttrGroupWithAttrsVo { /** * 分组id */ private Long attrGroupId; /** * 组名 */ private String attrGroupName; /** * 排序 */ private Integer sort; /** * 描述 .

爱吃小香葱的博客 585

第194天学习打卡(项目 谷粒商城 36 新增商品 获取分类关联的平台)

新增商品 获取分类关联的品牌 查看页面遇到的错误 TypeError: Cannot read property 'publish' of undefined 解决办法 关于pubsub、publish报错,无法发送查询品牌信息的请求: 1、npm install --save pubsub-js 2、在src下的main.js中引用: import PubSub from 'pubsub-js' Vue.prototype.PubSub = PubSub DONE Compiled succe

doudoutj的博客 393
上一篇: 去除eslint 不必要校验 如缩进空格
下一篇: vscode 与 idea 使用 git提交代码正确步骤
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

打赏作者

我才是真的封不觉

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

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

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

打赏作者

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

抵扣说明:

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

余额充值