zjxpcyc 6 anni fa
parent
commit
f31e00b292

+ 8
- 6
models/model/sys_case_user.go Vedi File

@@ -5,12 +5,14 @@ import (
5 5
 )
6 6
 
7 7
 type SysCaseUser struct {
8
-	CaseUserId string    `xorm:"not null pk VARCHAR(64)"`
9
-	OrgId      string    `xorm:"VARCHAR(64)"`
10
-	CaseId     string    `xorm:"VARCHAR(64)"`
11
-	UserName   string    `xorm:"VARCHAR(50)"`
12
-	Tel        string    `xorm:"VARCHAR(50)"`
13
-	UserType   string    `xorm:"comment('案场管理员 咖啡师 消息收发员') VARCHAR(20)"`
8
+	CaseUserId string `xorm:"not null pk VARCHAR(64)"`
9
+	OrgId      string `xorm:"VARCHAR(64)"`
10
+	CaseId     string `xorm:"VARCHAR(64)"`
11
+	UserName   string `xorm:"VARCHAR(50)"`
12
+	Tel        string `xorm:"VARCHAR(50)"`
13
+	UserType   string `xorm:"comment('案场管理员
14
+            咖啡师
15
+            消息收发员') VARCHAR(20)"`
14 16
 	Status     int       `xorm:"SMALLINT(6)"`
15 17
 	CreateDate time.Time `xorm:"DATETIME"`
16 18
 }

+ 1
- 1
models/model/sys_tag_case.go Vedi File

@@ -2,5 +2,5 @@ package model
2 2
 
3 3
 type SysTagCase struct {
4 4
 	TagId  string `xorm:"not null pk VARCHAR(64)"`
5
-	CaseId string `xorm:"VARCHAR(64)"`
5
+	CaseId string `xorm:"not null pk VARCHAR(64)"`
6 6
 }

+ 1
- 1
models/model/sys_user_case.go Vedi File

@@ -8,8 +8,8 @@ type SysUserCase struct {
8 8
 	UserId     string    `xorm:"not null pk VARCHAR(64)"`
9 9
 	CaseId     string    `xorm:"not null pk VARCHAR(64)"`
10 10
 	CaseName   string    `xorm:"VARCHAR(100)"`
11
-	IsCreated  int       `xorm:"TINYINT(1)"`
12 11
 	IsBelong   int       `xorm:"TINYINT(1)"`
12
+	IsCreated  int       `xorm:"TINYINT(1)"`
13 13
 	Status     int       `xorm:"SMALLINT(6)"`
14 14
 	CreateDate time.Time `xorm:"DATETIME"`
15 15
 }

+ 21
- 15
models/model/ta_account_change.go Vedi File

@@ -5,19 +5,25 @@ import (
5 5
 )
6 6
 
