智能仲裁后端服务

DeptIdentifyMapper.xml 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper">
  6. <resultMap type="DeptIdentify" id="DeptIdentifyResult">
  7. <id property="id" column="id" />
  8. <result property="identifyStatus" column="identify_status" />
  9. <result property="identifyDate" column="identify_date" />
  10. <result property="isUse" column="is_use" />
  11. <result property="orgId" column="org_id" />
  12. <result property="authFlowId" column="auth_flow_id" />
  13. <result property="identifyName" column="identify_name" />
  14. <result property="operName" column="oper_name" />
  15. <result property="operPhone" column="oper_phone" />
  16. <result property="identifyType" column="identify_type" />
  17. </resultMap>
  18. <select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
  19. SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
  20. oper_name,oper_phone,identify_type
  21. FROM dept_identify
  22. <where>
  23. <if test="id != null">
  24. AND id = #{id}
  25. </if>
  26. <if test="identifyStatus != null">
  27. AND identify_status = #{identifyStatus}
  28. </if>
  29. <if test="isUse != null">
  30. AND is_use = #{isUse}
  31. </if>
  32. <if test="identifyName != null and identifyName != ''">
  33. AND identify_name = #{identifyName}
  34. </if>
  35. <if test="operName != null and operName != ''">
  36. AND oper_name = #{operName}
  37. </if>
  38. <if test="operPhone != null and operPhone != ''">
  39. AND oper_phone = #{operPhone}
  40. </if>
  41. AND identify_type = 1
  42. </where>
  43. </select>
  44. <insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
  45. insert into dept_identify(
  46. <if test="identifyName != null and identifyName != ''">identify_name,</if>
  47. <if test="identifyStatus != null">identify_status,</if>
  48. <if test="identifyDate != null">identify_date,</if>
  49. <if test="isUse != null">is_use,</if>
  50. <if test="orgId != null and orgId != ''">org_id,</if>
  51. <if test="operName != null and operName != ''">oper_name,</if>
  52. <if test="operPhone != null and operPhone != ''">oper_phone,</if>
  53. <if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
  54. <if test="identifyType != null">identify_type</if>
  55. )values(
  56. <if test="identifyName != null and identifyName != ''">#{identifyName},</if>
  57. <if test="identifyStatus != null">#{identifyStatus},</if>
  58. <if test="identifyDate != null">#{identifyDate},</if>
  59. <if test="isUse != null">#{isUse},</if>
  60. <if test="orgId != null and orgId != ''">#{orgId},</if>
  61. <if test="operName != null and operName != ''">#{operName},</if>
  62. <if test="operPhone != null and operPhone != ''">#{operPhone},</if>
  63. <if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
  64. <if test="identifyType != null ">#{identifyType}</if>
  65. )
  66. </insert>
  67. <update id="updateDeptIdentify" parameterType="DeptIdentify">
  68. update dept_identify
  69. <set>
  70. <if test="identifyDate != null">identify_date = #{identifyDate},</if>
  71. <if test="isUse != null">is_use = #{isUse},</if>
  72. <if test="identifyStatus != null ">identify_status = #{identifyStatus},</if>
  73. <if test="orgId != null and orgId != ''">org_id = #{orgId},</if>
  74. <if test="authFlowId != null and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
  75. </set>
  76. <where>
  77. <if test="id != null">
  78. AND id = #{id}
  79. </if>
  80. </where>
  81. </update>
  82. </mapper>