1
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ public interface OrderFileMapper extends SuperMapper<OrderFile> {
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<OrderFile> findList(Page<OrderFile> page, @Param("p") Map<String, Object> params);
|
||||
List<OrderFile> findList(Page<OrderFile> page, @Param("params") Map<String, Object> params);
|
||||
|
||||
|
||||
// 新增订单资源
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<select id="findList" resultType="com.central.order.model.OrderFile">
|
||||
SELECT * FROM order_files t
|
||||
<where>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
AND t.order_no LIKE CONCAT('%', #{orderNo}, '%')
|
||||
<if test="params.orderNo != null and params.orderNo != ''">
|
||||
AND t.order_no LIKE CONCAT('%', #{params.orderNo}, '%')
|
||||
</if>
|
||||
<if test="createTime != null and createTime.length == 2">
|
||||
AND t.create_time BETWEEN #{createTime[0]} AND #{createTime[1]}
|
||||
<if test="params.createTime != null and params.createTime.length == 2">
|
||||
AND t.create_time BETWEEN #{params.createTime[0]} AND #{params.createTime[1]}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY t.id DESC
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# 使用轻量级的 nginx 镜像
|
||||
FROM nginx:alpine
|
||||
|
||||
# 复制构建后的文件到 nginx 目录
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
|
||||
# 复制 nginx 配置文件
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 暴露 8080 端口
|
||||
EXPOSE 8080
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "开始部署前端项目..."
|
||||
|
||||
# 停止并删除旧容器
|
||||
docker compose down
|
||||
|
||||
# 重新构建并启动
|
||||
docker compose up -d --build
|
||||
|
||||
# 检查容器状态
|
||||
docker compose ps
|
||||
|
||||
echo "部署完成!项目已启动在 8080 端口"
|
||||
@@ -0,0 +1,28 @@
|
||||
version: '3'
|
||||
services:
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: frontend
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
restart: always
|
||||
networks:
|
||||
- app-network
|
||||
# 如果有后端服务,可以添加依赖
|
||||
# depends_on:
|
||||
# - backend
|
||||
|
||||
# 如果有后端服务,可以添加后端服务配置
|
||||
# backend:
|
||||
# image: your-backend-image
|
||||
# container_name: backend
|
||||
# networks:
|
||||
# - app-network
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
@@ -0,0 +1,56 @@
|
||||
server {
|
||||
listen 8080;
|
||||
server_name localhost;
|
||||
|
||||
# gzip 配置
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# 前端路由
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# API-UAA 服务代理
|
||||
location /api-uaa/ {
|
||||
proxy_pass http://119.45.169.13:9900/api-uaa/; # 替换为实际的后端地址
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# 添加跨域头
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
|
||||
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
|
||||
|
||||
# 处理 OPTIONS 请求
|
||||
if ($request_method = 'OPTIONS') {
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
|
||||
# 其他 API 服务代理(如果需要)
|
||||
location /api/ {
|
||||
proxy_pass http://119.45.169.13:9900/; # 替换为实际的后端地址
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# 添加跨域头
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
|
||||
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
|
||||
|
||||
# 处理 OPTIONS 请求
|
||||
if ($request_method = 'OPTIONS') {
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user