UserAuthenticationApprove.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <!-- namespace必须指向DAO接口 -->
  5. <mapper namespace="com.jpsoft.employment.modules.base.dao.UserAuthenticationApproveDAO">
  6. <resultMap id="UserAuthenticationApproveMap" type="com.jpsoft.employment.modules.base.entity.UserAuthenticationApprove">
  7. <id property="id" column="id_" />
  8. <result property="createBy" column="create_by" />
  9. <result property="createTime" column="create_time" />
  10. <result property="updateBy" column="update_by" />
  11. <result property="updateTime" column="update_time" />
  12. <result property="delFlag" column="del_flag" />
  13. <result property="jobUserId" column="job_user_id" />
  14. <result property="approvePersonId" column="approve_person_id" />
  15. <result property="approveTime" column="approve_time" />
  16. <result property="approvalStatus" column="approval_status" />
  17. </resultMap>
  18. <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.UserAuthenticationApprove">
  19. <!--
  20. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  21. select sys_guid() from dual
  22. </selectKey>
  23. -->
  24. <![CDATA[
  25. insert into base_user_authentication_approve
  26. (id_,create_by,create_time,update_by,update_time,del_flag,job_user_id,approve_person_id,approve_time,approval_status)
  27. values
  28. (
  29. #{id,jdbcType=VARCHAR}
  30. ,#{createBy,jdbcType=VARCHAR}
  31. ,#{createTime,jdbcType= TIMESTAMP }
  32. ,#{updateBy,jdbcType=VARCHAR}
  33. ,#{updateTime,jdbcType= TIMESTAMP }
  34. ,#{delFlag,jdbcType= NUMERIC }
  35. ,#{jobUserId,jdbcType=VARCHAR}
  36. ,#{approvePersonId,jdbcType=VARCHAR}
  37. ,#{approveTime,jdbcType= TIMESTAMP }
  38. ,#{approvalStatus,jdbcType=VARCHAR}
  39. )
  40. ]]>
  41. </insert>
  42. <delete id="delete" parameterType="string">
  43. delete from base_user_authentication_approve where id_=#{id,jdbcType=VARCHAR}
  44. </delete>
  45. <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.UserAuthenticationApprove">
  46. update base_user_authentication_approve
  47. <set>
  48. <if test="createBy!=null">
  49. create_by=#{createBy,jdbcType=VARCHAR},
  50. </if>
  51. <if test="createTime!=null">
  52. create_time=#{createTime,jdbcType= TIMESTAMP },
  53. </if>
  54. <if test="updateBy!=null">
  55. update_by=#{updateBy,jdbcType=VARCHAR},
  56. </if>
  57. <if test="updateTime!=null">
  58. update_time=#{updateTime,jdbcType= TIMESTAMP },
  59. </if>
  60. <if test="delFlag!=null">
  61. del_flag=#{delFlag,jdbcType= NUMERIC },
  62. </if>
  63. <if test="jobUserId!=null">
  64. job_user_id=#{jobUserId,jdbcType=VARCHAR},
  65. </if>
  66. <if test="approvePersonId!=null">
  67. approve_person_id=#{approvePersonId,jdbcType=VARCHAR},
  68. </if>
  69. <if test="approveTime!=null">
  70. approve_time=#{approveTime,jdbcType= TIMESTAMP },
  71. </if>
  72. <if test="approvalStatus!=null">
  73. approval_status=#{approvalStatus,jdbcType=VARCHAR},
  74. </if>
  75. </set>
  76. where id_=#{id}
  77. </update>
  78. <select id="get" parameterType="string" resultMap="UserAuthenticationApproveMap">
  79. select * from base_user_authentication_approve where id_=#{0}
  80. </select>
  81. <select id="exist" parameterType="string" resultType="int">
  82. select count(*) from base_user_authentication_approve where id_=#{0}
  83. </select>
  84. <select id="list" resultMap="UserAuthenticationApproveMap">
  85. select * from base_user_authentication_approve
  86. </select>
  87. <select id="search" parameterType="hashmap" resultMap="UserAuthenticationApproveMap">
  88. <![CDATA[
  89. select * from base_user_authentication_approve
  90. ]]>
  91. <where>
  92. <if test="searchParams.approvalStatus != null">
  93. and approval_status = #{searchParams.approvalStatus}
  94. </if>
  95. </where>
  96. <foreach item="sort" collection="sortList" open="order by" separator=",">
  97. ${sort.name} ${sort.order}
  98. </foreach>
  99. </select>
  100. <select id="findByUserId" parameterType="string" resultMap="UserAuthenticationApproveMap">
  101. select * from base_user_authentication_approve
  102. where del_flag = 0
  103. and job_user_id = #{0}
  104. limit 1
  105. </select>
  106. </mapper>