7 7
 type TaAccountChange struct {
8
-	DetailId     string    `xorm:"not null pk VARCHAR(64)"`
9
-	AccountId    string    `xorm:"VARCHAR(64)"`
10
-	CustomerId   string    `xorm:"VARCHAR(64)"`
11
-	CustomerName string    `xorm:"VARCHAR(50)"`
12
-	OrgId        string    `xorm:"VARCHAR(64)"`
13
-	CaseId       string    `xorm:"VARCHAR(64)"`
14
-	ChangeType   string    `xorm:"comment('integral 积分 amount 城币') VARCHAR(20)"`
15
-	ChangeSource string    `xorm:"comment('vip vip卡充值 orders 订单消费 register 注册 perfect 完善资料 recommend 推荐') VARCHAR(20)"`
16
-	SourceId     string    `xorm:"VARCHAR(64)"`
17
-	SourceName   string    `xorm:"VARCHAR(255)"`
18
-	Amount       string    `xorm:"DECIMAL(8,2)"`
19
-	FloatType    string    `xorm:"comment('+ -') VARCHAR(5)"`
20
-	CreateDate   time.Time `xorm:"DATETIME"`
21
-	CreateUser   string    `xorm:"VARCHAR(64)"`
22
-	Status       int       `xorm:"SMALLINT(6)"`
8
+	DetailId     string `xorm:"not null pk VARCHAR(64)"`
9
+	AccountId    string `xorm:"VARCHAR(64)"`
10
+	CustomerId   string `xorm:"VARCHAR(64)"`
11
+	CustomerName string `xorm:"VARCHAR(50)"`
12
+	OrgId        string `xorm:"VARCHAR(64)"`
13
+	CaseId       string `xorm:"VARCHAR(64)"`
14
+	ChangeType   string `xorm:"comment('integral 积分
15
+            amount 城币') VARCHAR(20)"`
16
+	ChangeSource string `xorm:"comment('vip vip卡充值
17
+            orders 订单消费
18
+            register 注册
19
+            perfect 完善资料
20
+            recommend 推荐') VARCHAR(20)"`
21
+	SourceId   string `xorm:"VARCHAR(64)"`
22
+	SourceName string `xorm:"VARCHAR(255)"`
23
+	Amount     string `xorm:"DECIMAL(8,2)"`
24
+	FloatType  string `xorm:"comment('+
25
+            -') VARCHAR(5)"`
26
+	CreateDate time.Time `xorm:"DATETIME"`
27
+	CreateUser string    `xorm:"VARCHAR(64)"`
28
+	Status     int       `xorm:"SMALLINT(6)"`
23 29
 }

+ 0
- 1
models/model/ta_case_key.go Vedi File

@@ -11,5 +11,4 @@ type TaCaseKey struct {
11 11
 	CreateDate time.Time `xorm:"DATETIME"`
12 12
 	OrgId      string    `xorm:"VARCHAR(64)"`
13 13
 	CaseId     string    `xorm:"VARCHAR(64)"`
14
-	LockNo     int       `xorm:"SMALLINT(6)"`
15 14
 }

+ 3
- 2
models/model/ta_cms_case_image.go Vedi File

@@ -5,6 +5,7 @@ type TaCmsCaseImage struct {
5 5
 	CmsCaseId      string `xorm:"VARCHAR(64)"`
6 6
 	CaseImageUrl   string `xorm:"TEXT"`
7 7
 	Status         int    `xorm:"SMALLINT(6)"`
8
-	ImageType      string `xorm:"comment('cover:封面 detail:详情') VARCHAR(32)"`
9
-	Sort           int    `xorm:"INT(11)"`
8
+	ImageType      string `xorm:"comment('cover:封面
9
+            detail:详情') VARCHAR(32)"`
10
+	Sort int `xorm:"INT(11)"`
10 11
 }

+ 28
- 0
models/model/ta_coupon_card2.go Vedi File

@@ -0,0 +1,28 @@
1
+package model
2
+
3
+import (
4
+	"time"
5
+)
6
+
7
+type TaCouponCard2 struct {
8
+	CardId           string    `xorm:"not null pk VARCHAR(64)"`
9
+	CardTypeId       string    `xorm:"VARCHAR(64)"`
10
+	SendType         int       `xorm:"comment('0案场 1渠道') SMALLINT(6)"`
11
+	VideoUrl         string    `xorm:"TEXT"`
12
+	CoverUrl         string    `xorm:"TEXT"`
13
+	Price            float32   `xorm:"FLOAT(64)"`
14
+	StartDate        time.Time `xorm:"DATETIME"`
15
+	EndDate          time.Time `xorm:"DATETIME"`
16
+	ShareDescription string    `xorm:"VARCHAR(255)"`
17
+	RuleDescription  string    `xorm:"VARCHAR(400)"`
18
+	UseDescription   string    `xorm:"TEXT"`
19
+	TotalCount       int       `xorm:"INT(11)"`
20
+	SentCount        int       `xorm:"INT(11)"`
21
+	UsedCount        int       `xorm:"INT(11)"`
22
+	Status           int       `xorm:"comment('0未发布 1发布 2过期') SMALLINT(6)"`
23
+	CaseId           string    `xorm:"VARCHAR(64)"`
24
+	OrgId            string    `xorm:"VARCHAR(64)"`
25
+	CreateDate       time.Time `xorm:"DATETIME"`
26
+	CreateUser       string    `xorm:"VARCHAR(64)"`
27
+	IsOver           int       `xorm:"TINYINT(1)"`
28
+}

