作者 陈志颖

fix:排行榜空档期

@@ -128,3 +128,236 @@ @@ -128,3 +128,236 @@
128 } 128 }
129 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 129 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
130 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 130 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
  131 +2020/11/24 03:53:49.520 [I] [???:0] http server Running on http://:8082
  132 +2020/11/24 03:54:18.855 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./cash-pool/cash-pool?companyId=358.1606161258855407000
  133 + Auth=
  134 + BodyData:{}
  135 +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"}
  136 +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
  137 +2020/11/24 03:54:27.681 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/input.1606161267681728000
  138 + Auth=
  139 + BodyData:{
  140 + "companyId": 358,
  141 + "cash": 2002
  142 +}
  143 +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"}
  144 +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
  145 +2020/11/24 08:40:45.612 [I] [???:0] http server Running on http://:8082
  146 +2020/11/24 08:41:29.222 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./list-interval/21.1606178489221999000
  147 + Auth=
  148 + BodyData:{}
  149 +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"}
  150 +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
  151 +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
  152 + Auth=
  153 + BodyData:{}
  154 +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"}
  155 +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/
  156 +2020/11/24 08:41:59.237 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178519237311000
  157 + Auth=
  158 + BodyData:{
  159 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  160 + "listIntervalEndTime": "2020-12-25T12:01:54.851528+08:00"
  161 +}
  162 +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"}
  163 +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
  164 +2020/11/24 08:42:04.305 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178524305346000
  165 + Auth=
  166 + BodyData:{
  167 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  168 + "listIntervalEndTime": "2020-12-25T12:01:54.851528+08:00"
  169 +}
  170 +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"}
  171 +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
  172 +2020/11/24 08:42:11.510 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178531510619000
  173 + Auth=
  174 + BodyData:{
  175 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  176 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  177 +}
  178 +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"}
  179 +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
  180 +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
  181 + Auth=
  182 + BodyData:{}
  183 +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"}
  184 +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/
  185 +2020/11/24 08:43:30.440 [I] [???:0] http server Running on http://:8082
  186 +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
  187 + Auth=
  188 + BodyData:{}
  189 +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"}
  190 +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/
  191 +2020/11/24 08:43:41.752 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178621752702000
  192 + Auth=
  193 + BodyData:{
  194 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  195 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  196 +}
  197 +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"}
  198 +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
  199 +2020/11/24 08:44:25.367 [I] [???:0] http server Running on http://:8082
  200 +2020/11/24 08:44:27.500 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178667500220000
  201 + Auth=
  202 + BodyData:{
  203 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  204 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  205 +}
  206 +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"}
  207 +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
  208 +2020/11/24 08:45:29.235 [I] [???:0] http server Running on http://:8082
  209 +2020/11/24 08:45:59.373 [I] [???:0] http server Running on http://:8082
  210 +2020/11/24 08:46:03.531 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178763531785000
  211 + Auth=
  212 + BodyData:{
  213 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  214 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  215 +}
  216 +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"}
  217 +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
  218 +2020/11/24 08:47:17.485 [I] [???:0] http server Running on http://:8082
  219 +2020/11/24 08:47:22.873 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178842873450000
  220 + Auth=
  221 + BodyData:{
  222 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  223 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  224 +}
  225 +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"}
  226 +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
  227 +2020/11/24 08:49:33.327 [I] [???:0] http server Running on http://:8082
  228 +2020/11/24 08:49:35.954 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178975954467000
  229 + Auth=
  230 + BodyData:{
  231 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  232 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  233 +}
  234 +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"}
  235 +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
  236 +2020/11/24 08:49:41.019 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178981019711000
  237 + Auth=
  238 + BodyData:{
  239 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  240 + "listIntervalEndTime": "2020-12-22T12:01:54.851528+08:00"
  241 +}
  242 +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"}
  243 +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
  244 +2020/11/24 08:49:55.573 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178995572985000
  245 + Auth=
  246 + BodyData:{
  247 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  248 + "listIntervalEndTime": "2020-12-23T12:01:54.851528+08:00"
  249 +}
  250 +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"}
  251 +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
  252 +2020/11/24 08:49:59.855 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606178999855514000
  253 + Auth=
  254 + BodyData:{
  255 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  256 + "listIntervalEndTime": "2020-12-24T12:01:54.851528+08:00"
  257 +}
  258 +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"}
  259 +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
  260 +2020/11/24 08:51:32.367 [I] [???:0] http server Running on http://:8082
  261 +2020/11/24 08:51:38.465 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179098465325000
  262 + Auth=
  263 + BodyData:{
  264 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  265 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  266 +}
  267 +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"}
  268 +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
  269 +2020/11/24 08:51:42.512 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179102512844000
  270 + Auth=
  271 + BodyData:{
  272 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  273 + "listIntervalEndTime": "2020-12-22T12:01:54.851528+08:00"
  274 +}
  275 +2020/11/24 08:51:42.800 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179102512844000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
  276 +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
  277 +2020/11/24 08:51:47.218 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179107218077000
  278 + Auth=
  279 + BodyData:{
  280 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  281 + "listIntervalEndTime": "2020-12-23T12:01:54.851528+08:00"
  282 +}
  283 +2020/11/24 08:51:47.289 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179107218077000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
  284 +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
  285 +2020/11/24 08:51:51.199 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179111199911000
  286 + Auth=
  287 + BodyData:{
  288 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  289 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  290 +}
  291 +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"}
  292 +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
  293 +2020/11/24 08:51:52.245 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179112245538000
  294 + Auth=
  295 + BodyData:{
  296 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  297 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  298 +}
  299 +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"}
  300 +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
  301 +2020/11/24 08:51:56.773 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179116773840000
  302 + Auth=
  303 + BodyData:{
  304 + "listIntervalStartTime": "2020-12-20T12:01:54.851528+08:00",
  305 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  306 +}
  307 +2020/11/24 08:51:56.918 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179116773840000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
  308 +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
  309 +2020/11/24 08:52:01.128 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179121128086000
  310 + Auth=
  311 + BodyData:{
  312 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  313 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  314 +}
  315 +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"}
  316 +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
  317 +2020/11/24 08:52:30.694 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179150694338000
  318 + Auth=
  319 + BodyData:{
  320 + "listIntervalStartTime": "2020-12-27T12:01:54.851528+08:00",
  321 + "listIntervalEndTime": "2020-12-29T12:01:54.851528+08:00"
  322 +}
  323 +2020/11/24 08:52:30.698 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179150694338000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
  324 +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
  325 +2020/11/24 08:58:20.524 [I] [???:0] http server Running on http://:8082
  326 +2020/11/24 08:58:34.927 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179514927044000
  327 + Auth=
  328 + BodyData:{
  329 + "listIntervalStartTime": "2020-12-27T12:01:54.851528+08:00",
  330 + "listIntervalEndTime": "2020-12-29T12:01:54.851528+08:00"
  331 +}
  332 +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"}
  333 +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
  334 +2020/11/24 08:58:42.508 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179522508358000
  335 + Auth=
  336 + BodyData:{
  337 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  338 + "listIntervalEndTime": "2020-12-21T12:01:54.851528+08:00"
  339 +}
  340 +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"}
  341 +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
  342 +2020/11/24 08:58:48.594 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179528594164000
  343 + Auth=
  344 + BodyData:{
  345 + "listIntervalStartTime": "2020-12-21T12:01:54.851528+08:00",
  346 + "listIntervalEndTime": "2020-12-22T12:01:54.851528+08:00"
  347 +}
  348 +2020/11/24 08:58:48.681 [D] [server.go:2843] <====Send RequestId:PUT./list-interval/22.1606179528594164000 BodyData:{"code":501,"msg":"内部服务出错:年榜时间不能重叠"}
  349 +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
  350 +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
  351 + Auth=
  352 + BodyData:{}
  353 +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"}
  354 +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/
  355 +2020/11/24 08:59:36.812 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./list-interval/22.1606179576812922000
  356 + Auth=
  357 + BodyData:{
  358 + "listIntervalStartTime": "2020-12-15T12:01:54.851528+08:00",
  359 + "listIntervalEndTime": "2020-12-16T12:01:54.851528+08:00"
  360 +}
  361 +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"}
  362 +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
  363 +2020/11/24 09:09:56.658 [I] [???:0] http server Running on http://:8082
