Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/partnermg into dev
正在显示
3 个修改的文件
包含
8 行增加
和
4 行删除
1 | package command | 1 | package command |
2 | 2 | ||
3 | -import "gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/lib" | 3 | +import ( |
4 | + "gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/lib" | ||
5 | +) | ||
4 | 6 | ||
5 | type UpdateOrderCommand struct { | 7 | type UpdateOrderCommand struct { |
6 | //id | 8 | //id |
@@ -41,5 +43,6 @@ func (command UpdateOrderCommand) ValidateCommand() error { | @@ -41,5 +43,6 @@ func (command UpdateOrderCommand) ValidateCommand() error { | ||
41 | if len(command.OrderRegion) == 0 { | 43 | if len(command.OrderRegion) == 0 { |
42 | return lib.ThrowError(lib.ARG_ERROR, "订单区域必填") | 44 | return lib.ThrowError(lib.ARG_ERROR, "订单区域必填") |
43 | } | 45 | } |
46 | + | ||
44 | return nil | 47 | return nil |
45 | } | 48 | } |
@@ -31,7 +31,7 @@ type Order struct { | @@ -31,7 +31,7 @@ type Order struct { | ||
31 | //订单已支付金额(货款) | 31 | //订单已支付金额(货款) |
32 | OrderPaymentAmount float64 | 32 | OrderPaymentAmount float64 |
33 | //最后分红状态 | 33 | //最后分红状态 |
34 | - BonusStatus int | 34 | + BonusStatus int `pg:",default:1"` |
35 | //订单区域信息 | 35 | //订单区域信息 |
36 | OrderRegionInfo domain.RegionInfo | 36 | OrderRegionInfo domain.RegionInfo |
37 | 37 | ||
@@ -51,6 +51,7 @@ type Order struct { | @@ -51,6 +51,7 @@ type Order struct { | ||
51 | 51 | ||
52 | //上一次查看时间 已读情况 | 52 | //上一次查看时间 已读情况 |
53 | LastViewTime time.Time | 53 | LastViewTime time.Time |
54 | + //最后分红状态 | ||
54 | } | 55 | } |
55 | 56 | ||
56 | var _ pg.BeforeUpdateHook = (*Order)(nil) | 57 | var _ pg.BeforeUpdateHook = (*Order)(nil) |
@@ -117,8 +117,8 @@ func (controller *BaseController) GetHeaderToken() string { | @@ -117,8 +117,8 @@ func (controller *BaseController) GetHeaderToken() string { | ||
117 | } | 117 | } |
118 | 118 | ||
119 | func (controller *BaseController) ValidJWTToken() bool { | 119 | func (controller *BaseController) ValidJWTToken() bool { |
120 | - controller.setUserId(2) | ||
121 | - return true | 120 | + // controller.setUserId(2) |
121 | + // return true | ||
122 | 122 | ||
123 | headerToken := controller.GetHeaderToken() | 123 | headerToken := controller.GetHeaderToken() |
124 | mytoken := new(lib.MyToken) | 124 | mytoken := new(lib.MyToken) |
-
请 注册 或 登录 后发表评论