+ 3
- 1
models/model/ta_coupon_card_target.go Vedi File

@@ -2,6 +2,8 @@ package model
2 2
 
3 3
 type TaCouponCardTarget struct {
4 4
 	TargetId   string `xorm:"not null pk VARCHAR(64)"`
5
-	CouponId   string `xorm:"VARCHAR(64)"`
5
+	CardId     string `xorm:"VARCHAR(64)"`
6
+	DetailId   string `xorm:"VARCHAR(64)"`
6 7
 	TargetName string `xorm:"VARCHAR(255)"`
8
+	CardState  string `xorm:"VARCHAR(64)"`
7 9
 }

+ 7
- 0
models/model/ta_coupon_card_target2.go Vedi File

@@ -0,0 +1,7 @@
1
+package model
2
+
3
+type TaCouponCardTarget2 struct {
4
+	TargetId   string `xorm:"not null pk VARCHAR(64)"`
5
+	CardId     string `xorm:"VARCHAR(64)"`
6
+	TargetName string `xorm:"VARCHAR(255)"`
7
+}

+ 1
- 0
models/model/ta_customer_card.go Vedi File

@@ -16,4 +16,5 @@ type TaCustomerCard struct {
16 16
 	VerifyDate       time.Time `xorm:"DATETIME"`
17 17
 	CaseId           string    `xorm:"VARCHAR(64)"`
18 18
 	OrgId            string    `xorm:"VARCHAR(64)"`
19
+	VerifyStatus     string    `xorm:"VARCHAR(32)"`
19 20
 }

+ 4
- 0
models/model/ta_customer_course.go Vedi File

@@ -20,4 +20,8 @@ type TaCustomerCourse struct {
20 20
 	Address          string    `xorm:"VARCHAR(200)"`
21 21
 	CourseDate       string    `xorm:"VARCHAR(200)"`
22 22
 	Remark           string    `xorm:"TEXT"`
23
+	CourseObtaimType string    `xorm:"VARCHAR(32)"`
24
+	SourceId         string    `xorm:"VARCHAR(64)"`
25
+	Status           int       `xorm:"SMALLINT(6)"`
26
+	IsDone           int       `xorm:"TINYINT(1)"`
23 27
 }

+ 19
- 0
models/model/ta_customer_course_detail.go Vedi File

@@ -0,0 +1,19 @@
1
+package model
2
+
3
+import (
4
+	"time"
5
+)
6
+
7
+type TaCustomerCourseDetail struct {
8
+	CustomerDetailId string    `xorm:"not null pk VARCHAR(64)"`
9
+	CustomerCourseId string    `xorm:"VARCHAR(64)"`
10
+	CourseId         string    `xorm:"VARCHAR(64)"`
11
+	DetailId         string    `xorm:"VARCHAR(64)"`
12
+	StartDate        time.Time `xorm:"DATETIME"`
13
+	EndDate          time.Time `xorm:"DATETIME"`
14
+	VerifyStatus     string    `xorm:"VARCHAR(32)"`
15
+	VerifyDate       time.Time `xorm:"DATETIME"`
16
+	VerifyUser       string    `xorm:"VARCHAR(64)"`
17
+	CaseId           string    `xorm:"VARCHAR(64)"`
18
+	Status           int       `xorm:"SMALLINT(6)"`
19
+}

+ 25
- 0
models/model/ta_experience_card.go Vedi File

