作者 陈志颖

fix:更新兑换活动

@@ -71,3 +71,263 @@ @@ -71,3 +71,263 @@
71 } 71 }
72 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"} 72 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"}
73 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 73 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
  74 +2020/11/22 21:17:28.167 [D] [server.go:2843] ====>Recv User:<nil> RequestId:GET./cash-pool/activity/deadline-list?companyId=311.1606051048167857000
  75 + Auth=
  76 + BodyData:{}
  77 +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"}
  78 +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
  79 +2020/11/22 21:23:58.263 [I] [???:0] http server Running on http://:8082
  80 +2020/11/22 21:24:16.269 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051456269516000
  81 + Auth=
  82 + BodyData:{
  83 + "companyId": 311,
  84 + "exchangeActivityName": "这是公司311的兑换活动7",
  85 + "deadline": "2020-11-30T16:00:00.000Z",
  86 + "exchangeRate": 5
  87 +}
  88 +2020/11/22 21:24:16.341 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606051456269516000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  89 +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
  90 +2020/11/22 21:24:26.208 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051466208439000
  91 + Auth=
  92 + BodyData:{
  93 + "companyId": 311,
  94 + "exchangeActivityName": "这是公司311的兑换活动7",
  95 + "deadline": "2020-11-31T16:00:00.000Z",
  96 + "exchangeRate": 5
  97 +}
  98 +2020/11/22 21:24:26.246 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606051466208439000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  99 +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
  100 +2020/11/22 21:24:43.861 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051483861157000
  101 + Auth=
  102 + BodyData:{
  103 + "companyId": 311,
  104 + "exchangeActivityName": "这是公司311的兑换活动7",
  105 + "deadline": "2020-12-01T16:00:00.000Z",
  106 + "exchangeRate": 5
  107 +}
  108 +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"}
  109 +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
  110 +2020/11/22 21:24:46.236 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051486236353000
  111 + Auth=
  112 + BodyData:{
  113 + "companyId": 311,
  114 + "exchangeActivityName": "这是公司311的兑换活动7",
  115 + "deadline": "2020-12-01T16:00:00.000Z",
  116 + "exchangeRate": 5
  117 +}
  118 +2020/11/22 21:24:46.250 [D] [server.go:2843] <====Send RequestId:POST./cash-pool/activity.1606051486236353000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  119 +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
  120 +2020/11/22 21:24:51.388 [D] [server.go:2843] ====>Recv User:<nil> RequestId:POST./cash-pool/activity.1606051491388211000
  121 + Auth=
  122 + BodyData:{
  123 + "companyId": 311,
  124 + "exchangeActivityName": "这是公司311的兑换活动7",
  125 + "deadline": "2020-12-02T16:00:00.000Z",
  126 + "exchangeRate": 5
  127 +}
  128 +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"}
  129 +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
  130 +2020/11/22 21:25:13.980 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051513980649000
  131 + Auth=
  132 + BodyData:{
  133 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  134 + "deadline": "2020-12-01T16:00:00.000Z",
  135 + "exchangeRate": 100
  136 +}
  137 +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"}
  138 +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
  139 +2020/11/22 21:25:26.229 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051526229702000
  140 + Auth=
  141 + BodyData:{
  142 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  143 + "deadline": "2020-12-01T16:00:00.000Z",
  144 + "exchangeRate": 100
  145 +}
  146 +2020/11/22 21:25:26.240 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051526229702000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  147 +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
  148 +2020/11/22 21:25:34.057 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051534057347000
  149 + Auth=
  150 + BodyData:{
  151 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  152 + "deadline": "2020-12-02T16:00:00.000Z",
  153 + "exchangeRate": 100
  154 +}
  155 +2020/11/22 21:25:34.078 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051534057347000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  156 +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
  157 +2020/11/22 21:25:39.139 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051539139213000
  158 + Auth=
  159 + BodyData:{
  160 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  161 + "deadline": "2020-12-03T16:00:00.000Z",
  162 + "exchangeRate": 100
  163 +}
  164 +2020/11/22 21:25:39.196 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051539139213000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  165 +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
  166 +2020/11/22 21:25:44.616 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051544616825000
  167 + Auth=
  168 + BodyData:{
  169 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  170 + "deadline": "2020-12-04T16:00:00.000Z",
  171 + "exchangeRate": 100
  172 +}
  173 +2020/11/22 21:25:44.666 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051544616825000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  174 +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
  175 +2020/11/22 21:26:35.498 [I] [???:0] http server Running on http://:8082
  176 +2020/11/22 21:26:40.109 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051600109281000
  177 + Auth=
  178 + BodyData:{
  179 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  180 + "deadline": "2020-12-04T16:00:00.000Z",
  181 + "exchangeRate": 100
  182 +}
  183 +2020/11/22 21:26:40.136 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051600109281000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  184 +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
  185 +2020/11/22 21:26:41.696 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051601696751000
  186 + Auth=
  187 + BodyData:{
  188 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  189 + "deadline": "2020-12-04T16:00:00.000Z",
  190 + "exchangeRate": 100
  191 +}
  192 +2020/11/22 21:26:41.749 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051601696751000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  193 +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
  194 +2020/11/22 21:26:46.536 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051606536216000
  195 + Auth=
  196 + BodyData:{
  197 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  198 + "deadline": "2020-12-01T16:00:00.000Z",
  199 + "exchangeRate": 100
  200 +}
  201 +2020/11/22 21:26:46.545 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051606536216000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  202 +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
  203 +2020/11/22 21:27:28.888 [I] [???:0] http server Running on http://:8082
  204 +2020/11/22 21:27:33.151 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051653151246000
  205 + Auth=
  206 + BodyData:{
  207 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  208 + "deadline": "2020-12-01T16:00:00.000Z",
  209 + "exchangeRate": 100
  210 +}
  211 +2020/11/22 21:27:33.223 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051653151246000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  212 +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
  213 +2020/11/22 21:27:36.982 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051656982751000
  214 + Auth=
  215 + BodyData:{
  216 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  217 + "deadline": "2020-12-02T16:00:00.000Z",
  218 + "exchangeRate": 100
  219 +}
  220 +2020/11/22 21:27:37.038 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051656982751000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  221 +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
  222 +2020/11/22 21:27:40.151 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051660151425000
  223 + Auth=
  224 + BodyData:{
  225 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  226 + "deadline": "2020-12-03T16:00:00.000Z",
  227 + "exchangeRate": 100
  228 +}
  229 +2020/11/22 21:27:40.170 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051660151425000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  230 +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
  231 +2020/11/22 21:27:43.950 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051663950109000
  232 + Auth=
  233 + BodyData:{
  234 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  235 + "deadline": "2020-12-04T16:00:00.000Z",
  236 + "exchangeRate": 100
  237 +}
  238 +2020/11/22 21:27:43.990 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051663950109000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  239 +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
  240 +2020/11/22 21:27:48.166 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051668166525000
  241 + Auth=
  242 + BodyData:{
  243 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  244 + "deadline": "2020-12-05T16:00:00.000Z",
  245 + "exchangeRate": 100
  246 +}
  247 +2020/11/22 21:27:48.222 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051668166525000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  248 +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
  249 +2020/11/22 21:27:52.166 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051672166152000
  250 + Auth=
  251 + BodyData:{
  252 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  253 + "deadline": "2020-12-06T16:00:00.000Z",
  254 + "exchangeRate": 100
  255 +}
  256 +2020/11/22 21:27:52.194 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051672166152000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  257 +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
  258 +2020/11/22 21:28:35.821 [I] [???:0] http server Running on http://:8082
  259 +2020/11/22 21:29:23.031 [I] [???:0] http server Running on http://:8082
  260 +2020/11/22 21:29:26.055 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051766055285000
  261 + Auth=
  262 + BodyData:{
  263 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  264 + "deadline": "2020-12-06T16:00:00.000Z",
  265 + "exchangeRate": 100
  266 +}
  267 +2020/11/22 21:29:26.074 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051766055285000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  268 +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
  269 +2020/11/22 21:29:27.663 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051767663535000
  270 + Auth=
  271 + BodyData:{
  272 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  273 + "deadline": "2020-12-06T16:00:00.000Z",
  274 + "exchangeRate": 100
  275 +}
  276 +2020/11/22 21:29:27.700 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051767663535000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  277 +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
  278 +2020/11/22 21:29:32.267 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051772267800000
  279 + Auth=
  280 + BodyData:{
  281 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  282 + "deadline": "2020-12-07T16:00:00.000Z",
  283 + "exchangeRate": 100
  284 +}
  285 +2020/11/22 21:29:32.304 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051772267800000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  286 +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
  287 +2020/11/22 21:30:30.885 [I] [???:0] http server Running on http://:8082
  288 +2020/11/22 21:31:08.799 [I] [???:0] http server Running on http://:8082
  289 +2020/11/22 21:31:12.212 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051872212413000
  290 + Auth=
  291 + BodyData:{
  292 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  293 + "deadline": "2020-12-07T16:00:00.000Z",
  294 + "exchangeRate": 100
  295 +}
  296 +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"}
  297 +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
  298 +2020/11/22 21:31:18.166 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051878166806000
  299 + Auth=
  300 + BodyData:{
  301 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  302 + "deadline": "2020-12-07T16:00:00.000Z",
  303 + "exchangeRate": 100
  304 +}
  305 +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"}
  306 +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
  307 +2020/11/22 21:31:21.196 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051881196197000
  308 + Auth=
  309 + BodyData:{
  310 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  311 + "deadline": "2020-12-07T16:00:00.000Z",
  312 + "exchangeRate": 100
  313 +}
  314 +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"}
  315 +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
  316 +2020/11/22 21:31:26.144 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051886144192000
  317 + Auth=
  318 + BodyData:{
  319 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  320 + "deadline": "2020-12-06T16:00:00.000Z",
  321 + "exchangeRate": 100
  322 +}
  323 +2020/11/22 21:31:26.171 [D] [server.go:2843] <====Send RequestId:PUT./cash-pool/activity/88.1606051886144192000 BodyData:{"code":501,"msg":"内部服务出错:兑换活动截止时间不能重合"}
  324 +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
  325 +2020/11/22 21:31:32.861 [D] [server.go:2843] ====>Recv User:<nil> RequestId:PUT./cash-pool/activity/88.1606051892861690000
  326 + Auth=
  327 + BodyData:{
  328 + "exchangeActivityName": "这是更新后的公司10019的兑换活动,哈哈哈",
  329 + "deadline": "2020-12-08T16:00:00.000Z",
  330 + "exchangeRate": 100
  331 +}
  332 +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"}
  333 +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 @@ -337,9 +337,8 @@ func (cashPoolService *CashPoolService) CreateExchangeCashActivity(createExchang
337 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 337 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
338 } else { 338 } else {
339 for _, activity := range activities { 339 for _, activity := range activities {
340 - //if t2.Format("2006-01-02") == activity.Deadline.UTC().Format("2006-01-02") {  
341 - //if t2.Format("2006-01-02") == activity.Deadline.Local().Format("2006-01-02") {  
342 - if t2.Before(activity.Deadline.Local()) || t2.Equal(activity.Deadline.Local()) { 340 + if t2.Format("2006-01-02") <= activity.Deadline.Local().Format("2006-01-02") {
  341 + //if t2.Before(activity.Deadline.Local()) || t2.Equal(activity.Deadline.Local()) {
343 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "兑换活动截止时间不能重合") 342 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "兑换活动截止时间不能重合")
344 } 343 }
345 } 344 }
@@ -930,6 +929,19 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang @@ -930,6 +929,19 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang
930 // 更新兑换活动命令已兑换素币 929 // 更新兑换活动命令已兑换素币
931 updateExchangeCashActivityCommand.ExchangedSuMoney = activityFound.ExchangedSuMoney 930 updateExchangeCashActivityCommand.ExchangedSuMoney = activityFound.ExchangedSuMoney
932 931
  932 + // 获取该公司所有兑换现金活动
  933 + if _, activities, err := exchangeCashActivityRepository.FindAll(map[string]interface{}{
  934 + "companyId": activityFound.CompanyId,
  935 + }); err != nil {
  936 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  937 + } else {
  938 + for _, activity := range activities {
  939 + if updateExchangeCashActivityCommand.Deadline.Local().Format("2006-01-02") < activity.Deadline.Local().Format("2006-01-02") {
  940 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "兑换活动截止时间不能重合")
  941 + }
  942 + }
  943 + }
  944 +
