Guiji_civiladministration_Mapper2.xml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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.sooka.mapper.Guiji_civiladministration_Mapper">
  4. <sql id="global_name">
  5. id,create_time,cd_time,cd_batch,cd_operation,cd_source,
  6. </sql>
  7. <sql id="global_value">
  8. #{id},now(),#{cd_time},#{cd_batch},#{cd_operation},#{cd_source},
  9. </sql>
  10. <sql id="update_sql">
  11. create_time = now(),cd_batch = #{cd_batch},cd_operation = #{cd_operation},cd_source =#{cd_source},
  12. </sql>
  13. <parameterMap id="pm_szxxsj" type="com.sooka.model.bo.Guiji_civiladministration_szxxsj_Bean"></parameterMap>
  14. <insert id="add_guiji_civiladministration_szxxsj" parameterMap="pm_szxxsj">
  15. insert into t_guiji_civiladministration_szxxsj (
  16. <include refid="global_name"></include>
  17. DNAME,DSFZH,DSEX,DMZ,DAGE,BIRTH,DHJLY,DXZQH,ADDRESS,DTIME,DREASON,DADDRESS,
  18. HHSJ,RELATIONSHIP,LINKMAN,LINKMANPHONE,LINKMANADDRESS,OPERTM,OPERID,OPERDW)
  19. values (
  20. <include refid="global_value"></include>
  21. #{DNAME},#{DSFZH},#{DSEX},#{DMZ},#{DAGE},#{BIRTH},#{DHJLY},#{DXZQH},#{ADDRESS},
  22. #{DTIME},#{DREASON},#{DADDRESS},#{HHSJ},#{RELATIONSHIP},#{LINKMAN},#{LINKMANPHONE},
  23. #{LINKMANADDRESS},#{OPERTM},#{OPERID},#{OPERDW}
  24. )
  25. </insert>
  26. <update id="update_guiji_civiladministration_szxxsj" parameterMap="pm_szxxsj">
  27. update t_guiji_civiladministration_szxxsj
  28. <trim prefix="SET" suffixOverrides=",">
  29. <include refid="update_sql"></include>
  30. <if test="DNAME != null and DNAME != ''">
  31. DSFZH = #{DSFZH},
  32. </if>
  33. <if test="DSEX != null and DSEX != ''">
  34. DSEX = #{DSEX},
  35. </if>
  36. <if test="DMZ != null and DMZ != ''">
  37. DMZ = #{DMZ},
  38. </if>
  39. <if test="DAGE != null and DAGE != ''">
  40. DAGE = #{DAGE},
  41. </if>
  42. <if test="BIRTH != null and BIRTH != ''">
  43. BIRTH = #{BIRTH},
  44. </if>
  45. <if test="DHJLY != null and DHJLY != ''">
  46. DHJLY = #{DHJLY},
  47. </if>
  48. <if test="DXZQH != null and DXZQH != ''">
  49. DXZQH = #{DXZQH},
  50. </if>
  51. <if test="ADDRESS != null and ADDRESS != ''">
  52. ADDRESS = #{ADDRESS},
  53. </if>
  54. <if test="DTIME != null and DTIME != ''">
  55. DTIME = #{DTIME},
  56. </if>
  57. <if test="DREASON != null and DREASON != ''">
  58. DREASON = #{DREASON},
  59. </if>
  60. <if test="HHSJ != null and HHSJ != ''">
  61. HHSJ = #{HHSJ},
  62. </if>
  63. <if test="DADDRESS != null and DADDRESS != ''">
  64. DADDRESS = #{DADDRESS},
  65. </if>
  66. <if test="RELATIONSHIP != null and RELATIONSHIP != ''">
  67. RELATIONSHIP = #{RELATIONSHIP},
  68. </if>
  69. <if test="LINKMAN != null and LINKMAN != ''">
  70. LINKMAN = #{LINKMAN},
  71. </if>
  72. <if test="LINKMANPHONE != null and LINKMANPHONE != ''">
  73. LINKMANPHONE = #{LINKMANPHONE},
  74. </if>
  75. <if test="LINKMANADDRESS != null and LINKMANADDRESS != ''">
  76. LINKMANADDRESS = #{LINKMANADDRESS},
  77. </if>
  78. <if test="OPERTM != null and OPERTM != ''">
  79. OPERTM = #{OPERTM},
  80. </if>
  81. <if test="OPERID != null and OPERID != ''">
  82. OPERID = #{OPERID},
  83. </if>
  84. <if test="OPERDW != null and OPERDW != ''">
  85. OPERDW = #{OPERDW},
  86. </if>
  87. </trim>
  88. where id=#{id}
  89. </update>
  90. </mapper>