...
|
...
|
@@ -397,11 +397,16 @@ func (controller *SuMoneyController) ImportExchangeList () { |
|
|
//importExchangeCashListCommand := &command.ImportExchangeCashListCommand{}
|
|
|
//json.Unmarshal(controller.Ctx.Input.GetData("requestBody").([]byte), importExchangeCashListCommand)
|
|
|
//fmt.Printf("命令:%+v\n", importExchangeCashListCommand.Where)
|
|
|
fmt.Print(controller.GetString("where"), "\n")
|
|
|
//fmt.Print(controller.GetString("where"), "\n")
|
|
|
where := controller.GetString("where")
|
|
|
//fmt.Print(reflect.TypeOf(importExchangeCashListCommand.Where), "\n")
|
|
|
file, h, _ := controller.GetFile("file")
|
|
|
|
|
|
jsonMap := make(map[string]interface{})
|
|
|
err := json.Unmarshal([]byte(where), &jsonMap)
|
|
|
|
|
|
fmt.Print(jsonMap["activityId"])
|
|
|
|
|
|
// 错误信息返回
|
|
|
var response utils.JsonResponse
|
|
|
|
...
|
...
|
@@ -481,9 +486,8 @@ func (controller *SuMoneyController) ImportExchangeList () { |
|
|
if i > 2 && len(row) > 1 {
|
|
|
// 创建兑换清单命令
|
|
|
createExchangeCashPersonCommand := &command.CreateExchangeCashPersonCommand{}
|
|
|
//createExchangeCashPersonCommand.ExchangeCashActivityId = importExchangeCashListCommand.Where["activityId"].(int64)
|
|
|
createExchangeCashPersonCommand.ExchangeCashActivityId = int64(where[0])
|
|
|
createExchangeCashPersonCommand.Operator = int64(where[1])
|
|
|
createExchangeCashPersonCommand.ExchangeCashActivityId, _ = strconv.ParseInt(jsonMap["activityId"].(string), 10, 64 )
|
|
|
createExchangeCashPersonCommand.Operator = int64(jsonMap["uid"].(float64))
|
|
|
createExchangeCashPersonCommand.PersonName = row[0]
|
|
|
createExchangeCashPersonCommand.PersonAccount = row[1]
|
|
|
r2, _ := strconv.ParseFloat(row[2], 64)
|
...
|
...
|
|