作者 陈志颖

fix:排行榜空档期

... ... @@ -128,3 +128,236 @@
}
2020/11/24 02:30:42.227 [D] [server.go:2843] <====Send RequestId:POST./statistics/employees-ranking-list.1606156242196619000 BodyData:{"code":0,"data":{"currentEmployeeContributions":{"Uid":3259769336137728,"EmployeeName":"杨志","EmployeesContributions":7232,"Ranking":3},"currentEmployeeWealth":{"Uid":3259769336137728,"EmployeeName":"杨志","EmployeeSuMoney":7032,"Ranking":3},"employeesContributions":[{"Uid":3259769335767040,"EmployeeName":"朱武","EmployeesContributions":88100,"Ranking":1},{"Uid":3259769336174592,"EmployeeName":"索超","EmployeesContributions":26217.3,"Ranking":2},{"Uid":3259769336137728,"EmployeeName":"杨志","EmployeesContributions":7232,"Ranking":3},{"Uid":3259769336070144,"EmployeeName":"杜迁","EmployeesContributions":3635,"Ranking":4},{"Uid":3259769336037376,"EmployeeName":"朱贵2","EmployeesContributions":3325,"Ranking":5},{"Uid":3259769336137728,"EmployeeName":"杨志358","EmployeesContributions":3309.8,"Ranking":6},{"Uid":3288265494991872,"EmployeeName":"李四","EmployeesContributions":10.5,"Ranking":7},{"Uid":3259769336317952,"EmployeeName":"陈达","EmployeesContributions":0,"Ran
2020/11/24 02:30:42.227 [D] [server.go:1925] | 127.0.0.1| 200 | 30.748579ms| match| POST  /statistics/employees-ranking-list r:/statistics/employees-ranking-list
2020/11/24 03:53:49.520 [I] [???:0] http server Running on http://:8082
2020/11/24 03:54:18.855 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./cash-pool/cash-pool?companyId=358.1606161258855407000
Auth=
BodyData:{}
2020/11/24 03:54:19.497 [D] [server.go:2843] <====Send RequestId:GET./cash-pool/cash-pool?companyId=358.1606161258855407000 BodyData:{"code":0,"data":{"cashPoolId":10,"cash":2001,"companyId":358,"exchangedCash":4,"unExchangeCash":1997,"exchangedSuMoney":3,"unExchangeSuMoney":3498567.67,"rate":1.33,"lastRate":0,"createTime":"2020-11-17T11:02:21.013016+08:00"},"msg":"ok"}
2020/11/24 03:54:19.497 [D] [server.go:1925] | 127.0.0.1| 200 | 642.39342ms| match| GET  /cash-pool/cash-pool r:/cash-pool/cash-pool
2020/11/24 03:54:27.681 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/input.1606161267681728000
Auth=
BodyData:{
"companyId": 358,
"cash": 2002
}
2020/11/24 03:54:27.805 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/input.1606161267681728000 BodyData:{"code":0,"data":{"cashPoolId":10,"cash":2002,"companyId":358,"exchangedCash":4,"unExchangeCash":1998,"exchangedSuMoney":3,"unExchangeSuMoney":3498567.67,"rate":1.33,"lastRate":2,"createTime":"2020-11-17T11:02:21.013016+08:00"},"msg":"ok"}
2020/11/24 03:54:27.805 [D] [server.go:1925] | 127.0.0.1| 200 | 124.15514ms| match| POST  /cash-pool/input r:/cash-pool/input
2020/11/24 08:40:45.612 [I] [???:0] http server Running on http://:8082
2020/11/24 08:41:29.222 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./list-interval/21.1606178489221999000
Auth=
BodyData:{}
2020/11/24 08:41:29.483 [D] [server.go:2843] <====Send RequestId:GET./list-interval/21.1606178489221999000 BodyData:{"code":0,"data":{"listIntervalId":21,"companyId":381,"intervalStartTime":"2020-12-18T00:00:00+08:00","intervalEndTime":"2020-12-20T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:41:29.483 [D] [server.go:1925] | 127.0.0.1| 200 | 262.139779ms| match| GET  /list-interval/21 r:/list-interval/:listId
2020/11/24 08:41:33.616 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./list-interval/?companyId=381&offset=0&limit=20.1606178493616396000
Auth=
BodyData:{}
2020/11/24 08:41:33.704 [D] [server.go:2843] <====Send RequestId:GET./list-interval/?companyId=381&offset=0&limit=20.1606178493616396000 BodyData:{"code":0,"data":{"count":3,"listIntervals":[{"listIntervalId":23,"companyId":381,"intervalStartTime":"2020-12-22T00:00:00+08:00","intervalEndTime":"2020-12-26T23:59:59+08:00"},{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},{"listIntervalId":21,"companyId":381,"intervalStartTime":"2020-12-18T00:00:00+08:00","intervalEndTime":"2020-12-20T23:59:59+08:00"}]},"msg":"ok"}
2020/11/24 08:41:33.705 [D] [server.go:1925] | 127.0.0.1| 200 | 88.61391ms| match| GET  /list-interval/ r:/list-interval/
2020/11/24 08:41:59.237 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178519237311000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-25T12:01:54.851528+08:00"
}
2020/11/24 08:41:59.353 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178519237311000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-25T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:41:59.353 [D] [server.go:1925] | 127.0.0.1| 200 | 116.777579ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:42:04.305 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178524305346000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-25T12:01:54.851528+08:00"
}
2020/11/24 08:42:04.371 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178524305346000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-25T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:42:04.371 [D] [server.go:1925] | 127.0.0.1| 200 | 66.630134ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:42:11.510 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178531510619000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:42:11.615 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178531510619000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:42:11.615 [D] [server.go:1925] | 127.0.0.1| 200 | 104.895896ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:42:14.993 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./list-interval/?companyId=381&offset=0&limit=20.1606178534993600000
Auth=
BodyData:{}
2020/11/24 08:42:15.023 [D] [server.go:2843] <====Send RequestId:GET./list-interval/?companyId=381&offset=0&limit=20.1606178534993600000 BodyData:{"code":0,"data":{"count":3,"listIntervals":[{"listIntervalId":23,"companyId":381,"intervalStartTime":"2020-12-22T00:00:00+08:00","intervalEndTime":"2020-12-26T23:59:59+08:00"},{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},{"listIntervalId":21,"companyId":381,"intervalStartTime":"2020-12-18T00:00:00+08:00","intervalEndTime":"2020-12-20T23:59:59+08:00"}]},"msg":"ok"}
2020/11/24 08:42:15.024 [D] [server.go:1925] | 127.0.0.1| 200 | 30.397914ms| match| GET  /list-interval/ r:/list-interval/
2020/11/24 08:43:30.440 [I] [???:0] http server Running on http://:8082
2020/11/24 08:43:32.650 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./list-interval/?companyId=381&offset=0&limit=20.1606178612650199000
Auth=
BodyData:{}
2020/11/24 08:43:32.670 [D] [server.go:2843] <====Send RequestId:GET./list-interval/?companyId=381&offset=0&limit=20.1606178612650199000 BodyData:{"code":0,"data":{"count":3,"listIntervals":[{"listIntervalId":23,"companyId":381,"intervalStartTime":"2020-12-22T00:00:00+08:00","intervalEndTime":"2020-12-26T23:59:59+08:00"},{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},{"listIntervalId":21,"companyId":381,"intervalStartTime":"2020-12-18T00:00:00+08:00","intervalEndTime":"2020-12-20T23:59:59+08:00"}]},"msg":"ok"}
2020/11/24 08:43:32.670 [D] [server.go:1925] | 127.0.0.1| 200 | 20.659754ms| match| GET  /list-interval/ r:/list-interval/
2020/11/24 08:43:41.752 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178621752702000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:43:41.867 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178621752702000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:43:41.867 [D] [server.go:1925] | 127.0.0.1| 200 | 114.585999ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:44:25.367 [I] [???:0] http server Running on http://:8082
2020/11/24 08:44:27.500 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178667500220000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:44:27.579 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178667500220000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:44:27.579 [D] [server.go:1925] | 127.0.0.1| 200 | 79.421661ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:45:29.235 [I] [???:0] http server Running on http://:8082
2020/11/24 08:45:59.373 [I] [???:0] http server Running on http://:8082
2020/11/24 08:46:03.531 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178763531785000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:46:03.858 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178763531785000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:46:03.858 [D] [server.go:1925] | 127.0.0.1| 200 | 327.217855ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:47:17.485 [I] [???:0] http server Running on http://:8082
2020/11/24 08:47:22.873 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178842873450000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:47:23.032 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178842873450000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:47:23.032 [D] [server.go:1925] | 127.0.0.1| 200 | 161.899362ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:49:33.327 [I] [???:0] http server Running on http://:8082
2020/11/24 08:49:35.954 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178975954467000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:49:36.068 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178975954467000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:49:36.068 [D] [server.go:1925] | 127.0.0.1| 200 | 114.414737ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:49:41.019 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178981019711000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-22T12:01:54.851528+08:00"
}
2020/11/24 08:49:41.269 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178981019711000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-22T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:49:41.269 [D] [server.go:1925] | 127.0.0.1| 200 | 249.576357ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:49:55.573 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178995572985000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-23T12:01:54.851528+08:00"
}
2020/11/24 08:49:55.581 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178995572985000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-23T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:49:55.581 [D] [server.go:1925] | 127.0.0.1| 200 | 8.288394ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:49:59.855 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178999855514000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-24T12:01:54.851528+08:00"
}
2020/11/24 08:49:59.969 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606178999855514000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-24T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:49:59.969 [D] [server.go:1925] | 127.0.0.1| 200 | 113.827234ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:51:32.367 [I] [???:0] http server Running on http://:8082
2020/11/24 08:51:38.465 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179098465325000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:51:38.540 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179098465325000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:51:38.540 [D] [server.go:1925] | 127.0.0.1| 200 | 75.368965ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:51:42.512 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179102512844000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-22T12:01:54.851528+08:00"
}
2020/11/24 08:51:42.800 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179102512844000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
2020/11/24 08:51:42.800 [D] [server.go:1925] | 127.0.0.1| 200 | 287.632247ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:51:47.218 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179107218077000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-23T12:01:54.851528+08:00"
}
2020/11/24 08:51:47.289 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179107218077000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
2020/11/24 08:51:47.290 [D] [server.go:1925] | 127.0.0.1| 200 | 72.340281ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:51:51.199 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179111199911000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:51:51.338 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179111199911000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:51:51.338 [D] [server.go:1925] | 127.0.0.1| 200 | 138.903569ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:51:52.245 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179112245538000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:51:52.324 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179112245538000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:51:52.324 [D] [server.go:1925] | 127.0.0.1| 200 | 78.985385ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:51:56.773 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179116773840000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-20T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:51:56.918 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179116773840000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
2020/11/24 08:51:56.919 [D] [server.go:1925] | 127.0.0.1| 200 | 145.246959ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:52:01.128 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179121128086000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:52:01.198 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179121128086000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:52:01.198 [D] [server.go:1925] | 127.0.0.1| 200 | 70.945481ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:52:30.694 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179150694338000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-27T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-29T12:01:54.851528+08:00"
}
2020/11/24 08:52:30.698 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179150694338000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
2020/11/24 08:52:30.698 [D] [server.go:1925] | 127.0.0.1| 200 | 4.050597ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:58:20.524 [I] [???:0] http server Running on http://:8082
2020/11/24 08:58:34.927 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179514927044000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-27T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-29T12:01:54.851528+08:00"
}
2020/11/24 08:58:35.222 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179514927044000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-27T00:00:00+08:00","intervalEndTime":"2020-12-29T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:58:35.222 [D] [server.go:1925] | 127.0.0.1| 200 | 295.365488ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:58:42.508 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179522508358000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
}
2020/11/24 08:58:42.544 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179522508358000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:58:42.545 [D] [server.go:1925] | 127.0.0.1| 200 | 36.728752ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:58:48.594 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179528594164000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-22T12:01:54.851528+08:00"
}
2020/11/24 08:58:48.681 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179528594164000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
2020/11/24 08:58:48.682 [D] [server.go:1925] | 127.0.0.1| 200 | 87.940142ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 08:59:19.573 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./list-interval/?companyId=381&offset=0&limit=20.1606179559573678000
Auth=
BodyData:{}
2020/11/24 08:59:19.718 [D] [server.go:2843] <====Send RequestId:GET./list-interval/?companyId=381&offset=0&limit=20.1606179559573678000 BodyData:{"code":0,"data":{"count":3,"listIntervals":[{"listIntervalId":23,"companyId":381,"intervalStartTime":"2020-12-22T00:00:00+08:00","intervalEndTime":"2020-12-26T23:59:59+08:00"},{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-21T00:00:00+08:00","intervalEndTime":"2020-12-21T23:59:59+08:00"},{"listIntervalId":21,"companyId":381,"intervalStartTime":"2020-12-18T00:00:00+08:00","intervalEndTime":"2020-12-20T23:59:59+08:00"}]},"msg":"ok"}
2020/11/24 08:59:19.718 [D] [server.go:1925] | 127.0.0.1| 200 | 145.289606ms| match| GET  /list-interval/ r:/list-interval/
2020/11/24 08:59:36.812 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179576812922000
Auth=
BodyData:{
"listIntervalStartTime": "2020-12-15T12:01:54.851528+08:00",
"listIntervalEndTime": "2020-12-16T12:01:54.851528+08:00"
}
2020/11/24 08:59:36.836 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179576812922000 BodyData:{"code":0,"data":{"listIntervalId":22,"companyId":381,"intervalStartTime":"2020-12-15T00:00:00+08:00","intervalEndTime":"2020-12-16T23:59:59+08:00"},"msg":"ok"}
2020/11/24 08:59:36.836 [D] [server.go:1925] | 127.0.0.1| 200 | 23.603024ms| match| PUT  /list-interval/22 r:/list-interval/:listId
2020/11/24 09:09:56.658 [I] [???:0] http server Running on http://:8082
... ...
... ... @@ -211,9 +211,6 @@ func (listIntervalService *ListIntervalService) UpdateListInterval(updateListInt
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(updateListIntervalCommand.ListIntervalId)))
}
//listIntervalFoundIntervalStartTime := listIntervalFound.IntervalStartTime.Local()
//listIntervalFoundIntervalEndTime := listIntervalFound.IntervalEndTime.Local()
// 获取榜单命令
listListIntervalQuery := &query.ListListIntervalQuery {
CompanyId: listIntervalFound.CompanyId,
... ... @@ -253,41 +250,22 @@ func (listIntervalService *ListIntervalService) UpdateListInterval(updateListInt
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
}
} else if currentListIntervalIndex != 0 { // 当前排行榜不在首位
fmt.Print(currentListIntervalIndex, "\n")
// 上一个年榜开始结束时间
lastIntervalStartTime := listIntervals[currentListIntervalIndex + 1].IntervalStartTime.Local()
lastIntervalEndTime := listIntervals[currentListIntervalIndex + 1].IntervalEndTime.Local()
fmt.Print(lastIntervalEndTime,"\n")
// 下一个年榜开始结束时间
nextIntervalStartTime := listIntervals[currentListIntervalIndex - 1].IntervalStartTime.Local()
fmt.Print(nextIntervalStartTime, "\n")
nextIntervalEndTime := listIntervals[currentListIntervalIndex - 1].IntervalEndTime.Local()
// 开始时间大于上一个年榜结束时间且结束时间大于下一个年榜开始时间
if startTime.Before(lastIntervalEndTime) && endTime.After(nextIntervalEndTime) {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
}
// 开始时间小于上一个年榜结束时间且结束时间小于下一个年榜开始时间
if startTime.Before(lastIntervalEndTime) && endTime.Before(nextIntervalStartTime) {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
}
// 开始时间小于上一个年榜结束时间且结束时间大于下一个年榜开始时间
if startTime.Before(lastIntervalEndTime) && endTime.After(nextIntervalStartTime) {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
}
// 开始时间大于下一个年榜开始时间
if startTime.After(nextIntervalStartTime) {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
}
// 开始时间大于下一个年榜开始时间且结束时间大于下一个年榜结束时间
if startTime.After(nextIntervalStartTime) && endTime.After(nextIntervalEndTime) {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
}
fmt.Print(startTime, "\n")
fmt.Print(endTime, "\n")
// 开始时间小于上一个年榜开始时间且结束时间小于上一个年榜结束时间
if startTime.Before(lastIntervalStartTime) && endTime.Before(lastIntervalEndTime) {
if startTime.After(lastIntervalStartTime) && startTime.Before(lastIntervalEndTime) || endTime.After(nextIntervalStartTime) && endTime.Before(nextIntervalEndTime) {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
}
}
... ...
... ... @@ -435,27 +435,27 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut
if len(listIntervals) == 0 { // 未配置年榜
timeNow := time.Now().Local()
contributionsWealthRankingQuery.StartTime = time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 0, 0, 0, time.Local)
contributionsWealthRankingQuery.EndTime = time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 0, 0, 0, time.Local)
contributionsWealthRankingQuery.EndTime = time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 23, 59, 59, 0, time.Local)
} else if len(listIntervals) == 1 { // 只配置了一个年榜
currentTime := time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)
if currentTime.Before(listIntervals[0].IntervalStartTime.Local()) && currentTime.After(listIntervals[0].IntervalEndTime.Local()) || currentTime.Equal(listIntervals[0].IntervalStartTime.Local()) || currentTime.Equal(listIntervals[0].IntervalEndTime.Local()) { // 当前时间在榜单内
currentTime := time.Now().Local()
if currentTime.After(listIntervals[0].IntervalStartTime.Local()) && currentTime.Before(listIntervals[0].IntervalEndTime.Local()) || currentTime.Equal(listIntervals[0].IntervalStartTime.Local()) || currentTime.Equal(listIntervals[0].IntervalEndTime.Local()) { // 当前时间在榜单内
contributionsWealthRankingQuery.StartTime = listIntervals[0].IntervalStartTime.Local()
contributionsWealthRankingQuery.EndTime = listIntervals[0].IntervalEndTime.Local()
} else { // 当前时间处于空档期
contributionsWealthRankingQuery.StartTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)
contributionsWealthRankingQuery.EndTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)
contributionsWealthRankingQuery.EndTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 23, 23, 23, 23, time.Local)
}
} else { // 配置了多个年榜
// 判断当前时间是否在榜单里
currentTime := time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)
currentTime := time.Now().Local()
for _, listInterval := range listIntervals {
if currentTime.Before(listInterval.IntervalStartTime.Local()) && currentTime.After(listInterval.IntervalEndTime.Local()) || currentTime.Equal(listInterval.IntervalStartTime.Local()) || currentTime.Equal(listInterval.IntervalEndTime.Local()) { // 当前时间在榜单内
if currentTime.After(listInterval.IntervalStartTime.Local()) && currentTime.Before(listInterval.IntervalEndTime.Local()) || currentTime.Equal(listInterval.IntervalStartTime.Local()) || currentTime.Equal(listInterval.IntervalEndTime.Local()) { // 当前时间在榜单内
contributionsWealthRankingQuery.StartTime = listInterval.IntervalStartTime.Local()
contributionsWealthRankingQuery.EndTime = listInterval.IntervalEndTime.Local()
break
} else { // 当前时间处于空档期
contributionsWealthRankingQuery.StartTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)
contributionsWealthRankingQuery.EndTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)
contributionsWealthRankingQuery.EndTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 23, 59, 59, 0, time.Local)
break
}
}
... ...
... ... @@ -155,9 +155,22 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co
}
// 更新现金池
newCashPool := &domain.CashPool{
//newCashPool := &domain.CashPool{
// CashPoolId: cashPools[0].CashPoolId,
// CompanyId: createCashPoolCommand.CompanyId,
// Cash: createCashPoolCommand.Cash,
// ExchangedCash: cashPools[0].ExchangedCash,
// UnExchangeCash: cashPools[0].UnExchangeCash + (createCashPoolCommand.Cash - cashPools[0].Cash),
// ExchangedSuMoney: systemExchangedSuMoney,
// UnExchangeSuMoney: systemUnExchangeSuMoney,
// Rate: newRate,
// LastRate: lastActivityRate,
// CreateTime: time.Now().Local(),
//}
// 更新现金池命令
updateCashPoolCommand := &command.UpdateCashPoolCommand{
CashPoolId: cashPools[0].CashPoolId,
CompanyId: createCashPoolCommand.CompanyId,
Cash: createCashPoolCommand.Cash,
ExchangedCash: cashPools[0].ExchangedCash,
UnExchangeCash: cashPools[0].UnExchangeCash + (createCashPoolCommand.Cash - cashPools[0].Cash),
... ... @@ -165,11 +178,15 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co
UnExchangeSuMoney: systemUnExchangeSuMoney,
Rate: newRate,
LastRate: lastActivityRate,
CreateTime: time.Now().Local(),
}
// 更新现金池
if err := cashPools[0].Update(tool_funs.SimpleStructToMap(updateCashPoolCommand)); err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
// 保存现金池更新
if cashPool, err := cashPoolRepository.Save(newCashPool); err != nil {
if cashPool, err := cashPoolRepository.Save(cashPools[0]); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
if err := transactionContext.CommitTransaction(); err != nil {
... ...