Merge branch 'feature/mall_product' of http://117.33.142.185:3000/zenghuapei/cyywl_server into feature/mall_product
commit
4ce486afef
|
@ -0,0 +1,20 @@
|
||||||
|
FROM registry.cn-hangzhou.aliyuncs.com/lrh-public/openjdk:8u222-jre-up
|
||||||
|
|
||||||
|
LABEL Author="axzsd" \
|
||||||
|
Email="atva725@qq.com" \
|
||||||
|
Description="创盈支付服务端"
|
||||||
|
|
||||||
|
ENV SPRING_PROFILES_ACTIVE="dev"
|
||||||
|
ENV JAVA_OPTIONS "-Xms800m -Xmx800m \
|
||||||
|
-XX:+HeapDumpOnOutOfMemoryError \
|
||||||
|
-Dfile.encoding=UTF-8 \
|
||||||
|
-Djava.awt.headless=true \
|
||||||
|
-Dsun.net.client.defaultConnectTimeout=10000 \
|
||||||
|
-Dsun.net.client.defaultReadTimeout=30000"
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR /work/projects/yudao-server
|
||||||
|
COPY yudao-server/target/yudao-server.jar /opt/app.jar
|
||||||
|
|
||||||
|
EXPOSE 48080
|
||||||
|
ENTRYPOINT exec java $JAVA_OPTIONS -jar -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} /opt/app.jar
|
|
@ -0,0 +1,45 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
environment {
|
||||||
|
INTRANET_REGISTRY='192.168.1.124:10083'
|
||||||
|
PUBLIC_REGISTRY='192.168.1.124:10083'
|
||||||
|
IMAGE_NAMESPACE='cmx'
|
||||||
|
IMAGE_NAME='yudao-server-api'
|
||||||
|
GIT_BRANCH='feature/mall_product'
|
||||||
|
Dockerfile='builds/Dockerfile'
|
||||||
|
DockerComposefile='docker-compose-test.yml'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Pull Code') {
|
||||||
|
steps {
|
||||||
|
checkout([$class: 'GitSCM', branches: [[name: "$GIT_BRANCH"]], extensions: [cloneOption(depth: 1, noTags: true, reference: '', shallow: true)], userRemoteConfigs: [[credentialsId: 'Hx-Deploy-Git', url: 'http://117.33.142.185:3000/zenghuapei/cyywl_server.git']]])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('compile & buildImage->push') {
|
||||||
|
steps {
|
||||||
|
withMaven(maven: 'M3') {
|
||||||
|
sh 'mvn clean package -Dmaven.test.skip=true'
|
||||||
|
}
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'HxDockerRepo', passwordVariable: 'DOCKER_PASSWORD', usernameVariable: 'DOCKER_USERNAME')]) {
|
||||||
|
sh 'docker build -f $Dockerfile -t $INTRANET_REGISTRY/$IMAGE_NAMESPACE/$IMAGE_NAME:$BUILD_ID .'
|
||||||
|
sh 'echo "push start..."'
|
||||||
|
sh 'docker push $INTRANET_REGISTRY/$IMAGE_NAMESPACE/$IMAGE_NAME:$BUILD_ID'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('SSH Deploy') {
|
||||||
|
steps {
|
||||||
|
withCredentials([sshUserPrivateKey(credentialsId: 'halo-test-ssh', keyFileVariable: 'primaryKeyVar', usernameVariable: 'userVar')]) {
|
||||||
|
sh 'ssh -i ${primaryKeyVar} root@36.41.184.13 "curl -s https://cmx.bskies.cc:8000/shell/deploy/init_work_dir.sh | bash -s /opt/app/${IMAGE_NAME}"'
|
||||||
|
sh 'scp -i ${primaryKeyVar} builds/${DockerComposefile} root@36.41.184.13:/opt/app/${IMAGE_NAME}'
|
||||||
|
sh 'ssh -i ${primaryKeyVar} root@36.41.184.13 "curl -s https://cmx.bskies.cc:8000/shell/deploy/docker_deploy.sh | bash -s /opt/app/${IMAGE_NAME} $PUBLIC_REGISTRY/$IMAGE_NAMESPACE/$IMAGE_NAME:$BUILD_ID /opt/app/${IMAGE_NAME}/$DockerComposefile"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
version: "3.9"
|
||||||
|
services:
|
||||||
|
yudao-server:
|
||||||
|
image: ${IMAGE_VERSION}
|
||||||
|
restart: always
|
||||||
|
privileged: true
|
||||||
|
container_name: yudao-server
|
||||||
|
environment:
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
SPRING_PROFILES_ACTIVE: test
|
||||||
|
# volumes:
|
||||||
|
# - /opt/logs/cyywl:/work/projects/yudao-server
|
||||||
|
ulimits:
|
||||||
|
nproc: 65535
|
||||||
|
nofile:
|
||||||
|
soft: 20000
|
||||||
|
hard: 40000
|
||||||
|
ports:
|
||||||
|
- "48080:48080"
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 800MB
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:48080/cyyywl-api/actuator/health"]
|
||||||
|
timeout: 30s
|
||||||
|
interval: 45s
|
||||||
|
retries: 3
|
|
@ -15,7 +15,8 @@ import java.util.Arrays;
|
||||||
public enum UserTypeEnum implements IntArrayValuable {
|
public enum UserTypeEnum implements IntArrayValuable {
|
||||||
|
|
||||||
MEMBER(1, "会员"), // 面向 c 端,普通用户
|
MEMBER(1, "会员"), // 面向 c 端,普通用户
|
||||||
ADMIN(2, "管理员"); // 面向 b 端,管理后台
|
ADMIN(2, "管理员"), // 面向 b 端,管理后台
|
||||||
|
PROMOTER(3, "推广员"); // 面向 c 端,普通用户
|
||||||
|
|
||||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UserTypeEnum::getValue).toArray();
|
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UserTypeEnum::getValue).toArray();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package cn.iocoder.yudao.module.member.controller.app.user.vo;
|
package cn.iocoder.yudao.module.member.controller.app.user.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -19,4 +20,7 @@ public class AppUserInfoRespVO {
|
||||||
|
|
||||||
@Schema(description = "用户手机号", required = true, example = "15601691300")
|
@Schema(description = "用户手机号", required = true, example = "15601691300")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
|
@Schema(description = "用户类型", required = true, example = "15601691300")
|
||||||
|
private UserTypeEnum userType;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,6 @@ public class TenantBaseVO {
|
||||||
* 销售负责人
|
* 销售负责人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "销售负责人", example = "https://www.iocoder.cn")
|
@Schema(description = "销售负责人", example = "https://www.iocoder.cn")
|
||||||
@NotEmpty(message = "销售负责人不能为空")
|
|
||||||
@Length( max = 10, message = "销售负责人长度为 {max}位")
|
@Length( max = 10, message = "销售负责人长度为 {max}位")
|
||||||
private String saleContactName;
|
private String saleContactName;
|
||||||
|
|
||||||
|
@ -78,7 +77,6 @@ public class TenantBaseVO {
|
||||||
* 销售负责人联系电话
|
* 销售负责人联系电话
|
||||||
*/
|
*/
|
||||||
@Schema(description = "销售负责人联系电话", example = "https://www.iocoder.cn")
|
@Schema(description = "销售负责人联系电话", example = "https://www.iocoder.cn")
|
||||||
@NotEmpty(message = "销售负责人不能为空")
|
|
||||||
@Mobile( message = "销售负责人联系电话不正确")
|
@Mobile( message = "销售负责人联系电话不正确")
|
||||||
private String saleContactMobile;
|
private String saleContactMobile;
|
||||||
|
|
||||||
|
@ -90,4 +88,11 @@ public class TenantBaseVO {
|
||||||
@Length( max = 300, message = "微信客服地址长度为 {max}位")
|
@Length( max = 300, message = "微信客服地址长度为 {max}位")
|
||||||
private String wxKfUrl;
|
private String wxKfUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通知公告
|
||||||
|
*/
|
||||||
|
@Schema(description = "通知公告", example = "https://www.iocoder.cn")
|
||||||
|
@Length( max =1000, message = "通知公告长度为 {max}位")
|
||||||
|
private String notice;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,10 @@ public class TenantDO extends BaseDO {
|
||||||
* 微信客服地址
|
* 微信客服地址
|
||||||
*/
|
*/
|
||||||
private String wxKfUrl;
|
private String wxKfUrl;
|
||||||
|
/**
|
||||||
|
* 通知公告
|
||||||
|
*/
|
||||||
|
private String notice;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
server:
|
server:
|
||||||
port: 48080
|
port: 48080
|
||||||
|
servlet:
|
||||||
|
context-path: /cyyywl-api
|
||||||
|
|
||||||
--- #################### 数据库相关配置 ####################
|
--- #################### 数据库相关配置 ####################
|
||||||
|
|
||||||
|
@ -156,7 +158,31 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta
|
||||||
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
||||||
key-prefix: wa # Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置
|
key-prefix: wa # Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置
|
||||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
||||||
|
pay:
|
||||||
|
one:
|
||||||
|
enabled: true
|
||||||
|
app-id: wxb1826c88da21d81e
|
||||||
|
mch-id: 1641993417
|
||||||
|
mch-key: qdn2I7Cmx4JeiKOt2CDjiu6UHgLTsOsM
|
||||||
|
apiv3-key: cyywl666666cyywl888888cyywl66666
|
||||||
|
private-cert-path: classpath:/1/apiclient_cert.pem
|
||||||
|
private-key-path: classpath:/1/apiclient_key.pem
|
||||||
|
key-path: classpath:/1/apiclient_cert.p12
|
||||||
|
cert-serial-no: 58FDB503F92B6C0E258C9940BB726C2BF6022E56
|
||||||
|
notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/pay_notify
|
||||||
|
refund-notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/refund_notify
|
||||||
|
two:
|
||||||
|
enabled: true
|
||||||
|
app-id: wxb1826c88da21d81e
|
||||||
|
mch-id: 1642042589
|
||||||
|
mch-key: qdn2I7Cmx4JeiKOt2CDjiu6UHgLTsOsM
|
||||||
|
apiv3-key: cyywl666666cyywl888888cyywl66666
|
||||||
|
private-cert-path: classpath:/2/apiclient_cert.pem
|
||||||
|
private-key-path: classpath:/2/apiclient_key.pem
|
||||||
|
key-path: classpath:/2/apiclient_cert.p12
|
||||||
|
cert-serial-no: 47F04D51F958FFEF56A6DFC25BDE83CF89353E19
|
||||||
|
notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/pay_notify
|
||||||
|
refund-notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/refund_notify
|
||||||
--- #################### 芋道相关配置 ####################
|
--- #################### 芋道相关配置 ####################
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
# 芋道配置项,设置当前项目所有自定义的配置
|
||||||
|
|
|
@ -3,7 +3,7 @@ spring:
|
||||||
name: yudao-server
|
name: yudao-server
|
||||||
|
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: local
|
||||||
|
|
||||||
main:
|
main:
|
||||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
||||||
|
|
Loading…
Reference in New Issue