Commit 57911cfe by giaogiao

用户付款: 添加付款时间

parent 180c4693
...@@ -38,6 +38,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -38,6 +38,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.Instant;
/** /**
* 行程表 控制器 * 行程表 控制器
...@@ -66,6 +68,7 @@ public class StrokeController extends BaseController { ...@@ -66,6 +68,7 @@ public class StrokeController extends BaseController {
Stroke stroke = new Stroke(); Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokePaymentInfoParam, stroke); BeanUtils.copyProperties(strokePaymentInfoParam, stroke);
stroke.setPaymentStatus(StatePaymentStatusEnum.PAYING.getCode()); stroke.setPaymentStatus(StatePaymentStatusEnum.PAYING.getCode());
stroke.setUserRechargeTime(Timestamp.from(Instant.now()));
boolean flag = strokeService.update(stroke, new UpdateWrapper<Stroke>().lambda() boolean flag = strokeService.update(stroke, new UpdateWrapper<Stroke>().lambda()
.eq(Stroke::getUserId, jwtToken.getUserId()) .eq(Stroke::getUserId, jwtToken.getUserId())
.eq(Stroke::getId, strokePaymentInfoParam.getId()) .eq(Stroke::getId, strokePaymentInfoParam.getId())
......
/*
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.geekidea.springbootplus.test;
import java.sql.Timestamp;
import java.time.Instant;
/**
* @author geekidea
* @date 2020/3/16
**/
public class TimestampTest {
public static void main(String[] args) {
// 获取当前时间戳
Timestamp from = Timestamp.from(Instant.now());
System.out.println(from);
}
}
...@@ -81,6 +81,9 @@ public class Stroke extends BaseEntity { ...@@ -81,6 +81,9 @@ public class Stroke extends BaseEntity {
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
private Timestamp updateTime; private Timestamp updateTime;
@ApiModelProperty("付款时间")
private Timestamp userRechargeTime;
@ApiModelProperty("货物名称") @ApiModelProperty("货物名称")
private String goodsName; private String goodsName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment