Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

mall-portal接口/home/content返回的秒杀时间有误 #532

Open
yuki0320 opened this issue Mar 15, 2022 · 0 comments
Open

mall-portal接口/home/content返回的秒杀时间有误 #532

yuki0320 opened this issue Mar 15, 2022 · 0 comments

Comments

@yuki0320
Copy link

我在测试请求http://localhost:8085/home/content接口的时候,返回的homeFlashPromotion是这样的:

{
  "startTime": "1970-01-01T08:00:00.000+00:00",
  "endTime": "1970-01-01T09:00:00.000+00:00",
  "nextStartTime": "1970-01-01T10:00:00.000+00:00",
  "nextEndTime": "1970-01-01T11:00:00.000+00:00",
  ....
}

,我是按照你的教程用docker部署的,查看了docker的容器日志显示的是这样的:

{
  "method":"GET",
  "ip":"127.0.0.1",
  "description":"根据活动名称分页查询",
  "uri":"/flash/list",
  "url":"http://localhost:8085/flash/list",
  "result":{
  "code":200,
  "data":{
  "totalPage":1,
  "pageSize":5,
  "list":[
        {
          "endDate":1647360000000, //==> new Date(1647360000000) = Wed Mar 16 2022 00:00:00 GMT+0800 (中國標準時間)
          "title":"2022换季秒杀",
          "createTime":1647329507000,  //==> new Date(1647329507000) = Tue Mar 15 2022 15:31:47 GMT+0800 (中國標準時間)
          "id":14,
          "startDate":1647273600000, //==> new Date(1647273600000) = Tue Mar 15 2022 00:00:00 GMT+0800 (中國標準時間)
          "status":1
        }
      ],
      "pageNum":1,
      "total":1
    },
    "message":"操作成功"
    },
    "basePath":"http://localhost:8085",
    "parameter":[
        {
        "pageSize":5
        },
        {
        "pageNum":1
        }
    ],
  "startTime":1647330876502, //==> new Date(1647330876502) = Tue Mar 15 2022 15:54:36 GMT+0800 (中國標準時間)
  "username":"admin",
  "spendTime":3
}

在数据库中是这样的:

id title start_date end_date status create_time
14 2022换季秒杀 2022-03-15 2022-03-16 1 2022-03-15 15:31:47

容器启动脚本是按照你教程上写的:

docker run -p 8085:8085 --name ${app_name} \
--link mysql:db \
--link redis:redis \
--link mongo:mongo \
--link rabbitmq:rabbit \
-e TZ="Asia/Shanghai" \
-v /etc/localtime:/etc/localtime \
-v /mydata/app/${app_name}/logs:/var/logs \
-d mall/${app_name}:1.0-SNAPSHOT

不知道是不是我在其他地方配置有误,还请大佬抽空帮忙看看,不胜感激

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant