小编kar*_*aja的帖子

DESC 中的订单记录在 SequelizeJS 中不起作用

在我的应用程序中,我有 Products 表,其中包含各种类型的产品。在每条记录中都有列调用updateDetails,它是一个JSON具有以下属性的对象。

const updateDetails = { time: '2020-05-28T05:53:31.540Z', userId: 1, officeId: 2}
Run Code Online (Sandbox Code Playgroud)

但在产品表中的一些记录updateDetailsnull,将任何用户编辑的记录后更新。

我的示例数据库记录如下。

[
 { 
  name: 'Product 1', 
  type: 'a', 
  updateDetails: { time: '2020-05-28T05:53:31.540Z', userId: 1, officeId: 2 }
 },
 { 
  name: 'Product 2', 
  type: 'a', 
  updateDetails: null
 },
 { 
  name: 'Product 3', 
  type: 'a', 
  updateDetails: { time: '2020-05-27T05:53:31.540Z', userId: 1, officeId: 2 }
 },
 { 
  name: 'Product 4', 
  type: 'a', 
  updateDetails: null
 },
 { 
  name: 'Product 5', 
  type: 'a', …
Run Code Online (Sandbox Code Playgroud)

javascript postgresql node.js express sequelize.js

8
推荐指数
0
解决办法
208
查看次数

如何在Angular的HttpClient中使用reportProgress?

我正在使用HTTP POST方法下载文件。我想调用另一种方法来向最终用户显示下载进度,直到文件下载完成。如何使用reportProgressHttpClient此。

  downfile(file: any): Observable<any> {

    return this.http.post(this.url , app, {
      responseType: "blob", reportProgress: true, headers: new HttpHeaders(
        { 'Content-Type': 'application/json' },
      )
    });
  }
Run Code Online (Sandbox Code Playgroud)

httpclient angular angular7

5
推荐指数
1
解决办法
3587
查看次数