Copilot commented on code in PR #7038:
URL: https://github.com/apache/shenyu/pull/7038#discussion_r4032584383


##########
shenyu-admin/src/main/resources/mappers/alert-receiver-sqlmap.xml:
##########
@@ -125,6 +125,39 @@
         FROM alert_receiver
         WHERE id = #{id, jdbcType=VARCHAR}
     </select>
+    <update id="updateByPrimaryKeySelective" 
parameterType="org.apache.shenyu.admin.model.entity.AlertReceiverDO">
+        update alert_receiver
+        <set>
+            <if test="name != null">name = #{name,jdbcType=VARCHAR},</if>
+            <if test="type != null">type = #{type,jdbcType=TINYINT},</if>
+            <if test="phone != null">phone = #{phone,jdbcType=VARCHAR},</if>
+            <if test="email != null">email = #{email,jdbcType=VARCHAR},</if>
+            <if test="hookUrl != null">hook_url = 
#{hookUrl,jdbcType=VARCHAR},</if>
+            <if test="wechatId != null">wechat_id = 
#{wechatId,jdbcType=VARCHAR},</if>
+            <if test="accessToken != null">access_token = 
#{accessToken,jdbcType=TINYINT},</if>

Review Comment:
   `accessToken` is a `String` (and the resultMap already maps `access_token` 
as `jdbcType=VARCHAR`), but the new selective update binds it as 
`jdbcType=TINYINT`. This type mismatch can cause JDBC conversion errors or 
incorrect values when updating DingTalk robot access tokens. Align the 
parameter JDBC type with the column mapping.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to