调整商城订单
This commit is contained in:
parent
2de5f008de
commit
03f19ba0b3
@ -2,7 +2,6 @@ package com.cpop.common.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cpop.common.utils.text.Convert;
|
||||
import com.sun.xml.internal.ws.util.UtilException;
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
@ -57,7 +56,7 @@ public class ServletUtils {
|
||||
}
|
||||
parameter = json.getString(name);
|
||||
} catch (IOException e) {
|
||||
throw new UtilException("获取分页参数失败!");
|
||||
throw new RuntimeException("获取分页参数失败!");
|
||||
}
|
||||
}
|
||||
return Convert.toInt(parameter);
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
# 项目相关配置
|
||||
cpop:
|
||||
# 文件路径 示例( Windows配置W:/WorkSpace/java/uploadPath,Linux配置 /home/baseFramework/uploadPath)
|
||||
profile: /root/jambox-union/jambox-oam/uploadPath/upload
|
||||
profile: /root/cpop-union/cpop-mall/upload
|
||||
jwt:
|
||||
#白名单
|
||||
whiteList: /login,/getCaptcha,/profile/**,/wxOpen/receiveTicket,/wxOpen/*/callback,/wxOpen/bindOpenAccount/*,/wxCp/portal/*
|
||||
whiteList: /login,/miniLogin,/wxPay/callback/notify/**,/profile/**
|
||||
#拦截
|
||||
gateway:
|
||||
rsa-keypair:
|
||||
# 公钥文件
|
||||
publicKeyFile: /root/jambox-union/jambox-oam/script/secretKey/publicKey
|
||||
publicKeyFile: /root/cpop-union/cpop-mall/script/secretKey/publicKey
|
||||
# 公钥文件
|
||||
privateKeyFile: /root/jambox-union/jambox-oam/script/secretKey/privateKey
|
||||
privateKeyFile: /root/cpop-union/cpop-mall/script/secretKey/privateKey
|
||||
|
||||
# DataSource Config
|
||||
spring:
|
||||
@ -24,7 +24,7 @@ spring:
|
||||
#端口
|
||||
port: 6333
|
||||
#数据库
|
||||
database: 5
|
||||
database: 10
|
||||
#密码
|
||||
password: Jambox.123*
|
||||
#连接超时
|
||||
@ -60,11 +60,11 @@ mybatis-flex:
|
||||
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
datasource:
|
||||
mall:
|
||||
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/cpop-union?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/cpop_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: Customer0401
|
||||
jambox:
|
||||
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/jambox_association?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/jambox_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: Customer0401
|
||||
|
||||
@ -76,4 +76,6 @@ logging:
|
||||
wx:
|
||||
pay:
|
||||
#通知地址
|
||||
notifyUrl:
|
||||
notifyUrl: https://test.cpopsz.com/onlineShop/Cpop-Mall/wxPay/callback/notify/order
|
||||
#支付成功
|
||||
notifyRefund: https://test.cpopsz.com/onlineShop/Cpop-Mall/wxPay/callback/notify/refund
|
||||
@ -101,3 +101,5 @@ wx:
|
||||
pay:
|
||||
#通知地址
|
||||
notifyUrl: https://frp-oak.top:11899/Cpop-Mall/wxPay/callback/notify/order
|
||||
#支付成功
|
||||
notifyRefund: https://frp-oak.top:11899/Cpop-Mall/wxPay/callback/notify/refund
|
||||
@ -31,7 +31,7 @@ spring:
|
||||
max-file-size: 1024MB
|
||||
max-request-size: 300MB
|
||||
profiles:
|
||||
active: test,mall,system
|
||||
active: prod,mall,system
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
@ -27,6 +27,7 @@ import com.cpop.mall.business.entity.OrderRefund;
|
||||
import com.cpop.mall.business.mapper.OrderRefundMapper;
|
||||
import com.cpop.mall.business.service.OrderRefundService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
|
||||
@ -48,6 +49,9 @@ public class OrderRefundServiceImpl extends ServiceImpl<OrderRefundMapper, Order
|
||||
@Autowired
|
||||
private WxPayHandler wxPayHandler;
|
||||
|
||||
@Value("${wx.pay.notifyRefund}")
|
||||
private String notifyRefund;
|
||||
|
||||
/**
|
||||
* @descriptions 同意退款
|
||||
* @author DB
|
||||
@ -65,14 +69,14 @@ public class OrderRefundServiceImpl extends ServiceImpl<OrderRefundMapper, Order
|
||||
ProfitSharing profitSharing = SpringUtils.getBean(ProfitSharingService.class).queryChain().where(PROFIT_SHARING.ORDER_ID.eq(order.getId()))
|
||||
.and(PROFIT_SHARING.ORDER_SOURCE.eq(OrderSource.MALL.toString())).one();
|
||||
//TODO:可能还需要先从分账退款
|
||||
ProfitSharingReturnRequest profitSharingReturnRequest = new ProfitSharingReturnRequest();
|
||||
/*ProfitSharingReturnRequest profitSharingReturnRequest = new ProfitSharingReturnRequest();
|
||||
profitSharingReturnRequest.setOrderId(profitSharing.getOutProfitSharingId());
|
||||
profitSharingReturnRequest.setReturnMchid(profitSharing.getPayAccount());
|
||||
profitSharingReturnRequest.setAmount(profitSharing.getAmount());
|
||||
profitSharingReturnRequest.setOutOrderNo(profitSharing.getId());
|
||||
profitSharingReturnRequest.setDescription("订单退款");
|
||||
profitSharingReturnRequest.setSubMchId("1618436087");
|
||||
ProfitSharingReturnResult profitSharingReturnResult = wxPayService.getProfitSharingV3Service().profitSharingReturn(profitSharingReturnRequest);
|
||||
ProfitSharingReturnResult profitSharingReturnResult = wxPayService.getProfitSharingV3Service().profitSharingReturn(profitSharingReturnRequest);*/
|
||||
WxPayRefundV3Request request = new WxPayRefundV3Request();
|
||||
WxPayRefundV3Request.Amount amount = new WxPayRefundV3Request.Amount();
|
||||
//退款金额(单位分)
|
||||
@ -81,6 +85,7 @@ public class OrderRefundServiceImpl extends ServiceImpl<OrderRefundMapper, Order
|
||||
.setTotal(refund)
|
||||
.setCurrency("CNY");
|
||||
request.setTransactionId(order.getOutOrderNo())
|
||||
.setNotifyUrl(notifyRefund)
|
||||
.setOutRefundNo(id)
|
||||
.setReason(orderRefund.getRefundReason())
|
||||
.setAmount(amount);
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
package com.cpop.mall.business.vo;
|
||||
|
||||
import com.mybatisflex.annotation.RelationOneToMany;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author DB
|
||||
* @createTime 2023/10/28 0:28
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "小程序商城订单分页返回对象")
|
||||
public class MiniOrderPageVo implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单状态(0:待付款;1:待发货;2:待确认;3:已完成;4:退款/售后中)
|
||||
*/
|
||||
@ApiModelProperty("订单状态(0:待付款;1:待发货;2:待确认;3:已完成;4:退款/售后中)")
|
||||
private Integer orderStatus;
|
||||
|
||||
/**
|
||||
* 外部订单号
|
||||
*/
|
||||
@ApiModelProperty("外部订单号")
|
||||
private String outOrderNo;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
@ApiModelProperty("总金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 总积分
|
||||
*/
|
||||
@ApiModelProperty("总积分")
|
||||
private Long totalPoint;
|
||||
|
||||
/**
|
||||
* 品牌id
|
||||
*/
|
||||
@ApiModelProperty("品牌id")
|
||||
private String brandId;
|
||||
|
||||
/**
|
||||
* 店铺(校区)id
|
||||
*/
|
||||
@ApiModelProperty("店铺(校区)id")
|
||||
private String storeId;
|
||||
|
||||
/**
|
||||
* 商品名
|
||||
*/
|
||||
@ApiModelProperty("商品名")
|
||||
private String productNames;
|
||||
|
||||
/**
|
||||
* 下单用户id
|
||||
*/
|
||||
@ApiModelProperty("下单用户id")
|
||||
private String payUserId;
|
||||
|
||||
/**
|
||||
* 收货人名
|
||||
*/
|
||||
@ApiModelProperty("收货人名")
|
||||
private String receiveName;
|
||||
|
||||
/**
|
||||
* 收货人电话
|
||||
*/
|
||||
@ApiModelProperty("收货人电话")
|
||||
private String receivePhone;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
@ApiModelProperty("收货地址")
|
||||
private String receiveAddress;
|
||||
|
||||
/**
|
||||
* 物流订单号
|
||||
*/
|
||||
@ApiModelProperty("物流订单号")
|
||||
private String logisticsOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 订单详情vo
|
||||
*/
|
||||
@ApiModelProperty("订单详情")
|
||||
@RelationOneToMany(selfField = "id",
|
||||
targetField = "orderId",
|
||||
targetTable = "cp_mall_order_detail")
|
||||
private List<OrderDetailVo> detailList;
|
||||
}
|
||||
@ -62,7 +62,12 @@ public class WxPayProperties {
|
||||
private String certSerialNo;
|
||||
|
||||
/**
|
||||
* 通知地址
|
||||
* 支付通知地址
|
||||
*/
|
||||
private String notifyUrl;
|
||||
|
||||
/**
|
||||
* 退款通知
|
||||
*/
|
||||
private String notifyRefund;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user