1 项目简介

1.1 nginx

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
  
    server {
       listen       80;
       server_name  git.tianji.com;
       location / {
            proxy_pass http://localhost:10880;
       }
    }
    server {
       listen       80;
       server_name  jenkins.tianji.com;
       location / {
            proxy_pass http://localhost:18080;
       }
    }
    server {
       listen       80;
       server_name  mq.tianji.com;
       location / {
            proxy_pass http://localhost:15672;
       }
    }
    server {
       listen       80;
       server_name  nacos.tianji.com;
       location / {
            rewrite /(.*)  /nacos/$1 break;
            proxy_pass http://localhost:8848;
       }
    }
    server {
       listen       80;
       server_name  xxljob.tianji.com;
       location / {
            rewrite /  /xxl-job-admin break;
            proxy_pass http://localhost:8880;
       }
       location /xxl-job-admin {
            proxy_pass http://localhost:8880;
       }
    }
    
    server {
       listen       80;
       server_name  es.tianji.com;
       location / {
            proxy_pass http://localhost:5601;
       }
    }
    server {
       listen       80;
       server_name  api.tianji.com;
       location / {
            proxy_set_header Host       $host; # 传递原始Host头
            proxy_pass http://192.168.150.101:10010;
            # proxy_pass http://192.168.150.1:10010; # 由于要修改网关在本地测试,所以代理到本地IP
       }
    }
    server {
       listen       80;
       server_name  www.tianji.com;
       location / {
            root /usr/local/src/tj-portal;
            index  index.html index.htm;
          #   proxy_pass http://192.168.150.1:18082;
       }
       location /img-tx {
            rewrite /img-tx/(.*)  /$1 break;
            proxy_pass http://wisehub-1312394356.cos.ap-shanghai.myqcloud.com;
       }
    }
    server {
       listen       80;
       server_name  manage.tianji.com;
       location / {
            root /usr/local/src/tj-admin;
            index  index.html index.htm;
          #   proxy_pass http://192.168.150.1:18081;
       }
       location /img-tx {
            rewrite /img-tx/(.*)  /$1 break;
            proxy_pass http://wisehub-1312394356.cos.ap-shanghai.myqcloud.com;
       }
    }
}

1.2 docker

1.3 项目进度

1.4 项目访问

00.网络
    a.虚拟网络编辑器(VMnet8)
        子网IP            192.168.150.0
        子网掩码          255.255.255.0
        NAT设置           192.168.150.2
        DHCP设置          192.168.150.98       192.168.150.254
    b.网络适配器(VMnet8 -> TCP/IPv4)
        IP地址            192.168.150.1
        子网掩码          255.255.255.0
        默认网关          192.168.150.2
    c.虚拟机
        # 用户名
        root
        # 密码
        123321

01.hosts
    192.168.150.101 git.tianji.com
    192.168.150.101 jenkins.tianji.com   
    192.168.150.101 mq.tianji.com        
    192.168.150.101 nacos.tianji.com     
    192.168.150.101 xxljob.tianji.com    
    192.168.150.101 es.tianji.com        
    192.168.150.101 api.tianji.com         http://192.168.150.101:10010
    192.168.150.101 www.tianji.com         http://192.168.150.101:18082     http://192.168.150.101:18082/index.html
    192.168.150.101 manage.tianji.com      http://192.168.150.101:18081     http://192.168.150.101:18081/index.html
    ---------------------------------------------------------------------------------------------------------
    delete请求
    http://api.tianji.com/ts/orders/1597502678241378305
    
    被nginx反向代理到
    http://192.168.150.101:10010/t3/orders/1597502678241378305
    
    被gateway路由到
    http://192.168.150.101:8088/orders/1597502678241378305

02.service
    Seata           http://192.168.150.101:7099/
    RabbitMQ        http://192.168.150.101:15672/                  tjxt/123321
    Nacos           http://192.168.150.101:8848/nacos/             nacos/nacos
    xxl-job-admin   http://192.168.150.101:8880/xxl-job-admin/     admin/123456
    Elasticsearch   http://192.168.150.101:9200/
    Jenkins         http://192.168.150.101:18080/                  root/123
    Gogs            http://192.168.150.101:10880/                  tjxt/123321
    kibana          http://192.168.150.101:5601/
    Sentinel
    mongo
    mysql           http://192.168.150.101:3306/                   root/123
    redis           http://192.168.150.101:6379/                   123321
    tomcat          /usr/local/src/tomcat  8080
    nginx           /usr/local/src/nginx   80

03.tianji_refer运行
    a.出错
        src/main/java/com/tianji/promotion/constants/DiscountType.java
        src/main/java/com/tianji/promotion/handler/CouponJobHandler.java
    b.界面
        http://192.168.150.101:18081     13500010002 / 123456 或 admin
        http://192.168.150.101:18082     13500010003 / 123456
    c.原型
        用户端:https://lanhuapp.com/link/#/invite?sid=qx0Fy3fa   密码: ZsP3
        管理端:https://lanhuapp.com/link/#/invite?sid=qx03viNU   密码: Ssml

2 我的课表:LearningLessonController

2.1 业务流程

2.2 业务实体

2.2.1 分页请求参数

2.2.2 分页结果

2.2.3 课程、用户、订单、课表

2.2.4 统一返回实体类:VO、PO

2.3 业务接口统计

2.3.1 添加课程到课表

2.3.2 分页查询我的课表

2.3.3 查询正在学习的课程

2.3.4 根据id查询指定课程的学习状态

2.4 实现业务接口

2.4.1 添加课程到课表

2.4.2 分页查询我的课表

2.4.3 查询正在学习的课程

2.4.4 查询指定课程信息

2.4.5 删除指定课程信息

2.4.6 统计课程的学习人数

2.4.7 校验当前课程是否已经报名

3 学习计划和进度:LearningRecordController

3.1 业务流程

3.2 业务接口统计

3.2.1 创建学习计划

3.2.2 查询学习记录

3.2.3 提交学习记录

3.2.4 查询我的学习计划

3.3 实现业务接口

3.3.1 创建学习计划

3.3.2 查询学习记录

3.3.3 提交学习记录

3.3.4 查询我的学习计划

4 高并发优化

4.1 高并发优化方案

4.2 播放进度记录方案改进

4.3 延迟任务

5 问答系统