优化项目结构

This commit is contained in:
启航老齐 2025-12-28 16:07:44 +08:00
parent d9e73729e3
commit 4c3ac0a357
38 changed files with 140 additions and 125 deletions

View File

@ -194,8 +194,8 @@ graph TD
+ 用户
+ 菜单
+ `oms-api`
oms主功能微服务,主要功能包括:
+ `erp-api`
erp主功能微服务,主要功能包括:
+ 队列消息处理(订单消息、退款消息)
+ 订单接口

View File

@ -1,18 +1,22 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- <parent>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-parent</artifactId>-->
<!-- <version>3.0.2</version>-->
<!-- <relativePath/>-->
<!-- </parent>-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.2</version>
<relativePath/>
<groupId>cn.qihangerp.api</groupId>
<artifactId>api</artifactId>
<version>2.12.0</version>
</parent>
<groupId>com.qihang.oms</groupId>
<artifactId>oms-api</artifactId>
<artifactId>erp-api</artifactId>
<packaging>jar</packaging>
<name>oms-api</name>
<name>erp-api</name>
<url>http://maven.apache.org</url>
<properties>
@ -25,24 +29,24 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-web</artifactId>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-tomcat</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-undertow</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter</artifactId>

View File

@ -1,6 +1,5 @@
package cn.qihangerp.oms;
package cn.qihangerp.erp;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@ -13,15 +12,15 @@ import org.springframework.web.client.RestTemplate;
//@EnableDiscoveryClient
//@MapperScan("cn.qihangerp.oms.mapper")
@EnableFeignClients(basePackages = "cn.qihangerp.oms")
@EnableFeignClients(basePackages = "cn.qihangerp.erp")
@EnableDiscoveryClient
@ComponentScan(basePackages={"cn.qihangerp"})
@SpringBootApplication
public class OmsApi {
public class ErpApi {
public static void main( String[] args )
{
System.out.println( "Hello oms-api!" );
SpringApplication.run(OmsApi.class, args);
System.out.println( "Hello erp-api!" );
SpringApplication.run(ErpApi.class, args);
}
@Bean
@LoadBalanced

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.config;
package cn.qihangerp.erp.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;

View File

@ -1,7 +1,6 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import jakarta.annotation.Resource;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;

View File

@ -1,11 +1,10 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.common.AjaxResult;
import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.PageResult;
import cn.qihangerp.common.TableDataInfo;
import cn.qihangerp.model.entity.OLogisticsCompany;
import cn.qihangerp.model.entity.OShop;
import cn.qihangerp.module.service.OLogisticsCompanyService;
import cn.qihangerp.module.service.OShopPlatformService;
import cn.qihangerp.module.service.OShopService;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.common.AjaxResult;
import cn.qihangerp.common.PageQuery;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.common.AjaxResult;

View File

@ -1,11 +1,11 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.model.entity.OShop;
import cn.qihangerp.model.entity.OShopPlatform;
import cn.qihangerp.module.service.OLogisticsCompanyService;
import cn.qihangerp.module.service.OShopPlatformService;
import cn.qihangerp.module.service.OShopService;
import cn.qihangerp.oms.request.ShopBo;
import cn.qihangerp.erp.request.ShopBo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import cn.qihangerp.common.AjaxResult;
import cn.qihangerp.common.TableDataInfo;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.TableDataInfo;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.common.AjaxResult;
import cn.qihangerp.security.common.BaseController;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.common.AjaxResult;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.common.AjaxResult;
import cn.qihangerp.common.PageQuery;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller;
package cn.qihangerp.erp.controller;
import cn.qihangerp.common.AjaxResult;

View File

@ -1,10 +1,8 @@
package cn.qihangerp.oms.feign;
package cn.qihangerp.erp.feign;
import com.alibaba.fastjson2.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = "open-api")

View File

@ -1,10 +1,8 @@
package cn.qihangerp.oms.mq;
package cn.qihangerp.erp.mq;
import cn.qihangerp.module.service.ApiMessageService;
import com.alibaba.fastjson2.JSON;
import cn.qihangerp.common.enums.EnumShopType;
import cn.qihangerp.common.mq.MqMessage;
import cn.qihangerp.common.mq.MqType;
import cn.qihangerp.common.utils.SpringUtils;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.mq;
package cn.qihangerp.erp.mq;
import cn.qihangerp.common.ResultVo;
import cn.qihangerp.common.mq.MqMessage;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.mq;
package cn.qihangerp.erp.mq;
import cn.qihangerp.common.ResultVo;
import cn.qihangerp.common.enums.EnumShopType;
@ -9,7 +9,7 @@ import cn.qihangerp.module.order.service.OOrderService;
import cn.qihangerp.module.order.service.ORefundService;
import cn.qihangerp.module.order.service.ErpShipmentService;
import cn.qihangerp.module.service.ApiMessageService;
import cn.qihangerp.oms.feign.OpenApiService;
import cn.qihangerp.erp.feign.OpenApiService;
import com.alibaba.fastjson2.JSONObject;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.mq;//package com.qihang.sys.api.mq;
package cn.qihangerp.erp.mq;//package com.qihang.sys.api.mq;
//
//import lombok.Data;
//

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.mq;//package com.qihang.sys.api.mq;
package cn.qihangerp.erp.mq;//package com.qihang.sys.api.mq;
//
//import lombok.AllArgsConstructor;
//import org.springframework.data.redis.core.RedisTemplate;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.mq;
package cn.qihangerp.erp.mq;
import lombok.AllArgsConstructor;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.request;
package cn.qihangerp.erp.request;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.serviceImpl;
package cn.qihangerp.erp.serviceImpl;
import cn.qihangerp.model.entity.SysConfig;
import cn.qihangerp.service.SysConfigService;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.serviceImpl;
package cn.qihangerp.erp.serviceImpl;
import cn.qihangerp.model.entity.SysUser;
import cn.qihangerp.service.ISysUserService;

View File

@ -1,16 +1,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- <parent>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-parent</artifactId>-->
<!-- <version>3.0.2</version>-->
<!-- <relativePath/>-->
<!-- </parent>-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.2</version>
<relativePath/>
<groupId>cn.qihangerp.api</groupId>
<artifactId>api</artifactId>
<version>2.12.0</version>
</parent>
<groupId>cn.qihangerp</groupId>
<artifactId>gateway</artifactId>
<packaging>jar</packaging>
<version>2.0.0</version>
<name>gateway</name>
<url>http://maven.apache.org</url>

View File

@ -1,14 +1,18 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- <parent>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-parent</artifactId>-->
<!-- <version>3.0.2</version>-->
<!-- <relativePath/>-->
<!-- </parent>-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.2</version>
<relativePath/>
<groupId>cn.qihangerp.api</groupId>
<artifactId>api</artifactId>
<version>2.12.0</version>
</parent>
<groupId>cn.qihangerp.open</groupId>
<artifactId>open-api</artifactId>
<packaging>jar</packaging>
@ -25,24 +29,24 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-web</artifactId>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-tomcat</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-undertow</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>

View File

@ -1,22 +1,27 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- <parent>-->
<!-- <groupId>cn.qihangerp</groupId>-->
<!-- <artifactId>qihangerp-cloud</artifactId>-->
<!-- <version>2.0.6</version>-->
<!-- </parent>-->
<parent>
<groupId>cn.qihangerp</groupId>
<artifactId>qihangerp-cloud</artifactId>
<version>2.0.6</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.2</version>
<relativePath/>
</parent>
<groupId>cn.qihangerp.api</groupId>
<artifactId>api</artifactId>
<version>1.0</version>
<version>2.12.0</version>
<packaging>pom</packaging>
<name>api</name>
<url>http://maven.apache.org</url>
<modules>
<module>gateway</module>
<module>oms-api</module>
<module>erp-api</module>
<module>sys-api</module>
<module>open-api</module>
</modules>
@ -27,6 +32,10 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>

View File

@ -1,15 +1,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- <parent>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-parent</artifactId>-->
<!-- <version>3.0.2</version>-->
<!-- <relativePath/>-->
<!-- </parent>-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.2</version>
<relativePath/>
<groupId>cn.qihangerp.api</groupId>
<artifactId>api</artifactId>
<version>2.12.0</version>
</parent>
<groupId>cn.qihangerp.api</groupId>
<artifactId>sys-api</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>sys-api</name>
@ -26,24 +30,24 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-web</artifactId>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-tomcat</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-undertow</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>

Binary file not shown.

View File

@ -23,7 +23,7 @@
<artifactId>open-sdk</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/open-sdk-1.10.4.jar</systemPath>
<systemPath>${project.basedir}/libs/open-sdk-1.10.9.3.jar</systemPath>
</dependency>
<dependency>
<groupId>cn.qihangerp.service</groupId>

View File

@ -14,9 +14,6 @@
<module>core</module>
<module>serviceImpl</module>
<module>microservices</module>
<module>core/model</module>
<module>core/interfaces</module>
</modules>
<properties>

View File

@ -12,7 +12,7 @@
<version>2.0.0</version>
<packaging>pom</packaging>
<name>module</name>
<name>serviceImpl</name>
<url>http://maven.apache.org</url>
<modules>
<module>sys</module>