commit f49061d4e2a404d138d2ed44595f4cd03f9299b0 Author: 86191 <2160251938@qq.com> Date: Wed Jul 31 19:40:21 2024 +0800 初始化 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e403e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0060b93 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# |- home +# |- app.jar - 启动jar包 +# |- logs - 日志文件 + +# 指定构建镜像的起始镜像 +FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/dragonwell:17.0.4.0.4.8-standard-ga-8.6 + +# 定义时区参数 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone + +# 挂载工作目录 +VOLUME ["/home/logs/cloud-pay"] + +# 拷贝执行jar包文件 +COPY ./cloud-pay-server/target/cloud-pay.jar /home/app.jar + +# 构建启动命令 +ENTRYPOINT ["java","-Dfile.encoding=utf-8","-jar"] +CMD ["/home/app.jar"] + diff --git a/cloud-pay-client/pom.xml b/cloud-pay-client/pom.xml new file mode 100644 index 0000000..3a6d1e6 --- /dev/null +++ b/cloud-pay-client/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + com.muyu + cloud-pay + 1.0.0 + + + cloud-pay-client + 1.0.0 + + + 17 + 17 + UTF-8 + + + + + com.muyu + cloud-pay-common + + + + diff --git a/cloud-pay-client/src/main/java/com/muyu/Main.java b/cloud-pay-client/src/main/java/com/muyu/Main.java new file mode 100644 index 0000000..95690d4 --- /dev/null +++ b/cloud-pay-client/src/main/java/com/muyu/Main.java @@ -0,0 +1,7 @@ +package com.muyu; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/cloud-pay-common/pom.xml b/cloud-pay-common/pom.xml new file mode 100644 index 0000000..add9550 --- /dev/null +++ b/cloud-pay-common/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + com.muyu + cloud-pay + 1.0.0 + + + cloud-pay-common + 1.0.0 + + + 17 + 17 + UTF-8 + + + + + com.muyu + cloud-common-core + + + + diff --git a/cloud-pay-common/src/main/java/com/muyu/Main.java b/cloud-pay-common/src/main/java/com/muyu/Main.java new file mode 100644 index 0000000..95690d4 --- /dev/null +++ b/cloud-pay-common/src/main/java/com/muyu/Main.java @@ -0,0 +1,7 @@ +package com.muyu; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/cloud-pay-common/src/main/java/com/muyu/cloud/pay/domain/OrderPayCustomer.java b/cloud-pay-common/src/main/java/com/muyu/cloud/pay/domain/OrderPayCustomer.java new file mode 100644 index 0000000..6829ec4 --- /dev/null +++ b/cloud-pay-common/src/main/java/com/muyu/cloud/pay/domain/OrderPayCustomer.java @@ -0,0 +1,34 @@ +package com.muyu.cloud.pay.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.*; +import lombok.experimental.SuperBuilder; + +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName(value = "order_pay_customer", autoResultMap = true) +public class OrderPayCustomer extends BaseEntity { + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + /** + * 服务/客户名称 + */ + private String appName; + /** + * 服务/客户编码 + */ + private String appCode; + /** + * 状态 + */ + private String status; +} diff --git a/cloud-pay-remote/pom.xml b/cloud-pay-remote/pom.xml new file mode 100644 index 0000000..9aa694d --- /dev/null +++ b/cloud-pay-remote/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + com.muyu + cloud-pay + 1.0.0 + + + cloud-pay-remote + 1.0.0 + + + 17 + 17 + UTF-8 + + + + + + com.muyu + cloud-pay-common + + + + diff --git a/cloud-pay-remote/src/main/java/com/muyu/Main.java b/cloud-pay-remote/src/main/java/com/muyu/Main.java new file mode 100644 index 0000000..95690d4 --- /dev/null +++ b/cloud-pay-remote/src/main/java/com/muyu/Main.java @@ -0,0 +1,7 @@ +package com.muyu; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/cloud-pay-server/pom.xml b/cloud-pay-server/pom.xml new file mode 100644 index 0000000..19adf8d --- /dev/null +++ b/cloud-pay-server/pom.xml @@ -0,0 +1,116 @@ + + + 4.0.0 + + com.muyu + cloud-pay + 1.0.0 + + + cloud-pay-server + 1.0.0 + + + 17 + 17 + UTF-8 + + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + com.mysql + mysql-connector-j + + + + + com.muyu + cloud-common-datasource + + + + + com.muyu + cloud-common-datascope + + + + + com.muyu + cloud-common-log + + + + + com.muyu + cloud-common-api-doc + + + + + com.muyu + cloud-common-xxl + + + + com.muyu + cloud-common-rabbit + + + + + + cloud-pay + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + + diff --git a/cloud-pay-server/src/main/java/com/muyu/cloud/pay/PayApplication.java b/cloud-pay-server/src/main/java/com/muyu/cloud/pay/PayApplication.java new file mode 100644 index 0000000..d6ab8b6 --- /dev/null +++ b/cloud-pay-server/src/main/java/com/muyu/cloud/pay/PayApplication.java @@ -0,0 +1,15 @@ +package com.muyu.cloud.pay; + +import com.muyu.common.security.annotation.EnableCustomConfig; +import com.muyu.common.security.annotation.EnableMyFeignClients; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@EnableCustomConfig +@EnableMyFeignClients +@SpringBootApplication +public class PayApplication { + public static void main(String[] args) { + SpringApplication.run(PayApplication.class, args); + } +} diff --git a/cloud-pay-server/src/main/java/com/muyu/cloud/pay/controller/TestController.java b/cloud-pay-server/src/main/java/com/muyu/cloud/pay/controller/TestController.java new file mode 100644 index 0000000..fd10e67 --- /dev/null +++ b/cloud-pay-server/src/main/java/com/muyu/cloud/pay/controller/TestController.java @@ -0,0 +1,23 @@ +package com.muyu.cloud.pay.controller; + +import com.muyu.common.core.domain.Result; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RequestMapping("/test") +@RestController +public class TestController { + + @PostMapping + public Result post(){ + return Result.success("测试Post成功"); + } + + @GetMapping + public Result get(){ + return Result.success("测试Get成功"); + } + +} diff --git a/cloud-pay-server/src/main/resources/banner.txt b/cloud-pay-server/src/main/resources/banner.txt new file mode 100644 index 0000000..0dd5eee --- /dev/null +++ b/cloud-pay-server/src/main/resources/banner.txt @@ -0,0 +1,2 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} diff --git a/cloud-pay-server/src/main/resources/bootstrap.yml b/cloud-pay-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..b4e1672 --- /dev/null +++ b/cloud-pay-server/src/main/resources/bootstrap.yml @@ -0,0 +1,56 @@ +# Tomcat +server: + port: 9701 + +# nacos线上地址 +nacos: + addr: 52.77.1.1:8848 + user-name: nacos + password: nacos + namespace: mengyu + +# Spring +spring: + main: + allow-bean-definition-overriding: true + application: + # 应用名称 + name: cloud-pay + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: ${nacos.addr} + # nacos用户名 + username: ${nacos.user-name} + # nacos密码 + password: ${nacos.password} + # 命名空间 + namespace: ${nacos.namespace} + config: + # 增加超时时间 + timeout: 10000 + # 服务注册地址 + server-addr: ${nacos.addr} + # nacos用户名 + username: ${nacos.user-name} + # nacos密码 + password: ${nacos.password} + # 命名空间 + namespace: ${nacos.namespace} + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + # 系统共享配置 + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + # 系统环境Config共享配置 + - application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + # xxl-job 配置文件 + - application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + # rabbit 配置文件 + - application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + diff --git a/cloud-pay-server/src/main/resources/logback/dev.xml b/cloud-pay-server/src/main/resources/logback/dev.xml new file mode 100644 index 0000000..a0e16b0 --- /dev/null +++ b/cloud-pay-server/src/main/resources/logback/dev.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + diff --git a/cloud-pay-server/src/main/resources/logback/prod.xml b/cloud-pay-server/src/main/resources/logback/prod.xml new file mode 100644 index 0000000..afd0098 --- /dev/null +++ b/cloud-pay-server/src/main/resources/logback/prod.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + ${log.sky.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + + + ERROR + + ACCEPT + + DENY + + + + + + + + ${log.sky.pattern} + + + + + + + + + + + + + + + + + + + + diff --git a/cloud-pay-server/src/main/resources/logback/test.xml b/cloud-pay-server/src/main/resources/logback/test.xml new file mode 100644 index 0000000..be7c5f6 --- /dev/null +++ b/cloud-pay-server/src/main/resources/logback/test.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + ${log.sky.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + + + ERROR + + ACCEPT + + DENY + + + + + + + + ${log.sky.pattern} + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..018635d --- /dev/null +++ b/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + + + com.muyu + cloud-server-parent + 3.6.4 + + + + cloud-pay + 1.0.1 + pom + + cloud-pay-server + cloud-pay-remote + cloud-pay-common + cloud-pay-client + + + + 17 + 17 + UTF-8 + + +