@@ -0,0 +1,25 @@
1
+package model
2
+
3
+import (
4
+	"time"
5
+)
6
+
7
+type TaExperienceCard struct {
8
+	CardId     string    `xorm:"not null pk VARCHAR(64)"`
9
+	CardTypeId string    `xorm:"VARCHAR(64)"`
10
+	SendType   string    `xorm:"comment('0案场 1渠道') VARCHAR(32)"`
11
+	VideoUrl   string    `xorm:"TEXT"`
12
+	CoverUrl   string    `xorm:"TEXT"`
13
+	Price      float32   `xorm:"FLOAT(64)"`
14
+	StartDate  time.Time `xorm:"DATETIME"`
15
+	EndDate    time.Time `xorm:"DATETIME"`
16
+	TotalCount int       `xorm:"INT(11)"`
17
+	SentCount  int       `xorm:"INT(11)"`
18
+	UsedCount  int       `xorm:"INT(11)"`
19
+	Status     string    `xorm:"comment('private未发布 public发布 over过期') VARCHAR(32)"`
20
+	CaseId     string    `xorm:"VARCHAR(64)"`
21
+	OrgId      string    `xorm:"VARCHAR(64)"`
22
+	CreateDate time.Time `xorm:"DATETIME"`
23
+	CreateUser string    `xorm:"VARCHAR(64)"`
24
+	IsOver     int       `xorm:"TINYINT(1)"`
25
+}

+ 1
- 0
models/model/ta_experience_card_verification.go Vedi File

