作者 陈志颖

test:活动截止时间筛选

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