正在显示
5 个修改的文件
包含
15 行增加
和
8 行删除
@@ -132,7 +132,8 @@ func OrderList(header *protocol.RequestHeader, request *protocol.DividendOrdersR | @@ -132,7 +132,8 @@ func OrderList(header *protocol.RequestHeader, request *protocol.DividendOrdersR | ||
132 | EndTime: request.EndTime, | 132 | EndTime: request.EndTime, |
133 | Offset: request.PageIndex * request.PageSize, | 133 | Offset: request.PageIndex * request.PageSize, |
134 | Limit: request.PageSize, | 134 | Limit: request.PageSize, |
135 | - SortByUpdateTime: domain.DESC, | 135 | + //SortByUpdateTime: domain.DESC, |
136 | + SortByCreateTime: domain.DESC, | ||
136 | JoinWays: request.JoinWays, | 137 | JoinWays: request.JoinWays, |
137 | }) | 138 | }) |
138 | if err != nil { | 139 | if err != nil { |
@@ -197,7 +197,8 @@ func List(header *protocol.RequestHeader, request *protocol.OrderListRequest) (r | @@ -197,7 +197,8 @@ func List(header *protocol.RequestHeader, request *protocol.OrderListRequest) (r | ||
197 | queryOption := &domain.OrderQueryOption{ | 197 | queryOption := &domain.OrderQueryOption{ |
198 | Limit: request.PageSize, | 198 | Limit: request.PageSize, |
199 | Offset: request.PageSize * request.PageIndex, | 199 | Offset: request.PageSize * request.PageIndex, |
200 | - SortByUpdateTime: domain.DESC, | 200 | + //SortByUpdateTime: domain.DESC, |
201 | + SortByCreateTime: domain.DESC, | ||
201 | PartnerId: request.PartnerId, | 202 | PartnerId: request.PartnerId, |
202 | PartnerCategoryId: request.JoinWay, | 203 | PartnerCategoryId: request.JoinWay, |
203 | OrderType: request.OrderType, | 204 | OrderType: request.OrderType, |
@@ -2,11 +2,11 @@ package constant | @@ -2,11 +2,11 @@ package constant | ||
2 | 2 | ||
3 | import "os" | 3 | import "os" |
4 | 4 | ||
5 | -var POSTGRESQL_DB_NAME = "partner_dev" //partner | ||
6 | -var POSTGRESQL_USER = "postgres" // | ||
7 | -var POSTGRESQL_PASSWORD = "eagle1010" //pgsql@123 | ||
8 | -var POSTGRESQL_HOST = "114.55.200.59" //127.0.0.1 | ||
9 | -var POSTGRESQL_PORT = "31543" //5432 | 5 | +var POSTGRESQL_DB_NAME = "partner_dev" //partner_test/partner_dev |
6 | +var POSTGRESQL_USER = "postgres" //postgres | ||
7 | +var POSTGRESQL_PASSWORD = "eagle1010" //pgsql@123/1993618jack | ||
8 | +var POSTGRESQL_HOST = "114.55.200.59" //127.0.0.1/114.55.200.59 | ||
9 | +var POSTGRESQL_PORT = "31543" //5432/31543 | ||
10 | var DISABLE_CREATE_TABLE = true | 10 | var DISABLE_CREATE_TABLE = true |
11 | var DISABLE_SQL_GENERATE_PRINT = false | 11 | var DISABLE_SQL_GENERATE_PRINT = false |
12 | 12 |
@@ -174,6 +174,7 @@ type DividendOrdersQueryOption struct { | @@ -174,6 +174,7 @@ type DividendOrdersQueryOption struct { | ||
174 | Offset int `json:"offset,omitempty"` | 174 | Offset int `json:"offset,omitempty"` |
175 | Limit int `json:"limit,omitempty"` | 175 | Limit int `json:"limit,omitempty"` |
176 | SortByUpdateTime string `json:"sortByUpdateTime,omitempty"` | 176 | SortByUpdateTime string `json:"sortByUpdateTime,omitempty"` |
177 | + SortByCreateTime string `json:"sortByCreateTime,omitempty"` | ||
177 | JoinWays []*company.JoinWays `json:"joinWays,omitempty"` // 合伙类型 | 178 | JoinWays []*company.JoinWays `json:"joinWays,omitempty"` // 合伙类型 |
178 | } | 179 | } |
179 | 180 |
@@ -144,7 +144,11 @@ func (dao *OrderBaseDao) DividendOrders(option *domain.DividendOrdersQueryOption | @@ -144,7 +144,11 @@ func (dao *OrderBaseDao) DividendOrders(option *domain.DividendOrdersQueryOption | ||
144 | q.Offset(option.Offset) | 144 | q.Offset(option.Offset) |
145 | } | 145 | } |
146 | if len(option.SortByUpdateTime) > 0 { | 146 | if len(option.SortByUpdateTime) > 0 { |
147 | - q.Order(fmt.Sprintf("order_base.id %v", option.SortByUpdateTime)) | 147 | + //q.Order(fmt.Sprintf("order_base.id %v", option.SortByUpdateTime)) |
148 | + q.Order(fmt.Sprintf("order_base.update_time %v", option.SortByUpdateTime)) | ||
149 | + } | ||
150 | + if len(option.SortByCreateTime) > 0 { | ||
151 | + q.Order(fmt.Sprintf("order_base.create_time %v", option.SortByCreateTime)) | ||
148 | } | 152 | } |
149 | count, err = q.Distinct().SelectAndCount() | 153 | count, err = q.Distinct().SelectAndCount() |
150 | for i := range orders { | 154 | for i := range orders { |
-
请 注册 或 登录 后发表评论