Loading

谷粒商城-仓储服务

前置操作

  1. 需要在application.yaml中配置nacos的注册中心地址和应用名称
spring:
  cloud:
    nacos:
      discovery:
        server-addr: 127.0.0.1:8848
  application:
    name: gulimall-ware
  1. 在启动文件上加上服务发现注解 @EnableDiscoveryClient
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.example.gulimall.ware.dao")
public class GulimallWareApplication {
    public static void main(String[] args) {
        SpringApplication.run(GulimallWareApplication.class, args);
    }
}
  1. 可以提前在nacos配置中心中创建一个配置文件 gulimall-ware.yml,本地创建 bootstrap.yaml 绑定配置中心的配置文件。
spring:
  application:
    name: gulimall-ware
  cloud:
    nacos:
      config:
        server-addr: 127.0.0.1:8848
        namespace: d176f0ab-41ba-4b16-8d0a-64f6315a0510
        file-extension: yml
  1. 因为ware是新增进来的服务,所以还需要为其配置网关。
        - id: ware-route
          uri: lb://gulimall-ware
          predicates: 
            - Path=/api/ware/**
          filters:
            - RewritePath=/api/(?<segment>/?.*), /$\{segment}

仓库维护

修改查询功能,不记录了。

采购单维护

商品库存应该是跟采购这边挂钩的,采购修改库存。

1 采购流程

image-20220826165222935

注:合并采购需求至采购单,只能合并到未被领取的采购单。

基础篇总结

image-20220828130842577

posted @ 2022-10-10 10:56  KledKled  阅读(12)  评论(0编辑  收藏  举报