|
@@ -21,7 +21,7 @@ type SqlData struct { |
|
@@ -21,7 +21,7 @@ type SqlData struct { |
21
|
AuditTemplateId int64 `orm:"column(audit_template_id)"`
|
21
|
AuditTemplateId int64 `orm:"column(audit_template_id)"`
|
22
|
ChanceTypeId int `orm:"column(chance_type_id)"`
|
22
|
ChanceTypeId int `orm:"column(chance_type_id)"`
|
23
|
PublishStatus int `orm:"column(publish_status)"`
|
23
|
PublishStatus int `orm:"column(publish_status)"`
|
24
|
- CreateAt time.Time `orm:"column(create_at);type(timestamp)"`
|
24
|
+ CreateAt string `orm:"column(create_at)`
|
25
|
ReviewStatus int8 `orm:"column(review_status)"`
|
25
|
ReviewStatus int8 `orm:"column(review_status)"`
|
26
|
Status int8 `orm:"column(status)"`
|
26
|
Status int8 `orm:"column(status)"`
|
27
|
DiscoveryScore string `orm:"column(discovery_score)"`
|
27
|
DiscoveryScore string `orm:"column(discovery_score)"`
|
|
@@ -277,7 +277,6 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
@@ -277,7 +277,6 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
277
|
return returnData, nil
|
277
|
return returnData, nil
|
278
|
}
|
278
|
}
|
279
|
for _, v := range data {
|
279
|
for _, v := range data {
|
280
|
- t := v.CreateAt.Unix()
|
|
|
281
|
item := protocol.RspAuditList{
|
280
|
item := protocol.RspAuditList{
|
282
|
Id: fmt.Sprint(v.Id),
|
281
|
Id: fmt.Sprint(v.Id),
|
283
|
Status: v.Status,
|
282
|
Status: v.Status,
|
|
@@ -290,12 +289,11 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
@@ -290,12 +289,11 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
290
|
DiscoveryScore: v.DiscoveryScore,
|
289
|
DiscoveryScore: v.DiscoveryScore,
|
291
|
CommentTotal: v.CommentTotal,
|
290
|
CommentTotal: v.CommentTotal,
|
292
|
UserName: v.NickName,
|
291
|
UserName: v.NickName,
|
|
|
292
|
+ CreateTime: 0,
|
293
|
}
|
293
|
}
|
294
|
-
|
|
|
295
|
- if t < 0 {
|
|
|
296
|
- item.CreateTime = 0
|
|
|
297
|
- } else {
|
|
|
298
|
- item.CreateTime = t
|
294
|
+ t, err := time.ParseInLocation("2006-01-02 15:04:05", v.CreateAt, time.Local)
|
|
|
295
|
+ if err == nil {
|
|
|
296
|
+ item.CreateTime = t.Unix()
|
299
|
}
|
297
|
}
|
300
|
if d, err := models.GetDepartmentById(v.DepartmentId); err == nil {
|
298
|
if d, err := models.GetDepartmentById(v.DepartmentId); err == nil {
|
301
|
item.Department = d.Name
|
299
|
item.Department = d.Name
|
|
@@ -350,8 +348,7 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
|
@@ -350,8 +348,7 @@ func GetChanceDetail(chanceid int64, companyid int64) (ResponseChanceInfo, error |
350
|
log.Error("机会的公司不匹配")
|
348
|
log.Error("机会的公司不匹配")
|
351
|
return returnData, protocol.NewErrWithMessage("1")
|
349
|
return returnData, protocol.NewErrWithMessage("1")
|
352
|
}
|
350
|
}
|
353
|
- returnData.CreateTime = chanceInfo.CreateAt.Format("2006-01-02 15:16:17")
|
|
|
354
|
-
|
351
|
+ returnData.CreateTime = chanceInfo.CreateAt
|
355
|
var (
|
352
|
var (
|
356
|
chanceContent []protocol.InputElement
|
353
|
chanceContent []protocol.InputElement
|
357
|
)
|
354
|
)
|
|
@@ -446,7 +443,7 @@ func AllowChanceEnableStatus(chanceid int64, companyid int64) error { |
|
@@ -446,7 +443,7 @@ func AllowChanceEnableStatus(chanceid int64, companyid int64) error { |
446
|
return nil
|
443
|
return nil
|
447
|
}
|
444
|
}
|
448
|
chanceinfo.Status = models.ChanceStatusAllow
|
445
|
chanceinfo.Status = models.ChanceStatusAllow
|
449
|
- chanceinfo.UpdateAt = time.Now()
|
446
|
+ chanceinfo.UpdateAt = time.Now().String()
|
450
|
err = models.UpdateChanceById(chanceinfo, []string{"Status", "UpdateAt"})
|
447
|
err = models.UpdateChanceById(chanceinfo, []string{"Status", "UpdateAt"})
|
451
|
if err != nil {
|
448
|
if err != nil {
|
452
|
log.Error("更新机会数据失败:%s", err)
|
449
|
log.Error("更新机会数据失败:%s", err)
|
|
@@ -470,7 +467,7 @@ func ForbidChanceEnableStatus(chanceid int64, companyid int64) error { |
|
@@ -470,7 +467,7 @@ func ForbidChanceEnableStatus(chanceid int64, companyid int64) error { |
470
|
return protocol.NewErrWithMessage("1")
|
467
|
return protocol.NewErrWithMessage("1")
|
471
|
}
|
468
|
}
|
472
|
chanceinfo.Status = models.ChanceStatusForbid
|
469
|
chanceinfo.Status = models.ChanceStatusForbid
|
473
|
- chanceinfo.UpdateAt = time.Now()
|
470
|
+ chanceinfo.UpdateAt = time.Now().String()
|
474
|
err = models.UpdateChanceById(chanceinfo, []string{"Status", "UpdateAt"})
|
471
|
err = models.UpdateChanceById(chanceinfo, []string{"Status", "UpdateAt"})
|
475
|
if err != nil {
|
472
|
if err != nil {
|
476
|
log.Error("更新机会数据失败:%s", err)
|
473
|
log.Error("更新机会数据失败:%s", err)
|