CompanyExamineMapper.xml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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.dgtly.companyext.mapper.CompanyExamineMapper">
  6. <resultMap type="CompanyExamine" id="CompanyExamineResult">
  7. <result property="id" column="id" />
  8. <result property="companyReviewedId" column="company_reviewed_id" />
  9. <result property="status" column="status" />
  10. <result property="applyDate" column="apply_date" />
  11. <result property="examineDate" column="examine_date" />
  12. <result property="rejectReason" column="reject_reason" />
  13. <result property="createBy" column="create_by" />
  14. <result property="createTime" column="create_time" />
  15. <result property="updateBy" column="update_by" />
  16. <result property="updateTime" column="update_time" />
  17. <result property="remark" column="remark" />
  18. </resultMap>
  19. <sql id="selectCompanyExamineVo">
  20. select id, company_reviewed_id, status, examine_date, reject_reason, create_by, create_time, update_by, update_time, remark from company_examine
  21. </sql>
  22. <select id="selectCompanyExamineById" parameterType="Long" resultMap="CompanyExamineResult">
  23. <include refid="selectCompanyExamineVo"/>
  24. where id = #{id}
  25. </select>
  26. <insert id="insertCompanyExamine" parameterType="CompanyExamine" useGeneratedKeys="true" keyProperty="id">
  27. insert into company_examine
  28. <trim prefix="(" suffix=")" suffixOverrides=",">
  29. examine_date,
  30. create_time,
  31. <if test="companyReviewedId != null ">company_reviewed_id,</if>
  32. <if test="status != null ">status,</if>
  33. <if test="rejectReason != null and rejectReason != ''">reject_reason,</if>
  34. <if test="createBy != null and createBy != ''">create_by,</if>
  35. <if test="updateBy != null and updateBy != ''">update_by,</if>
  36. <if test="updateTime != null ">update_time,</if>
  37. <if test="remark != null and remark != ''">remark,</if>
  38. </trim>
  39. <trim prefix="values (" suffix=")" suffixOverrides=",">
  40. now(),
  41. now(),
  42. <if test="companyReviewedId != null ">#{companyReviewedId},</if>
  43. <if test="status != null ">#{status},</if>
  44. <if test="rejectReason != null and rejectReason != ''">#{rejectReason},</if>
  45. <if test="createBy != null and createBy != ''">#{createBy},</if>
  46. <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
  47. <if test="updateTime != null ">#{updateTime},</if>
  48. <if test="remark != null and remark != ''">#{remark},</if>
  49. </trim>
  50. </insert>
  51. <update id="updateCompanyExamine" parameterType="CompanyExamine">
  52. update company_examine
  53. <trim prefix="SET" suffixOverrides=",">
  54. <if test="status != null ">status = #{status},</if>
  55. <if test="rejectReason != null and rejectReason != ''">reject_reason = #{rejectReason},</if>
  56. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  57. update_time = NOW(),
  58. </trim>
  59. where id = #{id}
  60. </update>
  61. <delete id="deleteCompanyExamineById" parameterType="Long">
  62. delete from company_examine where id = #{id}
  63. </delete>
  64. <delete id="deleteCompanyExamineByIds" parameterType="String">
  65. delete from company_examine where id in
  66. <foreach item="id" collection="array" open="(" separator="," close=")">
  67. #{id}
  68. </foreach>
  69. </delete>
  70. </mapper>