From fc1a066edd335345167df7573f9119ef8dd1689a Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Thu, 10 Jul 2025 17:36:47 +0800
Subject: [PATCH] 小程序:微信授权登录角色处理

---
 oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml
index 1611552..c975d0e 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml
@@ -3,9 +3,10 @@
 <mapper namespace="com.oying.modules.sh.mapper.OrderOperationLogMapper">
     <resultMap id="BaseResultMap" type="com.oying.modules.sh.domain.OrderOperationLog">
         <id column="log_id" property="logId"/>
-        <result column="user_id" property="userId"/>
+        <result column="username" property="username"/>
         <result column="user_type" property="userType"/>
         <result column="operation" property="operation"/>
+        <result column="operation_describe" property="operationDescribe"/>
         <result column="remark" property="remark"/>
         <result column="snapshot_data" property="snapshotData"/>
         <result column="operation_time" property="operationTime"/>
@@ -13,7 +14,7 @@
     </resultMap>
 
     <sql id="Base_Column_List">
-        log_id, user_id, user_type, operation, remark, snapshot_data, operation_time, order_num
+        log_id, username, user_type, operation, operation_describe, remark, snapshot_data, operation_time, order_num
     </sql>
 
     <select id="findAll" resultMap="BaseResultMap">
@@ -21,8 +22,8 @@
         <include refid="Base_Column_List"/>
         from sh_order_operation_log
         <where>
-            <if test="criteria.userId != null">
-                and user_id = #{criteria.userId}
+            <if test="criteria.username != null">
+                and username like concat('%',#{criteria.username},'%')
             </if>
             <if test="criteria.userType != null">
                 and user_type = #{criteria.userType}
@@ -36,4 +37,10 @@
         </where>
         order by log_id desc
     </select>
-</mapper>
\ No newline at end of file
+    <select id="getByOrderNum" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from sh_order_operation_log
+        where order_num = #{orderNum} order by log_id desc
+    </select>
+</mapper>

--
Gitblit v1.9.3