UserInfoMapper.xml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.crm.manager.dao.mapper.UserInfoMapper">
  6. <!-- 根据ID更新user_info表的动态SQL -->
  7. <update id="updateById">
  8. UPDATE user_info
  9. <set>
  10. <if test="username != null and username != ''">username = #{username},</if>
  11. <if test="password != null and password != ''">password = #{password},</if>
  12. <if test="name != null">name = #{name},</if>
  13. <if test="secretKey != null">secret_key = #{secretKey},</if>
  14. <if test="nationality != null">nationality = #{nationality},</if>
  15. <if test="roleId != null">role_id = #{roleId},</if>
  16. <if test="lang != null">lang = #{lang},</if>
  17. <if test="groupId != null">group_id = #{groupId},</if>
  18. <if test="valid != null">valid = #{valid},</if>
  19. <if test="userType != null">user_type = #{userType},</if>
  20. <if test="ipLimit != null">ip_limit = #{ipLimit},</if>
  21. <if test="limitIp != null">limit_ip = #{limitIp},</if>
  22. <if test="inRate != null">in_rate = #{inRate},</if>
  23. <if test="outRate != null">out_rate = #{outRate},</if>
  24. <if test="inProfitRate != null">in_profit_rate = #{inProfitRate},</if>
  25. <if test="outProfitRate != null">out_profit_rate = #{outProfitRate},</if>
  26. <if test="lastTime != null">last_time = #{lastTime},</if>
  27. <if test="lastIp != null">last_ip = #{lastIp},</if>
  28. <if test="lastAddress != null">last_address = #{lastAddress},</if>
  29. <if test="modifyTime != null">modify_time = #{modifyTime},</if>
  30. <if test="modifyUser != null">modify_user = #{modifyUser},</if>
  31. <if test="modifyIp != null">modify_ip = #{modifyIp},</if>
  32. <if test="note != null">note = #{note},</if>
  33. <if test="verified != null">verified = #{verified},</if>
  34. <if test="addressLine != null">address_line = #{addressLine},</if>
  35. <if test="areaCode != null">area_code = #{areaCode},</if>
  36. <if test="birth != null">birth = #{birth},</if>
  37. <if test="city != null">city = #{city},</if>
  38. <if test="country != null">country = #{country},</if>
  39. <if test="gender != null">gender = #{gender},</if>
  40. <if test="identity != null">identity = #{identity},</if>
  41. <if test="firstName != null">first_name = #{firstName},</if>
  42. <if test="lastName != null">last_name = #{lastName},</if>
  43. <if test="state != null">state = #{state},</if>
  44. <if test="zipCode != null">zip_code = #{zipCode},</if>
  45. <if test="cardType != null">card_type = #{cardType},</if>
  46. <if test="authStatus != null">auth_status = #{authStatus},</if>
  47. <if test="externalUserId != null">external_user_id = #{externalUserId},</if>
  48. <if test="kycVerifyUrl != null">kyc_verify_url = #{kycVerifyUrl},</if>
  49. <if test="status != null">status = #{status},</if>
  50. </set>
  51. WHERE id = #{id}
  52. </update>
  53. </mapper>