wangpengfei
2023-08-24 20f6ea1b89070f17b1d9f47e9c5e349f0c87c37d
Merge remote-tracking branch 'origin/master'
8个文件已修改
124 ■■■■■ 已修改文件
api/v1/serviceFollowup.go 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/model.go 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceContract.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceFollowup.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceOrder.go 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/serviceFollowup.go
@@ -132,7 +132,9 @@
//    @Summary    回访单管理列表
//    @Produce    application/json
//    @Param        object    body        request.GetServiceFollowupList    true    "参数"
//    @Success    200        {object}    contextx.Response{data=response.ServiceFollowupResponse}
//
// @Success    200        {object}    contextx.Response{data=response.ServiceFollowupResponse}
//
//    @Router        /api/serviceFollowup/list [post]
func (con *ServiceFollowupApi) List(c *gin.Context) {
    var params request.GetServiceFollowupList
docs/docs.go
@@ -12241,6 +12241,9 @@
                "signTime": {
                    "type": "string"
                },
                "updateTime": {
                    "type": "string"
                },
                "wechatOrderStatus": {
                    "$ref": "#/definitions/model.WechatOrderStatus"
                },
@@ -12394,6 +12397,9 @@
                            "$ref": "#/definitions/constvar.RefundSourceType"
                        }
                    ]
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12473,6 +12479,9 @@
                            "$ref": "#/definitions/constvar.SalesReturnSourceType"
                        }
                    ]
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12623,6 +12632,12 @@
                "contactId": {
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "endTime": {
                    "type": "string"
                },
@@ -12684,6 +12699,9 @@
                    "type": "string"
                },
                "terms": {
                    "type": "string"
                },
                "updateTime": {
                    "type": "string"
                }
            }
@@ -12754,6 +12772,12 @@
                "contactId": {
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "file": {
                    "type": "string"
                },
@@ -12807,6 +12831,9 @@
                },
                "timelyRateId": {
                    "type": "integer"
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12842,6 +12869,12 @@
                "contactId": {
                    "description": "联系人id",
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "expectTime": {
                    "description": "希望处理时间",
@@ -12963,6 +12996,9 @@
                "timeSpentId": {
                    "description": "花费时间",
                    "type": "integer"
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
docs/swagger.json
@@ -12229,6 +12229,9 @@
                "signTime": {
                    "type": "string"
                },
                "updateTime": {
                    "type": "string"
                },
                "wechatOrderStatus": {
                    "$ref": "#/definitions/model.WechatOrderStatus"
                },
@@ -12382,6 +12385,9 @@
                            "$ref": "#/definitions/constvar.RefundSourceType"
                        }
                    ]
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12461,6 +12467,9 @@
                            "$ref": "#/definitions/constvar.SalesReturnSourceType"
                        }
                    ]
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12611,6 +12620,12 @@
                "contactId": {
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "endTime": {
                    "type": "string"
                },
@@ -12672,6 +12687,9 @@
                    "type": "string"
                },
                "terms": {
                    "type": "string"
                },
                "updateTime": {
                    "type": "string"
                }
            }
