产品模块4
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
<modules>
|
||||
<module>tashow-infra-api</module>
|
||||
<module>tashow-system-api</module>
|
||||
<module>tashow-product-api</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
||||
40
tashow-feign/tashow-product-api/pom.xml
Normal file
40
tashow-feign/tashow-product-api/pom.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>com.tashow.cloud</groupId>
|
||||
<artifactId>tashow-feign</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<artifactId>tashow-product-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
infra 模块 API,暴露给其它模块调用
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.tashow.cloud</groupId>
|
||||
<artifactId>tashow-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 参数校验 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* infra API 包,定义暴露给其它模块的 API
|
||||
*/
|
||||
package com.tashow.cloud.productapi.api;
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.tashow.cloud.productapi.enums;
|
||||
|
||||
|
||||
import com.tashow.cloud.common.enums.RpcConstants;
|
||||
|
||||
/**
|
||||
* API 相关的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public class ApiConstants {
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*
|
||||
* 注意,需要保证和 spring.application.name 保持一致
|
||||
*/
|
||||
public static final String NAME = "product-server";
|
||||
|
||||
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/infra";
|
||||
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.tashow.cloud.productapi.enums;
|
||||
|
||||
/**
|
||||
* Infra 字典类型的枚举类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface DictTypeConstants {
|
||||
|
||||
String JOB_STATUS = "product_job_status"; // 定时任务状态的枚举
|
||||
String JOB_LOG_STATUS = "product_job_log_status"; // 定时任务日志状态的枚举
|
||||
|
||||
String API_ERROR_LOG_PROCESS_STATUS = "product_api_error_log_process_status"; // API 错误日志的处理状态的枚举
|
||||
|
||||
String CONFIG_TYPE = "product_config_type"; // 参数配置类型
|
||||
String BOOLEAN_STRING = "product_boolean_string"; // Boolean 是否类型
|
||||
|
||||
String OPERATE_TYPE = "product_operate_type"; // 操作类型
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.tashow.cloud.productapi.enums;
|
||||
|
||||
|
||||
import com.tashow.cloud.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* Infra 错误码枚举类
|
||||
*
|
||||
* infra 系统,使用 1-001-000-000 段
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
ErrorCode CATEGORY_NOT_EXISTS = new ErrorCode(10001, "产品类目不存在");
|
||||
ErrorCode PROD_NOT_EXISTS = new ErrorCode(10002, "商品不存在");
|
||||
ErrorCode PROD_ADDITIONAL_FEE_DATES_NOT_EXISTS = new ErrorCode(10003, "特殊日期附加费用规则不存在");
|
||||
ErrorCode PROD_ADDITIONAL_FEE_PERIODS_NOT_EXISTS = new ErrorCode(10004, "特殊时段附加费用规则不存在");
|
||||
}
|
||||
Reference in New Issue
Block a user