This commit is contained in:
2023-05-27 11:44:44 +08:00
parent 458687951e
commit 59efb253e4
3 changed files with 27 additions and 25 deletions

View File

@@ -309,6 +309,14 @@ public class PayController extends BaseController {
return response; return response;
} }
/**
* 汇付支付退款
*/
public RestApiResponse<?> adapayRefund(HttpServletRequest request, @RequestBody WeChatRefundDTO dto) {
return null;
}
/** /**
* 汇付支付回调 * 汇付支付回调
* <a href="https://api.jsowellcloud.com/uniapp/pay/adapayCallback">...</a> * <a href="https://api.jsowellcloud.com/uniapp/pay/adapayCallback">...</a>

View File

@@ -22,7 +22,9 @@ public class AdapayCallbackRecord implements Serializable {
/** /**
* 主键id * 主键id
*/ */
private String id; private Integer id;
private String paymentId;
/** /**
* 汇付商户appId * 汇付商户appId
@@ -82,23 +84,4 @@ public class AdapayCallbackRecord implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public AdapayCallbackRecord(String id, String appId, String description, String createdTime, String endTime, BigDecimal feeAmt, String orderNo, String outTransId, String partyOrderId, BigDecimal payAmt, String payChannel, BigDecimal realAmt, String shareEq, String status, String wxUserId, Date createTime, String delFlag) {
this.id = id;
this.appId = appId;
this.description = description;
this.createdTime = createdTime;
this.endTime = endTime;
this.feeAmt = feeAmt;
this.orderNo = orderNo;
this.outTransId = outTransId;
this.partyOrderId = partyOrderId;
this.payAmt = payAmt;
this.payChannel = payChannel;
this.realAmt = realAmt;
this.shareEq = shareEq;
this.status = status;
this.wxUserId = wxUserId;
this.createTime = createTime;
this.delFlag = delFlag;
}
} }

View File

@@ -2,7 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsowell.pile.mapper.AdapayCallbackRecordMapper"> <mapper namespace="com.jsowell.pile.mapper.AdapayCallbackRecordMapper">
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.AdapayCallbackRecord"> <resultMap id="BaseResultMap" type="com.jsowell.pile.domain.AdapayCallbackRecord">
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="id" property="id" />
<result column="payment_id" jdbcType="VARCHAR" property="paymentId" />
<result column="app_id" jdbcType="VARCHAR" property="appId" /> <result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="description" jdbcType="VARCHAR" property="description" /> <result column="description" jdbcType="VARCHAR" property="description" />
<result column="created_time" jdbcType="VARCHAR" property="createdTime" /> <result column="created_time" jdbcType="VARCHAR" property="createdTime" />
@@ -22,7 +23,7 @@
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" /> <result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, app_id, description, created_time, end_time, expend, fee_amt, order_no, out_trans_id, id, payment_id, app_id, description, created_time, end_time, expend, fee_amt, order_no, out_trans_id,
party_order_id, pay_amt, pay_channel, real_amt, share_eq, `status`, wx_user_id, create_time, party_order_id, pay_amt, pay_channel, real_amt, share_eq, `status`, wx_user_id, create_time,
del_flag del_flag
</sql> </sql>
@@ -37,12 +38,12 @@
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.AdapayCallbackRecord" useGeneratedKeys="true"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.AdapayCallbackRecord" useGeneratedKeys="true">
insert into adapay_callback_record (id, app_id, description, created_time, insert into adapay_callback_record (payment_id, app_id, description, created_time,
end_time, expend, fee_amt, end_time, expend, fee_amt,
order_no, out_trans_id, party_order_id, order_no, out_trans_id, party_order_id,
pay_amt, pay_channel, real_amt, pay_amt, pay_channel, real_amt,
share_eq, `status`, wx_user_id) share_eq, `status`, wx_user_id)
values (#{id},#{appId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{createdTime,jdbcType=VARCHAR}, values (#{paymentId,jdbcType=VARCHAR},#{appId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{createdTime,jdbcType=VARCHAR},
#{endTime,jdbcType=VARCHAR}, #{expend,jdbcType=OTHER}, #{feeAmt,jdbcType=DECIMAL}, #{endTime,jdbcType=VARCHAR}, #{expend,jdbcType=OTHER}, #{feeAmt,jdbcType=DECIMAL},
#{orderNo,jdbcType=VARCHAR}, #{outTransId,jdbcType=VARCHAR}, #{partyOrderId,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{outTransId,jdbcType=VARCHAR}, #{partyOrderId,jdbcType=VARCHAR},
#{payAmt,jdbcType=DECIMAL}, #{payChannel,jdbcType=VARCHAR}, #{realAmt,jdbcType=DECIMAL}, #{payAmt,jdbcType=DECIMAL}, #{payChannel,jdbcType=VARCHAR}, #{realAmt,jdbcType=DECIMAL},
@@ -51,6 +52,9 @@
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.AdapayCallbackRecord" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.AdapayCallbackRecord" useGeneratedKeys="true">
insert into adapay_callback_record insert into adapay_callback_record
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="paymentId != null">
payment_id,
</if>
<if test="appId != null"> <if test="appId != null">
app_id, app_id,
</if> </if>
@@ -104,6 +108,9 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="paymentId != null">
#{paymentId,jdbcType=VARCHAR},
</if>
<if test="appId != null"> <if test="appId != null">
#{appId,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR},
</if> </if>
@@ -160,6 +167,9 @@
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.AdapayCallbackRecord"> <update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.AdapayCallbackRecord">
update adapay_callback_record update adapay_callback_record
<set> <set>
<if test="paymentId != null">
payment_id = #{paymentId,jdbcType=VARCHAR},
</if>
<if test="appId != null"> <if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR}, app_id = #{appId,jdbcType=VARCHAR},
</if> </if>
@@ -216,7 +226,8 @@
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.AdapayCallbackRecord"> <update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.AdapayCallbackRecord">
update adapay_callback_record update adapay_callback_record
set app_id = #{appId,jdbcType=VARCHAR}, set payment_id = #{paymentId,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR},
created_time = #{createdTime,jdbcType=VARCHAR}, created_time = #{createdTime,jdbcType=VARCHAR},
end_time = #{endTime,jdbcType=VARCHAR}, end_time = #{endTime,jdbcType=VARCHAR},