@@ -7,6 +7,7 @@ import (
7 7
 type TaExperienceCardVerification struct {
8 8
 	ExperienceCardVerifyId   string    `xorm:"not null pk VARCHAR(64)"`
9 9
 	CustomerCardId           string    `xorm:"VARCHAR(64)"`
10
+	TargetId                 string    `xorm:"VARCHAR(64)"`
10 11
 	ExperienceCardVerifyTime time.Time `xorm:"DATETIME"`
11 12
 	ExperienceCardVerifyCase string    `xorm:"VARCHAR(64)"`
12 13
 	Status                   int       `xorm:"SMALLINT(6)"`

+ 1
- 1
models/model/ta_forbid_user.go Vedi File

@@ -8,7 +8,7 @@ type TaForbidUser struct {
8 8
 	ForbidId   string    `xorm:"not null pk VARCHAR(64)"`
9 9
 	UserId     string    `xorm:"VARCHAR(64)"`
10 10
 	UserType   string    `xorm:"VARCHAR(64)"`
11
-	ForbidType string    `xorm:"VARCHAR(20)"`
11
+	ForbidType string    `xorm:"comment('order 订单  coupon 卡券') VARCHAR(20)"`
12 12
 	BeginDate  time.Time `xorm:"DATETIME"`
13 13
 	EndDate    time.Time `xorm:"DATETIME"`
14 14
 	Status     int       `xorm:"SMALLINT(6)"`

+ 22
- 21
models/model/ta_goods_orders.go Vedi File

@@ -5,25 +5,26 @@ import (
5 5
 )
6 6
 
7 7
 type TaGoodsOrders struct {
8
-	OrdersId     string    `xorm:"not null pk VARCHAR(64)"`
9
-	OrdersNo     string    `xorm:"VARCHAR(32)"`
10
-	OrgId        string    `xorm:"VARCHAR(64)"`
11
-	CaseId       string    `xorm:"VARCHAR(64)"`
12
-	AreaId       string    `xorm:"VARCHAR(64)"`
13
-	AreaName     string    `xorm:"VARCHAR(50)"`
14
-	TableId      string    `xorm:"VARCHAR(64)"`
15
-	TableNo      string    `xorm:"VARCHAR(50)"`
16
-	Amount       string    `xorm:"DECIMAL(8,2)"`
17
-	CreateDate   time.Time `xorm:"DATETIME"`
18
-	Status       int       `xorm:"SMALLINT(6)"`
19
-	PayType      string    `xorm:"comment('vip VIP卡城币抵用 coupon 优惠券抵用') VARCHAR(20)"`
20
-	UserType     string    `xorm:"VARCHAR(20)"`
21
-	UserId       string    `xorm:"VARCHAR(64)"`
22
-	UserName     string    `xorm:"VARCHAR(50)"`
23
-	OrdersNum    int       `xorm:"INT(11)"`
24
-	Remark       string    `xorm:"TEXT"`
25
-	IsPay        int       `xorm:"TINYINT(1)"`
26
-	ActualAmount string    `xorm:"DECIMAL(8,2)"`
27
-	CouponAmount string    `xorm:"DECIMAL(8,2)"`
28
-	MakeStatus   string    `xorm:"VARCHAR(20)"`
8
+	OrdersId   string    `xorm:"not null pk VARCHAR(64)"`
9
+	OrdersNo   string    `xorm:"VARCHAR(32)"`
10
+	OrgId      string    `xorm:"VARCHAR(64)"`
11
+	CaseId     string    `xorm:"VARCHAR(64)"`
12
+	AreaId     string    `xorm:"VARCHAR(64)"`
13
+	AreaName   string    `xorm:"VARCHAR(50)"`
14
+	TableId    string    `xorm:"VARCHAR(64)"`
15
+	TableNo    string    `xorm:"VARCHAR(50)"`
16
+	Amount     string    `xorm:"DECIMAL(8,2)"`
17
+	CreateDate time.Time `xorm:"DATETIME"`
18
+	Status     int       `xorm:"SMALLINT(6)"`
19
+	PayType    string    `xorm:"comment('vip VIP卡城币抵用
20
+            coupon 优惠券抵用') VARCHAR(20)"`
21
+	UserType     string `xorm:"VARCHAR(20)"`
22
+	UserId       string `xorm:"VARCHAR(64)"`
23
+	UserName     string `xorm:"VARCHAR(50)"`
24
+	OrdersNum    int    `xorm:"INT(11)"`
25
+	Remark       string `xorm:"TEXT"`
26
+	IsPay        int    `xorm:"TINYINT(1)"`
27
+	ActualAmount string `xorm:"DECIMAL(8,2)"`
28
+	CouponAmount string `xorm:"DECIMAL(8,2)"`
29
+	MakeStatus   string `xorm:"VARCHAR(20)"`
29 30
 }

+ 14
- 0
models/model/ta_stop_user.go Vedi File

@@ -0,0 +1,14 @@
1
+package model
2
+
3
+import (
4
+	"time"
5
+)
6
+
7
+type TaStopUser struct {
8
+	StopId    string    `xorm:"not null pk VARCHAR(64)"`
9
+	UserId    string    `xorm:"VARCHAR(64)"`
10
+	UserType  string    `xorm:"VARCHAR(64)"`
11
+	StopType  int       `xorm:"SMALLINT(6)"`
12
+	BeginDate time.Time `xorm:"DATETIME"`
13
+	EndDate   time.Time `xorm:"DATETIME"`
14
+}

+ 6
- 4
models/model/ta_user_mapping.go Vedi File

@@ -1,10 +1,12 @@
1 1
 package model
2 2
 
3 3
 type TaUserMapping struct {
4
-	MappingId   string `xorm:"not null pk VARCHAR(64)"`
5
-	UserId      string `xorm:"VARCHAR(64)"`
6
-	UserType    string `xorm:"comment('customer 为会员 user 为后台用户') VARCHAR(50)"`
7
-	AccountType string `xorm:"comment('wechat 微信公众号 mini 小程序') VARCHAR(50)"`
4
+	MappingId string `xorm:"not null pk VARCHAR(64)"`
5
+	UserId    string `xorm:"VARCHAR(64)"`
6
+	UserType  string `xorm:"comment('customer 为会员
7
+            user 为后台用户') VARCHAR(50)"`
8
+	AccountType string `xorm:"comment('wechat 微信公众号
9
+            mini 小程序') VARCHAR(50)"`
8 10
 	Openid      string `xorm:"VARCHAR(200)"`
9 11
 	Uuid        string `xorm:"VARCHAR(200)"`
10 12
 	AccountInfo string `xorm:"TEXT"`

+ 5
- 0
service/course/order.go Vedi File

@@ -0,0 +1,5 @@
1
+package course
2
+
3
+func (s *CourseServ) Order() error {
4
+
5
+}