当前位置: 首页 > news >正文

个人网站包含哪些内容网站优化联系

个人网站包含哪些内容,网站优化联系,帮熟人做网站如何收费,网站首页设计公司P75 品牌分类关联和级联更新 第一步 1、把renren-fast-vue\src\views\modules下的common和product模块复制到vue中 2、mybatisplus的分页插件#xff0c;来调整品牌管理页面的页数不对问题 product新建config/MybatisPlusConfig.java文件#xff0c;参照官网#xff0c;…P75 品牌分类关联和级联更新 第一步 1、把renren-fast-vue\src\views\modules下的common和product模块复制到vue中 2、mybatisplus的分页插件来调整品牌管理页面的页数不对问题 product新建config/MybatisPlusConfig.java文件参照官网添加依赖导入类 mapperScan扫描的包是dao层下的其他一样 MapperScan(com.atguigu.gulimail.product.dao)3、品牌管理页面的查询功能不对 是在brandController的list请求中 StringUtils用的是lang包下的 String s (String) params.get(key);QueryWrapperBrandEntity brandEntityQueryWrapper new QueryWrapper();if(!StringUtils.isEmpty(s)){brandEntityQueryWrapper.eq(brand_id,s).or().like(name,s);}IPageBrandEntity page this.page(new QueryBrandEntity().getPage(params),brandEntityQueryWrapper);4、执行pms.sql恢复原始形状删除所有数据 第二步 1、品牌管理页面关联分类显示信息 /product/categorybrandrelation/catelog/listCategoryBrandRelationController.java RequestMapping(/catelog/list)public R categoryList(RequestParam(brandId) Long brandId){ListCategoryBrandRelationEntity list categoryBrandRelationService.list(new QueryWrapperCategoryBrandRelationEntity().eq(brand_id,brandId));return R.ok().put(page, list);}2、保存关联分类详细信息 RequestMapping(/save)public R save(RequestBody CategoryBrandRelationEntity categoryBrandRelation){// 查到对应的品牌名称和分类名称categoryBrandRelationService.saveDetail(categoryBrandRelation);return R.ok();}这里面三方表自动注入 不是service否则双向依赖。 品牌有注入关联表关联表也注入有品牌服务。 这里用 Dao Autowired private CategoryDao categoryDao; Autowired private BrandDao brandDao;public void saveDetail(CategoryBrandRelationEntity categoryBrandRelation) {Long brandId categoryBrandRelation.getBrandId();Long catelogId categoryBrandRelation.getCatelogId();// 查询品牌名和分类名BrandEntity brand brandDao.selectById(brandId);CategoryEntity category categoryDao.selectById(catelogId);categoryBrandRelation.setBrandName(brand.getName());categoryBrandRelation.setCatelogName(category.getName());this.save(categoryBrandRelation);}第三步 品牌页面更新名字时category_brand数据表也要更新 是用的update里面不是save RequestMapping(/update)public R update(Validated({UpdataGroup.class}) RequestBody BrandEntity brand){brandService.updateDetail(brand);return R.ok();}Autowired private CategoryBrandRelationService categoryBrandRelationService;Transactional Override public void updateDetail(BrandEntity brand) {this.updateById(brand);// 更新其他关联表if(!StringUtils.isEmpty(brand.getName())){categoryBrandRelationService.updateBrandName(brand.getBrandId(),brand.getName());}} Overridepublic void updateCatelogName(Long catId, String name) {CategoryBrandRelationEntity categoryBrandRelation new CategoryBrandRelationEntity();categoryBrandRelation.setCatelogId(catId);categoryBrandRelation.setBrandName(name);this.update(categoryBrandRelation,new UpdateWrapperCategoryBrandRelationEntity().eq(catelog_id,catId));}第四步 同理分类信息更新时category_brand数据表也要更新 RequestMapping(/update)public R update(RequestBody CategoryEntity category){categoryService.updateDetail(category);return R.ok();}Transactional Overridepublic void updateDetail(CategoryEntity category) {this.updateById(category);// 更新其他关联表if(!StringUtils.isEmpty(category.getName())){categoryBrandRelationService.updateCatelogName(category.getCatId(), category.getName());}}换一种方法实现用mybatisplus。需要安装mybatisX插件 Overridepublic void updateCatelogName(Long catId, String name) {this.baseMapper.updateCatelogName(catId, name);}之后自动创建方法提示生成。起名字 Mapper public interface CategoryBrandRelationDao extends BaseMapperCategoryBrandRelationEntity {void updateCatelogName(Param(id) Long catId,Param(name) String name); }update idupdateCatelogNameUPDATE pms_category_brand_relation SET catelog_name #{name} WHERE catelog_id #{id}/update其他 异常根类是Throwable它有两个子类 Error: 错误非常严重 Exception:编译时异常写代码时的异常。也就是平时所说的异常使用不当导致可避免。它有个子类 RuntimeException运行时异常
http://www.zqtcl.cn/news/765641/

相关文章:

  • 宁波三优互动网站建设公司怎么样手机app商城
  • 散热器 东莞网站建设php模板源码
  • 怎么申请域名建网站凡科网站建设总结
  • 温州网站设计定制外贸人才网哪家最好
  • 永康门业微网站建设做一个网站要多长时间
  • 南山网站建设哪家好四川省微信网站建设公
  • 网件路由器做网站网站建设中 提示
  • 全运网站的建设徐州网络推广公司排名
  • 成品网站源码1688体验区南宁网络推广服务商
  • 广州品牌网站开发公司网站建设价位
  • 网站首页没排名但内页有排名wordpress网站收录插件
  • 在线相册jsp网站开发与设计微信小程序app下载
  • 广元市建设局网站首页网站建设首选公司哪家好
  • 商务网站建设策划思路平台网站如何做推广方案设计
  • 哈尔滨网站快速排名通辽网站建设
  • 雄安专业网站建设哪家好分销系统网站建设
  • 咨询行业网站开发wordpress5.0新版如何发布文章
  • 做网站要什么技术saas建站和开源建站的区别
  • 大型网站建设哪家服务好qq对话制作器app
  • 做免费小说网站怎样赚钱网络推广方案最新
  • 电商网站的建设与运营揭阳专业的网站建设价格
  • 网站策划书包括哪些内容百度官方营销推广平台有哪些
  • 成都企业网站seo重庆企业网站推广费用
  • 广东电白建设集团有限公司网站wordpress 静态地址
  • 微网站和手机站区别工业设计专业学什么
  • 兰州网站建设哪里好素材图片高清
  • 公司网站建设进度设计官网登录入口
  • 中牟高端网站建设wordpress可视化文章
  • 那家公司做网站广西网络营销外包公司
  • 成品网站速成网站知名网站建设加盟合作