Browse Source

1、修改交易

zhoux 1 year ago
parent
commit
7b78aa1b24

+ 2 - 0
src/main/java/com/dk/oauth/mapper/TradeMapper.java

@@ -31,5 +31,7 @@ public interface TradeMapper extends BaseMapper<Trade> {
      */
      */
     Trade selectById(@Param("id") Integer id);
     Trade selectById(@Param("id") Integer id);
 
 
+    int updateById(Trade t);
+
 
 
 }
 }

+ 8 - 0
src/main/resources/mapper/TradeMapper.xml

@@ -116,6 +116,14 @@
         <include refid="Condition"/>
         <include refid="Condition"/>
     </select>
     </select>
 
 
+    <!-- 更新数据-->
+    <update id="updateById">
+        update dkic_a.t_cp_trade set
+            wx_trade_no = #{wxTradeNo},
+            trade_status = #{tradeStatus}
+        where trade_id = #{tradeId}
+    </update>
+
     <!-- 查询表t_cp_trade,根据交易单号查数据 -->
     <!-- 查询表t_cp_trade,根据交易单号查数据 -->
     <select id="selectTradeByNo" resultMap="BaseResultMap">
     <select id="selectTradeByNo" resultMap="BaseResultMap">
         SELECT
         SELECT