作者 陈志颖

fix:更新兑换活动

... ... @@ -71,3 +71,263 @@
}
2020/11/22 21:16:02.450 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606050962349119000 BodyData:{"code":0,"data":{"activityId":86,"exchangeActivityName":"这是公司311的兑换活动7","companyId":311,"exchangedCash":0,"exchangedSuMoney":0,"deadline":"2020-12-01T23:59:59+08:00","countDown":10,"rate":5,"createTime":"2020-11-22T21:16:02.443738+08:00"},"msg":"ok"}
2020/11/22 21:16:02.450 [D] [server.go:1925] | 127.0.0.1| 200 | 101.513849ms| match| POST  /cash-pool/activity r:/cash-pool/activity
2020/11/22 21:17:28.167 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./cash-pool/activity/deadline-list?companyId=311.1606051048167857000
Auth=
BodyData:{}
2020/11/22 21:17:28.175 [D] [server.go:2843] <====Send RequestId:GET./cash-pool/activity/deadline-list?companyId=311.1606051048167857000 BodyData:{"code":0,"data":{"deadlines":["2020-12-01","2020-11-29","2020-11-28","2020-11-27","2020-11-24","2020-11-22","2020-11-23"]},"msg":"ok"}
2020/11/22 21:17:28.175 [D] [server.go:1925] | 127.0.0.1| 200 | 7.689365ms| match| GET  /cash-pool/activity/deadline-list r:/cash-pool/activity/deadline-list
2020/11/22 21:23:58.263 [I] [???:0] http server Running on http://:8082
2020/11/22 21:24:16.269 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051456269516000
Auth=
BodyData:{
"companyId": 311,
"exchangeActivityName": "这是公司311的兑换活动7",
"deadline": "2020-11-30T16:00:00.000Z",
"exchangeRate": 5
}
2020/11/22 21:24:16.341 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606051456269516000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:24:16.341 [D] [server.go:1925] | 127.0.0.1| 200 | 72.046311ms| match| POST  /cash-pool/activity r:/cash-pool/activity
2020/11/22 21:24:26.208 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051466208439000
Auth=
BodyData:{
"companyId": 311,
"exchangeActivityName": "这是公司311的兑换活动7",
"deadline": "2020-11-31T16:00:00.000Z",
"exchangeRate": 5
}
2020/11/22 21:24:26.246 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606051466208439000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:24:26.246 [D] [server.go:1925] | 127.0.0.1| 200 | 38.524699ms| match| POST  /cash-pool/activity r:/cash-pool/activity
2020/11/22 21:24:43.861 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051483861157000
Auth=
BodyData:{
"companyId": 311,
"exchangeActivityName": "这是公司311的兑换活动7",
"deadline": "2020-12-01T16:00:00.000Z",
"exchangeRate": 5
}
2020/11/22 21:24:43.954 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606051483861157000 BodyData:{"code":0,"data":{"activityId":87,"exchangeActivityName":"这是公司311的兑换活动7","companyId":311,"exchangedCash":0,"exchangedSuMoney":0,"deadline":"2020-12-02T23:59:59+08:00","countDown":11,"rate":5,"createTime":"2020-11-22T21:24:43.869228+08:00"},"msg":"ok"}
2020/11/22 21:24:43.954 [D] [server.go:1925] | 127.0.0.1| 200 | 93.380385ms| match| POST  /cash-pool/activity r:/cash-pool/activity
2020/11/22 21:24:46.236 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051486236353000
Auth=
BodyData:{
"companyId": 311,
"exchangeActivityName": "这是公司311的兑换活动7",
"deadline": "2020-12-01T16:00:00.000Z",
"exchangeRate": 5
}
2020/11/22 21:24:46.250 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606051486236353000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:24:46.250 [D] [server.go:1925] | 127.0.0.1| 200 | 14.329406ms| match| POST  /cash-pool/activity r:/cash-pool/activity
2020/11/22 21:24:51.388 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051491388211000
Auth=
BodyData:{
"companyId": 311,
"exchangeActivityName": "这是公司311的兑换活动7",
"deadline": "2020-12-02T16:00:00.000Z",
"exchangeRate": 5
}
2020/11/22 21:24:51.506 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606051491388211000 BodyData:{"code":0,"data":{"activityId":88,"exchangeActivityName":"这是公司311的兑换活动7","companyId":311,"exchangedCash":0,"exchangedSuMoney":0,"deadline":"2020-12-03T23:59:59+08:00","countDown":12,"rate":5,"createTime":"2020-11-22T21:24:51.421644+08:00"},"msg":"ok"}
2020/11/22 21:24:51.506 [D] [server.go:1925] | 127.0.0.1| 200 | 118.512572ms| match| POST  /cash-pool/activity r:/cash-pool/activity
2020/11/22 21:25:13.980 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051513980649000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-01T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:25:14.282 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051513980649000 BodyData:{"code":0,"data":{"activityId":88,"exchangeActivityName":"这是更新后的公司10019的兑换活动,哈哈哈","companyId":311,"exchangedCash":0,"exchangedSuMoney":0,"deadline":"2020-12-02T00:00:00+08:00","countDown":12,"rate":100,"createTime":"2020-11-22T21:24:51.421644+08:00"},"msg":"ok"}
2020/11/22 21:25:14.282 [D] [server.go:1925] | 127.0.0.1| 200 | 301.803812ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:25:26.229 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051526229702000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-01T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:25:26.240 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051526229702000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:25:26.241 [D] [server.go:1925] | 127.0.0.1| 200 | 11.369258ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:25:34.057 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051534057347000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-02T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:25:34.078 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051534057347000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:25:34.078 [D] [server.go:1925] | 127.0.0.1| 200 | 21.379196ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:25:39.139 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051539139213000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-03T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:25:39.196 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051539139213000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:25:39.198 [D] [server.go:1925] | 127.0.0.1| 200 | 59.685878ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:25:44.616 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051544616825000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-04T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:25:44.666 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051544616825000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:25:44.666 [D] [server.go:1925] | 127.0.0.1| 200 | 50.009084ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:26:35.498 [I] [???:0] http server Running on http://:8082
2020/11/22 21:26:40.109 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051600109281000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-04T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:26:40.136 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051600109281000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:26:40.136 [D] [server.go:1925] | 127.0.0.1| 200 | 27.762013ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:26:41.696 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051601696751000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-04T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:26:41.749 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051601696751000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:26:41.749 [D] [server.go:1925] | 127.0.0.1| 200 | 52.590887ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:26:46.536 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051606536216000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-01T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:26:46.545 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051606536216000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:26:46.545 [D] [server.go:1925] | 127.0.0.1| 200 | 9.638212ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:27:28.888 [I] [???:0] http server Running on http://:8082
2020/11/22 21:27:33.151 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051653151246000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-01T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:27:33.223 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051653151246000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:27:33.224 [D] [server.go:1925] | 127.0.0.1| 200 | 72.963094ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:27:36.982 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051656982751000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-02T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:27:37.038 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051656982751000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:27:37.038 [D] [server.go:1925] | 127.0.0.1| 200 | 55.473116ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:27:40.151 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051660151425000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-03T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:27:40.170 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051660151425000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:27:40.170 [D] [server.go:1925] | 127.0.0.1| 200 | 19.196881ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:27:43.950 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051663950109000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-04T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:27:43.990 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051663950109000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:27:43.990 [D] [server.go:1925] | 127.0.0.1| 200 | 40.397795ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:27:48.166 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051668166525000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-05T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:27:48.222 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051668166525000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:27:48.222 [D] [server.go:1925] | 127.0.0.1| 200 | 56.366705ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:27:52.166 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051672166152000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-06T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:27:52.194 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051672166152000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:27:52.195 [D] [server.go:1925] | 127.0.0.1| 200 | 29.260444ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:28:35.821 [I] [???:0] http server Running on http://:8082
2020/11/22 21:29:23.031 [I] [???:0] http server Running on http://:8082
2020/11/22 21:29:26.055 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051766055285000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-06T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:29:26.074 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051766055285000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:29:26.074 [D] [server.go:1925] | 127.0.0.1| 200 | 19.508517ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:29:27.663 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051767663535000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-06T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:29:27.700 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051767663535000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:29:27.700 [D] [server.go:1925] | 127.0.0.1| 200 | 36.830136ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:29:32.267 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051772267800000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-07T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:29:32.304 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051772267800000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:29:32.304 [D] [server.go:1925] | 127.0.0.1| 200 | 37.182738ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:30:30.885 [I] [???:0] http server Running on http://:8082
2020/11/22 21:31:08.799 [I] [???:0] http server Running on http://:8082
2020/11/22 21:31:12.212 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051872212413000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-07T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:31:12.319 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051872212413000 BodyData:{"code":0,"data":{"activityId":88,"exchangeActivityName":"这是更新后的公司10019的兑换活动,哈哈哈","companyId":311,"exchangedCash":0,"exchangedSuMoney":0,"deadline":"2020-12-08T00:00:00+08:00","countDown":10,"rate":100,"createTime":"2020-11-22T21:24:51.421644+08:00"},"msg":"ok"}
2020/11/22 21:31:12.319 [D] [server.go:1925] | 127.0.0.1| 200 | 107.710707ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:31:18.166 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051878166806000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-07T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:31:18.256 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051878166806000 BodyData:{"code":0,"data":{"activityId":88,"exchangeActivityName":"这是更新后的公司10019的兑换活动,哈哈哈","companyId":311,"exchangedCash":0,"exchangedSuMoney":0,"deadline":"2020-12-08T00:00:00+08:00","countDown":16,"rate":100,"createTime":"2020-11-22T21:24:51.421644+08:00"},"msg":"ok"}
2020/11/22 21:31:18.257 [D] [server.go:1925] | 127.0.0.1| 200 | 90.579213ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:31:21.196 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051881196197000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-07T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:31:21.232 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051881196197000 BodyData:{"code":0,"data":{"activityId":88,"exchangeActivityName":"这是更新后的公司10019的兑换活动,哈哈哈","companyId":311,"exchangedCash":0,"exchangedSuMoney":0,"deadline":"2020-12-08T00:00:00+08:00","countDown":16,"rate":100,"createTime":"2020-11-22T21:24:51.421644+08:00"},"msg":"ok"}
2020/11/22 21:31:21.232 [D] [server.go:1925] | 127.0.0.1| 200 | 36.15719ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:31:26.144 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051886144192000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-06T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:31:26.171 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051886144192000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
2020/11/22 21:31:26.172 [D] [server.go:1925] | 127.0.0.1| 200 | 27.913537ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
2020/11/22 21:31:32.861 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051892861690000
Auth=
BodyData:{
"exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
"deadline": "2020-12-08T16:00:00.000Z",
"exchangeRate": 100
}
2020/11/22 21:31:32.915 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051892861690000 BodyData:{"code":0,"data":{"activityId":88,"exchangeActivityName":"这是更新后的公司10019的兑换活动,哈哈哈","companyId":311,"exchangedCash":0,"exchangedSuMoney":0,"deadline":"2020-12-09T00:00:00+08:00","countDown":16,"rate":100,"createTime":"2020-11-22T21:24:51.421644+08:00"},"msg":"ok"}
2020/11/22 21:31:32.915 [D] [server.go:1925] | 127.0.0.1| 200 | 53.82048ms| match| PUT  /cash-pool/activity/88 r:/cash-pool/activity/:activityId
... ...
... ... @@ -337,9 +337,8 @@ func (cashPoolService *CashPoolService) CreateExchangeCashActivity(createExchang
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
for _, activity := range activities {
//if t2.Format("2006-01-02") == activity.Deadline.UTC().Format("2006-01-02") {
//if t2.Format("2006-01-02") == activity.Deadline.Local().Format("2006-01-02") {
if t2.Before(activity.Deadline.Local()) || t2.Equal(activity.Deadline.Local()) {
if t2.Format("2006-01-02") <= activity.Deadline.Local().Format("2006-01-02") {
//if t2.Before(activity.Deadline.Local()) || t2.Equal(activity.Deadline.Local()) {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "兑换活动截止时间不能重合")
}
}
... ... @@ -930,6 +929,19 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang
// 更新兑换活动命令已兑换素币
updateExchangeCashActivityCommand.ExchangedSuMoney = activityFound.ExchangedSuMoney
// 获取该公司所有兑换现金活动
if _, activities, err := exchangeCashActivityRepository.FindAll(map[string]interface{}{
"companyId": activityFound.CompanyId,
}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
for _, activity := range activities {
if updateExchangeCashActivityCommand.Deadline.Local().Format("2006-01-02") < activity.Deadline.Local().Format("2006-01-02") {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "兑换活动截止时间不能重合")
}
}
}
// 更新兑换活动
if err := activityFound.Update(tool_funs.SimpleStructToMap(updateExchangeCashActivityCommand)); err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ... @@ -939,19 +951,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang
if activityUpdated, err := exchangeCashActivityRepository.Save(activityFound); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
// 获取该公司所有兑换现金活动
if _, activities, err := exchangeCashActivityRepository.FindAll(map[string]interface{}{
"companyId": activityFound.CompanyId,
}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
for _, activity := range activities {
if t2.Format("2006-01-02") == activity.Deadline.Local().Format("2006-01-02") {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "兑换活动截止时间不能重合")
}
}
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
... ...