zhangqian
2023-08-24 01e85245b2fbf5147554d1cfdfe9809d2e68b05d
修改时间创建时间统一处理
7个文件已修改
109 ■■■■ 已修改文件
docs/docs.go 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/model.go 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceContract.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceFollowup.go 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceOrder.go 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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"
                }
            }
@@ -12755,7 +12773,9 @@
                    "type": "integer"
                },
                "createTime": {
                    "description": "创建时间",
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "file": {
@@ -12813,7 +12833,6 @@
                    "type": "integer"
                },
                "updateTime": {
                    "description": "修改时间",
                    "type": "string"
                }
            }
@@ -12850,6 +12869,12 @@
                "contactId": {
                    "description": "联系人id",
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "expectTime": {
                    "description": "希望处理时间",
@@ -12971,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"
                }
            }
@@ -12743,7 +12761,9 @@
                    "type": "integer"
                },
                "createTime": {
                    "description": "创建时间",
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "file": {
@@ -12801,7 +12821,6 @@
                    "type": "integer"
                },
                "updateTime": {
                    "description": "修改时间",
                    "type": "string"
                }
            }
@@ -12838,6 +12857,12 @@
                "contactId": {
                    "description": "联系人id",
                    "type": "integer"
                },
                "createTime": {
                    "type": "string"
                },
                "creatorName": {
                    "type": "string"
                },
                "expectTime": {
                    "description": "希望处理时间",
@@ -12959,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:
@@ -1761,7 +1773,8 @@
      contactId:
        type: integer
      createTime:
        description: 创建时间
        type: string
      creatorName:
        type: string
      file:
        type: string
@@ -1800,7 +1813,6 @@
      timelyRateId:
        type: integer
      updateTime:
        description: 修改时间
        type: string
    type: object
  model.ServiceOrder:
@@ -1829,6 +1841,10 @@
      contactId:
        description: 联系人id
        type: integer
      createTime:
        type: string
      creatorName:
        type: string
      expectTime:
        description: 希望处理时间
        type: string
@@ -1915,6 +1931,8 @@
      timeSpentId:
        description: 花费时间
        type: integer
      updateTime:
        type: string
    type: object
  model.ServiceOrderStatus:
    properties:
model/model.go
@@ -27,12 +27,14 @@
    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:"-"`
    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,9 +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:附件"`
        CreateTime     string       `json:"createTime"` //创建时间
        UpdateTime     string       `json:"updateTime"` //修改时间
        gorm.Model     `json:"-"`
        CrmModel
    }
    ServiceFollowupSearch struct {
@@ -52,12 +50,6 @@
func (*ServiceFollowup) TableName() string {
    return "service_followup"
}
func (slf *ServiceFollowup) AfterFind(db *gorm.DB) error {
    slf.CreateTime = slf.CreatedAt.Format("2006-01-02 15:04")
    slf.UpdateTime = slf.UpdatedAt.Format("2006-01-02 15:04")
    return nil
}
func NewServiceFollowupSearch() *ServiceFollowupSearch {
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"
}