933 // 更新兑换活动 945 // 更新兑换活动
934 if err := activityFound.Update(tool_funs.SimpleStructToMap(updateExchangeCashActivityCommand)); err != nil { 946 if err := activityFound.Update(tool_funs.SimpleStructToMap(updateExchangeCashActivityCommand)); err != nil {
935 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 947 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
@@ -939,19 +951,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang @@ -939,19 +951,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang
939 if activityUpdated, err := exchangeCashActivityRepository.Save(activityFound); err != nil { 951 if activityUpdated, err := exchangeCashActivityRepository.Save(activityFound); err != nil {
940 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 952 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
941 } else { 953 } else {
942 - // 获取该公司所有兑换现金活动  
943 - if _, activities, err := exchangeCashActivityRepository.FindAll(map[string]interface{}{  
944 - "companyId": activityFound.CompanyId,  
945 - }); err != nil {  
946 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
947 - } else {  
948 - for _, activity := range activities {  
949 - if t2.Format("2006-01-02") == activity.Deadline.Local().Format("2006-01-02") {  
950 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "兑换活动截止时间不能重合")  
951 - }  
952 - }  
953 - }  
954 -  
955 if err := transactionContext.CommitTransaction(); err != nil { 954 if err := transactionContext.CommitTransaction(); err != nil {
956 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 955 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
957 } 956 }