作者 yangfu

Merge branch 'test' of http://gitlab.fjmaimaimai.com/mmm-go/oppmg into test

... ... @@ -248,7 +248,8 @@ type ResponseAuditList struct {
type RspAuditList struct {
Id string `json:"id"` //机会的id
Code string `json:"code"`
TemplateCode string `json:"template_code"`
ChanceTypeCode string `json:"chance_type_code"`
ChanceType string `json:"chance_type"` //一级分类
TemplateName string `json:"template_name"` //二级分类
UserName string `json:"user_name"` // 提交人
... ...
... ... @@ -86,9 +86,15 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64
datasql.WriteString(s)
countsql.WriteString(s)
}
if param.CreateTimeBegin > 0 && param.CreateTimeEnd > 0 {
cond = append(cond, param.CreateTimeBegin, param.CreateTimeEnd)
s := ` AND (UNIX_TIMESTAMP(a.create_at) BETWEEN ? AND ? ) `
if param.CreateTimeBegin > 0 {
cond = append(cond, param.CreateTimeBegin)
s := ` AND UNIX_TIMESTAMP(a.create_at)>=? `
datasql.WriteString(s)
countsql.WriteString(s)
}
if param.CreateTimeEnd > 0 {
cond = append(cond, param.CreateTimeEnd)
s := ` AND UNIX_TIMESTAMP(a.create_at)<=? `
datasql.WriteString(s)
countsql.WriteString(s)
}
... ... @@ -123,7 +129,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64
PublishStatusName: models.ChancePublishStatusMap[v.PublishStatus],
ReviewStatus: v.ReviewStatus,
ReviewStatusName: models.ChanceReviewStatusMap[v.ReviewStatus],
Code: v.Code,
TemplateCode: v.Code,
TemplateName: v.TemplateName,
}
... ... @@ -140,6 +146,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64
}
if ct, err := models.GetChanceTypeById(v.ChanceTypeId); err == nil {
item.ChanceType = ct.Name
item.ChanceTypeCode = ct.Code
}
returnData.List = append(returnData.List, item)
... ...