zhangqian
2023-08-24 d7aa0c40191ac24bdf7c546bbed52066a61e2033
Merge branch 'hotfix'
8个文件已修改
184 ■■■■■ 已修改文件
api/v1/serviceFollowup.go 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 36 ●●●●● 补丁 | 查看 | 原始文档 | 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
@@ -11845,6 +11845,14 @@
                    "description": "账户id",
                    "type": "integer"
                },
                "client": {
                    "description": "客户id",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.Client"
                        }
                    ]
                },
                "clientId": {
                    "description": "客户id",
                    "type": "integer"
@@ -12233,6 +12241,9 @@
                "signTime": {
                    "type": "string"
                },
                "updateTime": {
                    "type": "string"
                },
                "wechatOrderStatus": {
                    "$ref": "#/definitions/model.WechatOrderStatus"
                },
@@ -12386,6 +12397,9 @@
                            "$ref": "#/definitions/constvar.RefundSourceType"
                        }
                    ]
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12465,6 +12479,9 @@
                            "$ref": "#/definitions/constvar.SalesReturnSourceType"
                        }
                    ]
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12615,6 +12632,12 @@
                "contactId": {
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "endTime": {
                    "type": "string"
                },
@@ -12676,6 +12699,9 @@
                    "type": "string"
                },
                "terms": {
                    "type": "string"
                },
                "updateTime": {
                    "type": "string"
                }
            }
@@ -12746,6 +12772,12 @@
                "contactId": {
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "file": {
                    "type": "string"
                },
@@ -12799,6 +12831,9 @@
                },
                "timelyRateId": {
                    "type": "integer"
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12834,6 +12869,12 @@
                "contactId": {
                    "description": "联系人id",
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "expectTime": {
                    "description": "希望处理时间",
@@ -12955,6 +12996,9 @@
                "timeSpentId": {
                    "description": "花费时间",
                    "type": "integer"
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -13876,6 +13920,14 @@
                "bankAccountId": {
                    "description": "账户id",
                    "type": "integer"
                },
                "client": {
                    "description": "客户id",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.Client"
                        }
                    ]
                },
                "clientId": {
                    "description": "客户id",
@@ -16930,6 +16982,14 @@
                    "description": "账户id",
                    "type": "integer"
                },
                "client": {
                    "description": "客户id",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.Client"
                        }
                    ]
                },
                "clientId": {
                    "description": "客户id",
                    "type": "integer"
docs/swagger.json
@@ -11833,6 +11833,14 @@
                    "description": "账户id",
                    "type": "integer"
                },
                "client": {
                    "description": "客户id",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.Client"
                        }
                    ]
                },
                "clientId": {
                    "description": "客户id",
                    "type": "integer"
@@ -12221,6 +12229,9 @@
                "signTime": {
                    "type": "string"
                },
                "updateTime": {
                    "type": "string"
                },
                "wechatOrderStatus": {
                    "$ref": "#/definitions/model.WechatOrderStatus"
                },
@@ -12374,6 +12385,9 @@
                            "$ref": "#/definitions/constvar.RefundSourceType"
                        }
                    ]
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12453,6 +12467,9 @@
                            "$ref": "#/definitions/constvar.SalesReturnSourceType"
                        }
                    ]
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12603,6 +12620,12 @@
                "contactId": {
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "endTime": {
                    "type": "string"
                },
@@ -12664,6 +12687,9 @@
                    "type": "string"
                },
                "terms": {
                    "type": "string"
                },
                "updateTime": {
                    "type": "string"
                }
            }
@@ -12734,6 +12760,12 @@
                "contactId": {
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "file": {
                    "type": "string"
                },
@@ -12787,6 +12819,9 @@
                },
                "timelyRateId": {
                    "type": "integer"
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -12822,6 +12857,12 @@
                "contactId": {
                    "description": "联系人id",
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "expectTime": {
                    "description": "希望处理时间",
@@ -12943,6 +12984,9 @@
                "timeSpentId": {
                    "description": "花费时间",
                    "type": "integer"
                },
                "updateTime": {
                    "type": "string"
                }
            }
        },
@@ -13864,6 +13908,14 @@
                "bankAccountId": {
                    "description": "账户id",
                    "type": "integer"
                },
                "client": {
                    "description": "客户id",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.Client"
                        }
                    ]
                },
                "clientId": {
                    "description": "客户id",
@@ -16918,6 +16970,14 @@
                    "description": "账户id",
                    "type": "integer"
                },
                "client": {
                    "description": "客户id",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.Client"
                        }
                    ]
                },
                "clientId": {
                    "description": "客户id",
                    "type": "integer"
docs/swagger.yaml
@@ -1158,6 +1158,10 @@
      bankAccountId:
        description: 账户id
        type: integer
      client:
        allOf:
        - $ref: '#/definitions/model.Client'
        description: 客户id
      clientId:
        description: 客户id
        type: integer
@@ -1415,6 +1419,8 @@
        type: integer
      signTime:
        type: string
      updateTime:
        type: string
      wechatOrderStatus:
        $ref: '#/definitions/model.WechatOrderStatus'
      wechatOrderStatusId:
@@ -1517,6 +1523,8 @@
        allOf:
        - $ref: '#/definitions/constvar.RefundSourceType'
        description: 来源类型(1销售退货)
      updateTime:
        type: string
    type: object
  model.SalesReturn:
    properties:
@@ -1569,6 +1577,8 @@
        allOf:
        - $ref: '#/definitions/constvar.SalesReturnSourceType'
        description: 源单类型(1销售明细)
      updateTime:
        type: string
    type: object
  model.SalesReturnStatus:
    properties:
@@ -1670,6 +1680,10 @@
        $ref: '#/definitions/model.Contact'
      contactId:
        type: integer
      createTime:
        type: string
      creatorName:
        type: string
      endTime:
        type: string
      id:
@@ -1711,6 +1725,8 @@
      startTime:
        type: string
      terms:
        type: string
      updateTime:
        type: string
    type: object
  model.ServiceContractStatus:
@@ -1756,6 +1772,10 @@
        $ref: '#/definitions/model.Contact'
      contactId:
        type: integer
      createTime:
        type: string
      creatorName:
        type: string
      file:
        type: string
      id:
@@ -1792,6 +1812,8 @@
        $ref: '#/definitions/model.TimelyRate'
      timelyRateId:
        type: integer
      updateTime:
        type: string
    type: object
  model.ServiceOrder:
    properties:
@@ -1819,6 +1841,10 @@
      contactId:
        description: 联系人id
        type: integer
      createTime:
        type: string
      creatorName:
        type: string
      expectTime:
        description: 希望处理时间
        type: string
@@ -1905,6 +1931,8 @@
      timeSpentId:
        description: 花费时间
        type: integer
      updateTime:
        type: string
    type: object
  model.ServiceOrderStatus:
    properties:
@@ -2523,6 +2551,10 @@
      bankAccountId:
        description: 账户id
        type: integer
      client:
        allOf:
        - $ref: '#/definitions/model.Client'
        description: 客户id
      clientId:
        description: 客户id
        type: integer
@@ -4613,6 +4645,10 @@
      bankAccountId:
        description: 账户id
        type: integer
      client:
        allOf:
        - $ref: '#/definitions/model.Client'
        description: 客户id
      clientId:
        description: 客户id
        type: integer
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"
}