作者 陈志颖

test:测试导入

... ... @@ -29,6 +29,7 @@ require (
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/yudai/pp v2.0.1+incompatible // indirect
golang.org/x/tools v0.0.0-20200117065230-39095c1d176c
)
replace gitlab.fjmaimaimai.com/linmadan/mmm-worth => ../mmm-worth
... ...
... ... @@ -204,6 +204,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20200117065230-39095c1d176c h1:FodBYPZKH5tAN2O60HlglMwXGAeV/4k+NKbli79M/2c=
golang.org/x/tools v0.0.0-20200117065230-39095c1d176c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
... ...
... ... @@ -394,9 +394,12 @@ func (controller *SuMoneyController) ExchangeCashListRanking() {
// 导入兑换素币清单
func (controller *SuMoneyController) ImportExchangeList () {
cashPoolService := service.NewCashPoolService(nil)
importExchangeCashListCommand := &command.ImportExchangeCashListCommand{}
json.Unmarshal(controller.Ctx.Input.GetData("requestBody").([]byte), importExchangeCashListCommand)
//fmt.Printf("命令:%+v\n", importExchangeCashListCommand)
//importExchangeCashListCommand := &command.ImportExchangeCashListCommand{}
//json.Unmarshal(controller.Ctx.Input.GetData("requestBody").([]byte), importExchangeCashListCommand)
//fmt.Printf("命令:%+v\n", importExchangeCashListCommand.Where)
fmt.Print(controller.GetString("where"), "\n")
where := controller.GetString("where")
//fmt.Print(reflect.TypeOf(importExchangeCashListCommand.Where), "\n")
file, h, _ := controller.GetFile("file")
// 错误信息返回
... ... @@ -478,8 +481,9 @@ func (controller *SuMoneyController) ImportExchangeList () {
if i > 2 && len(row) > 1 {
// 创建兑换清单命令
createExchangeCashPersonCommand := &command.CreateExchangeCashPersonCommand{}
createExchangeCashPersonCommand.ExchangeCashActivityId ,err = strconv.ParseInt(importExchangeCashListCommand.Where["activityId"].(string), 10, 64)
createExchangeCashPersonCommand.Operator = importExchangeCashListCommand.Where["uid"].(int64)
//createExchangeCashPersonCommand.ExchangeCashActivityId = importExchangeCashListCommand.Where["activityId"].(int64)
createExchangeCashPersonCommand.ExchangeCashActivityId = int64(where[0])
createExchangeCashPersonCommand.Operator = int64(where[1])
createExchangeCashPersonCommand.PersonName = row[0]
createExchangeCashPersonCommand.PersonAccount = row[1]
r2, _ := strconv.ParseFloat(row[2], 64)
... ...