AdminLogMapper.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.juxiao.xchat.module.xbd.mapper.log.AdminLogMapper">
  6. <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.log.AdminLog" >
  7. <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
  8. SELECT LAST_INSERT_ID()
  9. </selectKey>
  10. insert into admin_log
  11. <trim prefix="(" suffix=")" suffixOverrides="," >
  12. <if test="optUid != null" >
  13. opt_uid,
  14. </if>
  15. <if test="optClass != null" >
  16. opt_class,
  17. </if>
  18. <if test="optMethod != null" >
  19. opt_method,
  20. </if>
  21. <if test="optMess != null" >
  22. opt_mess,
  23. </if>
  24. <if test="createTime != null" >
  25. create_time,
  26. </if>
  27. <if test="tmpint != null" >
  28. tmpint,
  29. </if>
  30. <if test="tmpstr != null" >
  31. tmpstr,
  32. </if>
  33. </trim>
  34. <trim prefix="values (" suffix=")" suffixOverrides="," >
  35. <if test="optUid != null" >
  36. #{optUid,jdbcType=INTEGER},
  37. </if>
  38. <if test="optClass != null" >
  39. #{optClass,jdbcType=VARCHAR},
  40. </if>
  41. <if test="optMethod != null" >
  42. #{optMethod,jdbcType=VARCHAR},
  43. </if>
  44. <if test="optMess != null" >
  45. #{optMess,jdbcType=VARCHAR},
  46. </if>
  47. <if test="createTime != null" >
  48. #{createTime,jdbcType=TIMESTAMP},
  49. </if>
  50. <if test="tmpint != null" >
  51. #{tmpint,jdbcType=INTEGER},
  52. </if>
  53. <if test="tmpstr != null" >
  54. #{tmpstr,jdbcType=VARCHAR},
  55. </if>
  56. </trim>
  57. </insert>
  58. </mapper>