...
|
...
|
@@ -153,6 +153,8 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
|
DiscoveryScore string `orm:"column(discovery_score)"`
|
|
|
CommentTotal string `orm:"column(comment_total)"`
|
|
|
Code string `orm:"column(code)"`
|
|
|
StoreType int8 `orm:"column(type)"`
|
|
|
ReserveTypeId int `orm:"column(reserve_type_id)"`
|
|
|
}
|
|
|
var (
|
|
|
datasql = strings.Builder{}
|
...
|
...
|
@@ -180,6 +182,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
|
s1 := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
|
|
|
,a.publish_status,a.create_at,a.review_status,a.status
|
|
|
,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
|
|
|
,a.type,a.reserve_type_id
|
|
|
FROM chance AS a
|
|
|
JOIN user_company AS c ON c.id = a.user_id
|
|
|
JOIN user AS d ON c.user_id = d.id
|
...
|
...
|
@@ -298,6 +301,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
|
CommentTotal: v.CommentTotal,
|
|
|
UserName: v.NickName,
|
|
|
CreateTime: 0,
|
|
|
ReserveType: "",
|
|
|
StoreType: v.StoreType,
|
|
|
StoreTypeName: models.ChanceStoreTypeMap[v.StoreType],
|
|
|
}
|
|
|
t, err := time.ParseInLocation("2006-01-02 15:04:05", v.CreateAt, time.Local)
|
|
|
if err == nil {
|
...
|
...
|
@@ -312,6 +318,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
|
if tp, err := models.GetAuditTemplateById(v.AuditTemplateId); err == nil {
|
|
|
item.TemplateName = tp.Name
|
|
|
}
|
|
|
if rt, err := models.GetChanceReserveTypeById(v.ReserveTypeId); err == nil {
|
|
|
item.ReserveType = rt.Name
|
|
|
}
|
|
|
returnData.List = append(returnData.List, item)
|
|
|
|
|
|
}
|
...
|
...
|
|