@@ -12742,6 +12760,12 @@
                "contactId": {
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "file": {
                    "type": "string"
                },
@@ -12795,6 +12819,9 @@
                },
                "timelyRateId": {
                    "type": "integer"
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12830,6 +12857,12 @@
                "contactId": {
                    "description": "联系人id",
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "expectTime": {
                    "description": "希望处理时间",
@@ -12951,6 +12984,9 @@
                "timeSpentId": {
                    "description": "花费时间",
                    "type": "integer"
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
docs/swagger.yaml
@@ -1419,6 +1419,8 @@
        type: integer
      signTime:
        type: string
      updateTime:
        type: string
      wechatOrderStatus:
        $ref: '#/definitions/model.WechatOrderStatus'
      wechatOrderStatusId:
@@ -1521,6 +1523,8 @@
        allOf:
        - $ref: '#/definitions/constvar.RefundSourceType'
        description: 来源类型(1销售退货)
      updateTime:
        type: string
    type: object
  model.SalesReturn:
    properties:
@@ -1573,6 +1577,8 @@
        allOf:
        - $ref: '#/definitions/constvar.SalesReturnSourceType'
        description: 源单类型(1销售明细)
      updateTime:
        type: string
    type: object
  model.SalesReturnStatus:
    properties:
@@ -1674,6 +1680,10 @@
        $ref: '#/definitions/model.Contact'
      contactId:
        type: integer
      createTime:
        type: string
      creatorName:
        type: string
      endTime:
        type: string
      id:
@@ -1715,6 +1725,8 @@
      startTime:
        type: string
      terms:
        type: string
      updateTime:
        type: string
    type: object
  model.ServiceContractStatus:
@@ -1760,6 +1772,10 @@
        $ref: '#/definitions/model.Contact'
      contactId:
        type: integer
      createTime:
        type: string
      creatorName:
        type: string
      file:
        type: string
      id:
@@ -1796,6 +1812,8 @@
        $ref: '#/definitions/model.TimelyRate'
      timelyRateId:
        type: integer
      updateTime:
        type: string
    type: object
  model.ServiceOrder:
    properties:
@@ -1823,6 +1841,10 @@
      contactId:
        description: 联系人id
        type: integer
      createTime:
        type: string
      creatorName:
        type: string
      expectTime:
        description: 希望处理时间
        type: string
@@ -1909,6 +1931,8 @@
      timeSpentId:
        description: 花费时间
        type: integer
      updateTime:
        type: string
    type: object
  model.ServiceOrderStatus:
    properties:
model/model.go
@@ -25,14 +25,16 @@
type CrmModel struct {
    gorm.Model  `json:"-"`
    CreatorId   int       `json:"-" gorm:"column:creator_id;type:int;comment:创建人id"`
    Creator     User      `json:"-"  gorm:"foreignKey:CreatorId"`
    CreateTime  time.Time `json:"createTime"  gorm:"-"`
    CreatorName string    `json:"creatorName" gorm:"-"`
    CreatorId   int    `json:"-" gorm:"column:creator_id;type:int;comment:创建人id"`
    Creator     User   `json:"-"  gorm:"foreignKey:CreatorId"`
    CreateTime  string `json:"createTime"  gorm:"-"`
    UpdateTime  string `json:"updateTime"  gorm:"-"`
    CreatorName string `json:"creatorName" gorm:"-"`
}
func (slf *CrmModel) AfterFind(tx *gorm.DB) (err error) {
    slf.CreatorName = slf.Creator.Username
    slf.CreateTime = slf.CreatedAt
    slf.CreateTime = slf.CreatedAt.Format("2006-01-02 15:04")
    slf.UpdateTime = slf.UpdatedAt.Format("2006-01-02 15:04")
    return nil
}
model/serviceContract.go
@@ -42,7 +42,7 @@
        AmountUnInvoiced        decimal.Decimal       `gorm:"column:amount_not_invoiced;type:decimal(12,2);comment:未开票金额" json:"amountUnInvoiced"` // 未开票金额
        AmountTotal             decimal.Decimal       `gorm:"column:amount_total;type:decimal(12,2);comment:价税合计" json:"amountTotal"`              // 价税合计
        Products                []*Product            `json:"products" gorm:"many2many:service_contract_product;"`
        gorm.Model              `json:"-"`
        CrmModel
    }
    ServiceContractSearch struct {
@@ -58,7 +58,7 @@
    }
)
func (ServiceContract) TableName() string {
func (slf *ServiceContract) TableName() string {
    return "service_contract"
}
model/serviceFollowup.go
@@ -33,8 +33,7 @@
        OldMember      User         `json:"oldMember" gorm:"foreignKey:OldMemberId"`
        Remark         string       `json:"remark" gorm:"column:remark;type:text;comment:备注"`
        File           string       `json:"file" gorm:"column:file;type:varchar(255);comment:附件"`
        gorm.Model `json:"-"`
        CrmModel
    }
    ServiceFollowupSearch struct {
@@ -49,7 +48,7 @@
    }
)
func (ServiceFollowup) TableName() string {
func (*ServiceFollowup) TableName() string {
    return "service_followup"
}
model/serviceOrder.go
@@ -54,6 +54,7 @@
        Solution             string             `gorm:"column:solution;type:varchar(255);not null;default:'';comment:解决方法" json:"solution"`              // 解决方法
        SolutionRemark       string             `gorm:"column:solution_remark;type:varchar(255);not null;default:'';comment:内部备注" json:"solutionRemark"` // 内部备注
        Remark               string             `gorm:"column:remark;type:varchar(255);not null;default:'';comment:备注" json:"remark"`                    // 备注
        CrmModel
    }
    // ServiceOrderSearch 服务单搜索条件
@@ -69,7 +70,7 @@
    }
)
func (ServiceOrder) TableName() string {
func (slf *ServiceOrder) TableName() string {
    return "service_order"
}