调整支付接口
This commit is contained in:
@@ -57,6 +57,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
"/api/shop/payment/mp-alipay/test/**",
|
||||
"/api/shop/payment/mp-alipay/getPhoneNumber",
|
||||
"/api/shop/test/**",
|
||||
"/api/shop/order-pay/change-order-no",
|
||||
"/api/shop/wx-login/**",
|
||||
"/api/apps/hualala/**",
|
||||
"/api/apps/hualala-cart/**",
|
||||
|
||||
@@ -7,6 +7,7 @@ import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alipay.api.AlipayApiException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.gxwebsoft.apps.entity.EquipmentGoods;
|
||||
import com.gxwebsoft.apps.service.EquipmentGoodsService;
|
||||
@@ -87,6 +88,20 @@ public class OrderPayController extends BaseController {
|
||||
//return success(orderPayService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@GetMapping("/change-order-no")
|
||||
public ApiResult<?> changeOrderNo() {
|
||||
List<OrderPay> list = orderPayService.list();
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
for (OrderPay orderPay : list) {
|
||||
if (!orderPay.getOrderNo().equals(orderPay.getOriginOrderNo())) {
|
||||
orderPay.setOrderNo(IdUtil.getSnowflakeNextIdStr());
|
||||
orderPayService.updateById(orderPay);
|
||||
}
|
||||
}
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
@GetMapping("/getByOrderId/{id}")
|
||||
public ApiResult<?> getByOrderId(@PathVariable("id") Integer orderId) {
|
||||
OrderPay one = orderPayService.lambdaQuery()
|
||||
@@ -162,8 +177,7 @@ public class OrderPayController extends BaseController {
|
||||
if (cnt > 0) {
|
||||
log.info("订单{}已支付支付押金!", orderId);
|
||||
one.setHasFreeze(1);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
log.info("订单{}未支付押金!", orderId);
|
||||
// fWrapper.clear();
|
||||
// fWrapper.eq(FreezeOrder::getOutOrderNo, freezeOrderNo)
|
||||
|
||||
@@ -44,6 +44,9 @@ public class OrderPay implements Serializable {
|
||||
@ApiModelProperty(value = "订单号")
|
||||
private String orderNo;
|
||||
|
||||
@ApiModelProperty(value = "订单号")
|
||||
private String originOrderNo;
|
||||
|
||||
@ApiModelProperty(value = "商品总金额(不含优惠折扣)")
|
||||
private BigDecimal totalPrice;
|
||||
private Integer orderSource;
|
||||
|
||||
Reference in New Issue
Block a user