|
@@ -31,6 +31,29 @@ type UserReadRecord struct {
|
|
|
ReportType int `description:"报告类型:1-普通研报;2-pdf研报"`
|
|
|
}
|
|
|
|
|
|
+type UserReadRecordView struct {
|
|
|
+ UserReadRecordId int `orm:"pk" description:"id"`
|
|
|
+ UserId int `description:"用户id"`
|
|
|
+ ReportId int `description:"报告id"`
|
|
|
+ ReportTitle string `description:"报告标题"`
|
|
|
+ // ChartPermissionId1 string `description:"一级品种id"`
|
|
|
+ // ChartPermissionId2 string `description:"二级品种id"`
|
|
|
+ ChartPermissionName string `description:"二级品种名称"`
|
|
|
+ ClassifyId1 int `description:"一级级分类id"`
|
|
|
+ ClassifyName1 string `description:"一级分类名称"`
|
|
|
+ ClassifyId2 int `description:"二级分类id"`
|
|
|
+ ClassifyName2 string `description:"二级分类名称"`
|
|
|
+ ClassifyId3 int `description:"三级分类id"`
|
|
|
+ ClassifyName3 string `description:"三级分类名称"`
|
|
|
+ Timestamp int `description:"阅读开始时间戳"`
|
|
|
+ EndTimestamp int `description:"阅读结束时间戳"`
|
|
|
+ CreateTime string `description:"创建时间"`
|
|
|
+ CreateDate string `description:"创建日期"`
|
|
|
+ StayTime string `description:"停留时间"`
|
|
|
+ StayTimestamp string `description:"停留时间戳"`
|
|
|
+ ReportType int `description:"报告类型:1-普通研报;2-pdf研报"`
|
|
|
+}
|
|
|
+
|
|
|
type ReadCntStaitc struct {
|
|
|
CreateDate string
|
|
|
Count int
|
|
@@ -42,7 +65,7 @@ type PermissionCntStaitc struct {
|
|
|
Percent float64
|
|
|
}
|
|
|
|
|
|
-func GetUserReadRecordByUserId(firstClassifyIds, secondClassifyIds, thirdClassifyIds []int, userId int, condition string, pars []interface{}, startSize, pageSize int) (items []*UserReadRecord, err error) {
|
|
|
+func GetUserReadRecordByUserId(firstClassifyIds, secondClassifyIds, thirdClassifyIds []int, userId int, condition string, pars []interface{}, startSize, pageSize int) (items []*UserReadRecordView, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT DISTINCT ur.user_read_record_id, ur.report_id, ur.report_title, ur.chart_permission_name, ur.classify_name2,
|
|
|
ur.create_time, ur.stay_time, ur.classify_id2, ur.classify_id3, ur.classify_name3, ur.classify_id1, ur.classify_name1
|