@@ -211,9 +211,6 @@ func (listIntervalService *ListIntervalService) UpdateListInterval(updateListInt @@ -211,9 +211,6 @@ func (listIntervalService *ListIntervalService) UpdateListInterval(updateListInt
211 return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(updateListIntervalCommand.ListIntervalId))) 211 return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(updateListIntervalCommand.ListIntervalId)))
212 } 212 }
213 213
214 - //listIntervalFoundIntervalStartTime := listIntervalFound.IntervalStartTime.Local()  
215 - //listIntervalFoundIntervalEndTime := listIntervalFound.IntervalEndTime.Local()  
216 -  
217 // 获取榜单命令 214 // 获取榜单命令
218 listListIntervalQuery := &query.ListListIntervalQuery { 215 listListIntervalQuery := &query.ListListIntervalQuery {
219 CompanyId: listIntervalFound.CompanyId, 216 CompanyId: listIntervalFound.CompanyId,
@@ -253,41 +250,22 @@ func (listIntervalService *ListIntervalService) UpdateListInterval(updateListInt @@ -253,41 +250,22 @@ func (listIntervalService *ListIntervalService) UpdateListInterval(updateListInt
253 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠") 250 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
254 } 251 }
255 } else if currentListIntervalIndex != 0 { // 当前排行榜不在首位 252 } else if currentListIntervalIndex != 0 { // 当前排行榜不在首位
  253 + fmt.Print(currentListIntervalIndex, "\n")
  254 +
256 // 上一个年榜开始结束时间 255 // 上一个年榜开始结束时间
257 lastIntervalStartTime := listIntervals[currentListIntervalIndex + 1].IntervalStartTime.Local() 256 lastIntervalStartTime := listIntervals[currentListIntervalIndex + 1].IntervalStartTime.Local()
258 lastIntervalEndTime := listIntervals[currentListIntervalIndex + 1].IntervalEndTime.Local() 257 lastIntervalEndTime := listIntervals[currentListIntervalIndex + 1].IntervalEndTime.Local()
  258 + fmt.Print(lastIntervalEndTime,"\n")
259 259
260 // 下一个年榜开始结束时间 260 // 下一个年榜开始结束时间
261 nextIntervalStartTime := listIntervals[currentListIntervalIndex - 1].IntervalStartTime.Local() 261 nextIntervalStartTime := listIntervals[currentListIntervalIndex - 1].IntervalStartTime.Local()
  262 + fmt.Print(nextIntervalStartTime, "\n")
262 nextIntervalEndTime := listIntervals[currentListIntervalIndex - 1].IntervalEndTime.Local() 263 nextIntervalEndTime := listIntervals[currentListIntervalIndex - 1].IntervalEndTime.Local()
263 264
264 - // 开始时间大于上一个年榜结束时间且结束时间大于下一个年榜开始时间  
265 - if startTime.Before(lastIntervalEndTime) && endTime.After(nextIntervalEndTime) {  
266 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")  
267 - }  
268 -  
269 - // 开始时间小于上一个年榜结束时间且结束时间小于下一个年榜开始时间  
270 - if startTime.Before(lastIntervalEndTime) && endTime.Before(nextIntervalStartTime) {  
271 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")  
272 - }  
273 -  
274 - // 开始时间小于上一个年榜结束时间且结束时间大于下一个年榜开始时间  
275 - if startTime.Before(lastIntervalEndTime) && endTime.After(nextIntervalStartTime) {  
276 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")  
277 - }  
278 -  
279 - // 开始时间大于下一个年榜开始时间  
280 - if startTime.After(nextIntervalStartTime) {  
281 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")  
282 - }  
283 -  
284 - // 开始时间大于下一个年榜开始时间且结束时间大于下一个年榜结束时间  
285 - if startTime.After(nextIntervalStartTime) && endTime.After(nextIntervalEndTime) {  
286 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")  
287 - } 265 + fmt.Print(startTime, "\n")
  266 + fmt.Print(endTime, "\n")
288 267
289 - // 开始时间小于上一个年榜开始时间且结束时间小于上一个年榜结束时间  
290 - if startTime.Before(lastIntervalStartTime) && endTime.Before(lastIntervalEndTime) { 268 + if startTime.After(lastIntervalStartTime) && startTime.Before(lastIntervalEndTime) || endTime.After(nextIntervalStartTime) && endTime.Before(nextIntervalEndTime) {
291 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠") 269 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "年榜时间不能重叠")
292 } 270 }
293 } 271 }
@@ -435,27 +435,27 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut @@ -435,27 +435,27 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut
435 if len(listIntervals) == 0 { // 未配置年榜 435 if len(listIntervals) == 0 { // 未配置年榜
436 timeNow := time.Now().Local() 436 timeNow := time.Now().Local()
437 contributionsWealthRankingQuery.StartTime = time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 0, 0, 0, time.Local) 437 contributionsWealthRankingQuery.StartTime = time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 0, 0, 0, time.Local)
438 - contributionsWealthRankingQuery.EndTime = time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 0, 0, 0, time.Local) 438 + contributionsWealthRankingQuery.EndTime = time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 23, 59, 59, 0, time.Local)
439 } else if len(listIntervals) == 1 { // 只配置了一个年榜 439 } else if len(listIntervals) == 1 { // 只配置了一个年榜
440 - currentTime := time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)  
441 - 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()) { // 当前时间在榜单内 440 + currentTime := time.Now().Local()
  441 + 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()) { // 当前时间在榜单内
442 contributionsWealthRankingQuery.StartTime = listIntervals[0].IntervalStartTime.Local() 442 contributionsWealthRankingQuery.StartTime = listIntervals[0].IntervalStartTime.Local()
443 contributionsWealthRankingQuery.EndTime = listIntervals[0].IntervalEndTime.Local() 443 contributionsWealthRankingQuery.EndTime = listIntervals[0].IntervalEndTime.Local()
444 } else { // 当前时间处于空档期 444 } else { // 当前时间处于空档期
445 contributionsWealthRankingQuery.StartTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local) 445 contributionsWealthRankingQuery.StartTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)
446 - contributionsWealthRankingQuery.EndTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local) 446 + contributionsWealthRankingQuery.EndTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 23, 23, 23, 23, time.Local)
447 } 447 }
448 } else { // 配置了多个年榜 448 } else { // 配置了多个年榜
449 // 判断当前时间是否在榜单里 449 // 判断当前时间是否在榜单里
450 - currentTime := time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local) 450 + currentTime := time.Now().Local()
451 for _, listInterval := range listIntervals { 451 for _, listInterval := range listIntervals {
452 - if currentTime.Before(listInterval.IntervalStartTime.Local()) && currentTime.After(listInterval.IntervalEndTime.Local()) || currentTime.Equal(listInterval.IntervalStartTime.Local()) || currentTime.Equal(listInterval.IntervalEndTime.Local()) { // 当前时间在榜单内 452 + if currentTime.After(listInterval.IntervalStartTime.Local()) && currentTime.Before(listInterval.IntervalEndTime.Local()) || currentTime.Equal(listInterval.IntervalStartTime.Local()) || currentTime.Equal(listInterval.IntervalEndTime.Local()) { // 当前时间在榜单内
453 contributionsWealthRankingQuery.StartTime = listInterval.IntervalStartTime.Local() 453 contributionsWealthRankingQuery.StartTime = listInterval.IntervalStartTime.Local()
454 contributionsWealthRankingQuery.EndTime = listInterval.IntervalEndTime.Local() 454 contributionsWealthRankingQuery.EndTime = listInterval.IntervalEndTime.Local()
455 break 455 break
456 } else { // 当前时间处于空档期 456 } else { // 当前时间处于空档期
457 contributionsWealthRankingQuery.StartTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local) 457 contributionsWealthRankingQuery.StartTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local)
458 - contributionsWealthRankingQuery.EndTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 0, 0, 0, 0, time.Local) 458 + contributionsWealthRankingQuery.EndTime = time.Date(time.Now().Local().Year(), time.Now().Local().Month(), time.Now().Local().Day(), 23, 59, 59, 0, time.Local)
459 break 459 break
460 } 460 }
461 } 461 }
@@ -155,9 +155,22 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co @@ -155,9 +155,22 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co
155 } 155 }
156 156
157 // 更新现金池 157 // 更新现金池
158 - newCashPool := &domain.CashPool{ 158 + //newCashPool := &domain.CashPool{
  159 + // CashPoolId: cashPools[0].CashPoolId,
  160 + // CompanyId: createCashPoolCommand.CompanyId,
  161 + // Cash: createCashPoolCommand.Cash,
  162 + // ExchangedCash: cashPools[0].ExchangedCash,
  163 + // UnExchangeCash: cashPools[0].UnExchangeCash + (createCashPoolCommand.Cash - cashPools[0].Cash),
  164 + // ExchangedSuMoney: systemExchangedSuMoney,
  165 + // UnExchangeSuMoney: systemUnExchangeSuMoney,
  166 + // Rate: newRate,
  167 + // LastRate: lastActivityRate,
  168 + // CreateTime: time.Now().Local(),
  169 + //}
  170 +
  171 + // 更新现金池命令
  172 + updateCashPoolCommand := &command.UpdateCashPoolCommand{
159 CashPoolId: cashPools[0].CashPoolId, 173 CashPoolId: cashPools[0].CashPoolId,
160 - CompanyId: createCashPoolCommand.CompanyId,  
161 Cash: createCashPoolCommand.Cash, 174 Cash: createCashPoolCommand.Cash,
162 ExchangedCash: cashPools[0].ExchangedCash, 175 ExchangedCash: cashPools[0].ExchangedCash,
163 UnExchangeCash: cashPools[0].UnExchangeCash + (createCashPoolCommand.Cash - cashPools[0].Cash), 176 UnExchangeCash: cashPools[0].UnExchangeCash + (createCashPoolCommand.Cash - cashPools[0].Cash),
@@ -165,11 +178,15 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co @@ -165,11 +178,15 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co
165 UnExchangeSuMoney: systemUnExchangeSuMoney, 178 UnExchangeSuMoney: systemUnExchangeSuMoney,
166 Rate: newRate, 179 Rate: newRate,
167 LastRate: lastActivityRate, 180 LastRate: lastActivityRate,
168 - CreateTime: time.Now().Local(), 181 + }
  182 +
  183 + // 更新现金池
  184 + if err := cashPools[0].Update(tool_funs.SimpleStructToMap(updateCashPoolCommand)); err != nil {
  185 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
169 } 186 }
170 187
171 // 保存现金池更新 188 // 保存现金池更新
172 - if cashPool, err := cashPoolRepository.Save(newCashPool); err != nil { 189 + if cashPool, err := cashPoolRepository.Save(cashPools[0]); err != nil {
173 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 190 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
174 } else { 191 } else {
175 if err := transactionContext.CommitTransaction(); err != nil { 192 if err := transactionContext.CommitTransaction(); err != nil {