wangfei 6 år sedan
förälder
incheckning
633e43c9a8
4 ändrade filer med 31 tillägg och 0 borttagningar
  1. 21
    0
      models/course/course.go
  2. 8
    0
      models/course/tag.go
  3. 1
    0
      models/message/image.go
  4. 1
    0
      models/model/ta_cms_images.go

+ 21
- 0
models/course/course.go Visa fil

@@ -0,0 +1,21 @@
1
+package course
2
+
3
+import (
4
+	"spaceofcheng/services/utils"
5
+
6
+	"github.com/go-xorm/xorm"
7
+)
8
+
9
+// CourseDAO 当前数据库操作对象
10
+type CourseDAO struct {
11
+	ctx *utils.Context
12
+	db  *xorm.Session
13
+}
14
+
15
+// NewCourseDAO New Inst
16
+func NewCourseDAO(ctx *utils.Context) *CourseDAO {
17
+	return &CourseDAO{
18
+		ctx: ctx,
19
+		db:  ctx.DB,
20
+	}
21
+}

+ 8
- 0
models/course/tag.go Visa fil

@@ -0,0 +1,8 @@
1
+package course
2
+
3
+import "spaceofcheng/services/models/model"
4
+
5
+// GetTageList 获取标签列表
6
+func (m *CourseDAO) GetTageList(caseid string) ([]model.TdCourseTag, error) {
7
+	return nil, nil
8
+}

+ 1
- 0
models/message/image.go Visa fil

@@ -65,6 +65,7 @@ func (m *MessageDAO) UpdateCmsImg(img model.TaCmsImages) error {
65 65
 		"foward_url",
66 66
 		"foward_resource_id",
67 67
 		"sort",
68
+		"title",
68 69
 	}
69 70
 	_, err := m.db.Cols(cols...).Where("image_id=?", img.ImageId).Update(img)
70 71
 	return err

+ 1
- 0
models/model/ta_cms_images.go Visa fil

@@ -6,6 +6,7 @@ import (
6 6
 
7 7
 type TaCmsImages struct {
8 8
 	ImageId          string    `xorm:"not null pk VARCHAR(64)"`
9
+	Title            string    `xorm:"VARCHAR(50)"`
9 10
 	LocationId       string    `xorm:"VARCHAR(64)"`
10 11
 	ImageUrl         string    `xorm:"VARCHAR(128)"`
11 12
 	ForwardType      string    `xorm:"comment('url:转跳链接,course:转跳课程') CHAR(32)"`