作者 陈志颖

test:活动截止时间筛选

@@ -89,9 +89,9 @@ func (repository *ExchangeCashActivityRepository) Find(queryOptions map[string]i @@ -89,9 +89,9 @@ func (repository *ExchangeCashActivityRepository) Find(queryOptions map[string]i
89 query = query.Where(`exchange_cash_activity.activity_name LIKE ?`, fmt.Sprintf("%%%s%%", activityNameMatch.(string))) 89 query = query.Where(`exchange_cash_activity.activity_name LIKE ?`, fmt.Sprintf("%%%s%%", activityNameMatch.(string)))
90 } 90 }
91 if deadline, ok := queryOptions["deadline"]; ok && deadline != "" { 91 if deadline, ok := queryOptions["deadline"]; ok && deadline != "" {
92 - t, _ := time.ParseInLocation("2006-01-02", deadline.(string), time.UTC)  
93 - newDeadlineStart := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.UTC)  
94 - newDeadlineEnd := time.Date(t.Year(), t.Month(), t.Day() + 1, 0, 0, 0, 0 - 1, time.UTC) 92 + t, _ := time.ParseInLocation("2006-01-02", deadline.(string), time.Local)
  93 + newDeadlineStart := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.Local)
  94 + newDeadlineEnd := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 0, time.Local)
95 query = query.Where(`exchange_cash_activity.deadline >= ?`, newDeadlineStart) 95 query = query.Where(`exchange_cash_activity.deadline >= ?`, newDeadlineStart)
96 query = query.Where(`exchange_cash_activity.deadline <= ?`, newDeadlineEnd) 96 query = query.Where(`exchange_cash_activity.deadline <= ?`, newDeadlineEnd)
97 } 97 }
@@ -396,19 +396,8 @@ func (controller *SuMoneyController) ExchangeCashListRanking() { @@ -396,19 +396,8 @@ func (controller *SuMoneyController) ExchangeCashListRanking() {
396 func (controller *SuMoneyController) ImportExchangeList () { 396 func (controller *SuMoneyController) ImportExchangeList () {
397 cashPoolService := service.NewCashPoolService(nil) 397 cashPoolService := service.NewCashPoolService(nil)
398 createExchangeCashPersonCommand := &command.CreateExchangeCashPersonCommand{} 398 createExchangeCashPersonCommand := &command.CreateExchangeCashPersonCommand{}
399 - //activityId, _ := controller.GetInt64("activityId")  
400 - //operator, _ := controller.GetInt64("operator")  
401 whereStr := controller.GetString("where") 399 whereStr := controller.GetString("where")
402 where, err := utils_tool.JsonToMap(whereStr) 400 where, err := utils_tool.JsonToMap(whereStr)
403 -  
404 - //var jsonBlob = []byte(whereStr)  
405 - //type Where struct {  
406 - // ActivityId string  
407 - // Uid string  
408 - //}  
409 - //var where Where  
410 - //err := json.Unmarshal(jsonBlob, where)  
411 - //fmt.Print(where, "\n")  
412 file, h, _ := controller.GetFile("file") 401 file, h, _ := controller.GetFile("file")
413 402
414 // 错误信息返回 403 // 错误信息返回