mybatis xml 中的 大于、小于、等于 写法
lambdaQuery中EQ、NE、GT、LT、GE、LE的用法
mybatis 批量更新操作
单条更新
xml
<update id="updateBatchById">
<foreach collection="list" item="item" index="index" separator=";">
update od_user_money set
money = #{item.money},
add_lng_amount = #{item.addLngAmount},
version = version+1
where id = #{item.id} and version = #{version}
</foreach>
</update>
Mapper
java
Integer updateBatchById(List<OdUserMoney> list);
一次性更新
xml
<update id="updateBatchV1">
update od_user_money
<trim prefix="set" suffixOverrides=",">
<trim prefix="money=case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.money!=null">
when id=#{item.id} then #{item.money}
</if>
</foreach>
</trim>
<trim prefix="add_lng_amount =case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.addLngAmount!=null">
when id=#{item.id} then #{item.addLngAmount}
</if>
</foreach>
</trim>
</trim>
,version = version+1
where id in
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
#{item.id}
</foreach>
</update>
Mapper
java
Integer updateBatchV1(List<OdUserMoney> list);
https://github.com/macrozheng/mall-swarm springcloud学习教程
https://blog.51cto.com/youlai/4903483?articleABtest=0 鉴权参考
https://blog.51cto.com/u_13675550/6172189?articleABtest=0 鉴权参考
https://blog.51cto.com/u_15284359/4935578?articleABtest=0 鉴权参考
https://blog.51cto.com/u_15973676/6074600?articleABtest=0 鉴权参考
http://t.csdnimg.cn/IrsAh springboot+oauth2.0
keytool -genkey -alias android.key -keyalg RSA -validity 36500 -keystore D:/rsa/android.key
keytool -genkey -alias jwt -keyalg RSA -validity 36500 -keystore D:/rsa/jwt.jks
keytool -importkeystore -srckeystore D:/rsa/jwt.jks -destkeystore D:/rsa/jwt.jks -deststoretype pkcs12
已将 "D:/rsa/jwt.jks" 迁移到 Non JKS/JCEKS。将 JKS 密钥库作为 "D:/rsa/jwt.jks.old" 进行了备份