AuthApplyMapper.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.ruoyi.tool.mapper.AuthApplyMapper">
  4. <resultMap id="BaseResultMap" type="com.ruoyi.tool.domain.AuthApply">
  5. <!--@mbg.generated-->
  6. <!--@Table auth_apply-->
  7. <id column="id" jdbcType="BIGINT" property="id" />
  8. <result column="applicant" jdbcType="VARCHAR" property="applicant" />
  9. <result column="status" jdbcType="INTEGER" property="status" />
  10. <result column="create_by" jdbcType="VARCHAR" property="createBy" />
  11. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  12. <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
  13. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  14. <result column="remark" jdbcType="VARCHAR" property="remark" />
  15. <result column="corp_id" jdbcType="VARCHAR" property="corpId" />
  16. </resultMap>
  17. <sql id="Base_Column_List">
  18. <!--@mbg.generated-->
  19. id, applicant, `status`, create_by, create_time, update_by, update_time, remark,
  20. corp_id
  21. </sql>
  22. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  23. <!--@mbg.generated-->
  24. select
  25. <include refid="Base_Column_List" />
  26. from auth_apply
  27. where id = #{id,jdbcType=BIGINT}
  28. </select>
  29. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  30. <!--@mbg.generated-->
  31. delete from auth_apply
  32. where id = #{id,jdbcType=BIGINT}
  33. </delete>
  34. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.tool.domain.AuthApply" useGeneratedKeys="true">
  35. <!--@mbg.generated-->
  36. insert into auth_apply (applicant, `status`, create_by,
  37. create_time, update_by, update_time,
  38. remark, corp_id)
  39. values (#{applicant,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
  40. #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
  41. #{remark,jdbcType=VARCHAR}, #{corpId,jdbcType=VARCHAR})
  42. </insert>
  43. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.tool.domain.AuthApply" useGeneratedKeys="true">
  44. <!--@mbg.generated-->
  45. insert into auth_apply
  46. <trim prefix="(" suffix=")" suffixOverrides=",">
  47. <if test="applicant != null and applicant != ''">
  48. applicant,
  49. </if>
  50. <if test="status != null">
  51. `status`,
  52. </if>
  53. <if test="createBy != null and createBy != ''">
  54. create_by,
  55. </if>
  56. <if test="createTime != null">
  57. create_time,
  58. </if>
  59. <if test="updateBy != null and updateBy != ''">
  60. update_by,
  61. </if>
  62. <if test="updateTime != null">
  63. update_time,
  64. </if>
  65. <if test="remark != null and remark != ''">
  66. remark,
  67. </if>
  68. <if test="corpId != null and corpId != ''">
  69. corp_id,
  70. </if>
  71. </trim>
  72. <trim prefix="values (" suffix=")" suffixOverrides=",">
  73. <if test="applicant != null and applicant != ''">
  74. #{applicant,jdbcType=VARCHAR},
  75. </if>
  76. <if test="status != null">
  77. #{status,jdbcType=INTEGER},
  78. </if>
  79. <if test="createBy != null and createBy != ''">
  80. #{createBy,jdbcType=VARCHAR},
  81. </if>
  82. <if test="createTime != null">
  83. #{createTime,jdbcType=TIMESTAMP},
  84. </if>
  85. <if test="updateBy != null and updateBy != ''">
  86. #{updateBy,jdbcType=VARCHAR},
  87. </if>
  88. <if test="updateTime != null">
  89. #{updateTime,jdbcType=TIMESTAMP},
  90. </if>
  91. <if test="remark != null and remark != ''">
  92. #{remark,jdbcType=VARCHAR},
  93. </if>
  94. <if test="corpId != null and corpId != ''">
  95. #{corpId,jdbcType=VARCHAR},
  96. </if>
  97. </trim>
  98. </insert>
  99. <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.tool.domain.AuthApply">
  100. <!--@mbg.generated-->
  101. update auth_apply
  102. <set>
  103. <if test="applicant != null and applicant != ''">
  104. applicant = #{applicant,jdbcType=VARCHAR},
  105. </if>
  106. <if test="status != null">
  107. `status` = #{status,jdbcType=INTEGER},
  108. </if>
  109. <if test="createBy != null and createBy != ''">
  110. create_by = #{createBy,jdbcType=VARCHAR},
  111. </if>
  112. <if test="createTime != null">
  113. create_time = #{createTime,jdbcType=TIMESTAMP},
  114. </if>
  115. <if test="updateBy != null and updateBy != ''">
  116. update_by = #{updateBy,jdbcType=VARCHAR},
  117. </if>
  118. <if test="updateTime != null">
  119. update_time = #{updateTime,jdbcType=TIMESTAMP},
  120. </if>
  121. <if test="remark != null and remark != ''">
  122. remark = #{remark,jdbcType=VARCHAR},
  123. </if>
  124. <if test="corpId != null and corpId != ''">
  125. corp_id = #{corpId,jdbcType=VARCHAR},
  126. </if>
  127. </set>
  128. where id = #{id,jdbcType=BIGINT}
  129. </update>
  130. <update id="updateByPrimaryKey" parameterType="com.ruoyi.tool.domain.AuthApply">
  131. <!--@mbg.generated-->
  132. update auth_apply
  133. set applicant = #{applicant,jdbcType=VARCHAR},
  134. `status` = #{status,jdbcType=INTEGER},
  135. create_by = #{createBy,jdbcType=VARCHAR},
  136. create_time = #{createTime,jdbcType=TIMESTAMP},
  137. update_by = #{updateBy,jdbcType=VARCHAR},
  138. update_time = #{updateTime,jdbcType=TIMESTAMP},
  139. remark = #{remark,jdbcType=VARCHAR},
  140. corp_id = #{corpId,jdbcType=VARCHAR}
  141. where id = #{id,jdbcType=BIGINT}
  142. </update>
  143. <!--auto generated by MybatisCodeHelper on 2024-06-06-->
  144. <select id="selectByStatusAndCorpId" resultMap="BaseResultMap">
  145. select
  146. id, applicant, `status`, create_by AS createBy,
  147. create_time AS createTime, update_by AS updateBy,
  148. update_time AS updateTime, remark ,
  149. corp_id AS corpId,se.nick_name as nickName
  150. from auth_apply aa
  151. left join sys_user se on aa.applicant = se.employ_no
  152. where aa.`status`=#{status,jdbcType=INTEGER} and aa.corp_id=#{corpId,jdbcType=VARCHAR}
  153. </select>
  154. </mapper>