DishJi opened a new issue #8361:
URL: https://github.com/apache/shardingsphere/issues/8361


   **Version**
   Springboot2.2.9 | mybatis-plus| sharding-jdbc-spring-boot-starter 4.1.1
   
   **Mybatis.xml**
   ```
   <update id="updateForListApi" parameterType="java.util.Map">
        UPDATE user_record
           <trim prefix="set" suffixOverrides=",">
               <trim prefix="synchroPoint =case" suffix="end,">
                   <foreach collection="list" item="item" index="index">
                       <if test="item.synchroPoint!=null">
                           when (id=#{item.id}) then #{item.synchroPoint}
                       </if>
                   </foreach>
               </trim>
           </trim>
           WHERE
            user_id=#{userId}
           and id IN
           <foreach collection="list" item="item" index="index" separator="," 
open="(" close=")">
               #{item.id}
           </foreach>
   </update>
   ```
   
   **Parameter Value**
   
![image](https://user-images.githubusercontent.com/26064998/100331909-b0910680-300b-11eb-9f7d-00dc7b353f61.png)
   
   **preciseShardingValue**
   
![image](https://user-images.githubusercontent.com/26064998/100332002-ce5e6b80-300b-11eb-90e2-f397eb379570.png)
   
   The value of userId cannot be obtained correctly, but when I fix the value 
of userId  in mybatis.xml, preciseShardingValue can be obtained correctly.
   
   For example
   
   
![image](https://user-images.githubusercontent.com/26064998/100332872-e2ef3380-300c-11eb-93c6-cbea55436bc0.png)
   
![image](https://user-images.githubusercontent.com/26064998/100332931-f6020380-300c-11eb-8389-1bd8893ada1c.png)
   
   
   


----------------------------------------------------------------
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.

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


Reply via email to